[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: |
Ihor Radchenko |
Subject: |
Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export |
Date: |
Wed, 31 Jan 2024 15:09:42 +0000 |
Max Nikulin <manikulin@gmail.com> writes:
>>> 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.
This has nothing to do with what happens when exporting verse blocks.
If you try a simple example like
#+options: toc:nil
* Heading
First.
Foo
#+BEGIN_VERSE
From fairest creatures we desire increase,
That thereby beauty’s rose might never die,
#+END_VERSE
Bar
Foo
#+BEGIN_VERSE
From fairest creatures we desire increase,
That thereby beauty’s rose might never die,
#+END_VERSE
Bar
you will see that lading and trailing spaces are insignificant:
\section{Heading}
\label{sec:orgc54e19b}
First.
Foo
\begin{verse}
\hspace*{1\fontdimen2\font}From fairest creatures we desire increase,\\
That thereby beauty’s rose might never die,\\
\end{verse}
Bar
Foo
\begin{verse}
\hspace*{1\fontdimen2\font}From fairest creatures we desire increase,\\
That thereby beauty’s rose might never die,\\
\end{verse}
Bar
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export, (continued)
- Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export, Juan Manuel Macías, 2024/01/21
- Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export, Ihor Radchenko, 2024/01/31
- Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export, Max Nikulin, 2024/01/21
- Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export, Max Nikulin, 2024/01/20
- Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export, Juan Manuel Macías, 2024/01/20
- Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export, Ihor Radchenko, 2024/01/20
- Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export, Max Nikulin, 2024/01/21
- Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export, Max Nikulin, 2024/01/20