emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [possible patch] Remove the '\\[0pt]' string from the last line of a


From: Max Nikulin
Subject: Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export
Date: Sun, 21 Jan 2024 12:44:07 +0700
User-agent: Mozilla Thunderbird

On 20/01/2024 19:35, Ihor Radchenko wrote:
Max Nikulin writes:

Can anyone think of a possible scenario where removing the '\\[0pt]' in
the last line would cause a problem?

I would suggest to strip leading and trailing newlines before processing
of the block content.

May you elaborate?

I expect that

#+BEGIN_VERSE


From fairest creatures we desire increase,
That thereby beauty’s rose might never die,



#+END_VERSE

is exported to

\begin{verse}
From fairest creatures we desire increase,\\
That thereby beauty’s rose might never die,
\end{verse}

and internally at some point it is represented as
"From fairest creatures we desire increase,\nThat thereby beauty’s rose might never die,"
without leading and trailing newlines.

In such scenario, we may technically violate what users ask us to do:

#+begin_verse
I really want newline here\\
#+end_verse

I really want newline here@@latex:\\%@@

This implies that Org mode does not follow its own markup. I disagree
with such suggestion.

I do not see any use case for "\\" at the last line. Perhaps it might even cause an org-lint warning. From my point of view, it is preferable to require more verbose markup in special cases to make intentions explicit.



reply via email to

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