Tuesday, June 1, 2010

Makefile tricks

I write to record Bryan's "embed postscript fonts" trick. Without this trick, some conference/journal submission systems won't let you submit, complaining that "fonts not embedded".

The trick is to use the "embed" rule, as called by "done" in the following Makefile. This code is available at /wisp/var/adam2/cbr/doc/Makefile

all : dirs tex bib tex tex done
one : dirs tex done 

done : embed
@printf "\n\n\n======================================\n"
@printf       "see output in $(HOME)/tmp/$(Src).pdf\n"
@printf "=======================================\n\n\n"
@printf "\n\nWarnings (may be none):\n\n"
grep arning $(HOME)/tmp/${Src}.log
dirs : 
- [ ! -d $(HOME)/tmp ] && mkdir $(HOME)/tmp
tex :
- pdflatex -output-directory=$(HOME)/tmp $(Src)
embed :
@ cd $(HOME)/tmp; \
    gs -q -dNOPAUSE -dBATCH -dPDFSETTINGS=/prepress \
       -sDEVICE=pdfwrite \
        -sOutputFile=$(Src)1.pdf $(Src).pdf
@ mv  $(HOME)/tmp/$(Src)1.pdf $(HOME)/tmp/$(Src).pdf
bib : 
- bibtex $(HOME)/tmp/$(Src)

No comments:

Post a Comment