# How to: Latex in Prezi while waiting for real latex support

• Idea
• Updated 1 year ago
###### Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: .

While waiting for official latex support, I do the following.

Create a tex-file like this:

\documentclass[12pt,a4paper,notitlepage]{article}
\usepackage{amsmath}
\usepackage[active,pdftex,displaymath,tightpage]{preview}
\usepackage[pdftex, ignoreall, textwidth=5cm]{geometry}
\begin{document}
\pagestyle{empty}
$\int_0^\infty x\arctan x \mathrm{\,d}x = \textrm{???}$
\end{document}

and compile it with pdflatex. This will render you a pdf that is convenient to include in your Prezi.

Here's a test prezi showing the result: http://prezi.com/fuvyh3amhfjr/

The main point of this is of course that the equations are vector graphics and thus nicely zoomable by Prezi, as opposed to making bitmap equations.

Two notes:
This is the minimal tex - use whatever packages you need to get your work done. If you do not want math specifically, use environment 'preview', see manual of the preview package for details.

To not get full page width I use the geometry package (see line 4) and manually specify image width, you will have to change this according to your content, or exclude the line and live with full width whitespace. If anyone figures out a nice way to get around this, please write a line here. For now, just adapt the textwidth=5cm to whatever width you need..
• 2 Posts
• 0 Likes
• looking forward to real latex support

Posted 5 years ago

Zoli Radnai, Official Rep

• 5939 Posts
• 311 Likes
Hi,
awesome, thanks for the cool workaround. I have added a new article to our learn page suggesting your tip. http://prezi.com/learn/how-add-latex-...

We are aware of the request for LaTex support. We cannot promise features, but we always listen to our community when developing.
• 1 Post
• 2 Likes
Hey,

I like LaTeX I much as I like Prezi :)
I usually use Codecogs' online editor when I need to put nicely typeset equations somewhere:
http://www.codecogs.com/latex/eqnedit...

You can save them in a variety of formats including pdf, swf and svg.

Have a good day,

Greg L
• 2 Posts
• 0 Likes
This editor pretty much makes my suggestion obsolete for equations. For more elaborate stuff (equation systems, theorems, etc) it's still a good idea to use the preview package and compile a pdf.

Thanks for the tip!

Jonas
• 2 Posts
• 2 Likes
Well, MacOS users are really gifted, in this way, like in many others ;-)

Here is why: just open your article, the one you wrote in LaTeX with the Preview, then use the Select tool, drag a rectangle around the formula you need,

then hit Copy, and Paste as New, Apple-C and Apple-N, then save this as a standalone pdf weighting only a few Kbs.

You don't need to compile anything, just use the PDFs you have in store!
Another option is LaTeXit, which allows you to produce pdfs of LaTeX fragments without the hassle of managing little files.
An elaborate example with an included PDF image, just for the fun of it :-)
• 2 Posts
• 0 Likes
This is awesome. I use LaTeXiT but I can "export" the pdf file I create into my presentation. How do I do it?

Thank you for your help.
• 5 Posts
• 0 Likes
This is what I did:

1. Create my equation in LaTeXiT
2. Under the File menu (in LaTeXiT) choose Export image...
3. Choose PDF Vector Format and save it somewhere
4. From Prezi choose Insert > Load file
5. Choose the pdf you created with LaTeXiT
6. Place it where you need it, adjust the size if needed.

This is what I did in approximately 30 seconds:

http://prezi.com/-par2cfal8eb/just-so...

I'm sure there are other ways of doing this, but this works for me. Unlike equations in png or jpg format, these pdfs can take any zoom and still look great. If you're proficient with LaTeX, you can change the preamble in LaTeXiT and customize it (e.g., change fonts, use different pacjages for specific needs, etc.)
• 2 Posts
• 0 Likes
Thank you OC.

After working on LaTeXiT a little bit, I found the same solution (using Export imange etc.). The only difference is the format. I have to use "PDF with outlined fonts", otherwise, it doesn't make me include the .pdf file I created using PDF Vector image. Any idea of the possible reason?
• 5 Posts
• 0 Likes
If "PDF with outline fonts" works for you, it doesn't matter why. I have to say that I didn't try all options. I tried PNG and the results were terrible. I tried PDF Vector Format and that worked great. I don't know anything about the difference between those two PDF options, so I can't answer your question. I would simply suggest that you try the different options and use whatever works.
• 2 Posts
• 0 Likes
I have been using LaTeXiT and Prezi for quite a while now.  I also use KLatexFormula when working on Windows.  One major drawback is that the exported PDF files are imported with a white background.

My workaround for this has been to create a PNG image, but scale up to 500%.

A better solution is to convert the PDF to SWF using the following command:
pdf2swf -s transparent image.pdf -o image.swf

Now my equations are imported with high-quality vector graphics AND transparency!
• 28 Posts
• 0 Likes
just for those who need a bit more space above and below, they can embed that in their latex code

\setlength{\PreviewBorder}{5bp} \begin{document} 

just change the dimension of the margin to your convenience.
• 1 Post
• 1 Like
Thanks!!!
• 11 Posts
• 0 Likes
I've found the pdfcrop tool to be handy for what it's worth
• 1 Post
• 3 Likes
Well ... I think that this workaround is a quite good one - for a workaround.

But it would be really nice, if there would be a more natural - and therefore faster - way to insert latex code into a prezi presentation.

Raise your hands if you would appreciate such a feature, too! :)
• 6743 Posts
• 287 Likes
+1 for a LaTeX and HTML parser or editor
• 1 Post
• 0 Likes
Any way to get a transparent background, as opposed to opaque white?
• 1 Post
• 0 Likes
All these workarounds are still tedious to use. I really like prezi, but its lack of direct latex support is painful. And without such a support, it won't spread in the scientific community.
• 5 Posts
• 0 Likes
Thanks for the clue! However, the preview package didn't work for me, as it would only collect the equations in a page, not the sorrounding text. I don't know whether this was the intention or if I did something wrong.

In any case, I devised a plan which has been working for me and I'm writing it here just in case it can be useful for others:

My intention was, in some way, use prezis to substitute beamer in mathematics presentations, so I need extensive creation of slides with text and formulas together. For a start, I have found the geometry package very convenient to choose the length of the text. Then I do the following in sequence:

1. Plan the talk in one or two sheets of paper, deciding which slides I want to include and getting some idea how they will be related in prezis. Usually I prepare a talk on the basis of a paper, so I can get some idea which information from the paper I will want to include in slides.

2. Then I produce one latex file for each slide and compile it to ps.

3. After producing all the ps files I want, I open each one of them in Ghostscript and do the ps to eps conversion, usually letting the bounding box to be calculated automatically (but if you want some more space sorrounding your slide, you can choose yourself the limits of the bounding box).

4. Then I drag each one of those eps files to epstopdf.exe in order to create corresponding pdf files with the correct bounding boxes (you can find epstopdf.exe in the binaries of your LaTeX distribution; for simplicity then I usually make a copy of it to the folder where I'm working, so that then it's easier to drag the eps files in that folder to that program).

5. After all these steps, I have all that I need to build my mathematics presentation in prezis, so I work in prezis as usual, uploading each file as necessary (or you can also upload in bulk).

If someone knows how to programme (I don't, at least not in a useful way), probably could create a batch file to automate some of the steps. And then distribute it to us ;-).

One last thing. Ocasionally there are some ps files which do not open in Ghostscript. For those rare cases I have the following workaround: instead of compiling the latex file to ps, I compile it to dvi and drag it to dvips.exe (yes, you can find it in your LaTeX distribution) to produce a corresponding ps file, so that then I can continue from step 3 on.

António Caetano.
• 5 Posts
• 0 Likes
If you want to see the result for an example where the procedure above was followed, have a look in http://prezi.com/dnl_yje9lkgc/atomic-....
• 5 Posts
• 0 Likes
Why go tex - ps- eps - pdf if you can go directly from tex to pdf using pdftex or pdflatex?
• 5 Posts
• 0 Likes
The problem is that if you do that your slide will occupy the whole letter or A4 size, with lots of white space sorrounding your text.

This problem is solved in the ps to eps part, where the white space sorrounding your text will be removed (as long as you keep the instruction \pagestyle{empty} in your latex file).
• 5 Posts
• 0 Likes
You are correct, now I see what you mean. An easier route, however, is to use LaTeXiT, as was discussed above.
• 5 Posts
• 0 Likes
I was assuming (and it seems I am right, by the search I have done just now) that LaTeXiT is designed only for MacOS. You see, I'm one of the ungifted guys who are using Windows ;-).

On the other hand, I seldom use exactly the text of the intended section of a paper to produce a slide: usually one has at least to remove some information for the presentation. Of course, if I could use something like LaTeXiT, it would save me some time, I guess. If you know of something similar for Windows users, I would be happy to know about it.

For small things (just one equation or some symbol) I use http://www.codecogs.com/latex/eqnedit..., as also discussed above.
• 3 Posts
• 5 Likes
The codecogs equation editor has been mentioned above, but they also have a URL handler that returns the latex in SWF format.

To use this, simply paste the following url into the url field when you are in prezi insert -> image:

http://latex.codecogs.com/swf.latex?1+sin(x)

This will trigger codecogs to generate a SWF file with 1+sin(x) in nice latex format.

For more details, I've written a post about this at The Daily Photon

-Andy
• 2 Posts
• 0 Likes
Thanks Andy. I read your article yesterday and thought it was a great idea. Let's face it though -- no matter how cool LaTeX is, not everyone wants to use it. I've written a translator for MathType for those who'd rather use MathType, and I'd love to have people try it out and tell me what doesn't work that should work. The translator uses the same CodeCogs root URL that you show above, and it takes the MathType equation and adds the LaTeX after the ? in the URL. If anyone wants to try it, email me at bobm at dessci dot com and I'll send it to you with instructions.
• 3 Posts
• 5 Likes
Is your translator scripted into a URL? What makes the codecogs latex trick so slick is that Prezi auto-imports images from URLs (a brilliant feature by the way). There are lots of ways to get math into Prezi, but what I like about latex at codecogs is that it basically makes "insert image" into "insert latex".
• 2 Posts
• 0 Likes
It basically turns a MathType equation into AMS-LaTeX, with one or two tweaks, and prepends the CodeCogs URL to it, thus producing the same SWF output as you described in your article. So now we have "insert LaTeX" into Prezi, as well as "insert MathType". The only downside is that with the SWF format, you can't copy the equation to paste back into MathType (like if you wanted to use it in Word or PPT or elsewhere) like you can on Wikipedia and a good number of other sites.
• 6 Posts
• 0 Likes
Width xetex unicode package this is possible, or using MatJax
• 5 Posts
• 0 Likes
I've been trying it successfully, but I noticed it is not possible to use in this way expressions with the < sign. Does anybody else have this problem?

To try to reproduce it, do the following: compose an expression like a < b in codecogs and use the procedure above to upload it to prezi; be sure to save your prezi and close it; is the expression still there? Not in my case, trying either with IE or Chrome.

As long as you don't close the prezi, the expression remains there, but it vanishes as soon as the prezi is closed.

Where is the bug coming from?
• 2 Posts
• 2 Likes
That's an awesome trick! Thanks for sharing! This more or less puts an end to the discussion as far as I am concerned...
• 6 Posts
• 0 Likes
I think MatJax would give an easy good solution here!

And beside that, unicode support for math symbols should also help!
I can even use those unicode symbols in chrome: ∈,R etc. !
Why can't I use those in perzi?
• 1 Post
• 0 Likes
For more complicated bits than Cogs can do (say with tikz imagery), the standalone package

http://www.ctan.org/tex-archive/macro...

works a charm.

This conversation is no longer open for comments or replies.