Templates for building tex documents by several authors =============================== (E.Chudakov gen@jlab.org) The idea is to keep the source in the SVN system, that different people can edit it and build various documents. Here, I assume that the source has been already checked out from SVN. By default, the documents are build using pdflatex. It makes pdf directly (no dvi). The advantages against dvips: a) accepts JPEG, PNG and PDF for pictures b) easy cross-referencing A) STRUCTURE The structure is as follows: scripts/ # directory with several useful scripts src/ # the sources (the .tex files and pictures) The structure of src/: beam/ # documents concerning the beam properties bibl/ # bib databases common/ # common files, like preamble files, and common pictures photopr-simul/ # photoproduction simulation trigger-hardware/ # trigger hardware trigger-review-2008/ # (main) the files for building a document for the trigger review on May, 2008 trigger-simul/ # trigger simulation The pictures are located in the proper directories, say beam/: beam_rates.tex # a section about the beam/protoproduction rates figs/ # appropriate figures A main directory, as trigger-review-2008/ is used to keep a few files used to build a particular document: main.tex # the main (a short file, defining the document and calling other files) title.tex # the title page introduction.tex # introduction section conclusion.tex # conclusion section figs/ # directory for some specific pictures used from this main directory B) BUILDING DOCUMENTS Let us assume you want to build the document for the trigger review, the main is in src/trigger-review-2008/ 1) cd to tex-docs 2) ./scripts/config trigger-review-2008 Start config Directory run_trigger-review-2008 created. 3) cd run_trigger-review-2008 4) make pdf It will build trigger-review-2008.pdf By default, pdflatex is used. C) EDITING 1) One can edit the existing file, say src/trigger-review-2008/conclusion.tex and rebuild the document repeating B) Them one may commit the changes to the repository: svn commit -m "A very important improvement" conclusion.tex 2) A new .tex file and a new picture should are added to trigger-simul/ trigger-simul/em-bg.tex trigger-simul/figs/embg.ps # this file is called from em-bg.tex a) the file em-bg.tex must be included in main.tex or trsimul.tex, \input{em-bg} % similar to other files in the main.tex b) build other formats of embg.ps: cd trigger-simul/figs/ ../../../scripts/myps2epdf embg cd ../ cat ../../svn.template >> em-bg.tex # add a SVN keyword which describes the last revision c) rebuild the document, see B) d) commit the changes to the repository: cd trigger-simul/ svn add em-bg.tex cd figs/ svn add embg.ps svn add embg.epsi svn add embg.pdf Or, if in bash: for i in `ls -1 embg*`; do svn add $i ; done cd ../ svn commit -m "Another change" D) PICTURES Example from beam/ \begin{figure}% [htb] \begin{center} \includegraphics[width=0.98\linewidth,angle=0]{figs/beam_phot_rates_01} \end{center} \caption{Bla bla} \label{fig:beam-phprod} \end{figure} Please note that NO extension should be used in the filename. The sequence for file searching is defined in src/common/preamb_common.tex