0

I would like to know what do I have to do if I want to convert the my Tex document into an image. I'm new to Latex World, sorry if it is a dumb question for somebody

2 Answers2

2

I don't have enough points to comment but what exactly you are talking about? You want to convert a 1 page Tex document to image? Simply you can build as pdf and then convert pdf to images with many free tools.

Odin
  • 203
  • Okey but I heard there is an easier method using directly the latex compiler to transform it into an image – Jordi Bosch Sep 15 '14 at 18:12
  • 1
    Check here then. You can do that in the \documentclass – Odin Sep 15 '14 at 18:16
  • If it's one page .pdf document, you can include it anyway as image or using pdfpages package anyway. There is no need to convert to another image format again –  Sep 15 '14 at 19:14
1

You must have ImageMagick installed. The following simulates everything you need to generated images from your TeX input file.

% filename.tex
% compile it with
% pdflatex -shell-escape filename.tex

\documentclass{article}
\usepackage{filecontents}

\begin{filecontents*}{main.tex}
\documentclass[12pt]{article}
\usepackage{blindtext}
\begin{document}
\Blinddocument
\end{document}
\end{filecontents*}

\immediate\write18{pdflatex main.tex}
\makeatletter
\immediate\write18{convert -density 100 main.pdf main-\@percentchar d.png }
\makeatother

\usepackage{animate}
\begin{document}
\animategraphics[autoplay,loop,scale=0.5,controls]{5}{main-}{0}{19}
\end{document}