[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A way to avoid unwanted new lines when using paragraph quotes?
From: |
Kashyap Chamarthy |
Subject: |
Re: A way to avoid unwanted new lines when using paragraph quotes? |
Date: |
Sun, 27 Dec 2020 22:15:25 +0100 |
On Sun, Dec 27, 2020 at 8:17 PM Juan Manuel Macías
<maciaschain@posteo.net> wrote:
>
> Hello again Kashyap,
Hey, Juan
> Kashyap Chamarthy <kashyap.cv@gmail.com> writes:
>
> > Hmm, that fixes the new line before the "sub bullet under test 3, with
> > a quote". However, a new line still remains after the quote ends (and
> > before the "Test 4" starts). Is it possible to nuke that too? If
> > not, that's okay, I can live with it. :-)
>
> I'd say a vertical space before and after a block quote would be
> 'typographically' correct.
You're right, and I agree.
> But if you want to eliminate the space after
> the block quote, without having to modify it in a general way, it could
> be solved with a bit of Elisp, by defining a custom filter so that the
> <blockquote> tag would be modified only within a plain list. Thus, with the
> configuration that Diego has suggested, everything would be without
> vertical space except the space before each block quote:
>
> #+BIND: org-export-filter-plain-list-functions (my-filter-html)
> #+begin_src emacs-lisp :exports results :results none
> (defun my-filter-html (text backend info)
> (when (org-export-derived-backend-p backend 'html)
> (replace-regexp-in-string "<blockquote>" "<blockquote
> style=\"margin-bottom:0px\">" text)))
> #+end_src
Thank you for the code snippet. My only use of Emacs is Org-Mode, so I
haven't spent much time learning Elisp yet.
Regards,
Kashyap