Questions about any kind of interaction with $\TeX$, $\LaTeX$, and friends, including transferring text/code to/from $\TeX$, using Mathematica graphics in LaTeX documents etc.

learn more… | top users | synonyms

75
votes
6answers
14k views

$\LaTeX$ and Mathematica

I quite often would like to draw graphics in my $\LaTeX$ documents using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems I would ...
19
votes
1answer
6k views

How to use $\LaTeX$ for typesetting labels and titles in Mathematica

I need to typeset large number of equations to be used for PlotLabel and Titles and such. These have to look nice. Hence I use ...
21
votes
5answers
8k views

Export Plots to $\LaTeX$

What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? ...
5
votes
1answer
1k views

Unable to convert $\TeX$ input into mathematica

The input ToExpression["\\sqrt{x y}", TeXForm] gives me the $Failed output. Maybe my very old computer is the problem, but ...
20
votes
2answers
5k views

Pasting $\LaTeX$ into a Mathematica notebook

I have read that $\LaTeX$ source can be directly pasted into a Mathematica notebook. However, I have been unsuccessful in this regard. An example of the errors received are: ...
7
votes
3answers
199 views

Incompatibility of Row and TeXForm

Bug introduced in 9.0 and persisting through 10.1.0 or later Update: Since no one has been able to give a reason for this change in behavior or provide a solution I am tagging this as a bug. ...
11
votes
1answer
667 views

Exporting numbered equations to HTML/TeX using conversion rules

This question is a follow up from this one. It may also be considered a duplicate since I have already asked this question in stackoverflow almost a year ago. For a background on using numbered ...
20
votes
2answers
2k views

How can I customize arrowhead shape to match common LaTeX styles?

How do I control the shape of my arrow heads? LaTeX's TikZ package has a wide variety of predefined arrowhead styles, some of which I'd like to try to match for Mathematica figures I'm importing into ...
12
votes
1answer
186 views

possible bug in Mathematica TeXForm? Generating \left\left

I asked about this in the TeX chat. It seems Mathematica generate invalid Latex in this example. ...
8
votes
2answers
350 views

How do I get the equivalent of the $\LaTeX$ \tag{} in Mathematica?

How do I get the equivalent of the $\LaTeX$ \tag{} in Mathematica? $a+b=x \tag{1}$ I'm not necessarily asking how to use the $\LaTeX$ \tag{} itself in ...
40
votes
1answer
926 views

Export Code to Pseudocode?

I'm writing a paper and all my code is in Mathematica. The snippets are mostly simple, and consist of loops, maps, variables, and conditionals. I'd like add it to my paper, however, not many academic ...
8
votes
2answers
454 views

TeX and TraditionalForm

I have a little problem, and hope, with your help, I'll be able to solve it. As you got from the title, I have some trouble with TeX in Mathematica. Imagine, I want to output a nice DisplayFormula, ...
13
votes
3answers
503 views

