How to split a dvi file to the text and the references


 

The problem originates from NSF grant-making, where one of the most convenient ways to upload the Project Description is doing it in dvi format. Once one is able to split the content and the references to separate dvi files! This page is created to describe how to make such a split. It worked for me, no guaranty it will work for everyone.

Assume one has a "proposal.tex" file which has the correct page numbering, and which includes all references. I also assume that "proposal.tex" is using bibtex, although I'm pretty sure that something similar to these tricks also works out without bibtex. I also assume that there is a "\newpage" command before the bibliography. (Furthermore, I assume that there is no file named "propfirst.*" and "propbib.*" in the directory where "proposal.tex" is.)

Step 1:

> cp proposal.tex propfirst.tex [enter]

Step 2:

> cp proposal.tex propbib.tex [enter]

Step 3:

Cut everything out from "propfirst.tex" between the "\newpage" preceding the bibliography and "\end{document}", including that "\newpage", but not "\end{document}". Then save the file.

Step 4:

Cut everything out from "propbib.tex" between "\begin{document}" and the "\newpage" preceding the bibliography, including this "\newpage", but not "\begin{document}". Then save the file.

Step 5:

latex "proposal.tex", bibtex it, then latex it twice (sometimes it's needed three times). So now we have the correct and final "proposal.aux" and "proposal.bbl" files.

Step 6:

> cp proposal.aux propfirst.aux [enter]

Step 7:

> cp proposal.bbl propbib.bbl [enter]

Step 8:

> latex propfirst.tex [enter] (only once!)

Step 9:

> latex propbib.tex [enter]

Step 10:

> latex propbib.tex [enter] (again)

Step 11:

Enjoy the files "propfirst.dvi" and "propbib.dvi". :-)


 

 

Back to the utilities