Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: TeXForm and custom LaTeX macros

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76208] Re: TeXForm and custom LaTeX macros
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 17 May 2007 06:58:08 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <f2emkm$2vn$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

with
MakeBoxes[dddot[y_], fmt_: StandardForm] :=
  OverscriptBox[MakeBoxes[y, fmt], "\[TripleDot]"]

you got the formated output in the frontend and
TeXForm form gives

In[]:=dddot[y] // TeXForm
Out[]= \dddot{y}

Understand that Format[] is a very old command (from
version 1.0) and in version 1 Mathematica had no frontend
and no typesetting. Format[] is made to produce output on a
ASCII console and not to setup typesetting directives.
Leave your hands from Format[] usual defining the correct
box output for the symbols will produce correct results
in the TeX output.

Regards
   Jens

Will Robertson wrote:
> Hello,
> 
> I'm not having much luck customising the output from TeXForm. I'm a
> bit of a new user of Mathematica, I'm afraid.
> 
> I would like to be able to do something like this:
>   Format[dddot[x_], TeXForm] := "\dddot{" <> ToString[x] <> "}"
>   dddot[y] // TeXForm
> 
> and get output of
>   \dddot{y}
> 
> but obviously that doesn't happen. In fact, I don't even understand
> the output of Mathematica at all (v6):
>   \text{$\backslash \backslash $dddot$\{$y$\}$}
> 
> Why are there *two* backslashes in there? I can see that it's trying
> to get the "\dddot" printed literally in the TeX output, but that's
> not very useful to me. Any suggestions would be greatly appreciated.
> 
> Thanks in advance,
> Will Robertson
> 
> 


  • Prev by Date: Re: Re: Compatibility woes
  • Next by Date: Re: more documentation finder palettes
  • Previous by thread: Re: TeXForm and custom LaTeX macros
  • Next by thread: Re: TeXForm and custom LaTeX macros