From e6e4c137780a37470aa63e18c9045639b1593ad9 Mon Sep 17 00:00:00 2001 From: Agathe Porte Date: Sat, 12 Aug 2017 11:06:53 +0200 Subject: Initial commit --- .gitignore | 14 ++++++++++++++ Makefile | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 17 +++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..adc9640 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +*.aux +*.fdb_latexmk +*.fls +*.glg +*.glo +*.gls +*.glsdefs +*.ist +*.lof +*.log +*.lot +*.out +*.toc +*.xdy diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..24dfd2d --- /dev/null +++ b/Makefile @@ -0,0 +1,48 @@ +# LaTeX basic Makefile +# +# WTFPL, 2016 Agathe Porte (MicroJoe) +# +# Inspirated from +# http://tex.stackexchange.com/questions/40738/how-to-properly-make-a-latex-project +# and my basic Makefile skills. + +# Very important variables to set up +PDF=main.pdf +PRINC=src/main.tex + +# You want latexmk to *always* run, because make does not have all the info. +# Also, include non-file targets in .PHONY so they are run regardless of any +# file of the given name existing. +.PHONY: $(PDF) all clean + +# Main rule: Construct the PDF +all: $(PDF) + +# Construct the PDF file from sources +$(PDF): $(PRINC) $(SOURCES) + source ~/.bashrc && latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make $(PRINC) + +# Remove all the intermediate files +clean: + @echo Cleaning temporary LaTeX files... + @rm -f \ + *.aux \ + *.fdb_latexmk \ + *.fls \ + *.glg \ + *.glo \ + *.gls \ + *.glsdefs \ + *.ist \ + *.lof \ + *.log \ + *.lot \ + *.out \ + *.toc \ + *.xdy + @echo Done + +mrproper: clean + @echo Removing all PDF files... + @rm -f *.pdf + @echo Done diff --git a/README.md b/README.md new file mode 100644 index 0000000..05e8912 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# A super LaTeX Makefile for large reports + +Feel free to use this Makefile in order to render your LaTeX report easier! + +## Description + +This Makefile uses `latexmk`, a tool that will manage any dependencies between +LaTeX files and run the LaTeX render multiple times if needed. This is +especially useful when you use a table of content, a glossary, or anything +that need the LaTeX engine to run multiple times before rendering a correct +output. + +## License + +Everything in this repository is released under WTFPL, so yeah, do whatever +you want. Spread this tool in order to allow people to use LaTeX for +everything! -- cgit v1.2.3