2

I am trying to use LatexIt for code inclusion in the presentation (keynote). I have added the \usepackage{listings} in the body templates => preamble and the MWE* is here:

\begin{lstlisting}
public class test{
}
\end{lstlisting}

So, when I try to "Latex it!" it gives errors:

Missing $ inserted.
Missing \endgroup inserted.
Missing \endgroup inserted.
Missing } inserted.
Missing } inserted.

and so on.

Any tips?

*Should be MNWE = Minimal Not Working Example.

Screenshot:

enter image description here

  • I think latexit is meant for inserting formulas IIRC. – user11232 Feb 17 '14 at 23:03
  • I don't think LaTeXIt is meant for general LaTeX compilation; it does formulas, that's all. – egreg Feb 17 '14 at 23:17
  • Your example works for me with the latest version of LaTeXIt (2.5.4). A possible problem with your example might be that you have to select text. – Guido Feb 18 '14 at 0:06
  • 1
    @egreg LaTeXIt can pretty well be used for general LaTeX compilation as long as the result is just a single page. I have used it quite a lot for including TikZ images and listings into my Keynote presentations. The point is the body/preamble templates, which have to be set up to include the respective packages. – Daniel Feb 18 '14 at 6:22
  • Your example works well here, please provide us the complete preamble template and body. – Daniel Feb 18 '14 at 6:23
3

The MWE seems to works properly.

enter image description here

After changing the preamble one has to apply it to the open document, and then complying using text. The screenshot in the original post indicates that one of the other options is used (Align, which is in math mode)

| improve this answer | |
  • is your texlive version 2013? – user3232 Feb 18 '14 at 22:14
  • My distribution is texlive 2013. But I have downloaded version 2.5.4 from the LaTeXIt (go to Check for Updates menu item) – Guido Feb 19 '14 at 0:59
  • Really strange, we have the same version of the software (I am on Mavericks). – user3232 Feb 19 '14 at 7:18
  • The version of LaTeXIt that ships with MacTeX/texlive is not the latest stable version. The latest stable version is 2.5.4. Also, I get your result when I do not select Text. – Guido Feb 19 '14 at 10:14
  • I have 2.5.4. I think LatexIt asked me if I wanted to update and so did I. I have got two macs (pro and air) -- the same problem in both. – user3232 Feb 19 '14 at 11:19

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.