From e60e28912bdfb7c695c963313a9fae987ae955a7 Mon Sep 17 00:00:00 2001 From: Luke Hsiao Date: Thu, 23 Aug 2018 13:31:57 -0700 Subject: Add 2018 Q4 Calendar --- 2018Q4_pa2.tex | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 93 ++++----------------------------------- 2 files changed, 145 insertions(+), 84 deletions(-) create mode 100644 2018Q4_pa2.tex diff --git a/2018Q4_pa2.tex b/2018Q4_pa2.tex new file mode 100644 index 0000000..c984a69 --- /dev/null +++ b/2018Q4_pa2.tex @@ -0,0 +1,136 @@ +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage[hidelinks]{hyperref} +\usepackage[letterpaper,landscape,margin=0.1in,paperheight=0.5\paperheight]{geometry} +\usepackage[utf8]{inputenc} +\usepackage{booktabs} +\usepackage{enumitem} +\usepackage{fontawesome} +\usepackage{tikz} +\usepackage{verbatim} +\usetikzlibrary{calendar} +\usetikzlibrary{shapes} +\usetikzlibrary{shapes.geometric} +% \usepackage{xcolor} +% \selectcolormodel{gray} +\renewcommand{\familydefault}{\sfdefault} +\definecolor{y}{RGB}{227,238,167} +\definecolor{g}{RGB}{127,205,187} +\definecolor{b}{RGB}{54,137,194} + +% Define the date highlights +\newcommand{\ward}{\node[xshift=-1.75ex,fill=y,circle] {};} +\newcommand{\church}{\node[xshift=-1.75ex,fill=b,circle] {};} +\newcommand{\stake}{\node[xshift=-1.75ex,fill=g,circle] {};} +\newcommand{\wardbullet}{\begin{tikzpicture}\node[xshift=-1.75ex,fill=y,circle,scale=0.8] {};\end{tikzpicture}} +\newcommand{\churchbullet}{\begin{tikzpicture}\node[xshift=-1.75ex,fill=b,circle,scale=0.8] {};\end{tikzpicture}} +\newcommand{\stakebullet}{\begin{tikzpicture}\node[xshift=-1.75ex,fill=g,circle,scale=0.8] {};\end{tikzpicture}} + +\begin{document} + \title{\vspace{-0.8cm}Palo Alto 2nd Ward 2018 Q4-at-a-Glance\vspace{-1.2cm}} + \date{} + \author{} + + \maketitle + \thispagestyle{empty} % Remove page numbers and headers + \makeatletter + + % Define our own style + \tikzstyle{week list sunday}=[ + % Note that we cannot extend from week list, + % the execute before day scope is cumulative + execute before day scope={% + \ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{}{ + % On first of month, except when first date in calendar. + \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@month@yshift}% + \pgftransformyshift{-\pgf@y} + }}{}% + }, + execute at begin day scope={% + % Because for TikZ Monday is 0 and Sunday is 6, + % we can't directly use \pgfcalendercurrentweekday, + % but instead we define \c@pgf@counta (basically) as: + % (\pgfcalendercurrentweekday + 1) % 7 + \pgfmathsetlength\pgf@x{\tikz@lib@cal@xshift}% + \ifnum\pgfcalendarcurrentweekday=6 + \c@pgf@counta=0 + \else + \c@pgf@counta=\pgfcalendarcurrentweekday + \advance\c@pgf@counta by 1 + \fi + \pgf@x=\c@pgf@counta\pgf@x + % Shift to the right position for the day. + \pgftransformxshift{\pgf@x} + }, + execute after day scope={ + % Week is done, shift to the next line. + \ifdate{Saturday}{ + \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@yshift}% + \pgftransformyshift{-\pgf@y} + }{}% + }, + % This should be defined, glancing from the source code. + tikz@lib@cal@width=7 + ] + + \makeatother + +\begin{minipage}{0.20\paperheight} + % The actual calendar is now rather easy: + \begin{tikzpicture}[every calendar/.append style={ + week list sunday, + month label above centered, + month text={\%mt \%y0}, + month yshift=0pt, + if={(Sunday) [blue!100]}, + }, + % every day/.style={anchor=base}, + day text={\%d=},rounded corners=0,anchor=base,text height=1ex,text depth=-0.5ex + ] + \matrix[column sep=1em, row sep=2em] { + \calendar[dates=2018-09-01 to 2018-09-last] + if (equals=2018-09-09) {\church}% + if (equals=2018-09-19) {\ward}% + if (equals=2018-09-22) {\ward}% + ; \\ + \calendar[dates=2018-10-01 to 2018-10-last] + if (equals=2018-10-06) {\church}% + ; \\ + \calendar[dates=2018-11-01 to 2018-11-last] + if (equals=2018-11-06) {\church}% + ; \\ + \calendar[dates=2018-12-01 to 2018-12-last] + if (equals=2018-12-06) {\church}% + ; \\ + }; + \end{tikzpicture} + +\end{minipage} +\begin{minipage}[t]{0.37\paperheight} +\subsection*{Important Dates} +\begin{itemize}[leftmargin=0.5cm,itemsep=2pt] + \item[\churchbullet] Sep 9: Face to Face for young adults with Elder Quintin + L. Cook + \item[\wardbullet] Sep 19 (7pm): Young Womens Mother \& Daughter Service + Project + \item[\wardbullet] Sep 22 (5pm): Relief Society Fall Dinner \& Social + \item[\stakebullet] Nov 30--Dec 4: Christmas Crèche Exhibit +\end{itemize} +\vfill +\end{minipage} + +\begin{center} + \begin{tabular}{llll} + \begin{tikzpicture}\ward\end{tikzpicture} Palo Alto 2nd Ward Events & + \begin{tikzpicture}\stake\end{tikzpicture} Menlo Park Stake Events & + \begin{tikzpicture}\church\end{tikzpicture} Church-wide Events \\ + \end{tabular} + + \vspace{0.5em} + Find the full, up-to-date calendar at \href{https://www.lds.org/church-calendar/}{\faCalendar~www.lds.org/church-calendar/} + + \vspace{0.5em} + \footnotesize{This printout was last updated on \today.} +\end{center} + +\end{document} diff --git a/Makefile b/Makefile index 9fd2454..8b80dff 100644 --- a/Makefile +++ b/Makefile @@ -1,84 +1,9 @@ -### 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) +SRC=$(wildcard *.tex) +PDF=$(SRC:.tex=.pdf) + +all: $(PDF) +%.pdf: %.tex + latexmk -outdir=build --pdf $< + latexmk -outdir=build -c + write-good $< || true +clean: ; latexmk -outdir=build -C; rm -f build/*.bbl -- cgit v1.2.3