LaTeX-Mk

For version 1.9.1, 26 August 2007

Dan McMahill

Copyright \begin{matrix}c \\ ◯ \end{matrix} 2002, 2003, 2004, 2005, 2006 Dan McMahill

This code is derived from software written by Dan McMahill This manual is derived from documentation written by Dan McMahill

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. All advertising materials mentioning features or use of this software

must display the following acknowledgement:

This product includes software developed by Dan McMahill

4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Table of Contents

1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Targets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.1 Base Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Draft Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Per Document Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.1 Site Configuration Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.1 Site and User Configuration File . . . . . . . . . . . . . . . . . 6 3.1.2 Generic Project Variables . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.3 Lgrind Site Configuration Variables . . . . . . . . . . . . . 12 3.1.4 Tgif Site Configuration Variables . . . . . . . . . . . . . . . 12 3.1.5 Xfig Site Configuration Variables . . . . . . . . . . . . . . . 12

3.2 Per-Project Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2.1 Required Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2.2 Generic Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2.3 Per-Project Lgrind Variables . . . . . . . . . . . . . . . . . . . 14 3.2.4 Per-Project META-post Variables. . . . . . . . . . . . . . . 15 3.2.5 Per-Project Tgif Variables . . . . . . . . . . . . . . . . . . . . . . 15 3.2.6 Per-Project Xfig Variables . . . . . . . . . . . . . . . . . . . . . . 16

4 HTML Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5 Using LaTeX-Mk Recursively. . . . . . . . . . . . . . 18

6 Obtaining LaTeX-Mk . . . . . . . . . . . . . . . . . . . . . 19

7 Installing LaTeX-Mk . . . . . . . . . . . . . . . . . . . . . . 20

7.1 System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 7.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

8 Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

9 Alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 10 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

10.1 The Dark Ages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 10.2 The Giant Per-Project Makefile . . . . . . . . . . . . . . . . . . . . . . . . 23 10.3 Enter LaTeX-Mk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 10.4 The Modern Era of LaTeX-Mk . . . . . . . . . . . . . . . . . . . . . . . . . 23

10.4.1 Version 0.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 10.4.2 Version 0.9.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 10.4.3 Version 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 10.4.4 Version 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 10.4.5 Version 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 10.4.6 Version 1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 10.4.7 Version 1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 10.4.8 Version 1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 10.4.9 Version 1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 10.4.10 Version 1.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 10.4.11 Version 1.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 10.4.12 Version 1.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 10.4.13 Version 1.9.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Target Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Variable Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

General Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

1 Introduction

LaTeX-Mk is a tool for managing small to large sized LaTeX projects. The typical LaTeX-Mk input file is simply a series of variable definitions in a ‘Makefile’ for the project. After creating a simple ‘Makefile’ the user can easily perform all required steps to do such tasks as: preview the document, print the document, or produce a PDF file. LaTeX-Mk will keep track of files that have changed and how to run the various programs that are needed to produce the output.

As a quick example, consider a project which has a single LaTeX file, ‘mydoc.tex’, as its input. To produce a ‘.pdf’ file you might use the following sequence of commands:

     latex mydoc.tex
     latex mydoc.tex
     latex mydoc.tex
     dvips -Ppdf -j0 -o mydoc.ps mydoc.dvi
     ps2pdf mydoc.ps mydoc.pdf

The triple invocation of ‘latex’ is to ensure that all references have been properly resolved and any page layout changes due to inserting the references have been accounted for. The sequence of commands isn’t horrible, but it still is several commands and one of them, ‘dvips’, has some flags to remember. To use LaTeX-Mk for this project, you would create a ‘Makefile’ that contains the following.

     NAME=mydoc
     include /usr/local/share/latex-mk/latex.gmk
   Note that the include /usr/local/share/latex-mk/latex.gmk is the syntax for

GNU ‘make’. If you are using BSD ‘make’ you would replace the include line with

.include "/usr/local/share/latex-mk/latex.mk". In both examples, you would

replace /usr/local with the installation prefix on your system. For the remainder of this document we will use the BSD style of include in the examples. Now to create a ‘.pdf’ file you simply run ‘make pdf’. For larger projects which may need to run programs to export drawings to Postscript files for inclusion or run BibTeX to generate bibliographies, the generation of ‘.pdf’ (or other) files becomes increasingly complicated to run manually. With LaTeX-Mk, such operations are still very simple.

As a more complicated example, consider a project whose LaTeX input is broken apart in to many ‘.tex’ files which are all included by ‘mydoc.tex’. Also suppose the project includes a bibliography and a large number of figures created with the Tgif program. An example ‘Makefile’ for this project might look like:

     NAME=        mydoc
     TEXSRCS=     ch1.tex ch2.tex ch3.tex refs.tex
     BIBTEXSRCS=  mybib.bib
     TGIFDIRS=    tgif_figs
     .include "/usr/local/share/latex-mk/latex.mk"

In this example is it assumed that all of the Tgif figures reside in a subdirectory called ‘tgif_figs’. When the user issues a ‘make’ command, all of the steps required to reformat the document are taken. Because of the dependency structure imposed by ‘make’, only the steps which need to be taken are done. This avoids re-exporting a large number of figures which may have not changed, but ensures that files which need processing are processed.

Hopefully this introduction has provided an adequate example for how LaTeX-Mk can simplify the management of LaTeX based documents. The LaTeX-Mk system is simple enough for small projects and powerful enough for large projects. The remainder of this manual will provide complete documentation on the use of LaTeX-Mk as well as configuration and installation instructions.

2 Targets

LaTeX-Mk provides a fixed set of targets, the argument to the ‘make’ command, for all projects. The default target is ‘view’ whose ultimate goal is to provide an on-screen preview of the formatted document. For additional information on the ‘make’ program, please refer to the documentation for your copy of ‘make’.

2.1 Base Targets

The targets provided by LaTeX-Mk are:

Target clean

