emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Latex-Export with custom commands
@ 2010-10-12 18:35 Maximilian Matthe
       [not found] ` <8011.1286914651@alphaville.usa.hp.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Maximilian Matthe @ 2010-10-12 18:35 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I'm having a .tex-file named style.tex which contains the following:

 > \usepackage{xspace}
 > \newcommand{\cA}{\ensuremath{\mathcal{A}}\xspace}

I'm including this file into my org-file with

 > #+LATEX_HEADER: \input{style}

Now, when I type sth. like this:

 > Inside normal text \cA just works fine.

But when I want to add superscripts to that A:

 > Now adding a superscript to \cA^n because I need it.

In the pdf-Output there is a space between the superscript and the A. 
That is because of the latex-export does sth like:

 > \ensuremath{\mathcal{A}}$^n$

Is there some workaround for that behaviour?

Best regards, Max

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

* Re: Latex-Export with custom commands
       [not found]   ` <4CB547A5.1030405@web.de>
@ 2010-10-13  5:53     ` Nick Dokos
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Dokos @ 2010-10-13  5:53 UTC (permalink / raw)
  To: Maximilian Matthe; +Cc: nicholas.dokos, emacs-orgmode

Maximilian Matthe <Maxi.Matthe@web.de> wrote:

> 
> 
> Nick Dokos schrieb:
> > You cannot expect org to do anything else: how is it supposed to know
> > that the \cA is part of a math expression?
> >
> >   
> >> Is there some workaround for that behaviour?
> >>
> >>     
> >
> > The obvious one of telling org (and latex) that these are math expressions
> > works fine:
> >
> >       $\cA$ and $\cA^n$ 
> >
> > or (as I prefer to write it):
> >
> >       \(\cA\) and \(\cA^n\)
> >
> > HTH,
> > Nick
> >   
> Hi,
> 
> (why is there no answer directly in the mailing list?)

Because I forgot to cc: the list (I tend to do that on a regular basis:
apologies).

> I know your shown workaround, but I thougt that it would be possible,
> to export
> 
> > \cA^n
> 
> as
> 
> $\cA^n$ instead of \cA$^n$. That is, if there is only one sign before
> the superscript, org shoud include it into the math-fragment.
> 

I don't think that's possible: it would require a parser of far greater
complexity.

> Regards, Max
> 

Nick

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

end of thread, other threads:[~2010-10-13  5:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-12 18:35 Latex-Export with custom commands Maximilian Matthe
     [not found] ` <8011.1286914651@alphaville.usa.hp.com>
     [not found]   ` <4CB547A5.1030405@web.de>
2010-10-13  5:53     ` Nick Dokos

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