User Tools

Site Tools


makegallery

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

makegallery [2008/02/12 14:39]
kleiner created
makegallery [2008/02/12 14:42] (current)
kleiner Corrected errors in code snippets
Line 12: Line 12:
  
 In case you don't use latexmk, or if you want to make your Makefile usable for people who don't, the following, slightly more complex Makefile should do the job. In case you don't use latexmk, or if you want to make your Makefile usable for people who don't, the following, slightly more complex Makefile should do the job.
-  ​LATEX = latex +<​code>​ 
-  PDFLATEX = pdflatex +LATEX = latex 
-  BIBTEX = bibtex +PDFLATEX = pdflatex 
-  EGREP = egrep +BIBTEX = bibtex 
-  EGFLAGS = "​-c"​ +EGREP = egrep 
-   +EGFLAGS = "​-c"​ 
-  RERUN = "​Label(s) may have changed"​ + 
-  RERUNBIB = "No file.*.bbl|Citation.*undefined"​ +RERUN = "Label\(s\) may have changed"​ 
-   +RERUNBIB = "No file.*\.bbl|Citation.*undefined"​ 
-  %.pdf: %.tex + 
-   ​$(PDFLATEX) $< +%.pdf: %.tex 
-   ​$(EGREP) $(EGFLAGS) $(RERUNBIB) $*.log && ($(BIBTEX) $*; $(PDFLATEX) $<); true + ​$(PDFLATEX) $< 
-   ​$(EGREP) $(RERUN) $*.log && $(PDFLATEX) $<; true + ​$(EGREP) $(EGFLAGS) $(RERUNBIB) $*.log && ($(BIBTEX) $*; $(PDFLATEX) $<); true 
-   ​$(EGREP) $(RERUN) $*.log && $(PDFLATEX) $<; true + ​$(EGREP) $(RERUN) $*.log && $(PDFLATEX) $<; true 
-   ​# Display relevant warnings, including the following line + ​$(EGREP) $(RERUN) $*.log && $(PDFLATEX) $<; true 
-   ​egrep -i -A 1 "​LaTeX.*Warning"​ $*.log ; true+ # Display relevant warnings, including the following line 
 + egrep -i -A 1 "​LaTeX.*Warning"​ $*.log ; true 
 +</​code>​
 To generate ''​.ps''​ files without latexmk, you will need a rule similar to the one above, that generates a ''​.dvi''​ file from a //.tex// file, and a second rule that uses ''​dvips''​ to generate the ''​.ps''​ file; however this is not provided here, at least for the moment. ​ To generate ''​.ps''​ files without latexmk, you will need a rule similar to the one above, that generates a ''​.dvi''​ file from a //.tex// file, and a second rule that uses ''​dvips''​ to generate the ''​.ps''​ file; however this is not provided here, at least for the moment. ​
  
Line 42: Line 44:
 =====  XFig to PDF/LaTeX combined ​ ===== =====  XFig to PDF/LaTeX combined ​ =====
 This requires the ''​transfig''​ package, in particular the ''​fig2dev''​ command. There are two rules involved. The first rule converts the ''​.fig''​ file (without text) to a ''​.pdf''​ file, and the second rule creates the file containing the corresponding LaTeX code. This requires the ''​transfig''​ package, in particular the ''​fig2dev''​ command. There are two rules involved. The first rule converts the ''​.fig''​ file (without text) to a ''​.pdf''​ file, and the second rule creates the file containing the corresponding LaTeX code.
-  ​%.pdf : %.fig +<​code>​ 
-    fig2dev -L pdftex $< $@ +%.pdf : %.fig 
-  +  fig2dev -L pdftex $< $@ 
-  %_t : %.fig + 
-    echo -e "​\\begin{picture}(0,​0)%n\\epsfig{file=$(patsubst %.fig,​%,​$<​)}%n\\end{picture}%"​ +%_t : %.fig 
-     ​> $@ +  echo -e "\\\\begin{picture}(0,​0)%\n\\\\epsfig{file=$(patsubst %.fig,​%,​$<​)}%\n\\\\end{picture}%"​\ 
-    fig2dev -L pdftex_t $< >> $@+   ​> $@ 
 +  fig2dev -L pdftex_t $< >> $@ 
 +</​code>​
 The line starting with ''​echo''​ makes sure that all you need to do in the LaTeX file is type The line starting with ''​echo''​ makes sure that all you need to do in the LaTeX file is type
   \input{file_t}   \input{file_t}
Line 60: Line 64:
  
 There are two rules involved. The first rule converts the ''​.fig''​ file (without text) to a ''​.pdf''​ file, and the second rule creates the file containing the corresponding LaTeX code. There are two rules involved. The first rule converts the ''​.fig''​ file (without text) to a ''​.pdf''​ file, and the second rule creates the file containing the corresponding LaTeX code.
-  ​%.ps : %.fig +<​code>​ 
-    fig2dev -L pstex $< $@ +%.ps : %.fig 
-   +  fig2dev -L pstex $< $@ 
-  %_t : %.fig + 
-    echo -e "​\\begin{picture}(0,​0)%n\\epsfig{file=$(patsubst %.fig,​%,​$<​)}%n\\end{picture}%"​ +%_t : %.fig 
-     ​> $@ +  echo -e "\\\\begin{picture}(0,​0)%\n\\\\epsfig{file=$(patsubst %.fig,​%,​$<​)}%\n\\\\end{picture}%"​\ 
-    fig2dev -L pstex_t $< >> $@+   ​> $@ 
 +  fig2dev -L pstex_t $< >> $@ 
 +</​code>​
 The line starting with ''​echo''​ makes sure that all you need to do in the LaTeX file is type The line starting with ''​echo''​ makes sure that all you need to do in the LaTeX file is type
   \input{file_t}   \input{file_t}
makegallery.txt · Last modified: 2008/02/12 14:42 by kleiner