Last active
December 20, 2015 12:08
-
-
Save jacebrowning/6128140 to your computer and use it in GitHub Desktop.
Generates a PDF from a Google Drive Document using html2text and LaTeX
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
ID = 123456789abcdef | |
NAME = MyDocument | |
.PHONY: pdf tex download all clean | |
pdf: $(NAME).pdf | |
$(NAME).pdf: $(NAME).tex *.bib | |
pdflatex $(NAME) | |
bibtex $(NAME) | |
pdflatex $(NAME) | |
pdflatex $(NAME) | |
rm $(NAME).log $(NAME).blg $(NAME).bbl $(NAME).aux | |
tex $(NAME).tex: | |
html2text --google-doc https://docs.google.com/document/d/$(ID)/pub?embedded=true > $(NAME).tex | |
all: tex pdf | |
clean: | |
rm $(NAME).tex $(NAME).pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment