dumping special formats (was Re: [OS X TeX] Language.dat)
ccr-mactex at creutzig.de
ccr-mactex at creutzig.de
Mon Sep 2 11:48:18 EDT 2002
"Josep M. Font" <font at mat.ub.es> writes:
> 1.2 Can I \dump my own format files (especialized LaTeXs with several
> packages incorporated? Should I just compile them and save them as
> .fmt files in some directory? Which one?
Sure you can. This is how I do it:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% projecthead.tex, used for LaTeX, pdfLaTeX, and for LaTeX used inside metapost
\documentclass[a5paper,10pt,DIV12,smallheadings,%
twoside,BCOR10mm]{scrreprt}
\newif\ifentwurf
\entwurftrue
% As usual, I put almost everything into a local .sty file.
\usepackage{project}
\hyphenation{PGP-keys Stan-dard-ein-ga-be Datei-na-men
Stan-dard-ein-stel-lun-gen Menü-be-fehl}
\dump
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% project.tex, the actual tex file. This file has to *start* with
%the next line:
%&pdfproject
% \makeindex opens a file, so it can't be \dump{}ed.
\makeindex
\begin{document}
...
\end{document}
######################################################################
#
# Makefile
.PRECIOUS: project.efmt pdfproject.efmt project.dvi
# start with your main file
TEXFILES=project.tex chapter1.tex chapter2.tex
default: project.pdf
project.pdf: $(TEXFILES) pdfproject.efmt
echo 'LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.' >project.log
while grep -q 'LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.' project.log; do \
env pool_size=200000 buf_size=150000 extra_mem_top=1100000 \
pdfevirtex -progname=pdfelatex -efmt=pdfproject $<; \
done
project.dvi: $(TEXFILES) project.efmt
echo 'LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.' >project.log
while grep -q 'LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.' project.log; do \
env pool_size=200000 buf_size=150000 extra_mem_top=1100000 \
evirtex -progname=elatex -efmt=project $<; \
done
project.ps: project.dvi
dvips $< -o $@
pdfproject.efmt: projecthead.tex project.sty
env pool_size=200000 pdfeinitex \&pdfelatex $<
mv projecthead.efmt $@
project.efmt: projecthead.tex project.sty
env pool_size=200000 einitex \&elatex $<
mv projecthead.efmt $@
######################################################################
######################################################################
Yes, this is advanced Unix usage. Yes, I know my Makefile has a
concurrency problem if you try to build the format files for pdf and
dvi at the same time -- but I never had any reason to do so. And
yes, I have quite a bit of practice with Makefiles. :-)
In the end, it boils down to "edit whatever you want, call 'make'
once and you should get a completely redone pdf file with the least
work possible." Just remember to put the .tex files in there
correctly and everything that your projecthead.tex depends on.
--
+--+
+--+|
|+-|+ Christopher Creutzig (ccr at mupad.de)
+--+ Tel.: 05251-60-5525
-----------------------------------------------------
Mac TeX info, resources, and news can be found at:
<http://www.esm.psu.edu/mac-tex/>
-----------------------------------------------------
List archives can be found at:
<http://www.esm.psu.edu/mac-tex/MacOSX-TeX-Digests/>
Threaded list archives can be found at:
<http://www.masda.vxu.se/~pku/MacOSX_TeX/>
-----------------------------------------------------
See message headers for list info.
-----------------------------------------------------
More information about the MacOSX-TeX
mailing list