[tex-live] bibtex with pdflatex

Zdenek Wagner zdenek.wagner at gmail.com
Sat Dec 5 11:40:39 CET 2009


2009/12/4 kap4lin <kap4lin at gmail.com>:
> Hi,
> KIndly CC me when replying.
>
> Using Texlive 2009, on Red Hat EL 5.4.
> Is there a way to combine bibtex and pdflatex into one command. So,
> that bib changes are done automatically? Specifically, I am looking to
> do this for Texworks.
>
I do it with a makefile. I am sending the contextof a makefile that
uses LaTeX + dvips (it is required to process this particular document
this way). There are several important points:

1. The implicit rule for dvi must be deleted otherwise make will
ignore the rule for aux
2. BibTeX run depends on aux, I have a special rule for aux creation
3. bbl file is marked as PRECIOUS because it may be useful to see it
if something does not work as expected
4. zwWhatever programs are symlinks to my perl script that run
Whatever repeatedly until the MD5 sum of the aux file does not change.
This ensures that cross references are resolved.

If you want to create PDF directly, you just delete targets for
dvi/ps/pdf and add the target for
%.pdf : %.tex %.bbl
I can imagine that the name of the main file can be sent to make from
a toolbar button or whatever.

If somebody wants, I can publish my zwtexrun script.

This is the Makefile:
## $Id: Makefile 123 2009-11-27 15:56:46Z zw $
name = anatevopsid

.PHONY: all

.PRECIOUS: ${name}.bbl

all: ${name}.pdf

%.pdf : %.ps
        ps2pdf $< $@

%.ps : %.dvi
        dvips -o $@ $<

%.dvi : %.tex


%.dvi : %.tex %.bbl
        zwlatex $<

%.aux : %.tex
        latex $<

%.bbl : %.aux %.bib
        bibtex $<




> --
> Regards
> Kap4Lin
> --------------------------------------
> http://counter.li.org  #402424
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz


More information about the tex-live mailing list