4
$\begingroup$

I recently started trying to use stylesheets and different cell types to organize and explain my logic. Often I try to type equations into my text cells to explain what I'm doing, but this can be rather tedious and the resulting equations are often hard to read (especially when trying to type bra-ket notation), I'm wondering if there's a way to render LaTeX in my text cells?

$\endgroup$
2
  • 1
    $\begingroup$ You can type a LaTeX string in a "Text" cell and then paste it into a new cell and it should format. If that doesn't work you can do this, too: ImportString["$\log(x)^2$", {"TeX", "Cell"}][[1]] // CellPrint $\endgroup$
    – b3m2a1
    Jan 31, 2020 at 22:01
  • 1
    $\begingroup$ What exactly is the problem? The ease (or lack of) of typing math in Mathematica? Or the typesetting quality? $\endgroup$
    – Szabolcs
    Feb 1, 2020 at 9:50

2 Answers 2

5
$\begingroup$

Maybe you need MaTeX package. This is the official website of MaTeX package.

$\endgroup$
1
  • $\begingroup$ this package is immensely helpful :) $\endgroup$
    – Kai
    Mar 22, 2020 at 13:15
5
$\begingroup$

In MMA 12.2 this is now possible in text boxes using ctrl + $, see the documentation.

$\endgroup$
3
  • $\begingroup$ Just curious....Have you tried the MaTeX package? How does MMA's latex environment compare? With MMA 12.2 being relatively new, I'm wondering if you've found it "buggy"? $\endgroup$ Jan 17, 2021 at 23:38
  • $\begingroup$ @ThatsRightJack I haven't used the new functionality much, but they serve different purposes. MaTeX can be used to generate LaTeX labels to put into graphics, while the new TeX support is for text cells, at least that's what I understand (I'm no expert on either of them) $\endgroup$
    – Kai
    Jan 18, 2021 at 14:55
  • $\begingroup$ thanks a lot, this worked very nicely with a rather monstrous formula written in LaTeX. $\endgroup$ Apr 6 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.