Mathematica Mathematica TexForm

  • Thread starter Orion1
  • Start date
969
2

Mathematica has a command that converts notebook (.nb) format into TeX (.tex) format:

[tex]\text{In[1]:=} \frac{{\left( x + y \right) }^2}{{\sqrt{x\,y}}}[/tex]
[tex]\text{Out[1]:=} \frac{{\left( x + y \right) }^2}{{\sqrt{x\,y}}}[/tex]
[tex]\text{In[2]:= TeXForm[ \% ]}[/tex]
[tex]\text{Out[2] TeXForm=}[/tex] \frac{{\left( x + y \right) }^2}{{\sqrt{x\,y}}}

I noticed that alot of calculus students have problems with interfacing these two forms and generally manually input equations into both programs independently. Also noticed problems with students on a Mathematica platform publishing their equations on this forum in TeX (.tex) format for peer review, however these instruction commands allow for usage for both applications.

Physicsforums TeX interface:
Code:
[tex]\frac{{\left( x + y \right) }^2}{{\sqrt{x\,y}}}[/tex]


Mathematica notebooks provide a sophisticated environment for creating technical documents. But particularly if you want to merge your work with existing material in TeX, you may find it convenient to use TeXForm to convert expressions in Mathematica into a form suitable for input to TeX.

Code:
TeXForm[ expr ] - print expr in TeX input form

[tex]\text{In[3]:= TeXForm} [ \frac{{\left( x + y \right) }^2}{{\sqrt{x\,y}}}][/tex]
[tex]\text{Out[3] TeXForm=}[/tex] \frac{{\left( x + y \right) }^2}{{\sqrt{x\,y}}}

In addition to being able to convert individual expressions to TeX, Mathematica also provides capabilities for translating complete notebooks. These capabilities can usually be accessed from the Save As Special menu in the notebook front end, where various options can be set.
Code:
TeXSave [" file .tex"] - save your complete notebook in current TeX input form.
TeXSave [" file .tex", "source.nb"] - save a TeX version of the notebook source (.nb)
Reference:
http://documents.wolfram.com/v5/TheMathematicaBook/APracticalIntroductionToMathematica/FilesAndExternalOperations/1.11.6.html" [Broken]
http://documents.wolfram.com/v5/TheMathematicaBook/APracticalIntroductionToMathematica/FilesAndExternalOperations/NBMLImages/1.11.6/1.11.6_3.gif" [Broken]
http://documents.wolfram.com/v5/TheMathematicaBook/APracticalIntroductionToMathematica/FilesAndExternalOperations/NBMLImages/1.11.6/1.11.6_9.gif" [Broken]
 
Last edited by a moderator:

Want to reply to this thread?

"Mathematica TexForm " You must log in or register to reply here.

Related Threads for: Mathematica TexForm

Replies
0
Views
2K
Replies
0
Views
2K
Replies
0
Views
2K
Replies
0
Views
2K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top