all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Daniel J. Sinder" <djsinder@gmail.com>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: BUG:  Problems with LaTeX exporting of ^ and _
Date: Thu, 16 Oct 2008 22:33:12 -0700	[thread overview]
Message-ID: <48F82398.4060403@gmail.com> (raw)

Consider the following simple org file:
-- start org file --
#+OPTIONS:   ^:{}

* This is a test
   - This is a super^script
   - This is a sub_script
-- end org file --

If I export this to HTML, as expected I get this (relevant portion 
only):
<ul>
<li>
This is a super^script
</li>
<li>
This is a sub_script
</li>
</ul>

But, if I export to LaTeX, I surprisingly get this:
\begin{itemize}
\item This is a $super^{script}$
\item This is a $sub_{script}$
\end{itemize}

I would expect no superscript and no subscript because I didn't use 
braces and I have ^:{} in my OPTIONS line.

Things get plain weird if I use braces in the first item, so my org 
file is now this:
-- start org file --
#+OPTIONS:   ^:{}

* This is a test
   - This is a super^{s}cript
   - This is a sub_script
-- end org file --

HTML output in this case is still what I'd expect:
<ul>
<li>
This is a super<sup>s</sup>cript
</li>
<li>
This is a sub_script
</li>
</ul>

But the LaTeX output is not at all what I'd expect:
\begin{itemize}
\item This is a $super^{s}$cript
\item This is a sub_script
\end{itemize}

Note that now the second item has changed in latex even though it 
didn't change in the org file.  Plus it actually throws an error in 
latex because there is no equation environment and no escape of the 
underscore.  The first item is also a problem because the equation 
environment splits in a strange place, causing fonts to get mixed. 
Ideally, it should be
\item This is a $\mbox{super}^{\mbox{\scriptsize{s}}}$cript
but I'd settle for this
\item This is a $super^{s}cript$

Dan

             reply	other threads:[~2008-10-17  5:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17  5:33 Daniel J. Sinder [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-10-17 13:22 BUG: Problems with LaTeX exporting of ^ and _ Sullivan, Gregory (US SSA)
2008-10-17 17:36 ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48F82398.4060403@gmail.com \
    --to=djsinder@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.