emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: James Harkins <jamshark70@gmail.com>
To: orgmode <emacs-orgmode@gnu.org>
Subject: LaTeX export: {} on separate lines are escaped, why?
Date: Sat, 27 Jul 2013 09:41:05 -0400	[thread overview]
Message-ID: <87li4s2k9a.wl%jamshark70@dewdrop-world.net> (raw)

Just wondering if there's a better way to handle LaTeX commands written inline, when the command arguments span a line break. Currently, LaTeX export preserves curly braces as is if a pair of them is on a single line, but it escapes them if there's a line break in between:

~~ org
Sections may be created as subpatches, using \inpcode{[route go
stop]} to start or stop the section, as in the very simple example in
Figure \ref{pd_comp}a.
~~

~~ Exported LaTeX:
Sections may be created as subpatches, using \codeident\{[route go
stop]\} to start or stop the section, as in the very simple example in
Figure \ref{pd_comp}a.
~~

(\codeident is a custom command I defined in the preamble, as semantic markup for \texttt.)

In the PDF, \ref{pd_comp} turns into a figure number, as I would expect, but \codeident\{...\} sets the enclosed string in the normal font rather than fixed-width (with visible {}, which shouldn't be in the printed output).

I do have a workaround:

~~ org
Sections may be created as subpatches, using
#+LaTeX: \inpcode{[route go stop]}
to start or stop the section, as in the very simple example in
Figure \ref{pd_comp}a.
~~

... where "#+LaTeX:" prevents M-q from breaking the braces onto separate lines, but -- this has tripped me up a few dozen times working on this article, so I thought it would be worth asking if this is really the ideal behavior.

hjh

             reply	other threads:[~2013-07-27 13:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-27 13:41 James Harkins [this message]
2013-07-27 18:40 ` LaTeX export: {} on separate lines are escaped, why? Nicolas Goaziou

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=87li4s2k9a.wl%jamshark70@dewdrop-world.net \
    --to=jamshark70@gmail.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).