0

I have output a Latex file from Wolfram Mathematica using the first very simple example shown at https://reference.wolfram.com/language/ref/format/TeX.html I then tried to compile it with TexMaker 4.5 on a Macbook Version 10.9.4 (Mavericks). I couldn't get the pdf, because of error:

 "pdflatex" -synctex=1 -interaction=nonstopmode %.tex

Anybody knows why? The full text is:

  %% AMS-LaTeX Created with the Wolfram Language for Students - Personal Use 
  Only : www.wolfram.com

 \documentclass{article}
\usepackage{amsmath, amssymb, graphics, setspace}

\newcommand{\mathsym}[1]{{}}
\newcommand{\unicode}[1]{{}}

\newcounter{mathematicapage}
\begin{document}

\begin{doublespace}
\noindent\(\pmb{\text{ExportString}[\text{Nest}
[1+1/\#\&,x,5],\text{{``}TeX{''}}]}\)
\end{doublespace}

\begin{doublespace}
\noindent\(\text{$\%\%$ AMS-LaTeX Created with the Wolfram Language for 
Students - Personal Use Only : www.wolfram.com$\backslash $n$\backslash 
$n$\backslash
\backslash $documentclass$\{$article$\}\backslash $n$\backslash \backslash 
$usepackage$\{$amsmath, amssymb, graphics, setspace$\}\backslash $n$\backslash
$n$\backslash \backslash $newcommand$\{\backslash \backslash $mathsym$\}$[1]$\
{\{\}\}\backslash $n$\backslash \backslash $newcommand$\{\backslash
\backslash $unicode$\}$[1]$\{\{\}\}\backslash $n$\backslash $n$\backslash 
\backslash $newcounter$\{$mathematicapage$\}\backslash $n$\backslash 
\backslash
$begin$\{$document$\}\backslash $n$\backslash $n$\backslash \backslash 
$[1+$\backslash \backslash $frac$\{$1$\}\{$1+$\backslash \backslash $frac$\
{$1$\}\{$1+$\backslash
\backslash $frac$\{$1$\}\{$1+$\backslash \backslash $frac$\{$1$\}\
{$1+$\backslash \backslash $frac$\{$1$\}\{$x$\}\}\}\}\}\backslash \backslash 
$]$\backslash
$n$\backslash $n$\backslash \backslash $end$\{$document$\}\backslash $n}\)
\end{doublespace}

\end{document}

closed as off-topic by TeXnician, Zarko, Schweinebacke, Mensch, Stefan Pinnow May 7 '17 at 17:43

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Welcome to TeX.SX! Comment out the second line. – TeXnician May 7 '17 at 14:49
  • have you installed a TeX system? TeXMaker is just an editor it needs tex to process the document (miktex or texlive distributions) – David Carlisle May 7 '17 at 16:08
  • Sorry, I hadn't installed the compiler – Andrea G May 7 '17 at 16:58
  • 4
    I'm voting to close this question as off-topic because the OP didn't have the compiler installed. – TeXnician May 7 '17 at 16:59
2

Well, your code has some issues:

  1. You have to comment out the second line (% Only :).
  2. There are many linebreaks after a \. This causes the braces ({) to be unescaped.
  3. It is very bad style. All of the text goes on one line and there's a real misuse of math mode. Best thing to do: Look at the source code, discard that one and rewrite the content from scratch.

I do not know Mathematica well enough to judge its LaTeX capabilities, but this is definitely a bad sign.

Code:

%% AMS-LaTeX Created with the Wolfram Language for Students - Personal Use 
%  Only : www.wolfram.com
 \documentclass{article}
\usepackage{amsmath, amssymb, graphics, setspace}

\newcommand{\mathsym}[1]{{}}
\newcommand{\unicode}[1]{{}}

\newcounter{mathematicapage}
\begin{document}

\begin{doublespace}
\noindent\(\pmb{\text{ExportString}[\text{Nest}
[1+1/\#\&,x,5],\text{{``}TeX{''}}]}\)
\end{doublespace}

\begin{doublespace}
\noindent\(\text{$\%\%$ AMS-LaTeX Created with the Wolfram Language for Students - Personal Use Only : www.wolfram.com$\backslash $n$\backslash 
$n$\backslash \backslash $documentclass$\{$article$\}\backslash $n$\backslash \backslash $usepackage$\{$amsmath, amssymb, graphics, setspace$\}\backslash $n$\backslash $n$\backslash \backslash $newcommand$\{\backslash \backslash $mathsym$\}$[1]$
\{\{\}\}\backslash $n$\backslash \backslash $newcommand$\{\backslash
\backslash $unicode$\}$[1]$\{\{\}\}\backslash $n$\backslash $n$\backslash 
\backslash $newcounter$\{$mathematicapage$\}\backslash $n$\backslash 
\backslash
$begin$\{$document$\}\backslash $n$\backslash $n$\backslash \backslash 
$[1+$\backslash \backslash $frac$\{$1$\}\{$1+$\backslash \backslash $frac$
\{$1$\}\{$1+$\backslash
\backslash $frac$\{$1$\}\{$1+$\backslash \backslash $frac$\{$1$\}
\{$1+$\backslash \backslash $frac$\{$1$\}\{$x$\}\}\}\}\}\backslash \backslash 
$]$\backslash $n$\backslash $n$\backslash \backslash $end$\{$document$\}\backslash $n}\)
\end{doublespace}
\end{document}
  • I just copied your code and got the same error – Andrea G May 7 '17 at 15:09
  • @AndreaG Well, I get no errors anymore. Could you please be more specific what error? – TeXnician May 7 '17 at 15:34
  • Error : could not start the command : "pdflatex" -synctex=1 -interaction=nonstopmode "ass".tex; It is weird: I am compiling fine another latex file I have, but not yours corrected. – Andrea G May 7 '17 at 15:40
  • @AndreaG Could you please open the command line, compile it in your command-line with pdflatex ass.tex (if the filename is right) and then post the output? – TeXnician May 7 '17 at 15:41
  • I am new to the language: what do you mean more precisely with "open the command line"? Do you mean the terminal? Could you explain me or give me instructions on how to do that? – Andrea G May 7 '17 at 15:50

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