batch conversion of TeX

Murray Taylor MTaylor at bytecraft.com.au
Wed Oct 17 18:42:13 PDT 2007


 

> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org 
> [mailto:owner-freebsd-questions at freebsd.org] On Behalf Of 
> Giorgos Keramidas
> Sent: Saturday, 13 October 2007 12:46 AM
> To: Aryeh M. Friedman
> Cc: freebsd-questions at freebsd.org
> Subject: Re: batch conversion of TeX
> 
> On 2007-10-12 09:44, "Aryeh M. Friedman" 
> <aryeh.friedman at gmail.com> wrote:
> > Those who have followed my openoffice to TeX conversion 
> know I am brand
> > new to TeX and want to know how to do the following conversions
> > (hopefully via some non-interactive process [eg. Make files]):
> >
> > TeX-->plain text
> > TeX-->HTML
> > TeX-->PDF
> > TeX-->PS
> 
> I usually start by writing something like this in a Makefile:
> 
>     DOC = foo
>     SRC = $(DOC).tex
>     PDF = $(DOC).pdf
> 
>     PDFLATEX = pdflatex
> 
>     all: $(PDF)
> 
>     $(PDF): $(SRC)
>             $(PDFLATEX) $(SRC)
>             $(PDFLATEX) $(SRC)
> 
> The two runs of $(PDFLATEX) are necessary to get cross-references
> correct in documents with internal cross-references.
> 
> There are other tools, like texindex(1) which you may want to 
> throw into
> the mix.  The TeX toolchain is described in detail in the 
> documentation
> which is available online at CTAN (the Comprehensive TeX Archive
> Network).  It may be interesting for you to at least skim through the
> docs available at http://www.ctan.org/tex-archive/info/
> 
> All the books available at the `info' directory are useful, 
> and many of
> them are excellent examples of what you can do by typesetting 
> with TeX.
> 
> Some of my favorites are:
> 
>   * ``Components of TeX''
>     http://www.ctan.org/tex-archive/info/components-of-TeX/
> 
>   * ``Essential information for writing LaTeX documents''
>     http://www.ctan.org/tex-archive/info/latex-essential/
> 
>   * ``Making TeX Work''
>     http://www.ctan.org/tex-archive/info/makingtexwork/
> 

the latex-mk port handles a lot of these functions
/usr/ports/misc/latex-mk

I uses it for all my docs

make              # generates a DVI file and calls a viewer
make ps
make pdf
make html         # settable options re single page - multi page
make draft-pdf    # overprints DRAFT - use this if you are not using the

                  #  \usepackage{draftcopy} which gives you more
flexibility
make print        # spools off to lp
make clean

And there are other available targets for the Make process.

It handles all the multiple passes etc over the LaTeX file(s)
and has a bunch of other capabilities to manage BibTeX stuff, image
management
Tgif, .jpg, .png ..... etc etc


One of my Makefiles

# base document name
NAME=  databasedesign

# bib file
BIBTEXSRCS=    suite.bib

# Tgif drawings are here
TGIFSRCS=      ./tgif

# and the magic is all in here
.include "/usr/local/share/latex-mk/latex.mk"

# End Makefile

---------------------------------------------------------------
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material. 

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---------------------------------------------------------------

### This e-mail message has been scanned for Viruses by Bytecraft ###


More information about the freebsd-questions mailing list