I want to generate two pdfs from one .tex file. There are two packages namely pdfscreenand screen for creating a document either for print as output or for viewing the pdf generated online.
How can I achieve this by means of a single .tex file?
Edit
\documenclass{book}
\usepackage[print,nopanel]{pdfscreen}
\begin{print}
...some packages name
\end{print}
\begin{screen}
...some packages name
\end{screen}
\begin{document}
This is some example document.
\end{document}
When I run pdflatex filename.tex, I want to have two pdfs according to packages used in print section and in screen section.
\documentclass{...}and ending with\end{document}. – cfr Nov 28 '14 at 01:26screenpackage I can find on CTAN is for LaTeX 2.09.printI cannot find at all. – cfr Nov 28 '14 at 01:29screenhave to do with it? It isn't in your MWE and you could not use it in a LaTeX-2e document. It would be much easier to create two documents with the relevant preambles and then input the main body of the document. – cfr Nov 28 '14 at 01:48pdflatexrun, though. So what you want is not 'just like' that at all ;). – cfr Nov 28 '14 at 02:19pdflatex -jobname=print "\newif\ifprint\printtrue\input{filename.tex}" && pdflatex -jobname=screen "\newif\ifprint\printfalse\input{filename.tex}", where your main file isfilename.texand it has something like\ifprint \usepackage{printstuff} \else \usepackage{screenstuff} \fifor separating out the different "print" and "screen" setups. I gave a similar answer here once. – jon Nov 28 '14 at 03:01