Does anyone any have experience with writing large works (fx. a thesis, BA, …) in Mathematica and then successfully converting it to LaTeX code of reasonably quality or should I just stick to my trusted Memoir class.
[Tex/LaTex] LaTeX and Mathematica
memoirwolfram-mathematica
Related Solutions
The instructions you mention are rather outdated.
Modify
wolfram.map
to have.pfa
instead of.pfb
(to reflect the format of the font files) and remove all fromJanson Text
onwards, as those fonts are not provided.Copy
wolfram.map
to/usr/local/texlive/texmf-local/fonts/map/dvips/wolfram/wolfram.map
Copy all subfolders from
texmf/fonts
(afm/wolfram
…) to the corresponding folders in/usr/local/texlive/texmf-local/fonts
.Copy the directory
texmf/tex/latex/wolfram
to/usr/local/texlive/texmf-local/tex/latex/wolfram
Copy
texmf/doc/wolfram
to/usr/local/texlive/texmf-local/doc/latex/wolfram
Run
mktexlsr
so that TeX Live will know about these filesRun
updmap-sys --enable Map=wolfram.map
Enjoy
All steps from 2 to 7 should be done as Administrator (prefix the commands with sudo
, typing the Administrator's password when requested)
Note that the 7z
archive linked to in the blog article seems to be corrupt, while the .zip
file is good.
Update
From TeX Live 2013 onwards, it's better to add the line
Map wolfram.map
to the file
/usr/local/texlive/texmf-local/web2c/updmap.cfg
(also requires Administrator privileges) and subsequently run
updmap-sys
without options. This replaces step 7 above.
Short answer: I'm not aware of a single solution that will do all three languages, at least not without some work on your part. listings
will likely be easiest.
minted
uses the Pygments syntax highlighter. Pygments currently doesn't support Maple or Mathematica (at least, not unless you can track down someone's custom lexer). So the only way to proceed with minted
is probably to write your own lexer (might not be that difficult, but I've never tried).
listings
supports Mathematica and Python, but not Maple (but you might look at this). So if you go that route, you will need to define a language (this shouldn't be too difficult; you could start with the link above, and customize to your needs).
Regarding other options: The program highlight can highlight Maple and export a LaTeX version. It also does Python, but not Sage or Mathematica. GNU Source-highlight doesn't have Mathematica or Maple. I've never used either of these. I think that covers all the standard and fallback syntax highlighters (there's also t-vim, but that's for ConTeXt). There are also some language specific options, for example, evidently there's a maple2e
package (see this).
You should keep in mind that Sage and Python aren't completely identical (for example, ^
vs. **
for exponents). If you want a more Sage-specific solution, you might see the sagetex
package's approach to using Sage with listings
. Basically, it defines a new Sage language based on Python, for the Sage console (just search the sagetex
documentation for \lstdefinelanguage{Sage}
, and take a look at what follows).
Best Answer
use the memoir class and export the code for the mathematica examples from within your LaTeX document. Then run the mathematica examples by a script and insert the created pdfs instead of the source code. Can all be done automatically.