# How do I get TexForm to work on the command line? (Windows only)

I try to run:

wolframscript -code "TeXForm[""2+2""]"


But I end up with:

TeXForm[2+2]


I am using Windows.

From my research, I understand that Mathematica can't display this properly on the command line. I also understand that I need to do something tricky, but I have no idea how Linux, or "xvfb-run" works.

Can someone please provide step-by-step instructions on how to solve this issue for us poor Windows users?

• It is spelled TeXForm but one set of quotes is enough. – Bill Watts Jan 30 '19 at 7:53

 wolframscript -code HoldForm[1+1] -format TeXForm

if on Windows, the Command Line cmd should be run as Administrator to have wolframscript executed. get more info on how to use wolframscript under Windows by this way.