Cleans the current working directory by removing all LaTeX output and other output files created during processing of the project. In addition, emacs ‘~’ files are removed.

Target dist

Creates a ‘.tar.gz’ file containing an archive of the project. It contains the source files and additionally some generated files which are generated with tools which someone else may not have installed. For example, any tgif drawings are included both in tgif ‘.obj’ form as well as encapsulated Postscript (or PDF if you are using pdflatex). For a multiple document project, a master ‘.tar.gz’ file is created containing the entire project as well as smaller ‘.tar.gz’ files for each document.

Target dvi

Performs all processing required to produce the ‘.dvi’ file for the project.

Target html

Performs all processing required to produce HTML output for the project.

Target pdf

Performs all processing required to produce a PDF (Portable Document Format) file, ‘.pdf’, for the project.

Target print

Sends the processed document to the printer.

Target ps

Performs all processing required to produce a Postscript file, ‘.ps’, for the project.

Target rtf

Performs all processing required to produce a RTF (Rich Text Format) file, ‘.rtf’, for the project. Please note that the ability of LaTex to RTF converters to work correctly is somewhat limited. Your mileage may vary.

Target show-var

This target is used to help debug users Makefiles as well as the LaTeX-Mk system. This target displays the value of the variable whose name is given by the variable VARNAME. For example:

       make show-var VARNAME=TEXSRCS

will display the value of the TEXSRCS variable.

Target view

Previews the ‘.dvi’ file.

Target viewpdf

Previews the PDF (‘.pdf’) file.

Target viewps

Previews the Postscript (‘.ps’) file.

2.2 Draft Targets

LaTeX-Mk supports adding a DRAFT watermark and timestamp for the Postscript, PDF, and printed output. To produce the draft versions, simply append -draft to the target. The currently supported draft targets are:

Target pdf-draft

Draft version of the pdf target.

Target ps-draft

Draft version of the ps target.

Target print-draft

Draft version of the print target.

Target viewpdf-draft

Draft version of the viewpdf target.

Target viewps-draft

Draft version of the viewps target.

2.3 Per Document Targets

LaTeX-Mk supports multiple top level documents in a single directory controlled by a single makefile. For each top level document specified in the NAME variable (more on variables later), there will be a set of targets defined which are specific to the document. The per document targets are:

Target print <name>

Prints the Postscript file ‘<name>.ps’.

Target view <name>

Previews the DVI file ‘<name>.dvi’.

Target viewpdf <name>

Previews the PDF file ‘<name>.pdf’.

Target viewps <name>

Previews the Postscript file ‘<name>.ps’.

In addition, draft versions of these targets exist:

Target print <name>-draft

Draft version of the print_<name> target.

Target ps <name>-draft

Draft version of the ps_<name> target.

Target view <name>-draft

Draft version of the view_<name> target.

Target viewpdf <name>-draft

Draft version of the viewpdf_<name> target.

Target viewps <name>-draft

Draft version of the viewps_<name> target.

3 Variables

The variables used by LaTeX-Mk can be categorized roughly into two groups. The first set of variables are typically set during the installation of LaTeX-Mk and these defaults used for all projects. These variables can be overridden on a per-user or per-project basis for maximum flexibility. The second set of variables are set by the user on a per-project basis.

3.1 Site Configuration Variables

This section documents the variables which are typically set on a site-wide or user-wide basis.

3.1.1 Site and User Configuration File

Variable MAKECONF

This variable is set to the location of the site-wide configuration file. If this file exists, it is sourced at the beginning of the LaTeX-Mk code. Default is ‘${sysconfdir}/latek-mk.conf’ for BSD make and ‘${sysconfdir}/latex-gmk.conf’ for GNU make. This is where system administrators can set system wide configuration variables. Any variables defined

here should be defined using VARIABLE?= "new value" instead of VARIABLE= "new

value" so that individual users can easily override the setting. The default setting may be changed during configuration of the package using the --with-mkconf and --with-gmkconf flags to configure. The sysconfdir directory can be specified to

configure with the --sysconfdir= option.

Variable USER MAKECONF

This variable is set to the location of a users personal configuration file. If this file exists, it is sourced at the beginning of the LaTeX-Mk code. Default is

‘$HOME/.latex-mk.conf’ for BSD make and ‘$HOME/.latex-gmk.conf’ for GNU

make. This file is sourced before the file specified by MAKECONF. The default setting may be changed during configuration of the package using the --with-usermkconf

and --with-usergmkconf flags to configure.

3.1.2 Generic Project Variables

This section documents the variables which are typically set on a site-wide or user-wide basis. In a typical installation these variables do not need to be explicitly set as they will take on reasonable defaults.

Variable BIBTEX

The bibtex executible. Defaults to ‘bibtex’.

Variable BIBTEX ENV

Deprecated. Actually this variable did not work correctly anyway. Use LATEX ENV to set variables for both LaTeX and bibTeX runs.

Variable BIBTEX FLAGS

A list of flags to be passed to the BIBTEX executible. Defaults to ‘’.

Variable CONVERT

The image file format conversion executible which is part of the ImageMagick

