emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] LaTeX export: {} on separate lines are escaped, why?


From: James Harkins
Subject: [O] LaTeX export: {} on separate lines are escaped, why?
Date: Sat, 27 Jul 2013 09:41:05 -0400
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]