emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Escaping an underscore in LaTeX export
@ 2013-08-27 22:48 John Hendy
  2013-08-27 23:14 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: John Hendy @ 2013-08-27 22:48 UTC (permalink / raw)
  To: emacs-orgmode

LaTeX recommends \_ as an "escaped" underscore. In other words,
"really use the underscore, not a subscript." When I do this in
Org-mode and export via =C-e l p=, I don't get that behavior.

Here's my options header:

#+OPTIONS: *:t TeX:t LaTeX:t

a\_b  -> a$\backslash$$_{\text{b}}$
a$\_$b  ->  a\$\_\$b
a $\_$ b  ->  a $\_$ b

What *does* work, is this:

a\(\_\)b  ->  a\_b


If this is the best/only way, that's okay. However, if others believe
that it should be passed through as \_ to LaTeX, perhaps that's the
best way? After all, just passing along _ works to subscript whenever
and wherever with my tex:t and latex:t options... perhaps escaping it
should also work?

An analog might be the use of \$, which escapes the dollar sign and
passes it through to appear as a dollar sign in the final document. I
suppose I'd make the case that if that's interpreted to be escaping
(vs. converting it to $\backslash$$), then perhaps escaping an
underscore should be treated the same.

Fringe use that I just stumbled on and isn't a critical issue, but I
thought I'd mention it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-31  2:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-27 22:48 Escaping an underscore in LaTeX export John Hendy
2013-08-27 23:14 ` Nicolas Goaziou
2013-08-31  2:49   ` John Hendy

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).