(http://imagemagick.org/) suite. Defaults to ‘convert’.

Variable DVIPDFM

The executible which produces PDF files from ‘.dvi’ files. Defaults to ‘dvipdfm’. Note that the default behavior is to use DVIPS to produce Postscript and then PS2PDF to produce a PDF file. To use DVIPDFM to directly produce PDF from DVI, set the USE DVIPDFM variable.

Variable DVIPDFM ENV

A list of variables to be set in the environment when DVIPDFM is executed. Defaults to ‘’.

Variable DVIPDFM FLAGS

A list of flags to be passed to the DVIPDFM executible. Defaults to ‘’. To set flags on a per-document basis, you can use <docname>_DVIPDFM_FLAGS where <docname> is the name of the document.

Variable DVIPDFM LANDSCAPE FLAGS

A list of flags to be added to DVIPDFM FLAGS when the LANDSCAPE variable is set. Defaults to ‘-l’.

Variable DVIPS

The executible which produces Postscript files from ‘.dvi’ files. Defaults to ‘dvips’.

Variable DVIPS ENV

A list of variables to be set in the environment when DVIPS is executed. Defaults to ‘’.

Variable DVIPS FLAGS

A list of flags to be passed to the DVIPS executible. Defaults to ‘-j0’. Note: versions of latex-mk prior to 1.2 used ‘-Ppdf -j0’ as the default. If you wish to maintain this behavior on latex-mk-1.2 and newer, you will need to set this variable in your site or user configuration file. To set flags on a per-document basis, you can use <docname>_DVIPS_FLAGS where <docname> is the name of the document.

Variable DVIPS LANDSCAPE FLAGS

A list of flags to be added to DVIPS FLAGS when the LANDSCAPE variable is set. Defaults to ‘-t landscape’.

Variable GV

The executible which previews Postscript files. Defaults to ‘gv’.

Variable GV FLAGS

A list of flags to be passed to the GV executible. Defaults to ‘’.

Variable GV LANDSCAPE FLAGS

A list of flags to be added to GV FLAGS when the LANDSCAPE variable is set. Defaults to ‘-landscape’.

Variable GZCAT

The gzcat file decompression utility. Defaults to ‘gzcat’.

Variable GZIP

The gzip file compression utility. Defaults to ‘gzip’.

Variable HEVEA

The Hevea executible. Defaults to ‘hevea’.

Variable HEVEA ENV

A list of variables to be set in the environment when HEVEA or IMAGEN is run. For example:

     HEVEA_ENV+= TEXINPUTS=.:/home/usr/tex:

Defaults to ‘’.

Variable HEVEA FLAGS

A list of flags to be passed to the HEVEA executible. Defaults to ‘-fix’.

Variable IMAGEN

The imagen executible (part of HeVeA). Defaults to ‘imagen’.

Variable JPG2EPS

The command to convert a JPEG file to an Encapsulated Postscript (EPS) file. Defaults to ‘${CONVERT}’.

Variable LATEX

The LaTeX executible. Defaults to ‘latex’.

Variable LATEX ENV

A list of variables to be set in the environment when LATEX is run. For example:

     LATEX_ENV+= TEXINPUTS=.:/home/usr/tex:

Defaults to ‘’.

Variable LATEX FLAGS

A list of flags to be passed to the LATEX executible. Defaults to ‘’.

Variable LATEX2HTML

The LaTex2HTML executible. Defaults to ‘latex2html’.

Variable LATEX2HTML ENV

A list of variables to be set in the environment when LATEX2HTML is run. For example:

     LATEX2HTML_ENV+= TEXINPUTS=.:/home/usr/tex:

Defaults to ‘’.

Variable LATEX2HTML FLAGS

A list of flags to be passed to the LATEX2HTML executible. Defaults to

‘-image_type png -local_icons -show_section_numbers’.

Variable LATEX2RTF

The LaTex2rtf executible. Defaults to ‘latex2rtf’.

Variable LATEX2RTF ENV

A list of variables to be set in the environment when LATEX2RTF is run.

Variable LATEX2RTF FLAGS

A list of flags to be passed to the LATEX2RTF executible. Defaults to ‘’.

Variable LPR

The executible which spools Postscript files to a printer. Defaults to ‘lpr’.

Variable LPR FLAGS

A list of flags to be passed to the LPR executible. For example:

     LPR_FLAGS= -Pbeernuts

Defaults to ‘’.

Variable MAKEGLS

The executible used to make glossaries. Defaults to ‘makeindex’.

Variable MAKEGLS FLAGS

A list of flags to be passed to the MAKEGLS executible. Defaults to ‘’.

Variable MAKEIDX

The makeindex executible. Defaults to ‘makeindex’.

Variable MAKEIDX FLAGS

A list of flags to be passed to the MAKEIDX executible. Defaults to ‘’.

Variable MPOST

The METApost executible. Defaults to ‘mpost’.

Variable MPOST FLAGS

A list of flags to be passed to the MPOST executible. Defaults to ‘’.

Variable PDFLATEX

The PDFLaTeX executible. Defaults to ‘pdflatex’.

Variable PDFLATEX ENV

A list of variables to be set in the environment when PDFLATEX is run. For example:

     PDFLATEX_ENV+= TEXINPUTS=.:/home/usr/tex:

Defaults to ‘’.

Variable PDFLATEX FLAGS

A list of flags to be passed to the PDFLATEX executible. Defaults to ‘’.

Variable PNG2EPS

The command to convert a Portable Network Graphic (PNG) file to an Encapsulated Postscript (EPS) file. Defaults to ‘${CONVERT}’.

Variable POST BIBTEX HOOK

If this variable is set to the name of an executible, then LaTeX-Mk will run this program/script immediately after a BibTeX run. This hook provides the ability to do post-processing of the BibTeX output prior to the final LaTeX run(s). This feature is likely to be of interest to advanced users only. The program/script is run in the same environment as specified by LATEX ENV and is given the project name as an argument. For example if your ‘Makefile’ contains

     NAME= mydoc
     POST_BIBTEX_HOOK=  ./my_bib_fixup

then the after BibTeX is run, ‘./my_bib_fixup mydoc’ will be run. POST BIBTEX HOOK defaults to ‘’.

Variable PS2PDF

The executible which produces PDF (‘.pdf’) files from Postscript (‘.ps’) files. Defaults to ‘ps2pdf’.

Variable PS2PDF FLAGS

A list of flags to be passed to the PS2PDF executible. Defaults to ‘’.

Variable TAR

The tar tape archiver utility. Defaults to ‘tar’.

Variable TEX2PAGE

The tex2page executible. Defaults to ‘tex2page’.

Variable TEX2PAGE ENV

A list of variables to be set in the environment when TEX2PAGE is run. For example:

     TEX2PAGE_ENV+= TEXINPUTS=.:/home/usr/tex:

Defaults to ‘’.

Variable TEX2PAGE FLAGS

A list of flags to be passed to the TEX2PAGE executible. Defaults to ‘’.

Variable USE DVIPDFM

When set, this variable causes the DVIPDFM program to be used to directly generate ‘.pdf’ files from the ‘.dvi’ files instead of using DVIPS to generate a Postscript file and then PS2PDF to convert the Postscript to PDF. Please note that the use of this option currently precludes the generation of the -draft versions of PDF files.

Variable USE HEVEA

When set, this variable causes the HEVEA program to be used to generate HTML output.

Variable USE LATEX2HTML

When set, this variable causes the LATEX2HTML program to be used to generate HTML output.

Variable USE PDFLATEX

When set, this variable causes the PDFLATEX program to be used to directly generate ‘.pdf’ files from the ‘.tex’ files instead of using LATEX to generate a ‘.dvi’ file, DVIPS to generate a Postscript file and then PS2PDF to convert the Postscript to PDF. Please note that the use of this option currently precludes the generation of the -draft versions of PDF files.

Variable USE TEX2PAGE

When set, this variable causes the TEX2PAGE program to be used to generate HTML output.

Variable VIEWPDF

The executible which previews ‘.pdf’ files. Defaults to ‘gv’.

Variable VIEWPDF FLAGS

A list of flags to be passed to the VIEWPDF executible. Defaults to ‘’.

Variable VIEWPDF LANDSCAPE FLAGS

A list of flags to be added to VIEWPDF FLAGS when the LANDSCAPE variable is set. Defaults to ‘-landscape’.

Variable XDVI

The executible which previews ‘.dvi’ files. Defaults to ‘xdvi’.

Variable XDVI FLAGS

A list of flags to be passed to the XDVI executible. Defaults to ‘’.

Variable XDVI LANDSCAPE FLAGS

A list of flags to be added to XDVI FLAGS when the LANDSCAPE variable is set. Defaults to ‘-paper usr’.

3.1.3 Lgrind Site Configuration Variables

This section documents the variables related to lgrind source code processing. Lgrind is a source code formatter which takes source code files in various programming languages and formats them for inclusion in a LaTeX document.

Variable LGRIND

The lgrind executible used for formatting source code for inclusion into a LaTeX document. Defaults to ‘lgrind’.

Variable LGRIND FLAGS

A list of flags to be passed to the LGRIND executible. For example:

     LGRIND_FLAGS= -i -t 4 -d /my/private/lgrindef

Defaults to ‘-i’.

3.1.4 Tgif Site Configuration Variables

This section documents the variables related to Tgif file processing. Tgif

(http://bourbon.usc.edu:8001/tgif/tgif.html) is a nice vector drawing program

which works well with LaTeX. Please note that LaTeX-Mk requires that all Tgif files use the extension ‘.obj’.

Variable TGIF

The tgif executible. Defaults to ‘tgif’.

Variable TGIF FLAGS

A list of flags to be passed to the TGIF executible to cause it to print to a file. These flags will be used for both PDF and EPS export. Defaults to ‘-color -print’.

Variable TGIF EPS FLAGS

A list of flags to be passed to the TGIF executible when exporting to an encapsulated Postscript, ‘.eps’, file. Defaults to ‘-eps’.

Variable TGIF PDF FLAGS

A list of flags to be passed to the TGIF executible when exporting to a PDF, ‘.pdf’, file. Defaults to ‘-pdf’.

3.1.5 Xfig Site Configuration Variables

This section documents the variables related to Xfig file processing. Please note that LaTeX-Mk requires that all Xfig files use the extension ‘.fig’.

Variable FIG2DEV

The executible which can convert xfig ‘.fig’ files to encapsulated Postscript ‘.eps’ files. Defaults to fig2dev.

Variable FIG2DEV FLAGS

A list of flags to be passed to the FIG2DEV executible to cause it to print to a file. These flags will be used for both PDF and EPS export. Defaults to ‘’.

Variable FIG2DEV EPS FLAGS

A list of flags to be passed to the FIG2DEV executible when exporting to an encapsulated Postscript, ‘.eps’, file. Defaults to ‘-L eps’.

Variable FIG2DEV PDF FLAGS

A list of flags to be passed to the FIG2DEV executible when exporting to a PDF, ‘.pdf’, file. Defaults to ‘-L pdf’.

3.2 Per-Project Variables

This section documents variables which can be set in project Makefiles to accommodate other dependencies which may be added.

3.2.1 Required Variables

Every project must define the NAME variable.

Variable NAME

Name of the project. The top level LaTeX input file is assumed to be called ‘<NAME>.tex’. For projects which have multiple documents, you would list the top level name for each document here. For example, if you have a single document, ‘mydoc’, you would use

     NAME= mydoc

and if you have multiple documents, ‘mydoc1’, ‘mydoc2’, and ‘mydoc3’, you would use

     NAME= mydoc1 mydoc2 mydoc3

3.2.2 Generic Variables

The variables described in this section affect all of the top level documents listed in the NAME variable. This is useful for listing common dependencies like a header or style file used by all documents. To list dependencies which are specific to one of the top level documents, you can use the variable <docname>_<VARNAME> where <docname> is the name of the document and <VARNAME> is the name of the variable. For example,

NAME= doc1 doc2
TEXSRCS= header.tex
doc1_TEXSRCS= intro1.tex body1.tex conclusions.tex

defines a project with two top level documents, doc1 and doc2. Both documents depend on ‘header.tex’ and in addition, doc1 depends on ‘intro1.tex’, ‘body1.tex’, and conclusions.tex. More information on the TEXSRCS variable is given later.

Variable BIBTEXSRCS

All files listed in this variable are assumed to be BibTeX input files. Listing files in this variable will cause a dependency to be added to the top level project and BibTeX will be run on these files as needed.

Variable CLEAN FILES

Files listed in this variable will be removed when the clean target is made. When setting this variable in a ‘Makefile’, the += syntax should be used to append to this variable. For example:

     CLEAN_FILES+=   my_leftover_file foo.bak

will add ‘my_leftover_file’ and ‘foo.bak’ to the list of files to be removed when

‘make clean’ is run.

Variable EXTRA DIST

Files listed in this variable will be added to the archive file created with the dist target.

     EXTRA_DIST+=   README.txt

Variable OTHER

Files listed in this variable will be added to the dependency list for the ‘.dvi’ file. For example if you want to add all ‘.eps’ and ‘.epsi’ files in a particular directory as well as some ‘.png’ files from another directory to the dependency list, then using BSD make, you could add:

     OTHER_EPS!=     ls eps/*.eps*
     OTHER+=         $(OTHER_EPS)
     OTHER_PNG!= ls png/*.png
     OTHER+=         $(OTHER_PNG:.png=.eps)
     CLEAN_FILES+=   $(OTHER_PNG:.png=.eps)

If you are using GNU make, you would use

     OTHER_EPS=      $(wildcard eps/*.eps*)
     OTHER+=         $(OTHER_EPS)
     OTHER_PNG=      $(wildcard png/*.png)
     OTHER+=         $(OTHER_PNG:.png=.eps)
     CLEAN_FILES+=   $(OTHER_PNG:.png=.eps)

Variable TEXSRCS

All files listed in this variable are assumed to be LaTeX input files. Listing files in this variable will cause a dependency to be added to the top level project. All LaTeX files used in the project should be listed in this variable with the exception of the top level LaTeX file which is automatically included by LaTeX-Mk.

3.2.3 Per-Project Lgrind Variables

Variable LGRINDSRCS

All files listed in this variable are assumed to be source code files to be processed by lgrind. Listing files in this variable will cause a dependency to be added to the top level project and will cause these files to be automatically re-formatted as required.

Variable LGRINDDIRS

A list of directories containing source code can be listed in this variable. All files found in those directories which have extensions will be formated using lgrind. Files without a ‘.*’ extension will be ignored. These files will be added to the top level dependency list and will be automatically re-formatted as required.

Variable foo LGRIND FLAGS

This variable sets specific flags which should be passed to lgrind when processing the source file ‘foo’. For example,

     mymodule.v_LGRIND_FLAGS=        -lverilog

If ‘foo’ is a directory which has been listed in LGRINDDIRS, then foo LGRIND FLAGS will be used for all files in the specified directory. You can define flags for an entire directory and then override it for a single file if needed. For example, suppose you want to use 4 as the tab width for all sources in the directory ‘srcs’ except for ‘srcs/funny.c’ where you want to use a tab width of 8. You would achieve this with

     srcs_LGRIND_FLAGS=              -t 4
     srcs/funny.c_LGRIND_FLAGS=      -t 8

3.2.4 Per-Project META-post Variables

Variable MPOSTSRCS

All files listed in this variable are assumed to be META-post ‘.mp’ files. Listing files in this variable will cause a dependency to be added to the top level project and will cause these files to be automatically re-exported to Postscript and/or PDF as required.

Variable MPOSTDIRS

A list of directories containing META-post figured can be listed in this variable. All ‘.mp’ files found in those directories are assumed to be META-post ‘.mp’ files. These files will be added to the top level dependency list and will be automatically re-exported to Postscript and/or PDF as required.

Variable MPOST TWICE

By default META-post is run once for each of its input files. Setting this variable will cause META-post to run twice on each input file. Some figures may require this and I haven’t figured out if there is a way to automatically make this determination like there is with LaTeX.

3.2.5 Per-Project Tgif Variables

Variable TGIFSRCS

All files listed in this variable are assumed to be tgif ‘.obj’ files. Listing files in this variable will cause a dependency to be added to the top level project and will cause these files to be automatically re-exported to Postscript as required.

Variable TGIFDIRS

A list of directories containing tgif drawings can be listed in this variable. All ‘.obj’ files found in those directories are assumed to be tgif ‘.obj’ files. These files will be added to the top level dependency list and will be automatically re-exported to Postscript as required.

3.2.6 Per-Project Xfig Variables

Variable XFIGSRCS

All files listed in this variable are assumed to be xfig ‘.fig’ files. Listing files in this variable will cause a dependency to be added to the top level project and will cause these files to be automatically re-exported to Postscript as required.

Variable XFIGDIRS

A list of directories containing xfig drawings can be listed in this variable. All ‘.fig’ files found in those directories are assumed to be xfig ‘.fig’ files. These files will be added to the top level dependency list and will be automatically re-exported to Postscript as required.

4 HTML Output

LaTeX-Mk includes support for generating HTML output. Currently Latex2HTML (see

http://www.latex2html.org), HeVeA (see http://para.inria.fr/~maranget/hevea/),
or tex2page (see http://www.ccs.neu.edu/home/dorai/tex2page/) can be used for pro-

ducing an HTML version of your document. The selection of which program to use is done with the USE HEVEA, USE LATEX2HTML, and USE TEX2PAGE variables. Simply define one of these in your ‘${sysconfdir}/latex-mk.conf’ file (for site-wide configuration) or ‘$HOME/.latex-mk.conf’ (for per-user configuration). If you are using GNU make, the

variable would be set in ‘${sysconfdir}/latex-gmk.conf’ or ‘$HOME/.latex-gmk.conf’

instead. You can also override this setting in your project ‘Makefile’. For example, to use Latex2HTML, add

     USE_LATEX2HTML=  yes

to your configuration file or to your project ‘Makefile’.

To generate HTML output, simply run ‘make html’. The HTML output along with any image files will be placed in a subdirectory called ‘${NAME}.html_dir’. For example, if you have a project with two top level documents, your ‘Makefile’ might look like:

     NAME=  doc1 doc2
     .include "/usr/pkg/share/latex-mk/latex.mk"

After running ‘make html’, you will have two new subdirectories called ‘doc1.html_dir’ and ‘doc2.html_dir’ containing HTML versions of the two documents.

To keep track of which files have been generated during the conversion, a temporary file, ‘${NAME}.www_files’ gets created and all generated files are recorded there. This allows the output produced by HeVeA to be moved to the correct subdirectory as well as allowing

‘make clean’ to work.

The HTML generation is still new and there are probably some bugs to work out. Please submit bug reports. There are also some features which may be useful that have not been integrated. For example the program ‘hacha’ could be used for breaking the HeVeA output into several smaller files.

5 Using LaTeX-Mk Recursively

In some cases you may wish to organize multiple documents into their own subdirectories but still be able to build all of them with a single make call. This is supported in LaTeX-Mk via the use of the ‘latex.subdir.mk’ makefile fragment. To use recursion, create a ‘Makefile’, in your top level directory which looks something like the following example.

     SUBDIR+=        project1
     SUBDIR+=        project2
     SUBDIR+=        project3
     .include "/usr/local/share/latex-mk/latex.subdir.mk"

Now create your usual LaTeX-Mk Makefiles in the ‘project1’, ‘project2’, and ‘project3’ subdirectories. Additional subdirectories are added to the SUBDIR variable. Multiple levels of subdirectories make be used. Please note that currently the use of both ‘latex.mk’ and ‘latex.subdir.mk’ in a single Makefile is not supported.

6 Obtaining LaTeX-Mk

The latest information and version of LaTeX-Mk can be found on the main LaTeX-Mk web site at http://latex-mk.sourceforge.net. A package for the NetBSD operating system (see http://www.NetBSD.org for information about NetBSD) exists at

ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/print/latex-mk/README.html.

A port for the FreeBSD operating system (see http://www.FreeBSD.org for information

about FreeBSD) exists at http://www.freshports.org/misc/latex-mk.

7 Installing LaTeX-Mk

7.1 System Requirements

To configure and install LaTeX-Mk, you will need a Unix-like operating system or shell with a compatible make program. In addition, to use LaTeX-Mk, you will require:

1. latex. The development of LaTeX-Mk was done using Thomas Esser’s TEX distribution, teTeX, version 1.0.7. More information on teTeX can be found at

    http://www.tug.org/tetex/.

2. Either GNU make version 3.80 or higher or a BSD make program. For information

    on GNU make, see http://www.gnu.org/software/make/. For information

on the NetBSD operating system (which of course includes BSD make), see http://www.netbsd.org. If you wish to install BSD make on a non-BSD system, you can try downloading one of the bmake snapshots from files area of the LaTeX-Mk

    sourceforge project page at http://www.sourceforge.net/projects/latex-mk. The

GNU make version requirement is firm. LaTeX-Mk will not work with versions of GNU make prior to 3.80. It is highly unlikely that LaTeX-Mk will be ported to older GNU make versions due to the lack of some important features in older versions.

7.2 Installation

Installation of LaTeX-Mk consists of three steps: configuration, building, and installing. In a typical installation, this is as simple as

     ./configure
     make
     make install

This will configure LaTeX-Mk with the defaults, create the final files to be installed, and install them in the proper location. The ‘configure’ script is a standard GNU autoconf script. The most common option is the ‘--prefix=<installation prefix>’ option. This causes LaTeX-Mk to use <installation prefix> as the base directory for the installation.

Running configure --help will give a list of the available configuration options. The ones which are specific to LaTeX-Mk, as opposed to being generic configure options are listed here. --with-mkconf=<mkconf>: this option changes the default system configuration file for BSD make. This file defaults to ‘${sysconfdir}/latex-mk.conf’. --with-gmkconf=<gmkconf>: this option changes the default system configuration file for GNU make. This file defaults to ‘${sysconfdir}/latex-gmk.conf’. -- with-usermkconf=<usermkconf>: this option changes the default user configuration file for BSD make. This file defaults to ‘$HOME/.latex-mk.conf’. --with-usergmkconf=<usergmkconf>: this option changes the default user configuration file for GNU make. This file defaults to ‘$HOME/.latex-gmk.conf’.

8 Feedback

To report bugs, provide feedback, suggest new features, etc. visit the LaTeX-Mk Project

management page at http://www.sourceforge.net/projects/latex-mk or send email to

the author at danmc@users.sourceforge.net. For information on the current version of LaTeX-Mk, visit the LaTeX-Mk homepage at http://latex-mk.sourceforge.net.

9 Alternatives

There are a few tools which are somewhat similar to LaTeX-Mk. I have not reviewed them in any detail and thus am unable to comment on how similar or different they are compared to LaTeX-Mk.

 1. "mk" http://www.servalys.nl/scripts/

10 History

10.1 The Dark Ages

In the beginning I used a WYSIWYG word processor from a large software vendor in the Pacific Northwest of the US. It worked for short papers, it was horrible for medium to long documents, painful for equations, and painful for figures. Then I learned LaTeX and life was much much better.

10.2 The Giant Per-Project Makefile

In graduate school, a friend showed me a makefile he had set up for his thesis. It contained all sorts of targets and some intelligence about running LaTeX multiple times for resolving references. I made a modified version of that for my thesis and even wrote a book where I used yet another modified version of that makefile. This approach was much better than doing everything by hand because I had added a lot of functionality over my friends makefile. In particular, my new makefile automatically dealt with tgif figures and I had many many figures in the thesis and the book.

Despite the utility of the large customized makefile I had, it was not maintainable in the sense that every time I started a new document, I’d end up with another copy of a very large makefile to maintain. If I fixed a bug in one, I’d have several other documents in progress which needed updating.

10.3 Enter LaTeX-Mk

For those of you familiar with the build system used by the BSD operating systems, you’ll know that for each program, there is a very simple makefile which lists the source files along with a couple of other variables which can optionally be set. Then a system makefile called ‘bsd.prog.mk’ is included. That included makefile fragment has all the code required to provide all the standard targets, sets up the various compiler flags and correctly handles all the dependencies. It is maintainable because the bulk of the code is common and only needs to be maintained in one place.

Being inspired by the BSD style makefile approach, I converted my most up to date giant per-project makefile into an include-able makefile fragment and spent some time defining the interface a bit more generically than I’d done in the past. Since that time I’ve used the result, LaTeX-Mk, for the last few documents at school, some papers I’ve worked on since then and also for work related documentation. So far, the makefile framework has proven to be very useful and a big time saver for me. Since I believe in open-source software I felt it was appropriate to document my efforts and provide a packaged solution that others could also use.

10.4 The Modern Era of LaTeX-Mk

10.4.1 Version 0.9

Released on 2002-10-09, this was the first public release of LaTeX-Mk. My reason for using 0.9 instead of 1.0 is that LaTeX-Mk had not been tested or used much by others yet. Even though it works well for me, as with any product I’m sure others will quickly find other ways to use it that I had not anticipated. My goal is to collect feedback over the first few months of public consumption and come out with a 1.0 version which incorporates the primary improvements.

10.4.2 Version 0.9.1

This is a bug fix version released on 2002-10-29. The significant changes over the previous version are:

• Per-document Xfig dependencies are now supported. This was an oversight in the previous version.

• A big non-portable GNU make hack has been removed. Starting with this version of LaTeX-Mk, you will need version 3.80 or newer of GNU make (run gmake --version to check your GNU make version) if you are using the GNU make interface to LaTeX-Mk. The new implementation is much cleaner and should continue to work with all newer versions of GNU make.

• The history section of the manual was added.

10.4.3 Version 1.0

This is the long awaited 1.0 release! Hopefully LaTeX-Mk can be considered production/stable at this point. This release was made on 2003-02-26. The significant changes/additions over the previous version are:

• Support for dvipdfm (see http://gaspra.kettering.edu/dvipdfm) is included. By setting the USE DVIPDFM variable, the dvipdfm program can be used to generate ‘.pdf’ files from the ‘.dvi’ file generated by LaTeX.

• Support for PDFLaTeX is included. By setting the USE PDFLATEX variable, the pdflatex program can be used to generate ‘.pdf’ files directly from the TeX sources.

• A testsuite is now included. This has resulted in the fixing of a handful of small bugs and should greatly contribute to the reliability and stability of this tool.

• Bugs related to processing multiple directories listed in TGIFDIRS and XFIGDIRS have been fixed.

• Bugs related to per-project processing of foo TGIFDIRS and foo XFIGDIRS have been fixed.

• A bug in latex-mk relating to BibTeX has been fixed. Previously, after a BibTeX run, latex-mk failed to run LaTeX the correct number of times.

10.4.4 Version 1.1

This is the "HTML Support" release. Version 1.1 was released on 2003-06-15. The significant changes/additions over the previous version are:

• Support for HTML output. Either LaTeX2HTML or HeVeA may be used.

• Fixed a bug where bibtex was not run sometimes when it needed to be run. This problem showed up with some versions of LaTeX.

• Added a POST BIBTEX HOOK variable which specifies a program to be run after a BibTeX run. This gives users the ability to insert an additional processing step if desired.

10.4.5 Version 1.2

Version 1.2 was released on 2004-03-21. The significant changes/additions over the previous version are:

• Fixed a bug which prevented the POST BIBTEX HOOK hook from actually doing anything.

• Dropped -Ppdf from the default DVIPS FLAGS. Users who wish to keep -Ppdf as part of DVIPS FLAGS can add it to the site configuration file, user configuration file, or project Makefile.

• Added DVIPDFM ENV variable for running dvipdfm inside a customized environment.

• Preliminary Rich Text Format (RTF) output support. The new rtf target will use latex2rtf to produce an RTF version of your document. Use this when sending your documents to the text-formatter-challenged.

• Fixed a bug where a list of figures, list of tables, and table of contents were sometimes not fully up to date in the final output.

• Added support for using ImageMagick to convert JPEG and PNG files to EPS for inclusion in a document.

10.4.6 Version 1.3

Version 1.3 was released on 2004-05-29. The significant changes/additions over the previous version are:

• Fixed a bug which prevented BibTeX from being run in the case where the source document did not have explicit \cite{} commands but rather used \nocite{}. Bug report #927068.

• Fixed some file names in the examples/ directory to avoid a file name clash on file systems which are not case sensitive. This should fix a long standing bug where latexmk would not build under cygwin. Bug report #946216.

10.4.7 Version 1.4

Version 1.4 was released on 2005-10-04. The significant changes/additions over the previous version are:

• Added support for lgrind.

• Added a dist target for creating a distribution archive of all source files.

• Added support for using tex2page for html output.

• When using pdflatex, directly convert tgif and xfig drawings to PDF instead of to encapsulated Postscript.

• When using pdflatex, do not create ‘.dvi’ files as part of the default target.

• Added a LANDSCAPE variable which when set will add landscape flags to various tools.

• Make the default flag for exporting xfig drawings to encapsulated Postscript be -L eps instead of -L ps.

10.4.8 Version 1.5

• When using tex2page or HeVeA for html output, do not force the running of LaTeX. With latex2html, LaTeX will still be run because latex2html makes use of the ‘.aux’ files generated by LaTeX.

• Fixed a bug where if the BibTeX input file was modified LaTeX would be run again but not BibTeX.

• Added a --tex2page mode for latex-mk (the script) which allows latex-mk to run tex2page the appropriate number of times to resolves all references.

• Improve the cleaning of tex2page generated output.

• Added ‘latex.subdir.mk’ to support recursive builds.

10.4.9 Version 1.6

• Fix a syntax error in the (not used yet) ieee-copyout script.

• Fix a bug in the latex-mk script when BibTeX is used.

• Add quoting of command names in the BSD makefiles. This will properly deal with pathnames to the programs which contain spaces. Currently GNU make will not properly deal with this.

10.4.10 Version 1.7

• Added support for makeindex. Suggested by Antoine Reilles who provided a preliminary patch.

• Added a --help flag to the latex-mk script and documented the script a bit more there. It seems that some users are using the latex-mk script only and not the makefile system. Suggested by Reuben Thomas.

• Added the ability in the latex-mk script to work with a read only current directory and use the TEXMFOUTPUT environment variable to control where the real output goes. Suggested by Reuben Thomas.

10.4.11 Version 1.8

• Fix a syntax error in the latex-mk script which showed up with some shells.

• Fix a bug in the latex-mk script where some of the ‘.old’ files that are used for determining when to re-run various tools were not being cleaned up properly.

• Add a few more files which latex and makeindex may generate to the list of files removed by the clean target.

• Add a testsuite entry for the clean target.

• Improve the makefile testsuite robustness. In particular it now deals with the bmake program having different names (make, bmake, bsdmake, etc).

• Improve and expand the testsuite for the latex-mk script.

10.4.12 Version 1.9

• Added support for per-document DVIPS FLAGS and DVIPDFM FLAGS.

• Avoided the use of hardcoded csh in some scripts.

• Removed claims of a BIBTEX ENV variable in the documentation. It didn’t do anything.

• Added METAPOST support.

• Fixed a bug when using BibTeX and PDFLaTeX at the same time.

• Added glossary support.

• Fixed a bug with GNU make draft output.

• Put the actual installation prefix into the manual.

• Avoid a case which caused the testsuite to hang.

• Expanded the testsuite and fixed some bugs in the testsuite.

• Fix a bug in cleaning xfig and tgif output.

10.4.13 Version 1.9.1

• Fixed a bug in the clean target when METAPOST is in use.

Target Index 28

Target Index

C

clean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

D

dist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 dvi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

H

html . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

P

pdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 pdf-draft. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 print-draft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 print_<name> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 print_<name>-draft . . . . . . . . . . . . . . . . . . . . . . . . . . 5 ps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 ps-draft. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 ps_<name>-draft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

R

rtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

S

show-var. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

V

view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 view_<name> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 view_<name>-draft . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 viewpdf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 viewpdf-draft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 viewpdf_<name> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 viewpdf_<name>-draft. . . . . . . . . . . . . . . . . . . . . . . . 5 viewps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 viewps-draft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 viewps_<name> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 viewps_<name>-draft . . . . . . . . . . . . . . . . . . . . . . . . . 5

Variable Index 29

Variable Index

B

BIBTEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 BIBTEX_ENV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 BIBTEX_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 BIBTEXSRCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

C

CLEAN_FILES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 CONVERT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

D

DVIPDFM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 DVIPDFM_ENV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 DVIPDFM_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

DVIPDFM_LANDSCAPE_FLAGS . . . . . . . . . . . . . . . . . . . . 7

DVIPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 DVIPS_ENV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 DVIPS_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 DVIPS_LANDSCAPE_FLAGS. . . . . . . . . . . . . . . . . . . . . . . 7

E

EXTRA_DIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

F

FIG2DEV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 FIG2DEV_EPS_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . 13 FIG2DEV_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 FIG2DEV_PDF_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . 13 foo_LGRIND_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

G

GV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 GV_FLAGS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 GV_LANDSCAPE_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . 8 GZCAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 GZIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

H

HEVEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 HEVEA_ENV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 HEVEA_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

I

IMAGEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

J

JPG2EPS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

L

LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 LATEX_ENV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 LATEX_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 LATEX2HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 LATEX2HTML_ENV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 LATEX2HTML_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 LATEX2RTF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 LATEX2RTF_ENV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 LATEX2RTF_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 LGRIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 LGRIND_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 LGRINDDIRS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 LGRINDSRCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 LPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 LPR_FLAGS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

M

MAKECONF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 MAKEGLS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 MAKEGLS_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 MAKEIDX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 MAKEIDX_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 MPOST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 MPOST_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 MPOST_TWICE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 MPOSTDIRS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 MPOSTSRCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

N

NAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

O

OTHER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

P

PDFLATEX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 PDFLATEX_ENV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 PDFLATEX_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 PNG2EPS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 POST_BIBTEX_HOOK . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 PS2PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 PS2PDF_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Variable Index 30

T

TAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 TEX2PAGE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 TEX2PAGE_ENV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 TEX2PAGE_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 TEXSRCS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 TGIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 TGIF_EPS_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 TGIF_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 TGIF_PDF_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 TGIFDIRS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 TGIFSRCS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

U

USE_DVIPDFM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 USE_HEVEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 USE_LATEX2HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 USE_PDFLATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 USE_TEX2PAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 USER_MAKECONF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

V

VIEWPDF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 VIEWPDF_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

                                                VIEWPDF_LANDSCAPE_FLAGS . . . . . . . . . . . . . . . . . . . 11

X

XDVI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 XDVI_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 XDVI_LANDSCAPE_FLAGS. . . . . . . . . . . . . . . . . . . . . . . 11 XFIGDIRS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 XFIGSRCS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

General Index 31

General Index

A

alternatives to LaTeX-Mk . . . . . . . . . . . . . . . . . . . . 22

B

BSD make, versus GNU make . . . . . . . . . . . . . . 1, 14 BUGS, reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

E

E-mail, bug reports . . . . . . . . . . . . . . . . . . . . . . . . . . 21

G

GNU make, version required . . . . . . . . . . . . . . . . . . 24 GNU make, versus BSD make . . . . . . . . . . . . . . 1, 14

I

include, Makefile syntax for. . . . . . . . . . . . . . . . . . . . 1

M

make, differences between GNU and BSD … 1, 14

R

Reporting BUGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

W

wildcard, Makefile syntax for . . . . . . . . . . . . . . . . . 14