LaTeX-Mk History

The Dark Ages

In the beginning I used M$ word. It worked for short papers, it was horrible for medium to long documents, painful for equations, painful for figures. Then I learned LaTeX and life was much much better.

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 intellegence 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.

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 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.

The Modern Era of LaTeX-Mk

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 has 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.

Version 0.9.1

This is a bug fix version which was 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.

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 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 (the script) relating to BibTeX has been fixed. Previously, after a BibTeX run, latex-mk failed to run LaTeX the correct number of times.

Version 1.1

LaTeX-Mk version 1.1 was released on June 15, 2003. This is the "HTML Support" release. 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.

Version 1.2

LaTeX-Mk version 1.2 was released on March 21, 2004. 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.

Version 1.3

LaTeX-Mk version 1.3 was released on May 29, 2004. 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 latex-mk would not build under cywgin. Bug report #946216.

Version 1.4

LaTeX-Mk version 1.4 was released on October 4, 2005. 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 @file{.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.

Version 1.5

LaTeX-Mk version 1.5 was released on January 28, 2006. The significant changes/additions over the previous version are:

  • 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 to support recursive builds.

Version 1.6

LaTeX-Mk version 1.6 was released on April 04, 2006. The significant changes/additions over the previous version are:

  • 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.

Version 1.7

LaTeX-Mk version 1.7 was released on June 09, 2006. The significant changes/additions over the previous version are:

  • 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.

Version 1.8

LaTeX-Mk version 1.8 was released on June 22, 2006. The significant changes/additions over the previous version are:

  • 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.

Version 1.9

LaTeX-Mk version 1.9 was released on June 15, 2007. The significant changes/additions over the previous version are:

  • 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.

Version 1.9.1

LaTeX-Mk version 1.9.1 was released on August 27, 2007. This is a bug fix release.

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

Version 2.0

LaTeX-Mk version 2.0 was released on April 5, 2010. This is a bug fix release.

  • Added support for the bibunits LaTeX package.
  • Fixed a bug where PDFLATEX_FLAGS was not being properly passed down to the latex-mk script when bibtex was in use.
  • Fixed a bug where exporting Xfig figures to PDF actually produced postscript instead of PDF.

Version 2.1

LaTeX-Mk version 2.1 was released on December 28, 2010. This is a bug fix release.

  • Fixed a bug in the quoting of lgrind related variables. The result is that the clean target didn't quite work right.
  • Improved quoting in the latex-mk script to better handle the case of a file name with spaces in it.

[LaTeX-Mk Logo]

 Bug Reports
   Project Page

SourceForge Logo
Copyright © 2002, 2003, 2004, 2005, 2006, 2007 Dan McMahill ALL RIGHTS RESERVED.