97
votes
$\LaTeX$ and Mathematica
I would like to make my graphics homogeneous with my (LaTeX) document. That means that I would like to use the same font in the graphics (labels for axis etc) as the main text.
I recently wrote a ...
- 231k
52
votes
How to use $\LaTeX$ for typesetting labels and titles in Mathematica
MaTeX is a package made exactly for this purpose. It can automatically compile small LaTeX snippets and import them as Mathematica graphics.
It is described in detail in this other Mathematica.SE ...
- 231k
42
votes
Accepted
How to convert the $\LaTeX$ format to Mathematica input?
You can use ToExpression.
ToExpression["string", TeXForm, HoldForm]
Paste your content inside quotes and click the ...
- 710
41
votes
Accepted
How best to embed various cell groups into a $\LaTeX$ project?
Introduction
Below I present usage of my CellsToTeX package.
It provides functions for converting Mathematica cells to $\TeX$ code
compatible with $\TeX$ package mmacells.
Compilation of this $\TeX$ ...
- 14.9k
27
votes
Accepted
Highlighting Mathematica code in $\LaTeX$ document
I too had a need for a better syntax highlighting engine for Mathematica that can be used in different formats (so the javascript plugin is ruled out), so I wrote a better lexer and highlighter for ...
- 87.7k
25
votes
Accepted
Bug in Mathematica TeXForm generating \left\left
Why we're getting this buggy result
In process of conversion to $\TeX$, whenever Mathematica encounters "something delimited" i.e. RowBox with something surrounded ...
- 14.9k
22
votes
Accepted
Font style in Mathematica and .tex file
You can match formatting between Mathematica figures and LaTeX using a small package I just wrote for using LaTeX-snippets in Mathematica: MaTeX.
Here's an example:
...
- 231k
22
votes
MaTeX for Mathematica 9
I am not willing to make MaTeX compatible with Mathematica 9 for the simple reason that it would create too much of a maintenance burden, and I already don't have time to properly respond to all ...
- 231k
20
votes
Accepted
Transitioning to Mathematica Documents from $\LaTeX$
Since no one dares an answer, let me make some statements that you probably won't like since you seem keen to switch to Mathematica. I don't think this is a good idea. It is just not the right tool ...
- 112k
16
votes
$\LaTeX$ and Mathematica
Endorsing Szabolcs' excellent $MaTeX$ package as a way to manage $\LaTeX$ in $Mathematica$ but with an addition that for me at least has removed the significant irritant of having to escape ...
- 5,981
16
votes
Accepted
Is it possible to change/customize some conversions done by TeXForm?
You could use my TeXUtilities package:
...
- 14.9k
15
votes
Accepted
Need help translating Mathematica code to LaTeX
This is not answer, but an extended comment that displays a graphic.
The code you post in your question does not work in any recent version of Mathematica. It is syntactically and semantically ...
- 107k
14
votes
Highlighting Mathematica code in $\LaTeX$ document
To get syntax highlighting for Mathematica in a latex code listing, try this:
...
- 141
14
votes
13
votes
Accepted
How do I prevent Mathematica from reformatting the expressions that I copy as LaTeX?
Unfortunately, the Mathematica's Copy As > LaTeX command is not (as you'd expect) a command that copies the selected expressions as LaTeX. Instead, it performs additional reformatting that can only be ...
- 14.9k
13
votes
How to use $\LaTeX$ in Mathematica text
Question not clear. But to insert Latex Matrix (or any other latex output, such as equations etc..) in textcell using the notebook, here is an example. If OP does not want to use the notebook at all, ...
- 127k
13
votes
Accepted
Replicating $\LaTeX$'s pgfplot Style in Mathematica
I noticed that for plots like this you get a significantly better performance when rotating the Graphics3D if you keep the answer inside a ...
- 65.8k
12
votes
Highlighting Mathematica code in $\LaTeX$ document
The answer by @R.M. is what I would recommend to anyone who has the ability to install the required prerequisites. But as requested by @murray, here is an example of a complete $\LaTeX$ document that ...
- 96.1k
12
votes
Accepted
Conversion to TeX results in infinite recursion
It can be traced that, in minimal example from question, following definition of System`Convert`TeXFormDump`maketex function is used:
...
- 14.9k
12
votes
Accepted
Is it possible to write time derivatives with the dot notation?
I can't test robustness, because I don't know what your work flow is, but one can Format the expression:
...
- 22.4k
12
votes
MaTeX and \phantom
The same sizes show up using pure Latex.
\documentclass[11pt]{article}
\begin{document}
\Huge
\[
\sqrt{\phantom{a^2}b}
\]
\[
\sqrt{a^2b}
\]
\end{document}
...
- 127k
11
votes
Accepted
Analyzing citations with Mathematica
This answer has two proposed solutions one with a dedicated parser the other using conversion to JSON. The programming of the JSON conversion happened three times faster. (But it was also done earlier ...
- 36.5k
10
votes
Mathematica2tikz an equivalent function
I don't know if this can be considered as an answer to your question, but: Do not do that! That would mean learning a new tool (not even talking about programming it), facing singular situations which ...
- 14k
10
votes
Accepted
Using Greek $\LaTeX$ fonts
I can no longer get this working. The commands shown below don't give me an output with the correct typeface with Greek letters. I don't know why.
tl;dr Use the Latin Modern Math OpenType fonts ...
- 231k
10
votes
How to call Mathematica from $ \rm\LaTeX $?
You can use Splice, which has been superseded by FileTemplate since v10.
[ As of 12.1 Splice...
- 5,609
10
votes
How to generate images of mathematical equations?
If you want to copy an image directly using the mouse, you can try Rasterize which generates an image which you can copy/paste directly.
Example 1:
...
- 127k
10
votes
Is it possible to change/customize some conversions done by TeXForm?
I will assume that you want the normal TraditionalForm typesetting in a notebook to be unaffected, and only want to see the ...
- 127k
9
votes
Accepted
Font style in Mathematica matching \mathcal and \mathbf in Miktex
I think what you want is script style. You can enter letters in that style in two ways: For example,
\[ScriptCapitalT]
$\mathcal{T}$
or alternatively by the ...
- 96.1k
9
votes
Accepted
ToExpression not accepting standard TeX strings
You can get your equation in unevaluated form using
ToExpression["\\int_0^\\infty E^{-x^2}\\,dx = \\frac{\\sqrt\\pi}2", TeXForm, HoldForm]
which wraps the ...
- 6,161
9
votes
Accepted
Multiple TeXForm returns just single output
This is just a long comment.
I see the same behaviour in several versions between 9.0–11.0.
Looking at what is actually being sent to the FE with LinkSnooper, we see that the kernel does send all ...
- 231k
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
latex × 318export × 50
output-formatting × 41
formatting × 32
plotting × 21
conversion × 20
notebooks × 19
matex × 18
front-end × 14
bugs × 12
string-manipulation × 12
graphics × 10
import × 10
fonts × 10
text × 8
pdf-format × 8
list-manipulation × 7
evaluation × 7
packages × 7
output × 6
labeling × 5
cells × 5
stylesheet × 5
custom-notation × 5
traditional-form × 5