Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2007 18:35:20 +0200
From:      Roland Smith <rsmith@xs4all.nl>
To:        "Aryeh M. Friedman" <aryeh.friedman@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: batch conversion of TeX
Message-ID:  <20071012163520.GD82032@slackbox.xs4all.nl>
In-Reply-To: <470F420C.3060607@gmail.com>
References:  <470F420C.3060607@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--hoZxPH4CaxYzWscb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 12, 2007 at 09:44:44AM +0000, Aryeh M. Friedman 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]):
>=20
> TeX-->plain text

detex

> TeX-->HTML

tex4ht

> TeX-->PDF

pdftex

> TeX-->PS

tex + dvips

All these programs come with a modern TeX distribution (I use texlive).

How to use these in a makefile depends on what you have. For a simple
document, processing with the command in question suffices.

But if you use footnotes and references, you need multiple passes to
sort everything out. If your document has an index and a bibliography,
you'll need to use makeindex and bibtex.

Here's an example of a Makefile for a long document of mine;

DOCSRC =3D logboek_RFS_II.tex
DOCPDF =3D $(DOCSRC:.tex=3D.pdf)

SUBDIR =3D grafieken figuren raytrace lam calc


$(DOCPDF): ${SUBDIR} $(DOCSRC) lbref.bib
        @echo -n "Regenerating the logbook... "
        @! pdflatex --interaction nonstopmode -file-line-error $*.tex | gre=
p -A 1 '^l\.'
        @makeindex -c -s myindex.ist $*.idx 2>/dev/null
        @bibtex $* >/dev/null
        @pdflatex --interaction batchmode -file-line-error $*.tex >/dev/null
        @makeindex -c -s myindex.ist $*.idx 2>/dev/null
        @pdflatex  --interaction nonstopmode -file-line-error $*.tex >/dev/=
null
        @! pdflatex  --interaction nonstopmode -file-line-error $*.tex |gre=
p Warning
        @rm -f $*.lo* $*.aux $*.ilg $*.ind $*.toc $*.bbl $*.blg
        @echo "Done."

${SUBDIR}::
        @cd ${.TARGET}; make ${.TARGETS}

clean: ${SUBDIR}
        @rm -f *.lo* *.aux *.ilg *.ind *.toc *.bbl *.blg
        @rm -f $(DOCPDF)

This Makefile also runs make in several subdirectories.

Roland
--=20
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

--hoZxPH4CaxYzWscb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHD6JIEnfvsMMhpyURAgmaAKCF9FX9AdilwyO3l/G+oWCdVjijfgCfb0T7
OQ0+T2XI3pT7eIdqadhpulI=
=Kngg
-----END PGP SIGNATURE-----

--hoZxPH4CaxYzWscb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071012163520.GD82032>