Last active
December 19, 2022 12:02
-
-
Save vadimkantorov/27ee19d130c413073bedd627c1b6a41e to your computer and use it in GitHub Desktop.
Makefile and gitignore for papers and posters
This file contains hidden or 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
# Download Makefile and .gitignore to a new project: | |
# wget -O Makefile -nv --no-check-certificate https://gist.githubusercontent.com/vadimkantorov/27ee19d130c413073bedd627c1b6a41e/raw/ && wget -O .gitignore -nv --no-check-certificate https://gist.github.com/vadimkantorov/27ee19d130c413073bedd627c1b6a41e/raw/.gitignore | |
# To install TexLive (including on WSLv1): sudo apt-get install -y texlive-latex-base texlive-latex-extra texlive-fonts-recommended make | |
# https://gist.github.com/vadimkantorov/27ee19d130c413073bedd627c1b6a41e | |
NAME = $(notdir ${CURDIR})# conferenceYEAR | |
$(NAME).pdf $(NAME).bbl: $(NAME).tex | |
-pdflatex $(basename $@) | |
-bibtex $(basename $@) | |
-pdflatex $(basename $@) | |
-pdflatex $(basename $@) | |
format: | |
find . -name '*.tex' | xargs fmt | |
arxiv: $(NAME).bbl | |
find . -name '*.tex' -exec sed -i'' 's/\([^\\]\|^\)\(\(\\\\\)*\)%.*/\1\2%/g' {} \; | |
tar -cf $(NAME).tar *.tex *.bib *.bbl *.sty *.bst *.cls figures/*.tex images/*.pdf | |
clean: | |
find . \( -name $(NAME).pdf -o -name $(NAME).tar -o -name '*.text.bak' -o -name '*.aux' -o -name '*.bbl' -o -name '*.blg' -o -name '*.brf' -o -name '*.log' -o -name '*.synctex.gz' -o -name '*.out' -o -name '*.snm' -o -name '*.nav' -o -name '*.vrb' -o -name '*.toc' -o -name '*~' \) -delete | |
view: | |
$(eval SUMATRA='/mnt/c/Users/vadim/AppData/Local/SumatraPDF/SumatraPDF.exe') | |
if [ -f $(SUMATRA) ]; then ($(SUMATRA) -reuse-instance $(NAME).pdf &); fi |
This file contains hidden or 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
*.text.bak | |
*.aux | |
*.bbl | |
*.blg | |
*.brf | |
*.log | |
*.synctex.gz | |
*.out | |
*~ | |
*.snm | |
*.nav | |
*.vrb | |
*.toc | |
*.tar |
This file contains hidden or 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
\newcommand\vadimkantorov[1]{\textcolor{blue}{[VK: #1]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment