Re: Is Format[ ,TeXForm] broken?
- To: mathgroup at smc.vnet.net
- Subject: [mg90289] Re: Is Format[ ,TeXForm] broken?
- From: m.r at inbox.ru
- Date: Fri, 4 Jul 2008 04:00:27 -0400 (EDT)
- References: <g4fhur$9r9$1@smc.vnet.net>
On Jul 2, 4:32 am, Will Robertson <wsp... at gmail.com> wrote:
> Hello,
>
> I'd like to be able to customise the exporting of my Mathematica
> expressions to LaTeX, but it doesn't seem to work like I expect:
>
> Format[AA,TeXForm]="BB";
> TeXForm[AA]
>
> Results in "\text{BB}". So far so good. But:
>
> TeXForm[AA+x]
>
> Results in "\text{AA}+x". The explicit TeXForm Format isn't applied to
> built-up expressions.
>
> I'm using Mathematica 6.0.2. Is this fixed in 6.0.3?
>
> Now, I can use this to approximate what I want:
>
> Format[AA]="BB"
>
> In this case both TeXForm outputs above show the expected result
> (\text{BB} in both). But I don't really want to do that, because then
> my Mathematica output will get rather messy (I use short names in Mathema=
tica
> and longer macro names in LaTeX to get consistent formatting).
>
> Many thanks,
> Will
The converter uses TraditionalForm, so you can add the definitions for
TraditionalForm Format or MakeBoxes:
Format[AA, TraditionalForm] = "BB";
TeXForm[AA + x]
Maxim Rytin
m.r at inbox.ru