Tuesday, March 4, 2008

Using DVIPS to print only a few pages to a PS file

I just figured out how to print only a few pages of a LaTeX document to a postscript or pdf file. After you run LaTeX on your file, you end up with a dvi file. Then simply run the following command:

dvips your-file.dvi -p =num1 -l =num2 -o your-file.ps

After you do this, your-file.ps will contain pages num1 through num2 of the dvi file. You can convert this to pdf by using ps2pdf as follows:

ps2pdf your-file.ps

No comments: