dpkg:rubber 

Description: an automated system for building LaTeX documents This is a building system for LaTeX documents. It is based on a routine that runs just as many compilations as necessary. The module system provides a great flexibility that virtually allows support for any package with no user intervention, as well as pre- and post-processing of the document. The standard modules currently provide support for bibtex, dvips, dvipdfm, pdftex, makeindex. A good number of standard packages are supported, including graphics/graphicx (with automatic conversion between various formats and Metapost compilation).

Homepage: http://rubber.sourceforge.net/
Tag: devel::buildtools, format::tex
Depends: python (>= 2.3), python (<< 2.4), tetex-bin

Rubber 

Source 

http://rubber.sourceforge.net/

Description 

Rubber is a program whose purpose is to handle all tasks related to the compilation of LaTeX documents. This includes compiling the document itself, of course, enough times so that all references are defined, and running BibTeX to manage bibliographic references. Automatic execution of dvips to produce PostScript documents is also included, as well as usage of pdfLaTeX to produce PDF documents.

Requirements 

Rubber is written entierly in the language Python, using features from version 2.3. Of course, a supported TeX compiler must be present, as well as additional tools like bibtex and dvips if they are used.

Comments 

current version: 0.99.8

Help 

Quick Help 

The included documentation contains a precise description of the command line interface and the list of standard modules. It is also available online http://rubber.sourceforge.net/doc.html. Some documentation is included about how to create your own modules to support packages.

Detail Help 

The purpose of Rubber is to make the building of a document automated, from the source files to the final document file, replacing the work of a Makefile.

The basis is a routine that compiles a LaTeX source the right number of times to resolve all references and make all tables of contents, list of figures, and so on. On top of that, Rubber provides a modular system to handle various tasks needed apart from compilations. This, for instance, includes processing bibliographic references or indices, as well as compilation or conversion of figures. Additionally, modules can perform a post-processing of the document (for instance to convert a DVI to PostScript or PDF) or even a preprocessing (useful when the LaTeX source is generated by another program, like cweave).

Dependency analysis is performed by parsing the source files, so that modifying any source, user package, graphics file or other dependency leads to appropriate compilations. Modules are triggered either explicitly using command-line options, or implicitly when the sources are parsed. For instance, BibTeX support is activated whenever the source contains commands that generate a bibliography, graphics support is activated by allows any additional feature to be supported by simply writing a module to support it.

Makefile for TeX compilation 

Newsgroups: comp.text.tex

Hi,

 I use the following Makefile with toc, bibtex handling. When I will
have more time I will modify this makefile to handle index.
LATEX = latex
BIBTEX = bibtex
L2H = latex2html
PDFLATEX = ps2pdf
DVIPS = dvips

RERUN = "(There were undefined references|Rerun to get
(cross-references|the bars) right)"
RERUNBIB = "No file.*\.bbl|Citation.*undefined"

GOALS = enonce.ps enonce.pdf
DVIFILES = enonce.dvi

COPY = if test -r $*.toc; then cp $*.toc $*.toc.bak; fi
RM = /usr/bin/rm -f

main:           $(DVIFILES)

all:            $(GOALS)

%.dvi:          %.tex
                $(COPY);$(LATEX) $<
                egrep -c $(RERUNBIB) $*.log && ($(BIBTEX) $*;$(COPY);$(LATEX) $<) ;
true
                egrep $(RERUN) $*.log && ($(COPY);$(LATEX) $<) ; true
                egrep $(RERUN) $*.log && ($(COPY);$(LATEX) $<) ; true
                if cmp -s $*.toc $*.toc.bak; then . ;else $(LATEX) $< ; fi
                $(RM) $*.toc.bak
# Display relevant warnings
                egrep -i "(Reference|Citation).*undefined" $*.log ; true

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

%.pdf:          %.ps
                $(PDFLATEX) $<

clean:
                rm -f *.aux *.log *.bbl *.blg *.brf *.cb *.ind *.idx *.ilg  \
                *.inx *.ps *.dvi *.pdf *.toc *.out

Makefile for TeX compilation 

Somewhere — I have no idea where, now — I came across a Makefile for LaTeX. The name at the top of it is Stefan van den Oord, who seems to have been a student in the Netherlands. I've slightly modified it (PDF-friendly tags in the dvips invocation, a .pdf target that uses distill with A4 paper).

I can't seem to find this file anywhere on the web any more (after a cursory search with google), so I'll include it here… warning, it's a bit long (~330 lines). My signature will probably be appended after it, so watch out for that if cutting and pasting.

Mary Ellen Foster

pdflatex doesn't like EPS?? 

http://groups.google.com/groups?hl=en&threadm=GFq7wp.8LA%40world.std.com&rnum=2&prev=/groups%3Fas_q%3Deps%2Bpdf%26num%3D50%26btnG%3DGoogle%2BSearch%26as_oq%3D%26as_epq%3D%26as_eq%3D%26as_ugroup%3Dcomp.text.tex%26as_usubject%3D%26as_uauthors%3D%2B%26as_umsgid%3D%26lr%3D

