From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: orgmode <emacs-orgmode@gnu.org>
Subject: [Small suggestion] on exporting verse blocks to LaTeX and vertical spaces
Date: Tue, 15 Dec 2020 18:21:13 +0100 [thread overview]
Message-ID: <87k0tjasty.fsf@posteo.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1991 bytes --]
Hi,
When exporting a verse block to LaTeX, each empty line between
'stanzas' results in the command =\vspace*{1em}=, which is fine.
However, I would dare to suggest that, in order to be more consistent
with the LaTeX `verse' environment (both the one that comes by
default and the one provided by the verse.sty package) the separation
between stanzas should be marked with:
- the last line of the stanza without =\\=
- + one (at least) empty line
which is the correct (or at least the most common) way to separate the
stanzas within this environment, since each stanza is still a
paragraph whose lines are cut off. Thus, we could also redefine
globally the \stanzaskip length provided by the verse.sty package
(i.e. \setlength{\stanzaskip}{1.2em plus .2em minus .5em}, etc.).
For example, with this (the number of white lines does not matter):
#+begin_src org
,#+begin_verse
Lorem ipsum dolor sit amet
consectetuer adipiscing elit
Lorem ipsum dolor sit amet
consectetuer adipiscing elit
Lorem ipsum dolor sit amet
consectetuer adipiscing elit
Lorem ipsum dolor sit amet
consectetuer adipiscing elit
,#+end_verse
#+end_src
we should get:
#+begin_src latex
\begin{verse}
Lorem ipsum dolor sit amet\\
consectetuer adipiscing elit\\
Lorem ipsum dolor sit amet\\
consectetuer adipiscing elit
Lorem ipsum dolor sit amet\\
consectetuer adipiscing elit\\
Lorem ipsum dolor sit amet\\
consectetuer adipiscing elit\\
\end{verse}
#+end_src
Perhaps replacing these lines in =org-latex-verse-block=
#+begin_src emacs-lisp
(replace-regexp-in-string
"^[ \t]*\\\\\\\\$" "\\vspace*{1em}"
#+end_src
with something like this
#+begin_src emacs-lisp
(replace-regexp-in-string
"\\(\\\\\\\\\n\\)+\\([ \t]*\\\\\\\\\\)+" "\n"
#+end_src
?
(On the other hand, I also think that vertical spaces between groups
of lines in verse blocks should always be exported to any format as
a single fixed space, regardless of how many empty lines there are).
Regards,
Juan Manuel
[-- Attachment #2: Type: text/html, Size: 0 bytes --]
reply other threads:[~2020-12-15 17:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87k0tjasty.fsf@posteo.net \
--to=maciaschain@posteo.net \
--cc=emacs-orgmode@gnu.org \
/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).