Created
January 7, 2012 19:44
-
-
Save sebix/1575781 to your computer and use it in GitHub Desktop.
Sample Makefile for compiling LaTeX-Documents + gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Backup-Files | |
*.backup | |
*~ | |
*.bak | |
# logfiles | |
*.aux | |
*.log | |
*.out | |
# Tables | |
*.toc | |
*.lot | |
*.lof | |
# Bibliography | |
*.blg | |
*.bbl | |
# Glossary | |
*.glo | |
*.xdy | |
*.glg | |
*.gls | |
*.ist | |
*.acn | |
# Index | |
*.idx | |
*.ilg | |
*.ind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME=nameOfWork | |
COMPILER=pdflatex | |
#adjust the number to your requirement; there's no good solution to reduce the output | |
COMPARGS=| tail -n -233 | grep -v .pfb | |
BIBLIO=bibtex | |
INDEXER=makeindex | |
GLOSSARY=makeglossaries | |
all: clean once bib glo idx | |
$(COMPILER) $(NAME).tex $(COMPARGS) | |
$(INDEXER) $(NAME).idx | |
$(COMPILER) $(NAME).tex $(COMPARGS) | |
once: | |
$(COMPILER) $(NAME).tex $(COMPARGS) | |
# -r to remove also files in subdirectories (helpful when working with multiple tex-files) | |
clean: | |
rm -rf $(NAME).toc $(NAME).lot $(NAME).lof | |
rm -rf $(NAME).blg $(NAME).bbl | |
rm -rf $(NAME).glo $(NAME).glg $(NAME).gls $(NAME).ist $(NAME).xdy $(NAME).acn | |
rm -rf $(NAME).idx $(NAME).ilg $(NAME).ind | |
rm -rf *.log *.aux *.out | |
rm -rf *~ *.pdf | |
glo: once | |
$(GLOSSARY) $(NAME).glo | |
idx: once | |
$(INDEXER) $(NAME).idx | |
bib: once | |
$(BIBLIO) $(NAME).aux | |
simple: once bib glo idx | |
$(COMPILER) $(NAME).tex $(COMPARGS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment