emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] ox-latex.el: fix blank lines behavior in verse block


From: Juan Manuel Macías
Subject: Re: [patch] ox-latex.el: fix blank lines behavior in verse block
Date: Tue, 15 Aug 2023 11:50:13 +0000

Ihor Radchenko writes:

> Thanks!
> I tested the patch with
>
> #+attr_latex:  :literal t
>
> #+begin_verse
>
>  This is just           a test.
>       ASF. 
>    
> #+end_verse
>
>
> and then with
>
> #+attr_latex:  :literal t
>
> #+begin_verse
>
>  This is just           a test.
>
>       ASF. 
>    
> #+end_verse
>
> The output is not different, which it should be, AFAIU. Am I missing 
> something?

I have tried your examples and I think both give the expected result.
Look at this screenshot:

https://i.imgur.com/ofl8Z9f.png

Note one important thing: the only horizontal spaces that are exported
"literally" (ie with \hspace...) are the ones at the beginning of the
line. This is the same as the old behavior, and works with both :literal
and the verse environment. Spaces between words are not exported. Well,
they are exported, but not as \hspace, so LaTeX resolves one or more
space to a single space. It could be an interesting feature that spaces
between words are also preserved, but none of the other backends do
that... Actually the :literal attribute has effect only on blank lines.

(Anyway, I think that without exporting the spaces between words, the
:literal attribute is a bit incomplete. But if those spaces are
exported, it would break compatibility with the other backends. The
horizontal space before the line makes sense for verses, because these
can often be indented arbitrarily in a poem. The other possibility is
that the :literal attribute also exports to a verse environment. In that
case, it would not break compatibility [the verse block in LaTeX would
just have two "modes": one more coherent with the syntax of the verse
environment and another one more similar to the behavior of the rest of
the backends and the "old" verse block behavior in LaTeX export]).

-- 
Juan Manuel Macías

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]