TeXForm and large brackets (\Biggl[ etc)

Goal I am trying to export a very long expression like expr = c1*bracket1[a+b+c2*bracket2[d+e+f...]]+... to LaTeX using ...
14
votes
3answers
692 views

How do I “start a reference system”?

When I attempt to insert a citation or specify a database to use as a bibliography, I get a message that I need to "start" the "reference system" "manually": I have no idea what a references system ...
3
votes
2answers
332 views

How can you combine lines in $\LaTeX$ and lines in Mathematica?

Suppose that you want to make a report about the golden section algorithm, and you want to explain the process with text in $\LaTeX$, and in every iteration you want to show in that report the values ...
3
votes
1answer
446 views

Running external pdflatex command and importing the generated PDF document

There have been a couple of questions about incorporating labels and equations that were typeset in $\LaTeX$ into a Mathematica notebook. Ideally, this requires running ...
2
votes
0answers
396 views

Generating a function which outputs possible chemical reactions

I want to make a list of chemical reactions and I write them down in a $\require{mhchem}\LaTeX$ format. They are of the following form $$NA_n^i+MB_m^j \rightarrow \hat NA_{\hat n}^{\hat i}+\hat ...
1
vote
3answers
115 views

How I create a 'TraditionalForm' expression in which only parts are evaluated?

I have an expression for the form Subscript[W, f[a, b]][c] = ρ^f[a,b]ω[c]ρ^-f[a,b] that I want to render in TraditionalForm ...
1
vote
0answers
92 views

Export to PDF file and use in latex, weird behaviour from using Acrobat

I have put all files here. All pictures are Exported from Mathematica 10.0.1 X64 (win7) using Export["filename.pdf",plotobject]. I first complied the latex file, ...
37
votes
1answer
2k views

Mathematica2tikz an equivalent function

Matlab2tikz is script which generates native Latex/Tikz figures from MATLAB. I am looking for an equivalent method/function in Mathematica to generate similar results. Obviously the final script may ...
6
votes
2answers
552 views

How can I convert a formatted text cell to latex code?

I have a formatted text cell, I want to export it as latex. How can I do that? Since copy as LaTeX doesn't work, I thought of pasting it into a string and exporting, but it's a no go: ...
12
votes
1answer
452 views

Saving a notebook as a $\LaTeX$ file, with syntax highlighting preserved

How can I save a notebook as a $\LaTeX$ file, while preserving the syntax highlighting (such as input/output boxes)?
9
votes
2answers
267 views

How do I prevent Mathematica from reformatting the expressions that I copy as LaTeX?

When I choose something that looks like $$ W_1(1)=\rho ^{5} \omega _1 \rho ^{-5}\\ W_2(2)=\rho ^{23} \omega _2 \rho ^{-23}\\ W_3(3)=\rho ^{10} \omega _3 \rho ^{-10}\\ W_4(4)=\rho ^{9} \omega _4 \rho ...
5
votes
1answer
495 views

How to use MathPSfrag package in Mathematica 10?

I am interested to use LaTeX like labels in the plots that I prepare in Mathematica, and hence, I downloaded the MathPSfrag package from this website ...
4
votes
1answer
865 views

How best to embed various cell groups into a latex project?

I'm an author and a coder. I want to reference various parts of my notebooks in my latex project. I've tried doing the following, using a post on the latex side of this problem. I'd like to solve it ...
13
votes
1answer
351 views

Highlighting Mathematica code in $\LaTeX$ document

I was thinking about the best way to include Mathematica code in a $\LaTeX$ document with a nice syntax highlighting. I have tried the packages listings and minted (with pygments), which both claim ...
8
votes
1answer
211 views

MaTeX for Mathematica 9

There's a great package called MaTeX that @Szabolcs wrote which allows one to easily use LaTeX within Mathematica for things like axes labels. After hours trying out various other solutions I ...
5
votes
4answers
213 views

HoldForm does not Hold Form for fractions sometimes

I'm facing a strange behavior of HoldForm. I need to display 1/2*3/4 in LaTeX like this : $$ \frac{1}{2} \times \frac{3}{4} $$ ...
6
votes
1answer
335 views

$\TeX$ conversion, support for \hphantom

I'm trying to write some $\TeX$ conversion for a tensor with an upper and a lower index, but I would like the lower index to be displaced to the right by the width of the upper index. In (La)TeX I ...
5
votes
2answers
338 views

Adjusting size and positioning of math notation in a Mathematica notebook? [duplicate]

Writing mathematics in a notebook is OK, but consider the following image: In LaTeX, I can write: $$y^2=\frac{1+2\sin^{-1}x}{2}$$ which displays as: ...
3
votes
1answer
313 views

String replacement to make the TeXForm output beautiful

This question is inspired by this question: How to convert the symbol $d$ in Integrate into $\mathrm{d}$?. Although it’s not a big problem, the TeXForm can be ...
2
votes
1answer
113 views

The space in default output of `ExportString` to Latex

Are there any reasons for converting subscriptbox to Tex with space? ...
2
votes
1answer
191 views

How to convert the symbol $d$ in Integrate into $\mathrm{d}$?

I used TeXForm[HoldForm[Integrate[x^2, {x, 1, 2}]]] to convert the integral $$\int_1^2 x^2 \, dx$$ How to get $$\int_1^2 x^2 \, \mathrm{d}x ?$$
8
votes
1answer
234 views

How to automate x[i]→x_{i}?

I have several Mathematica expressions in which subscripts are expressed with square brackets. E.g. x[12] is meant to represent x12, etc. If I evaluate ...
6
votes
3answers
166 views

Multiplication sign in TeXForm?

How do I get Mathematica to produce TeX output that does not omit the multiplication signs ? For example, this expression: ...
5
votes
1answer
205 views

Conversion to TeX results in infinite recursion

Bug introduced in 9.0 and persisting through 10.1 or later Confirmed as bug by WRI: [CASE:3059683] I'm trying to export to $\TeX$ a Message cell. For example, ...
5
votes
5answers
236 views

How to make a table of $\sum_{i=1}^n$?

I want to create a table of $\displaystyle \sum_{i=1}^n i^k$ for $1\le k\le 5$. The output I want to obtain is a TeXForm output as follows. \begin{align} ...
5
votes
0answers
372 views

Mathematica inserts extra \left and \right for absolute values in LaTeX output

Type the following in a Mathematica DisplayFormula cell(other styles may also encounter this problem): Esc+l+|+Esc and Esc+r+|+Esc, and save as LaTeX. Note: See the difference of the character ...
3
votes
1answer
127 views

Copy/paste of Interpretation to Latex fails, but works for InputText

As part of another issue, the following has come up. Create an Interpretaion: Interpretation[Subscript[a, b], a[b]] Select ...
3
votes
1answer
439 views

How to export multiple Barcharts from Mathematica to $\LaTeX$

I have to make a document with multiple bar charts and export it: ...
0
votes
1answer
76 views

TeXForm without simplification

I'd like to be able to feed an expression into Mathematica, and have Mathematica convert that expression to TeXForm WITHOUT ANY SIMPLIFICATION WHATSOEVER. As a trivial example, currently, if I enter ...