tueda / makefile4latex

A GNU Makefile for typesetting LaTeX documents.
MIT License
26 stars 3 forks source link
arxiv latex latexdiff make makefile

Makefile for LaTeX

GitHub Actions Status AppVeyor Status

This is a GNU Makefile for typesetting LaTeX2e documents. Expected to work with TeX Live on Linux and similar systems, e.g., on macOS or Cygwin. Just download a single Makefile and put it in your directory containing LaTeX source files. Running make will generate PDF files for your documents.

Features

Getting started

Download Makefile via this link in your browser or by using curl:

curl -O https://raw.githubusercontent.com/tueda/makefile4latex/v0.11.1/Makefile

and put it into a directory that contains LaTeX files. Then just type:

make

See also the Wiki page for other ways to start.

Targets

It is also possible to make each target file. For example, make foo.pdf tries to generate the pdf file from foo.tex.

Variables

Customization

The Makefile includes latex.mk (as well as .latex.mk) at the very end if exists. This file can be put in the user's home directory and/or the current working directory. It can be used for customizing the behaviour of the Makefile, for example, by setting TOOLCHAIN. For example, if you want to use the latex -> dvips -> ps2pdf toolchain instead of the default one pdflatex, then run the following command:

echo 'TOOLCHAIN = latex_dvips' >>latex.mk

See also the Wiki page for more customizations.