Message Boards Message Boards

Getting LaTex output into a Mathematica text cell is not practical, right?

Before I spend more time browsing online exchanges for a way to integrate a LaTeX document into a Mathematica notebook, can someone please confirm that the solution does not exist? Just knowing there's no solution, would save time. Having searched without success, I think the only way to create a Mathematica notebook with text cells that have print-ready math expressions is to tediously build the notebook one expression at a time, even if I already have a nicely formatted LaTeX document with all the text and dozens of math expressions already coded. If there is an efficient way to do that, please point me to documentation. Thanks.

POSTED BY: Jay Gourley
4 Replies

Thank you for posting the .tex file. I am not an expert in this, but the file uses many libraries which add functionality that the WL doesn't recognize. It also uses tables to organize all the expressions. In generally, it is just too complex. It's not really reasonable to expect the WL to be able to ingest an entire document like this: it would have to have full LaTeX functionality on top of everything else, plus there are limits to the front end's typesetting and layout options.

You can typeset the individual expressions using something like this:

TraditionalForm[Interpreter["InactiveTeXExpression"]["TeX goes here"]]

Whether it is worth doing that expression by expression is up to you!

POSTED BY: Gareth Russell

Thanks, Gareth Russell. That's what I assumed at the outset. The confirmation helps.

POSTED BY: Jay Gourley

I gather from Gareth Russell's post that, contrary to assumption, integrating a LaTeX document into a Mathematica notebook is possible. That's encouraging. Following are some details.

In answer to Russell's last question: Yes, I tried Import[] in several variations including his formulation. In all cases, I was calling import[] from within a notebook using two different .tex documents (attached here). Having never done that before, all my attempts were experimental.

In the case of Untitled Document.tex, Russell's formulation of Import[] returns a network object and opens a new notebook, which is empty except for a text string, "Document.tex".

In the case of stat-cookbook.tex, Import[] simply returns "$Failed" with no further error message.

Possibly helpful background:

The objective (distant though it seems at the moment) is a manipulatable Mathematica notebook that contains the abbreviated information contained in a handy .pdf reference sheet written by Matthias Vallentin. That too is attached.

The initial Import[] step is important because I am not fluent in LaTeX.

Before posting this question, I noticed the creation of a network object and found the Wolfram Language documentation tutorial/ManipulatingNotebooks that describes several functions for managing network objects. But despite being called a tutorial, it assumes familiarity (absent in my case) of how notebooks relate to a "frontend". I have not found documentation explaining that broader context.

I've probably omitted pertinent details here. But, based on the possibility of success implied by Russell's post, I will watch this thread carefully and answer questions quickly.

POSTED BY: Jay Gourley

I assume you have tried a simple Import, e.g.,

Import["ExampleData/test.tex", "NotebookObject"]

If that is not doing what you want, perhaps you can provide more details.

POSTED BY: Gareth Russell
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract