emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org, "Juan Manuel Macías" <maciaschain@posteo.net>
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	[thread overview]
Message-ID: <87r0hx8rpl.fsf@localhost> (raw)
In-Reply-To: <9ca74051-90b1-498f-92db-3d0730c1bc56@gmail.com>

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>


      reply	other threads:[~2024-01-31 15:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 23:46 [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export Juan Manuel Macías
2024-01-13 15:08 ` Ihor Radchenko
2024-01-13 16:05   ` Juan Manuel Macías
2024-01-13 18:28     ` Ihor Radchenko
2024-01-13 20:22       ` Juan Manuel Macías
2024-01-14 12:33         ` Ihor Radchenko
2024-01-14 21:58           ` Juan Manuel Macías
2024-01-16 14:09             ` Ihor Radchenko
2024-01-16 19:33               ` Juan Manuel Macías
2024-01-17 13:00                 ` Ihor Radchenko
2024-01-17 15:58                   ` Max Nikulin
2024-01-17 17:50                   ` Juan Manuel Macías
2024-01-18 13:05                     ` Ihor Radchenko
2024-01-19 17:28                       ` Juan Manuel Macías
2024-01-20 12:34                         ` Ihor Radchenko
2024-01-20 13:22                           ` Juan Manuel Macías
2024-01-20 13:46                             ` Ihor Radchenko
2024-01-20 15:41                               ` Juan Manuel Macías
2024-01-20 18:47                                 ` Ihor Radchenko
2024-01-20 20:27                                   ` Juan Manuel Macías
2024-01-21 13:42                                     ` Ihor Radchenko
2024-01-21 19:25                                       ` Juan Manuel Macías
2024-01-31 11:39                                       ` Ihor Radchenko
2024-01-21  6:06                                   ` Max Nikulin
2024-01-20 10:09                       ` Max Nikulin
2024-01-20 10:57                         ` Juan Manuel Macías
2024-01-20 12:41                         ` Ihor Radchenko
2024-01-21  5:56                           ` Max Nikulin
2024-01-20 10:27   ` Max Nikulin
2024-01-20 12:35     ` Ihor Radchenko
2024-01-21  5:44       ` Max Nikulin
2024-01-31 15:09         ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0hx8rpl.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=maciaschain@posteo.net \
    --cc=manikulin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).