From owner-freebsd-questions@FreeBSD.ORG Fri Oct 12 16:35:23 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BD3416A469 for ; Fri, 12 Oct 2007 16:35:23 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr4.xs4all.nl (smtp-vbr4.xs4all.nl [194.109.24.24]) by mx1.freebsd.org (Postfix) with ESMTP id 1003B13C474 for ; Fri, 12 Oct 2007 16:35:22 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr4.xs4all.nl (8.13.8/8.13.8) with ESMTP id l9CGZKEw056072; Fri, 12 Oct 2007 18:35:21 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id CDE87B869; Fri, 12 Oct 2007 18:35:20 +0200 (CEST) Date: Fri, 12 Oct 2007 18:35:20 +0200 From: Roland Smith To: "Aryeh M. Friedman" Message-ID: <20071012163520.GD82032@slackbox.xs4all.nl> Mail-Followup-To: "Aryeh M. Friedman" , freebsd-questions@freebsd.org References: <470F420C.3060607@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hoZxPH4CaxYzWscb" Content-Disposition: inline In-Reply-To: <470F420C.3060607@gmail.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: batch conversion of TeX X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2007 16:35:23 -0000 --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--