diff options
| author | Luke Hsiao <lwhsiao@stanford.edu> | 2018-07-15 14:56:10 -0700 |
|---|---|---|
| committer | Luke Hsiao <lwhsiao@stanford.edu> | 2018-07-15 14:56:10 -0700 |
| commit | dbb4587907778cdc26ed3d20b45f13d1898c99d5 (patch) | |
| tree | 1f31e261a9ef408b15c278832db201e2ce7ddc0b | |
| download | latex-cal-dbb4587907778cdc26ed3d20b45f13d1898c99d5.tar.gz latex-cal-dbb4587907778cdc26ed3d20b45f13d1898c99d5.tar.zst latex-cal-dbb4587907778cdc26ed3d20b45f13d1898c99d5.zip | |
Initial commit of year-at-a-glance
| -rw-r--r-- | Makefile | 84 | ||||
| -rw-r--r-- | pa2cal.tex | 25 |
2 files changed, 109 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9fd2454 --- /dev/null +++ b/Makefile @@ -0,0 +1,84 @@ +### latex.makefile + +# Targets: +# default : compiles the document to a PDF file using the defined +# latex generating engine. (pdflatex, xelatex, etc) +# display : displays the compiled document in a common PDF viewer. +# (currently linux = evince, OSX = open) +# clean : removes the build/ directory holding temporary files + + +PROJECT = pa2cal + +default: build/$(PROJECT).pdf + +display: default + (${PDFVIEWER} build/$(PROJECT).pdf &) + + +### Compilation Flags +PDFLATEX_FLAGS = -halt-on-error -output-directory build/ + +TEXINPUTS = .:build/ +TEXMFOUTPUT = build/ + + +### File Types (for dependancies +TEX_FILES = $(shell find . -name '*.tex' -or -name '*.sty' -or -name '*.cls') +BIB_FILES = $(shell find . -name '*.bib') +BST_FILES = $(shell find . -name '*.bst') +IMG_FILES = $(shell find . -path '*.jpg' -or -path '*.png' -or \( \! -path './build/*.pdf' -path '*.pdf' \) ) + + +### Standard PDF Viewers +# Defines a set of standard PDF viewer tools to use when displaying the result +# with the display target. Currently chosen are defaults which should work on +# most linux systems with GNOME installed and on all OSX systems. + +UNAME := $(shell uname) + +ifeq ($(UNAME), Linux) +PDFVIEWER = evince +endif + +ifeq ($(UNAME), Darwin) +PDFVIEWER = open +endif + + +### Clean +# This target cleans the temporary files generated by the tex programs in +# use. All temporary files generated by this makefile will be placed in build/ +# so cleanup is easy. + +clean:: + rm -rf build/ + +### Core Latex Generation +# Performs the typical build process for latex generations so that all +# references are resolved correctly. If adding components to this run-time +# always take caution and implement the worst case set of commands. +# Example: latex, bibtex, latex, latex +# +# Note the use of order-only prerequisites (prerequisites following the |). +# Order-only prerequisites do not effect the target -- if the order-only +# prerequisite has changed and none of the normal prerequisites have changed +# then this target IS NOT run. +# +# In order to function for projects which use a subset of the provided features +# it is important to verify that optional dependancies exist before calling a +# target; for instance, see how bibliography files (.bbl) are handled as a +# dependency. + +build/: + mkdir -p build/ + +build/$(PROJECT).aux: $(TEX_FILES) $(IMG_FILES) | build/ + pdflatex $(PDFLATEX_FLAGS) $(PROJECT) + +build/$(PROJECT).bbl: $(BIB_FILES) | build/$(PROJECT).aux + bibtex build/$(PROJECT) + pdflatex $(PDFLATEX_FLAGS) $(PROJECT) + +build/$(PROJECT).pdf: build/$(PROJECT).aux $(if $(BIB_FILES), build/$(PROJECT).bbl) + pdflatex $(PDFLATEX_FLAGS) $(PROJECT) diff --git a/pa2cal.tex b/pa2cal.tex new file mode 100644 index 0000000..75c5b8e --- /dev/null +++ b/pa2cal.tex @@ -0,0 +1,25 @@ +\documentclass{article} +\usepackage{tikz} +\usetikzlibrary{calendar} + + +\begin{document} + +\title{Palo Alto 2nd Ward | Year At a Glance} + +\maketitle + +\begin{tikzpicture} + \small\sffamily + \colorlet{darkgreen}{green!50!black} + \calendar[ + dates=\year-01-01 to \year-12-31, + week list, + month label above centered, + month text={\textit{\%mt \%y0}} + ] + if (Sunday) [black!50]; +\end{tikzpicture} + +\end{document} + |
