Skip to content

Instantly share code, notes, and snippets.

@dusekdan
Created August 15, 2017 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dusekdan/28ecd7ce4e6e4dfd0332368a6ca723b1 to your computer and use it in GitHub Desktop.
Save dusekdan/28ecd7ce4e6e4dfd0332368a6ca723b1 to your computer and use it in GitHub Desktop.
SHELL := /bin/bash
# Retrieves todo items from LaTeX file and prints them (+ their count)
define get_todo_items
@allTodoItems=$$(grep -i '% todo' xdusek21.tex | wc -l); echo -e "\n\e[33mFound \e[91m$$allTodoItems \e[33mTODO items:\n"
@grep -i '% todo' xdusek21.tex | while read -r line ; do echo -e "\t \e[92m$$line\n" ; done ; echo -e "\e[39m"
endef
all:
pdflatex xdusek21.tex # Output will be stored in xdusek21.pdf
pdflatex xdusek21.tex # To resolve references and create content table
rm xdusek21.aux xdusek21.log xdusek21.toc xdusek21.out
commit:
git add xdusek21.pdf xdusek21.tex
git commit -m "Autosave - More content added"
todo:
$(call get_todo_items)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment