5

I'm noob in TeX. Would it be possible to convert a .tex file into PNG without installing ImageMagick? Is there a standalone method that I can use?

8
  • 1
    Did you mean to write, "Convert a pdf file generated by tex into PNG without installing ..." (emphasis added)? Commented Aug 10, 2015 at 19:36
  • 6
    How can this be off topic? Commented Aug 10, 2015 at 20:37
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Commented Aug 10, 2015 at 22:05
  • 1
    Could you say what you mean by 'standalone'? There is some confusion among readers about this: the question suggests you just mean 'without installing ImageMagick' but you might mean 'without installing ImageMagick, a TeX distribution or any similar software' in which case, we need to know what counts as 'similar' ;). Commented Aug 11, 2015 at 2:40
  • 1
    @egreg no, I do not know dvipng. But I think the question was tex to png without steps between. Commented Aug 11, 2015 at 16:04

1 Answer 1

9

Yes, it's surely possible. The TeX Live distribution features the dvipng program. Here's a sample.

LaTeX file test.tex

\documentclass{article} \usepackage{kantlipsum} \pagestyle{empty} \begin{document} \kant[1] \end{document} 

Convert to DVI test.dvi

latex test 

Convert to PNG test1.png

dvipng -T tight test 

Output

enter image description here

Consult the manual for more information about command line options.

4
  • And how will the executables latex and dvipng be available without installing anything? Commented Aug 10, 2015 at 21:10
  • 2
    @PaulGessler I assume a TeX system. Commented Aug 10, 2015 at 21:10
  • @egreg Why the proliferation of ImageMagick method, then? I couldn't get convert to work. Will use this method. Thanks! Commented May 19, 2017 at 4:28
  • 2
    @FruitfulApproach Unfortunately, this method has very limited usefulness when graphics, such as TikZ, is involved. Commented May 19, 2017 at 8:09

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.