Newsgroups: comp.text.tex
Date: 2001-06-29 08:10:32 PST
> Having gotten past that, I find that pdflatex chokes when it sees
> an included EPS file. [...] I can get
> a decent-looking Postscript output file, maybe there is some way to
> derive a PDF from that? Thanks in advance for any thoughts.

you made a correct observation, which is reported to this group regularly, really. Have a look at the user guide for pdflatex and at epslatex.

Alois

pdflatex doesn't like EPS?? 

Thanks very much to everybody who responded. I have arrived at a makefile I am pretty happy with, which can generate PDF, PS, and HTML output. Since this issue seems to come up frequently, it hopefully won't be out of line to post the makefile below. This all works well on a Red Hat 6.2 box. The document presently includes one diagram done with xfig and maintained as a *.fig file.

.SUFFIXES: .tex .dvi .ps .pdf .eps .fig

.tex.dvi:
        latex $(@:.dvi=.tex)
        makeindex $(@:.dvi=.idx)
        latex $(@:.dvi=.tex)

.tex.pdf:
        sed 's/\.eps/.pdf/' < $(@:.pdf=.tex) > $(@:.pdf=.tx2)
        pdflatex $(@:.pdf=.tx2) $@
        makeindex $(@:.pdf=.idx)
        pdflatex $(@:.pdf=.tx2) $@
        rm -f $(@:.pdf=.tx2)

.dvi.ps:
        dvips -o $@ $(@:.ps=.dvi)

clean:
        rm -rf *.bak *.out *.toc *.log *.aux *.idx *.ind *.ilg \
                2pts.pdf book/ book.ps book.dvi book.pdf 2pts.eps

.fig.eps:
        fig2dev -L ps $(@:.eps=.fig) > $(@:.eps=.ps)
        ps2epsi $(@:.eps=.ps) $@
        rm -f $(@:.eps=.ps)

.eps.pdf:
        epstopdf $(@:.pdf=.eps) > $@

all: book.pdf book.ps html

book.pdf: book.tex 2pts.pdf
book.dvi: book.tex 2pts.eps

html: book/index.html

book/index.html: book.tex 2pts.pdf
        sed 's/\\tableofcontents//' < book.tex > book.tx2
        latex2html -no_math -split +1 book.tx2
        rm -f book.tx2

Will Ware

pdflatex doesn't like EPS?? 

The problem with Will's approach is that the make file assumes the .eps files are in current directory. But I put all my supporting files else where.

Instead, I chose VTeX/Lnx solution. http://www.micropress-inc.com/linux/

VTeX/Lnx is a TeX program for Linux(x86) that generates PDF or PostScript output immediately from the TeX source file. It comes with a complete LaTeX system. In contrast to pdfTeX, VTeX includes a full PostScript interpreter, so inclusion of EPS images is fully supported, as well as inline PostScript programming, i.e. PSTricks, psfrag etc. In contrast to traditional TeX systems, no intermediate DVI files are generated.

pdflatex doesn't like EPS?? 

No, too much burden, ps2pdf is as good.

epstopdf problem 

Newsgroups: comp.text.tex
> epstopdf is a _program_ not a package :-)
> Use it to convert your .eps files to .pdf files, before pdflatex-ing
> them. Don't use file extensions in the \includegraphics:
>
> \includegraphics{myfile}
>
> will use myfile.eps when you convert to PostScript, and myfile.pdf
> when you use pdflatex to get a PDF. (The latter also accepts .png and
> .jpeg.)

epstopdf is both a program AND a package, the latter written by Heiko Oberdiek. From the documentation:

% Function: This packages adds support of handling eps images % to package graphic{s,x} with option `pdftex'. % If an eps image is detected, epstopdf is automatically % called to convert it to pdf format.

epstopdf problem 

> Since epstopdf is also a program, one solution to your problem would be
> to run it in advance.  In bash,
>
> for file in *.eps
> do
>   epstopdf $file $(file%eps}.pdf
> done
>
> Run this once before you start, and then you can omit the epstopdf
> package and not have to make repeated runs through your document.

There will be no repeated runs with the epstopdf package, if the extension is omitted. A Makefile would make more sense, because then epstopdf will only called if necessary.

Heiko

epstopdf problem 

> > A Makefile would make more
> > sense, because then epstopdf will only called if necessary.
>
> True, except that then he has to maintain the makefile by keeping a
> complete list of all the source files.

With GNU make this is possible with few lines in the Makefile:

# collect all .eps files in current directory:
images := $(wildcard *.eps)
# replace ".eps" file extension with ".pdf":
images := $(patsubst %.eps,%.pdf,$(images))
# implicite rule that calls epstopdf:
%.pdf : %.eps
        epstopdf $<
# main rule for the project, for example:
all: test.tex $(images)
        pdfelatex $<

Heiko