From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel J. Sinder" Subject: BUG: Problems with LaTeX exporting of ^ and _ Date: Thu, 16 Oct 2008 22:33:12 -0700 Message-ID: <48F82398.4060403@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kqhxb-0004Rh-MH for emacs-orgmode@gnu.org; Fri, 17 Oct 2008 01:33:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqhxZ-0004RS-ID for emacs-orgmode@gnu.org; Fri, 17 Oct 2008 01:33:14 -0400 Received: from [199.232.76.173] (port=41647 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqhxZ-0004RP-Ct for emacs-orgmode@gnu.org; Fri, 17 Oct 2008 01:33:13 -0400 Received: from sd-green-bigip-207.dreamhost.com ([208.97.132.207]:35901 helo=randymail-a9.g.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KqhxZ-0006r5-D1 for emacs-orgmode@gnu.org; Fri, 17 Oct 2008 01:33:13 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode List 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):
  • This is a super^script
  • This is a sub_script
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:
  • This is a superscript
  • This is a sub_script
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