1

As explained in How to use "latex -> dvips -> ps2pdf" to get pdf output? sometimes it necessary to produce a pdf file from a tex file in two steps:

latex input.tex
dvips input.dvi
ps2pdf input.ps

Is there a single command that can do all the above steps at once?

1
  • You can also write a terminal/command line script to do this. The exact syntax depends on the operating system that you use, you could add that information to your question if you are interested in that solution. However, it should not really be needed to use this workflow anymore. For eps graphics you can just use pdflatex. For PSTricks you can use xelatex/lualatex or pdflatex with auto-pst-pdf. For Plain TeX things like MusiXTeX there are usually wrapper packages for (pdf)latex available.
    – Marijn
    Sep 11, 2022 at 14:48

2 Answers 2

1

run the command

latexmk -pdfps <texfile>
1

arara

% arara: latex
% arara: dvips
% arara: ps2pdf
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{example-image.eps}
\end{document}

Run with arara input.

latexmk

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{example-image.eps}
\end{document}

Run with latexmk -pdfps input.

pdflatex

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{example-image.eps}
\end{document}

You can directly run it with pdflatex input now. Note that you need to store example-image.eps file in the same directory of input.tex.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .