Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!uunet!mcsun!cernvax!chx400!chx400!bernina!neptune!inf.ethz.ch!wyle From: wyle@inf.ethz.ch (Mitchell Wyle) Newsgroups: comp.text.tex Subject: sccs, tex makefiles, xfig, hints Message-ID: <27530@neptune.inf.ethz.ch> Date: 15 Mar 91 11:00:34 GMT Sender: news@neptune.inf.ethz.ch Reply-To: wyle@inf.ethz.ch (Mitchell Wyle) Organization: ETH, Zurich Lines: 78 Like many of you, I use fig to draw figues, then fig2dev -L latex to transform the figures to latex. In the main document, I'll have entries such as: % ------------------------------- figure 1 ------------------------------- \begin{figure}[h]\label{overview} \input f1.tex \caption{System Overview} \end{figure} % ------------------------------- figure 1 ------------------------------- and of course fig2dev -L latex converts f1.fig to f1.tex. I recently discovered the wonderful world of implicit rules in makefiles. The makefile for the current paper I am working on is: .SUFFIXES: .fig .tex .fig.tex: fig2dev -L latex $*.fig > $*.tex .tex.dvi: latex $*.tex all: wan2.dvi wan2.dvi: f1.tex f2.tex wan2.tex f1.fig f2.fig f3.tex latex wan2.tex The neato thing about make is that it knows how to generate the .tex figures from the .fig figures; I just have to tell it that the main paper depends on the .tex versions of the figures; if the .fig version changes, make knows to re-run the fig2dev! * * * I also use sccs to control versions of the figures and tex documents. My documents all have something like: % sccs version control: %Z%%M% %I% %E% %U% as the first line. I hacked xfig to add the line: # %Z%%M% %I% %E% %U% after the version number line at the top. Then I can sccs deledit to checkpoint versions of the paper as it evolves. I can also go back to an earlier version when I accidentially delete too much text. I also hacked fig2dev to set the line-thickness on boxes, horizontal, and vertical lines. The restriction to \thinlines or thicklines is unecessary; read page 199 of the Latex book. I suppose I should send diffs to the fig2dev authors.... Of course the nice thing about using xfig and fig2dev -L latex is that the final document is 100% in latex so I can preview it, send it electronically, use emtex at home on dos ozTex on the macs, etc. without worrying about having a postscript(tm) printer, a dvi2xxx which will do the \special inclusion right, previewers which understand \special and all the other hassles. * * * If the maintainer of the comp.text.tex FAQ is reading this, I would appreciate your adding these hints if you think they are appropriate, i.e. How can I maintain version control of my tex documents? sccs is available on most Unix systems; a comment at the top of your document such as: % sccs version control: %Z%%M% %I% %E% %U%