Re: DOCBOOK: jadetex producing different output each time run

From
Adam Di Carlo <>
Date
1999-12-22T17:59:44+00:00
ID
Thread
Re: DOCBOOK: jadetex producing different output each time run
maarten de boer <> writes:

> What am I doing wrong?

Nothing.  After each pass by JadeTeX, the .aux file is updated.  In my
makefiles, I sometimes compare the .aux file prior to processing with
the file after processing, and make a decision based on that whether
to run again.

In this example Makefile snippet, we're using pdflatex directly, but
that doesn't matter, they all work the same.  MAX_TEX_RECURSION needs
to be set to prevent infinite recursion (a tri-stable .aux file).

I've CC'd the SGMLtools list because this technique should be used there too.

%.pdf:	%.tex
#	 note that I have seen bi-stable .aux files, thus we check two levels deep
	-cp -pf prior.aux pprior.aux
	-cp -pf $(shell basename $< .tex).aux prior.aux
#	 fail if we don't have pdflatex correctly installed
	kpsewhich pdflatex.fmt > /dev/null
#	 due to a bug in debiandoc2latex2e output, this might fail
	-pdflatex '\nonstopmode\input{$<}'
	set -e								;\
	if ! cmp $(shell basename $< .tex).aux prior.aux 2>/dev/null &&	\
	   ! cmp $(shell basename $< .tex).aux pprior.aux 2>/dev/null &&\
	   expr $(MAKELEVEL) '<' $(MAX_TEX_RECURSION); then		\
		rm -f $@						;\
		$(MAKE) $@						;\
	fi
	rm -f prior.aux pprior.aux

-- 
.....Adam Di .....<URL:http://www.onShore.com/>