MathGroup Archive 2005

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

Search the Archive

Typesetting Mathematica code


What is the best way for including Mathematica source code (typically 
whole cells) - using the same typeface/font as in the front end - in 
LaTeX documents?

It seems to me that there are three solutions: TeXForm, TeXSave, and 
saving the cell as EPS.  But none of these seem really feasible.

Using TeXForm doesn't seem ideal, since TeXForm[ expr ] first evaluates 
expr and prints a TeX version of the output, where what I want is the 
TeXForm of expr before evaluation. TeXSave is deprecated in Mathematica 
5.1 and, anyway, doesn't preserve the typeface/font.  For example, the 
lower-case double-stroked "e", "i", and "d" characters are translated 
into ordinary "e", "i", and "d".  The only fail-safe way seems to be 
saving the cell as EPS, but that won't really work for very long cells, 
and seems extremely wasteful, since the same font definitions will be 
included many, many times.


  • Prev by Date: Re: Trouble with Limit[I ... k]/k, k-> Infinity]
  • Next by Date: Re: Re: Maping and Complex Addition
  • Previous by thread: Re: Re: Re: Infinite sum of gaussians
  • Next by thread: Re: Re: Re: Re: Infinite sum of gaussians