From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: BUG: Problems with LaTeX exporting of ^ and _ Date: Fri, 17 Oct 2008 19:36:12 +0200 Message-ID: <910529FD-7C11-478C-ADB9-07434800E3B4@uva.nl> References: <73kku8$6rtks@dmzms99901.na.baesystems.com> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqtFK-00042f-30 for emacs-orgmode@gnu.org; Fri, 17 Oct 2008 13:36:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqtFJ-00042T-CU for emacs-orgmode@gnu.org; Fri, 17 Oct 2008 13:36:17 -0400 Received: from [199.232.76.173] (port=55823 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqtFJ-00042Q-9P for emacs-orgmode@gnu.org; Fri, 17 Oct 2008 13:36:17 -0400 Received: from nf-out-0910.google.com ([64.233.182.187]:20859) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KqtFI-0006Gi-Mm for emacs-orgmode@gnu.org; Fri, 17 Oct 2008 13:36:17 -0400 Received: by nf-out-0910.google.com with SMTP id c7so355882nfi.26 for ; Fri, 17 Oct 2008 10:36:15 -0700 (PDT) In-Reply-To: <73kku8$6rtks@dmzms99901.na.baesystems.com> 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: "Sullivan, Gregory (US SSA)" Cc: Org Mode List Hi Daniel and Greg, I believe I have fixed these issues. I am not entirely sure though if I do understand Bastien's code well enough. Please test and report back. One addition I have made: If the sub/superscript is a single char, it it typeset in the normal math italic. If it is longer, it is typeset in roman. If someone needs an explanation for this convention, ask, and I will explain. - Carsten On Oct 17, 2008, at 3:22 PM, Sullivan, Gregory (US SSA) wrote: > As far as: > > 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$ > > I agree that it should be the first (using mbox). The second is just > wrong, as it uses math mode spacing for each letter. > > Possibly a simpler way to accomplish this is > > \item This is a super${}^{s}$cript > > --Greg > > -- > Gregory T. Sullivan, Ph.D. > BAE Systems Advanced Information Technologies > 6 New England Executive Park, Burlington, MA 01803 > 781-262-4553 (office), 978-430-3461 (cell) > gregory.sullivan@baesystems.com > > > -----Original Message----- > From: emacs-orgmode-bounces+gregory.sullivan=baesystems.com@gnu.org > [mailto:emacs-orgmode-bounces+gregory.sullivan=baesystems.com@gnu.org] > On Behalf Of Daniel J. Sinder > Sent: Friday, October 17, 2008 1:33 AM > To: Org Mode List > Subject: [Orgmode] BUG: Problems with LaTeX exporting of ^ and _ > > 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 > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode