Instantly share code, notes, and snippets.

Embed
What would you like to do?
Makefile para compilar un projecto en LaTeX
MAIN_LATEX=latex_file
BUILD_DIR=build/
LATEXMK_OPTS="-output-directory=$(BUILD_DIR)"
PDFLATEX_OPTS="--output-directory=$(BUILD_DIR)"
TEX_ENGINE=-pdflatex="pdflatex $(PDFLATEX_OPTS)"
# TEX_ENGINE=-xelatex
all: latex
mkbuilddir:
mkdir -p $(BUILD_DIR)
latex:
latexmk -pdf -shell-escape $(LATEXMK_OPTS) $(TEX_ENGINE) $(MAIN_LATEX).tex
ln -sf build/$(MAIN_LATEX).pdf $(MAIN_LATEX).pdf
clean:
latexmk $(LATEXMK_OPTS) -c $(MAIN_LATEX).tex
rm -f *~
rm -f *.run.xml
rm -f $(MAIN_LATEX).bbl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment