All Projects → tueda → makefile4latex

tueda / makefile4latex

Licence: MIT license
A GNU Makefile for typesetting LaTeX documents.

Programming Languages

Makefile
30231 projects
shell
77523 projects
TeX
3793 projects

Projects that are alternatives of or similar to makefile4latex

Asyncrun.vim
🚀 Run Async Shell Commands in Vim 8.0 / NeoVim and Output to the Quickfix Window !!
Stars: ✭ 1,332 (+6242.86%)
Mutual labels:  make
Mmake
Mmake is a small program which wraps make to provide additional functionality, such as user-friendly help output, remote includes, and eventually more. It otherwise acts as a pass-through to standard make.
Stars: ✭ 1,593 (+7485.71%)
Mutual labels:  make
Intellij Makefile
Makefile support for IntelliJ-based IDEs
Stars: ✭ 164 (+680.95%)
Mutual labels:  make
Gomk
An opinionated Makefile for Go projects.
Stars: ✭ 96 (+357.14%)
Mutual labels:  make
Walk
A fast, general purpose, graph based build and task execution utility.
Stars: ✭ 108 (+414.29%)
Mutual labels:  make
Reggae
Build system in D, Python, Ruby, Javascript or Lua
Stars: ✭ 141 (+571.43%)
Mutual labels:  make
Make Docker Command
Seamlessly execute commands (composer, bower, compass) in isolation using docker and make.
Stars: ✭ 82 (+290.48%)
Mutual labels:  make
Mage
Mage is a make-like build tool using Go. You write plain-old go functions, and Mage automatically uses them as Makefile-like runnable targets.
Stars: ✭ 2,774 (+13109.52%)
Mutual labels:  make
Make Novice
Automation and Make
Stars: ✭ 122 (+480.95%)
Mutual labels:  make
Teachingmaterial
Various teaching material
Stars: ✭ 159 (+657.14%)
Mutual labels:  make
Sake Cli
🍶 Sake is a build tool for JavaScript.
Stars: ✭ 97 (+361.9%)
Mutual labels:  make
Generators
Laravel File Generators with config and publishable stubs
Stars: ✭ 102 (+385.71%)
Mutual labels:  make
Terraform Makefile
Helps me actually use terraform for multiple environments
Stars: ✭ 143 (+580.95%)
Mutual labels:  make
Hmake
HyperMake - Makes Builds Green without Worrying about Pre-requisites
Stars: ✭ 95 (+352.38%)
Mutual labels:  make
Neph
A modern command line job processor, similar with make command
Stars: ✭ 174 (+728.57%)
Mutual labels:  make
Make Handbook
Handbook about modern make usage
Stars: ✭ 85 (+304.76%)
Mutual labels:  make
Arduino Cmake Ng
CMake-Based framework for Arduino platforms
Stars: ✭ 123 (+485.71%)
Mutual labels:  make
Mach
A remake of make (in ClojureScript)
Stars: ✭ 240 (+1042.86%)
Mutual labels:  make
Zeus
An Electrifying Build System
Stars: ✭ 176 (+738.1%)
Mutual labels:  make
Foy
A simple, light-weight and modern task runner for general purpose.
Stars: ✭ 157 (+647.62%)
Mutual labels:  make

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

  • Only a single file (Makefile) distributed under the MIT License. Just put it into your directory.
  • Automatic detection of LaTeX source files. Just type make and then the Makefile knows what to do.
  • Dependency tracking.
  • Handling BibTeX, MakeIndex, glossaries and axodraw2.
  • Partial support for biber, bib2gls and sortref.
  • Colorized output.
  • Highly customizable by optional user configuration files (latex.mk files).
  • Placing intermediate files into a directory (BUILDDIR variable).
  • Latexdiff between Git revisions (DIFF variable).
  • Linting (make lint). ChkTeX, GNU Aspell, Hunspell, textlint and RedPen have built-in support.
  • Creating tar-gzipped source files for arXiv submission (make dist).
  • Watching source files to automatically typeset documents when they are modified (make watch).

Getting started

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

curl -O https://raw.githubusercontent.com/tueda/makefile4latex/v0.9.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

  • all (default): Build all documents in the current directory.
  • all-recursive: Build all documents in the source tree.
  • dvi, ps, pdf, eps, svg, jpg, png: Build all documents with the specified file format in the current directory.
  • help: Show help message.
  • clean: Delete all files created by running make.
  • mostlyclean: Delete only intermediate files created by running make.
  • lint: Run linters for source files in the current directory.
  • dist: Create tar-gzipped archives for arXiv submission.
  • watch: Watch the changes and automatically rebuild documents in the current directory.
  • upgrade: Upgrade the setup. For a Git repository, if there is no .gitignore file, it installs the default .gitignore. (Be careful not to overwrite any local changes!)

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

Variables

  • TOOLCHAIN: Control how PDF files are generated from LaTeX files. Given on the command line or in the user configuration files.

    • latex: Alias to latex_dvips.
    • latex_dvips: Use latex --> dvips --> ps2pdf.
    • latex_dvipdf: Use latex --> dvipdf.
    • platex: Alias to platex_dvips.
    • platex_dvips: Use platex --> dvips --> ps2pdf.
    • platex_dvipdfmx: Use platex --> dvipdfmx.
    • uplatex: Alias to uplatex_dvips.
    • uplatex_dvips: Use uplatex --> dvips --> ps2pdf.
    • uplatex_dvipdfmx: Use uplatex --> dvipdfmx.
    • pdflatex (default): Use pdflatex.
    • xelatex: Use xelatex.
    • lualatex: Use lualatex.
    • luajitlatex: Use luajitlatex.
  • BUILDDIR: Place intermediate files into BUILDDIR. Given on the command line or in the user configuration files. It is assumed that the -output-directory=DIR option is available in the LaTeX distribution you are using (which is true in TeX Live.) Note that some (La)TeX packages may not follow this option and may generate some files in the working directory, or may not correctly work in the worst case.

  • DIFF: Enable the Git-latexdiff mode. Given on the command line only. Requires latexdiff and latexpand. The DIFF variable specifies a Git revision for which a latexdiff with the working tree is performed, e.g., make DIFF=HEAD^. The resultant document has a postfix -diff like foo-diff.pdf. It is also possible to make a latexdiff between two revisions, e.g., make DIFF=HEAD~3..HEAD provided both revisions contain the source file.

  • COLOR: Control how colors are used in the output. Given on the command line or in the user configuration files.

    • always: Use colors.
    • never: Do not use colors.
    • auto (default): Use colors unless the output is piped.
  • LINTS: List linters to be used by make lint. Given on the command line or in the user configuration files. The default value is LINTS = chktex, so it runs ChkTeX. One can add or overwrite the list, for example, LINTS += aspell or LINTS = hunspell textlint redpen.

  • NODISTFILES, EXTRADISTFILES, ANCILLARYFILES: Control which files are included in tar-gzipped source files. Given on the command line or in the user configuration files. A tar-gzipped source file, foo.tar.gz for example, is created from the corresponding source file, foo.tex, and the dependent files. One can set NODISTFILES to exclude some of the dependent files from the resultant file. On the other hand, EXTRADISTFILES represents additional files to be included. The 00README.XXX file is also examined to determine additionally included files. Moreover, files listed in ANCILLARYFILES are copied to the anc directory inside the resultant file.

  • MOSTLYCLEANFILES, CLEANFILES: Specify files to be deleted for make mostlyclean and make clean, respectively. Given on the command line or in the user configuration files.

  • PREREQUISITE, PREREQUISITE_SUBDIRS, POSTPROCESS: Specify prerequisite and postprocessing tasks for documents in the current directory. Given on the command line or in the user configuration files. PREREQUISITE is a list of targets to be built before building documents in the current directory. PREREQUISITE_SUBDIRS is a list of targets in all the subdirectories required to build documents in the current directory. POSTPROCESS is a list of targets to be built after the completion of the building documents in the current directory.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].