emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Antti Kaihola <akaihol+emacs@ambitone.com>
To: emacs-orgmode@gnu.org
Subject: Verse construct generates invalid LaTeX code
Date: Thu, 24 Sep 2009 13:10:32 +0300	[thread overview]
Message-ID: <20090924131032.46d1ce8a@ambitone.com> (raw)

Here's an example file:


-----------------------------versetest.org
Test case for verse bug

#+BEGIN_VERSE
This is
the first stanza.

This is
the second stanza.
#+END_VERSE
-----------------------------versetest.org


It generates the following LaTeX code with the C-c C-e L command
(excerpt with line numbers added):


-----------------------------versetest.tex
22: \begin{verse}
23: This is\\
24: the first stanza.\\
25: \\
26: This is\\
27: the second stanza.\\
28: \end{verse}
-----------------------------versetest.tex


When compiled with pdflatex, it causes this error:


-----------------------------pdflatex output
! LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.25 \\
-----------------------------pdflatex output


Org-mode probably instructs pdflatex to ignore errors since C-c C-e d
compiles the .org file just fine, just without any break between
the stanzas.

Edition 1.6 of the LaTeX2e documentation states:

  Separate the lines of each stanza with \\, and use one or more blank
  lines to separate the stanzas,

so the correct LaTeX output would be:


-----------------------------corrected versetest.tex
22: \begin{verse}
23: This is\\
24: the first stanza.
25: 
26: This is\\
27: the second stanza.
28: \end{verse}
-----------------------------corrected versetest.tex

             reply	other threads:[~2009-09-24 10:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 10:10 Antti Kaihola [this message]
2009-09-28 20:10 ` Verse construct generates invalid LaTeX code Carsten Dominik

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=20090924131032.46d1ce8a@ambitone.com \
    --to=akaihol+emacs@ambitone.com \
    --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).