Last active
April 21, 2017 20:51
-
-
Save manoelcampos/30425a7397813cf2cd003420c07930f9 to your computer and use it in GitHub Desktop.
A Makefile to compile tex documents (using pdf latex) which filters the overwhelming amount of logs and just shows error messages instead. Change the name of the tex file to compile at the first line of the script.
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
FILE=NAME-OF-THE-TEX-FILE-WITHOUT-EXTENSION-HERE | |
TEMP_FILE_EXTENSIONS=log aux lol lof loc soc lot bit idx glo bbl brf nlo nls ilg toc ind out blg synctex.gz snm nav dvi tdo spl | |
all: clean build | |
build: | |
make pdf | |
make bib | |
make pdf | |
make pdf | |
pdf: | |
pdflatex -file-line-error -synctex=1 -interaction=nonstopmode "$(FILE).tex" | grep -e ".*:[0-9]*:.*" || true | |
bib: | |
bibtex "$(FILE).aux" | |
clean: | |
$(foreach ext,$(TEMP_FILE_EXTENSIONS),rm -rf *.$(ext);) | |
wordcount: | |
texcount -sum -total *.tex | |
#aliases for the "wordcount" target | |
wordscount: wordcount | |
wc: wordcount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment