Questions tagged [latex]

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.

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.

Useful links:

346 questions
21
votes
1 answer

Parallel and perpendicular symbol from Mathematica to $\LaTeX$

I want to get the following expression from Mathematica to $\LaTeX$: \begin{bmatrix} E_{\parallel} \\ E_{\perp} \end{bmatrix} I have tried to use inbuilt 'symbol' character from the special characters window but get an error: So I thought maybe I…
Steve Hatcher
  • 355
  • 1
  • 2
  • 6
17
votes
1 answer

How to use $\LaTeX$ in Mathematica text

I would like to formulate a question in a notebook for my students using $\LaTeX$ (or $MathML$) to typeset functions and matrices. I specifically want a language other than Mathematica as students will have to replicate the output using Mathematica.…
user49947
  • 171
  • 1
  • 1
  • 3
12
votes
4 answers

Get LaTeX form from step by step solution

If I want to copy block as latex I do copy as LaTeX. But when I write: WolframAlpha["integrate (sin(x))^4 dx"] How can I copy step by step solution as latex?
VirtualUser
  • 229
  • 1
  • 5
11
votes
2 answers

Saving in $\LaTeX$

When I save the following notebook code as $\LaTeX$, In[1]:= DSolve[y'[x] + x y'[x]^2 == 1, y, x] Out[1]= {{y -> Function[{x}, C[1] + 1/2 (-2 Sqrt[1 + 4 x] - 2 Log[1 - Sqrt[1 + 4 x]])]}, {y -> Function[{x}, C[1] + 1/2 (2 Sqrt[1 +…
Zbigniew
  • 411
  • 1
  • 4
  • 12
9
votes
2 answers

Bad Latex generated when using TeXForm with another answer solution

Update Thanks to answer below by Carl Woll, I've put my notebook where it contains all the settings and code needed to use for better Latex formatting if others want to use it. This will save you the time having to type all this. To use, simply…
Nasser
  • 143,286
  • 11
  • 154
  • 359
9
votes
2 answers

How to customize the TeXForm output?

The following snippet args = HoldForm[# Degree] & /@ Array[15 # &, 24, 0]; funcs = {Sin, Cos, Tan, Csc, Sec, Cot}; ques = RandomSample[#, 30] &@(#1@#2 & @@@ Tuples[{funcs, args}]); # == ReleaseHold[#] & /@ ques // Column // TeXForm will produce the…
Friendly Ghost
  • 337
  • 2
  • 7
9
votes
2 answers

Multiple TeXForm returns just single output

I have several expressions for which I need the LaTex output. If I put them one after another with TeXForm, only the last one is shown (see picture). This is different to for example "TraditionalForm" behavior which prints all three inputs. Am I…
user37523
8
votes
3 answers

How to force TeXForm not to use "array" environment for a square array?

The default behavior of Mathematica, transforms a jagged array TeXForm[{{1, 2}, {3}}] to \{\{1,2\},\{3\}\} but a square array TeXForm[{{1, 2}, {3, 4}}] to \left( \begin{array}{cc} 1 & 2 \\ 3 & 4 \\ \end{array} \right) Question Is it…
D G
  • 277
  • 1
  • 5
8
votes
1 answer

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 TeXForm on such an expression, x[12], e.g., gets converted to x(12). Is there a way to get it…
kjo
  • 11,717
  • 1
  • 30
  • 89
7
votes
2 answers

Personalize Copy As LaTeX

Built-in functions in formulas copied as $\LaTeX$ code from output cells are sometimes messy. I'd like to find a way to simplify the way this code is generated. There is one concrete instance that I'd like to raise: "Conjugate" is an exponent of…
Rol
  • 367
  • 4
  • 11
7
votes
1 answer

TeXForm of Grid, Add Seperation Lines and Color

I have the following grid (from documentation): data = Import["ExampleData/classification.tsv"] g = Grid[data, Alignment -> Left, Spacings -> {2, 1}, Frame -> All, ItemStyle -> "Text", Background -> {{Gray, None}, {LightGray, None}}] Which…
james
  • 3,043
  • 13
  • 29
6
votes
1 answer

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 that's the only command that has caused me problems, and that input is from the tutorials.
Zero
  • 727
  • 5
  • 13
6
votes
2 answers

MMa version of $\LaTeX$'s overtilde doesn't look as expected

I am (mis)using Mathematica as a WYSIWYG LaTex editor. I want to put a (long) tilde over an expression. DisplayForm[OverscriptBox[a + b, "_"]] DisplayForm[OverscriptBox[a + b, "~"]] This Is how it looks: (Of course I'm using cntrl-7 to type in the…
mathheadinclouds
  • 865
  • 5
  • 12
6
votes
1 answer

question on using TeXUtilities. Why it needs to be called twice to work

I find strange behavior of TeXUtilities by @jkuczm which I do not understand how to fix. I find I have to call TeXForm two times for it to start working. Here is a MWE This will install the package.…
Nasser
  • 143,286
  • 11
  • 154
  • 359
5
votes
1 answer

TeXForm: control processing spelt-out names of Greek letters

In a notebook, type in theta^2 then select it and use Copy As → LaTeX. The resulting LaTeX code is \text {theta}^2 Now try TeXForm[theta^2] (* \theta ^2 *) Note that theta turned into \theta in the second case. Why is there a difference between…
Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
1
2 3 4