├── .gitignore ├── README.md ├── article ├── README.md └── src │ ├── Makefile │ ├── sample.md │ └── sample.pdf ├── beamer-solarized ├── README.md └── src │ ├── Makefile │ ├── beamer-includes.tex │ ├── pandoc-solarized.sty │ ├── sample.md │ └── sample.pdf ├── beamer ├── README.md └── src │ ├── Makefile │ ├── sample.md │ └── sample.pdf ├── book-writeup ├── README.md └── src │ ├── 00-meta.md │ ├── Makefile │ ├── chapters │ ├── 00-dedication.md │ └── 01-overview.md │ ├── sample.pdf │ └── template.tex ├── homework ├── README.md └── src │ ├── Makefile │ ├── homework.cls │ ├── sample.md │ └── sample.pdf ├── revealjs-solarized ├── README.md └── src │ ├── Makefile │ ├── css │ └── solarized.css │ ├── default.revealjs │ ├── index.html │ ├── index.md │ ├── js │ └── toggle-theme.js │ ├── serve.sh │ └── solarized.theme ├── revealjs ├── README.md └── src │ ├── Makefile │ ├── index.html │ ├── index.md │ └── serve.sh └── tufte-handout ├── README.md └── src ├── Makefile ├── sample.md ├── sample.pdf └── template.tex /.gitignore: -------------------------------------------------------------------------------- 1 | .*.sw[nop] 2 | tags 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pandoc Starter 2 | 3 | This repository contains a number of files for getting started with Pandoc. Each 4 | example comes with: 5 | 6 | - A `README.md`, describing the type of document and usage 7 | - A `Makefile`, for building the document 8 | - A preview of the document 9 | - The relevant starter files (usually Markdown, sometimes LaTeX) 10 | 11 | ## Other projects 12 | 13 | - [`tufte-pandoc-css`](https://github.com/jez/tufte-pandoc-css) 14 | - [`pandoc-markdown-css-theme`](https://github.com/jez/pandoc-markdown-css-theme) 15 | 16 | ## License 17 | 18 | [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt) 19 | -------------------------------------------------------------------------------- /article/README.md: -------------------------------------------------------------------------------- 1 | # article 2 | 3 | These starter files can be used to generate a simple article, as you're familiar 4 | with from LaTeX's `article` document class. 5 | 6 | ## Dependencies 7 | 8 | There are a number of build dependencies for these starter files: 9 | 10 | - [Pandoc], a universal document converter 11 | - [LaTeX], a document preparation system 12 | 13 | [Pandoc]: http://pandoc.org/ 14 | [LaTeX]: https://www.latex-project.org/ 15 | 16 | Installation instructions vary depending on your system. See the linked websites 17 | for more information. 18 | 19 | ## Usage 20 | 21 | 1. Copy these starter files wherever you'd like. 22 | 1. Rename `sample.md` to `.md` 23 | 1. Edit the `TARGET` variable at the top of the [Makefile] to equal `` 24 | 1. Write your content in `.md` 25 | - Be sure to adjust the information like the `title` and `author` at the top 26 | of the file 27 | 1. Read the [Makefile's documentation][Makefile]. 28 | 29 | [Makefile]: src/Makefile 30 | 31 | ## License 32 | 33 | [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt) 34 | -------------------------------------------------------------------------------- /article/src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Jake Zimmerman 3 | # 4 | # ===== Usage ================================================================ 5 | # 6 | # NOTE: 7 | # When running these commands at the command line, replace $(TARGET) with 8 | # the actual value of the TARGET variable. 9 | # 10 | # 11 | # make Compile all *.md files to PDFs 12 | # make .pdf Compile .md to a PDF 13 | # make .tex Generate the intermediate LaTeX for .md 14 | # 15 | # make view Compile $(TARGET).md to a PDF, then view it 16 | # make again Force everything to recompile 17 | # 18 | # make clean Get rid of all intermediate generated files 19 | # make veryclean Get rid of ALL generated files: 20 | # 21 | # make print Send $(TARGET).pdf to the default printer: 22 | # 23 | # ============================================================================ 24 | 25 | TARGET=sample 26 | 27 | all: $(patsubst %.md,%.pdf,$(wildcard *.md)) 28 | 29 | PANDOC_FLAGS =\ 30 | -f markdown+tex_math_single_backslash \ 31 | -t latex \ 32 | 33 | LATEX_FLAGS = \ 34 | 35 | PDF_ENGINE = xelatex 36 | PANDOCVERSIONGTEQ2 := $(shell expr `pandoc --version | grep ^pandoc | sed 's/^.* //g' | cut -f1 -d.` \>= 2) 37 | ifeq "$(PANDOCVERSIONGTEQ2)" "1" 38 | LATEX_FLAGS += --pdf-engine=$(PDF_ENGINE) 39 | else 40 | LATEX_FLAGS += --latex-engine=$(PDF_ENGINE) 41 | endif 42 | 43 | all: $(patsubst %.md,%.pdf,$(wildcard *.md)) 44 | 45 | # Generalized rule: how to build a .pdf from each .md 46 | %.pdf: %.md 47 | pandoc $(PANDOC_FLAGS) $(LATEX_FLAGS) -o $@ $< 48 | 49 | # Generalized rule: how to build a .tex from each .md 50 | %.tex: %.md 51 | pandoc --standalone $(PANDOC_FLAGS) -o $@ $< 52 | 53 | touch: 54 | touch *.md 55 | 56 | again: touch all 57 | 58 | clean: 59 | rm -f *.aux *.log *.nav *.out *.snm *.toc *.vrb || true 60 | 61 | veryclean: clean 62 | rm -f *.pdf 63 | 64 | view: $(TARGET).pdf 65 | if [ "Darwin" = "$(shell uname)" ]; then open $(TARGET).pdf ; else xdg-open $(TARGET).pdf ; fi 66 | 67 | print: $(TARGET).pdf 68 | lpr $(TARGET).pdf 69 | 70 | .PHONY: all again touch clean veryclean view print 71 | -------------------------------------------------------------------------------- /article/src/sample.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Sample Article 3 | author: Jake Zimmerman 4 | date: \today 5 | --- 6 | 7 | # Tote Bag Iceland 8 | 9 | Tote bag iceland authentic, distillery church-key hexagon +1 gluten-free venmo 10 | small batch biodiesel fingerstache artisan lyft. Lumbersexual leggings wolf 11 | cardigan kitsch. Photo booth kitsch intelligentsia, meditation neutra heirloom 12 | hexagon asymmetrical man braid man bun williamsburg occupy disrupt irony. Pork 13 | belly pok pok iceland four loko pickled vice, glossier af wolf raclette. Offal 14 | mumblecore fashion axe kogi af. Street art freegan before they sold out 15 | lumbersexual, hammock cronut paleo jean shorts pabst next level raclette 16 | chicharrones disrupt gochujang mlkshk. 17 | 18 | Next level asymmetrical flexitarian messenger bag poutine, enamel pin sartorial 19 | wayfarers health goth chillwave craft beer man bun iPhone. Wayfarers lo-fi 20 | kickstarter flexitarian, vaporware crucifix cronut YOLO tbh. Keffiyeh mlkshk 21 | vexillologist fingerstache vaporware. Beard DIY hammock, kombucha VHS brooklyn 22 | 23 | - Mixtape blue bottle mumblecore tattooed forage migas. 24 | - Vice humblebrag gastropub, vexillologist ethical deep v street art bushwick 25 | selvage __blue bottle__ glossier vaporware banjo retro helvetica. 26 | - _Aesthetic vexillologist_ drinking vinegar, mixtape lumbersexual franzen 27 | microdosing cred hot chicken kinfolk roof party biodiesel umami letterpress 28 | pinterest. 29 | 30 | ## Organic salvia plaid kickstarter 31 | 32 | Jean shorts hashtag crucifix +1 everyday carry kickstarter, tacos subway tile 33 | mumblecore church-key. Semiotics selfies gluten-free, poke helvetica shabby chic 34 | quinoa deep v 90's drinking vinegar portland DIY asymmetrical. Plaid tofu 35 | scenester, neutra stumptown chambray literally trust fund hoodie. Food truck 36 | aesthetic lumbersexual tbh. Prism selvage kickstarter, disrupt mustache 37 | live-edge vexillologist vinyl. Meggings chia listicle vice, put a bird on it 38 | shoreditch chambray PBR&B poke meh. Chillwave artisan austin sriracha. 39 | -------------------------------------------------------------------------------- /article/src/sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jez/pandoc-starter/6ef5adff952a43e1251b0d8f8fd3c5bf34608dd0/article/src/sample.pdf -------------------------------------------------------------------------------- /beamer-solarized/README.md: -------------------------------------------------------------------------------- 1 | # beamer-solarized 2 | 3 | This is a simple set of [Solarized]-based styles for generating a PDF slide 4 | deck. Some features are: 5 | 6 | - A consistent Solarized feel with minimal decoration 7 | - Solarized colors for code blocks 8 | 9 | It uses Pandoc and the `beamer` LaTeX document class to generate presentations 10 | as PDF slides. 11 | 12 | [Solarized]: http://ethanschoonover.com/solarized 13 | 14 | ## Dependencies 15 | 16 | There are a number of build dependencies for these starter files: 17 | 18 | - [Pandoc], a universal document converter 19 | - [LaTeX], a document preparation system 20 | - The font Avenir 21 | - The font Menlo 22 | 23 | [Pandoc]: http://pandoc.org/ 24 | [LaTeX]: https://www.latex-project.org/ 25 | 26 | Installation instructions vary depending on your system. See the linked websites 27 | for more information. 28 | 29 | ## Usage 30 | 31 | 1. Copy these starter files wherever you'd like. 32 | 1. Rename `sample.md` to `.md` 33 | 1. Edit the `TARGET` variable at the top of the [Makefile] to equal `` 34 | 1. Write your content in `.md` 35 | - Be sure to adjust the information like the `title` and `author` at the top 36 | of the file 37 | - You can make section slides with `#` 38 | - You can make content slides with `##` (or `#` if you have no sections) 39 | 1. Read the [Makefile's documentation][Makefile]. 40 | 41 | [Makefile]: src/Makefile 42 | 43 | ## License 44 | 45 | [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt) 46 | -------------------------------------------------------------------------------- /beamer-solarized/src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Jake Zimmerman 3 | # 4 | # ===== Usage ================================================================ 5 | # 6 | # NOTE: 7 | # When running these commands at the command line, replace $(TARGET) with 8 | # the actual value of the TARGET variable. 9 | # 10 | # 11 | # make Compile all *.md files to PDFs 12 | # make .pdf Compile .md to a PDF 13 | # make .tex Generate the intermediate LaTeX for .md 14 | # 15 | # make view Compile $(TARGET).md to a PDF, then view it 16 | # make again Force everything to recompile 17 | # 18 | # make clean Get rid of all intermediate generated files 19 | # make veryclean Get rid of ALL generated files: 20 | # 21 | # make print Send $(TARGET).pdf to the default printer: 22 | # 23 | # ============================================================================ 24 | 25 | TARGET=sample 26 | 27 | 28 | PANDOC_FLAGS =\ 29 | -f markdown+tex_math_single_backslash \ 30 | -t beamer \ 31 | 32 | LATEX_FLAGS = \ 33 | 34 | PDF_ENGINE = xelatex 35 | PANDOCVERSIONGTEQ2 := $(shell expr `pandoc --version | grep ^pandoc | sed 's/^.* //g' | cut -f1 -d.` \>= 2) 36 | ifeq "$(PANDOCVERSIONGTEQ2)" "1" 37 | LATEX_FLAGS += --pdf-engine=$(PDF_ENGINE) 38 | else 39 | LATEX_FLAGS += --latex-engine=$(PDF_ENGINE) 40 | endif 41 | 42 | all: $(patsubst %.md,%.pdf,$(wildcard *.md)) 43 | 44 | # Generalized rule: how to build a .pdf from each .md 45 | %.pdf: %.md pandoc-solarized.sty beamer-includes.tex 46 | pandoc $(PANDOC_FLAGS) $(LATEX_FLAGS) -o $@ $< 47 | 48 | # Generalized rule: how to build a .tex from each .md 49 | %.tex: %.md pandoc-solarized.sty beamer-includes.tex 50 | pandoc --standalone $(PANDOC_FLAGS) -o $@ $< 51 | 52 | touch: 53 | touch *.md 54 | 55 | again: touch all 56 | 57 | clean: 58 | rm -f *.aux *.log *.nav *.out *.snm *.toc *.vrb || true 59 | 60 | veryclean: clean 61 | rm -f *.pdf 62 | 63 | view: $(TARGET).pdf 64 | if [ "Darwin" = "$(shell uname)" ]; then open $(TARGET).pdf ; else xdg-open $(TARGET).pdf ; fi 65 | 66 | print: $(TARGET).pdf 67 | lpr $(TARGET).pdf 68 | 69 | .PHONY: all again touch clean veryclean view print 70 | -------------------------------------------------------------------------------- /beamer-solarized/src/beamer-includes.tex: -------------------------------------------------------------------------------- 1 | \hypersetup{colorlinks=true, linkcolor=sblue, urlcolor=sblue, breaklinks=true} 2 | 3 | \setbeamercolor{normal text}{fg=sbase02,bg=sbase3} 4 | \setbeamercolor{structure}{fg=sblue} 5 | 6 | \setbeamerfont{title}{size=\Huge} 7 | 8 | -------------------------------------------------------------------------------- /beamer-solarized/src/pandoc-solarized.sty: -------------------------------------------------------------------------------- 1 | \definecolor{sbase03}{HTML}{002B36} 2 | \definecolor{sbase02}{HTML}{073642} 3 | \definecolor{sbase01}{HTML}{586E75} 4 | \definecolor{sbase00}{HTML}{657B83} 5 | \definecolor{sbase0}{HTML}{839496} 6 | \definecolor{sbase1}{HTML}{93A1A1} 7 | \definecolor{sbase2}{HTML}{EEE8D5} 8 | \definecolor{sbase3}{HTML}{FDF6E3} 9 | \definecolor{syellow}{HTML}{B58900} 10 | \definecolor{sorange}{HTML}{CB4B16} 11 | \definecolor{sred}{HTML}{DC322F} 12 | \definecolor{smagenta}{HTML}{D33682} 13 | \definecolor{sviolet}{HTML}{6C71C4} 14 | \definecolor{sblue}{HTML}{268BD2} 15 | \definecolor{scyan}{HTML}{2AA198} 16 | \definecolor{sgreen}{HTML}{859900} 17 | 18 | \providecommand{\KeywordTok}{} 19 | \providecommand{\DataTypeTok}{} 20 | \providecommand{\DecValTok}{} 21 | \providecommand{\BaseNTok}{} 22 | \providecommand{\FloatTok}{} 23 | \providecommand{\ConstantTok}{} 24 | \providecommand{\CharTok}{} 25 | \providecommand{\SpecialCharTok}{} 26 | \providecommand{\StringTok}{} 27 | \providecommand{\VerbatimStringTok}{} 28 | \providecommand{\SpecialStringTok}{} 29 | \providecommand{\ImportTok}{} 30 | \providecommand{\CommentTok}{} 31 | \providecommand{\DocumentationTok}{} 32 | \providecommand{\AnnotationTok}{} 33 | \providecommand{\CommentVarTok}{} 34 | \providecommand{\OtherTok}{} 35 | \providecommand{\FunctionTok}{} 36 | \providecommand{\VariableTok}{} 37 | \providecommand{\ControlFlowTok}{} 38 | \providecommand{\OperatorTok}{} 39 | \providecommand{\BuiltInTok}{} 40 | \providecommand{\ExtensionTok}{} 41 | \providecommand{\PreprocessorTok}{} 42 | \providecommand{\AttributeTok}{} 43 | \providecommand{\RegionMarkerTok}{} 44 | \providecommand{\InformationTok}{} 45 | \providecommand{\WarningTok}{} 46 | \providecommand{\AlertTok}{} 47 | \providecommand{\ErrorTok}{} 48 | \providecommand{\NormalTok}{} 49 | 50 | \renewcommand{\KeywordTok}[1]{\textcolor{sgreen}{{#1}}} 51 | \renewcommand{\DataTypeTok}[1]{\textcolor{syellow}{{#1}}} 52 | \renewcommand{\DecValTok}[1]{\textcolor{scyan}{{#1}}} 53 | \renewcommand{\BaseNTok}[1]{\textcolor{scyan}{{#1}}} 54 | \renewcommand{\FloatTok}[1]{\textcolor{scyan}{{#1}}} 55 | \renewcommand{\ConstantTok}[1]{\textcolor{scyan}{{#1}}} 56 | \renewcommand{\CharTok}[1]{\textcolor{scyan}{{#1}}} 57 | \renewcommand{\SpecialCharTok}[1]{\textcolor{sred}{{#1}}} 58 | \renewcommand{\StringTok}[1]{\textcolor{scyan}{{#1}}} 59 | \renewcommand{\VerbatimStringTok}[1]{{#1}} 60 | \renewcommand{\SpecialStringTok}[1]{\textcolor{sred}{{#1}}} 61 | \renewcommand{\ImportTok}[1]{{#1}} 62 | \renewcommand{\CommentTok}[1]{\textcolor{sbase1}{\textit{{#1}}}} 63 | \renewcommand{\DocumentationTok}[1]{\textcolor{sbase1}{\textit{{#1}}}} 64 | \renewcommand{\AnnotationTok}[1]{\textcolor{sbase1}{\textbf{\textit{{#1}}}}} 65 | \renewcommand{\CommentVarTok}[1]{\textcolor{sbase1}{\textbf{\textit{{#1}}}}} 66 | \renewcommand{\OtherTok}[1]{\textcolor{sblue}{#1}} 67 | \renewcommand{\FunctionTok}[1]{\textcolor{sblue}{{#1}}} 68 | \renewcommand{\VariableTok}[1]{\textcolor{sblue}{{#1}}} 69 | \renewcommand{\ControlFlowTok}[1]{\textcolor{sgreen}{\textbf{{#1}}}} 70 | \renewcommand{\OperatorTok}[1]{\textcolor{sgreen}{{#1}}} 71 | \renewcommand{\BuiltInTok}[1]{{#1}} 72 | \renewcommand{\ExtensionTok}[1]{{#1}} 73 | \renewcommand{\PreprocessorTok}[1]{\textcolor{sorange}{{#1}}} 74 | \renewcommand{\AttributeTok}[1]{{#1}} 75 | \renewcommand{\RegionMarkerTok}[1]{{#1}} 76 | \renewcommand{\InformationTok}[1]{\textcolor{sbase1}{\textbf{\textit{{#1}}}}} 77 | \renewcommand{\WarningTok}[1]{\textcolor{sorange}{\textbf{\textit{{#1}}}}} 78 | \renewcommand{\AlertTok}[1]{\textcolor{sred}{\textbf{{#1}}}} 79 | \renewcommand{\ErrorTok}[1]{\textcolor{sred}{\textbf{{#1}}}} 80 | \renewcommand{\NormalTok}[1]{{#1}} 81 | 82 | \renewcommand{\texttt}[1]{\colorbox{sbase2}{{\ttfamily #1}}} 83 | -------------------------------------------------------------------------------- /beamer-solarized/src/sample.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: My Title 3 | author: Jake Zimmerman 4 | date: \today 5 | fontsize: 12pt 6 | monofont: Menlo 7 | mainfont: Avenir 8 | header-includes: 9 | - \usepackage{pandoc-solarized} 10 | - \input{beamer-includes} 11 | --- 12 | 13 | # Section Title 14 | 15 | ## First Slide 16 | 17 | - Bullets 18 | - subitem 19 | 20 | ## Slide Title 21 | 22 | ```python 23 | # This does a thing 24 | def foo(): 25 | return 'bar' 26 | ``` 27 | 28 | 30 | -------------------------------------------------------------------------------- /beamer-solarized/src/sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jez/pandoc-starter/6ef5adff952a43e1251b0d8f8fd3c5bf34608dd0/beamer-solarized/src/sample.pdf -------------------------------------------------------------------------------- /beamer/README.md: -------------------------------------------------------------------------------- 1 | # beamer 2 | 3 | These starter files can be used to generate a simple slide deck, using LaTeX's 4 | `beamer` document class. 5 | 6 | ## Dependencies 7 | 8 | There are a number of build dependencies for these starter files: 9 | 10 | - [Pandoc], a universal document converter 11 | - [LaTeX], a document preparation system 12 | 13 | [Pandoc]: http://pandoc.org/ 14 | [LaTeX]: https://www.latex-project.org/ 15 | 16 | Installation instructions vary depending on your system. See the linked websites 17 | for more information. 18 | 19 | ## Usage 20 | 21 | 1. Copy these starter files wherever you'd like. 22 | 1. Rename `sample.md` to `.md` 23 | 1. Edit the `TARGET` variable at the top of the [Makefile] to equal `` 24 | 1. Write your content in `.md` 25 | - Be sure to adjust the information like the `title` and `author` at the top 26 | of the file 27 | - You can make section slides with `#` 28 | - You can make content slides with `##` (or `#` if you have no sections) 29 | 1. Read the [Makefile's documentation][Makefile]. 30 | 31 | [Makefile]: src/Makefile 32 | 33 | ## License 34 | 35 | [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt) 36 | -------------------------------------------------------------------------------- /beamer/src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Jake Zimmerman 3 | # 4 | # ===== Usage ================================================================ 5 | # 6 | # NOTE: 7 | # When running these commands at the command line, replace $(TARGET) with 8 | # the actual value of the TARGET variable. 9 | # 10 | # 11 | # make Compile all *.md files to PDFs 12 | # make .pdf Compile .md to a PDF 13 | # make .tex Generate the intermediate LaTeX for .md 14 | # 15 | # make view Compile $(TARGET).md to a PDF, then view it 16 | # make again Force everything to recompile 17 | # 18 | # make clean Get rid of all intermediate generated files 19 | # make veryclean Get rid of ALL generated files: 20 | # 21 | # make print Send $(TARGET).pdf to the default printer: 22 | # 23 | # ============================================================================ 24 | 25 | TARGET=sample 26 | 27 | 28 | PANDOC_FLAGS =\ 29 | -f markdown+tex_math_single_backslash \ 30 | -t beamer \ 31 | 32 | LATEX_FLAGS = \ 33 | 34 | PDF_ENGINE = xelatex 35 | PANDOCVERSIONGTEQ2 := $(shell expr `pandoc --version | grep ^pandoc | sed 's/^.* //g' | cut -f1 -d.` \>= 2) 36 | ifeq "$(PANDOCVERSIONGTEQ2)" "1" 37 | LATEX_FLAGS += --pdf-engine=$(PDF_ENGINE) 38 | else 39 | LATEX_FLAGS += --latex-engine=$(PDF_ENGINE) 40 | endif 41 | 42 | all: $(patsubst %.md,%.pdf,$(wildcard *.md)) 43 | 44 | # Generalized rule: how to build a .pdf from each .md 45 | %.pdf: %.md 46 | pandoc $(PANDOC_FLAGS) $(LATEX_FLAGS) -o $@ $< 47 | 48 | # Generalized rule: how to build a .tex from each .md 49 | %.tex: %.md 50 | pandoc --standalone $(PANDOC_FLAGS) -o $@ $< 51 | 52 | touch: 53 | touch *.md 54 | 55 | again: touch all 56 | 57 | clean: 58 | rm -f *.aux *.log *.nav *.out *.snm *.toc *.vrb || true 59 | 60 | veryclean: clean 61 | rm -f *.pdf 62 | 63 | view: $(TARGET).pdf 64 | if [ "Darwin" = "$(shell uname)" ]; then open $(TARGET).pdf ; else xdg-open $(TARGET).pdf ; fi 65 | 66 | print: $(TARGET).pdf 67 | lpr $(TARGET).pdf 68 | 69 | .PHONY: all again touch clean veryclean view print 70 | -------------------------------------------------------------------------------- /beamer/src/sample.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: My Title 3 | author: Jake Zimmerman 4 | date: \today 5 | fontsize: 12pt 6 | --- 7 | 8 | # Section Title 9 | 10 | ## First Slide 11 | 12 | - Bullets 13 | - subitem 14 | 15 | ## Slide Title 16 | 17 | ```python 18 | # This does a thing 19 | def foo(): 20 | return 'bar' 21 | ``` 22 | 23 | 25 | -------------------------------------------------------------------------------- /beamer/src/sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jez/pandoc-starter/6ef5adff952a43e1251b0d8f8fd3c5bf34608dd0/beamer/src/sample.pdf -------------------------------------------------------------------------------- /book-writeup/README.md: -------------------------------------------------------------------------------- 1 | # book-writeup 2 | 3 | Sometimes what you have to write up would benefit from being divided into 4 | chapters, as opposed to just top level headings. When this is the case, you 5 | might want to use Pandoc to format your document into a simple book like this. 6 | 7 | ## Dependencies 8 | 9 | There are a number of build dependencies for these starter files: 10 | 11 | - [Pandoc], a universal document converter 12 | - [LaTeX], a document preparation system 13 | - _Optional_: The font Menlo 14 | 15 | [Pandoc]: http://pandoc.org/ 16 | [LaTeX]: https://www.latex-project.org/ 17 | 18 | Installation instructions vary depending on your system. See the linked websites 19 | for more information. 20 | 21 | ## Usage 22 | 23 | 1. Copy these starter files wherever you'd like. 24 | 1. Adjust the metadata like title and author in `00-meta.md` 25 | 1. Make some chapters 26 | - Each chapter is just a Markdown file in `chapters/` with the 27 | name `XX-.md` 28 | - The `XX` is just a number so that chapters are loaded in order. They don't 29 | have to be sequential 30 | - The `` can be anything. It doesn't correspond to a chapter 31 | title. 32 | 1. Edit the `TARGET` variable at the top of the [Makefile] to be `` 33 | - This will be the filename of your generated PDF. 34 | - Don't put the `.pdf` suffix in this variable 35 | 1. Write your content in `.md` 36 | - Be sure to adjust the information like the `title` and `author` at the top 37 | of the file 38 | 1. Read the [Makefile's documentation][Makefile]. 39 | 40 | 41 | [Makefile]: src/Makefile 42 | 43 | ## License 44 | 45 | [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt) 46 | -------------------------------------------------------------------------------- /book-writeup/src/00-meta.md: -------------------------------------------------------------------------------- 1 | --- 2 | documentclass: book 3 | classoption: 4 | - oneside 5 | title: My Title Here 6 | author: Jake Zimmerman () 7 | date: \today 8 | geometry: margin=1.75in 9 | fontsize: 12pt 10 | fontfamily: ebgaramond-maths 11 | monofont: Menlo 12 | newtxmathoptions: 13 | - cmintegrals 14 | - cmbraces 15 | toc: true 16 | colorlinks: true 17 | linkcolor: RoyalBlue 18 | urlcolor: RoyalBlue 19 | --- 20 | 21 | -------------------------------------------------------------------------------- /book-writeup/src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Jake Zimmerman 3 | # 4 | # ===== Usage ================================================================ 5 | # 6 | # NOTE: 7 | # When running these commands at the command line, replace $(TARGET) with 8 | # the actual value of the TARGET variable. 9 | # 10 | # 11 | # make Compile all *.md files to PDFs 12 | # make .pdf Compile .md to a PDF 13 | # make .tex Generate the intermediate LaTeX for .md 14 | # 15 | # make view Compile $(TARGET).md to a PDF, then view it 16 | # make again Force everything to recompile 17 | # 18 | # make clean Get rid of all intermediate generated files 19 | # make veryclean Get rid of ALL generated files: 20 | # 21 | # make print Send $(TARGET).pdf to the default printer: 22 | # 23 | # ============================================================================ 24 | 25 | 26 | TARGET = sample 27 | 28 | SOURCES = $(shell find . -name '*.md') 29 | 30 | PANDOC_FLAGS =\ 31 | --template template.tex \ 32 | -f markdown+tex_math_single_backslash \ 33 | -t latex \ 34 | 35 | LATEX_FLAGS = \ 36 | 37 | PDF_ENGINE = xelatex 38 | PANDOCVERSIONGTEQ2 := $(shell expr `pandoc --version | grep ^pandoc | sed 's/^.* //g' | cut -f1 -d.` \>= 2) 39 | ifeq "$(PANDOCVERSIONGTEQ2)" "1" 40 | LATEX_FLAGS += --pdf-engine=$(PDF_ENGINE) 41 | else 42 | LATEX_FLAGS += --latex-engine=$(PDF_ENGINE) 43 | endif 44 | 45 | all: $(TARGET).pdf 46 | 47 | $(TARGET).pdf: $(SOURCES) template.tex 48 | pandoc $(PANDOC_FLAGS) $(LATEX_FLAGS) -o $@ $(SOURCES) 49 | 50 | $(TARGET).tex: $(SOURCES) template.tex 51 | pandoc --standalone $(PANDOC_FLAGS) -o $@ $(SOURCES) 52 | 53 | clean: 54 | rm -f *.aux *.log *.nav *.out *.snm *.toc *.vrb tags || true 55 | 56 | veryclean: clean 57 | rm -f $(TARGET).pdf 58 | 59 | view: $(TARGET).pdf 60 | if [ "Darwin" = "$(shell uname)" ]; then open $(TARGET).pdf ; else xdg-open $(TARGET).pdf ; fi 61 | 62 | .PHONY: all clean veryclean view 63 | -------------------------------------------------------------------------------- /book-writeup/src/chapters/00-dedication.md: -------------------------------------------------------------------------------- 1 | \newpage 2 | 3 | \vspace*{\fill} 4 | 5 | *Your dedication here* 6 | 7 | \vspace*{\fill} 8 | 9 | 10 | -------------------------------------------------------------------------------- /book-writeup/src/chapters/01-overview.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | You can make chapters by using `h1` Markdown headings. 4 | -------------------------------------------------------------------------------- /book-writeup/src/sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jez/pandoc-starter/6ef5adff952a43e1251b0d8f8fd3c5bf34608dd0/book-writeup/src/sample.pdf -------------------------------------------------------------------------------- /book-writeup/src/template.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} 2 | 3 | % For redefining the \chapter command 4 | \usepackage[explicit]{titlesec} 5 | 6 | % To make the headers nicer (lowercase) 7 | \usepackage{fancyhdr} 8 | \renewcommand{\chaptermark}[1]{\markboth{#1}{}} 9 | \renewcommand{\sectionmark}[1]{\markright{#1}} 10 | \pagestyle{fancy} 11 | \fancyhf{} 12 | \fancyhead[LE,RO]{\thepage} 13 | \fancyhead[LO]{\itshape\nouppercase{\rightmark}} 14 | \fancyhead[RE]{\itshape\nouppercase{\leftmark}} 15 | \renewcommand{\headrulewidth}{0pt} 16 | 17 | $if(newtxmathoptions)$ 18 | \usepackage[$for(newtxmathoptions)$$newtxmathoptions$$sep$,$endfor$]{newtxmath} 19 | $endif$ 20 | $if(fontfamily)$ 21 | \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} 22 | $else$ 23 | \usepackage{lmodern} 24 | $endif$ 25 | $if(linestretch)$ 26 | \usepackage{setspace} 27 | \setstretch{$linestretch$} 28 | $endif$ 29 | \usepackage{amssymb,amsmath} 30 | \usepackage{ifxetex,ifluatex} 31 | \usepackage{fixltx2e} % provides \textsubscript 32 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 33 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 34 | \usepackage[utf8]{inputenc} 35 | $if(euro)$ 36 | \usepackage{eurosym} 37 | $endif$ 38 | \else % if luatex or xelatex 39 | \ifxetex 40 | %\usepackage{mathspec} 41 | \else 42 | \usepackage{fontspec} 43 | \fi 44 | \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} 45 | $if(euro)$ 46 | \newcommand{\euro}{€} 47 | $endif$ 48 | $if(mainfont)$ 49 | \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} 50 | $endif$ 51 | $if(sansfont)$ 52 | \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} 53 | $endif$ 54 | $if(monofont)$ 55 | \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} 56 | $endif$ 57 | $if(mathfont)$ 58 | \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 59 | $endif$ 60 | $if(CJKmainfont)$ 61 | \usepackage{xeCJK} 62 | \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} 63 | $endif$ 64 | \fi 65 | % use upquote if available, for straight quotes in verbatim environments 66 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 67 | % use microtype if available 68 | \IfFileExists{microtype.sty}{% 69 | \usepackage{microtype} 70 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 71 | }{} 72 | $if(geometry)$ 73 | \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} 74 | $endif$ 75 | \usepackage{hyperref} 76 | $if(colorlinks)$ 77 | \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref 78 | $endif$ 79 | \hypersetup{unicode=true, 80 | $if(title-meta)$ 81 | pdftitle={$title-meta$}, 82 | $endif$ 83 | $if(author-meta)$ 84 | pdfauthor={$author-meta$}, 85 | $endif$ 86 | $if(keywords)$ 87 | pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$}, 88 | $endif$ 89 | $if(colorlinks)$ 90 | colorlinks=true, 91 | linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, 92 | citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, 93 | urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, 94 | $else$ 95 | pdfborder={0 0 0}, 96 | $endif$ 97 | breaklinks=true} 98 | \urlstyle{same} % don't use monospace font for urls 99 | $if(lang)$ 100 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 101 | \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} 102 | $if(babel-newcommands)$ 103 | $babel-newcommands$ 104 | $endif$ 105 | \else 106 | \usepackage{polyglossia} 107 | \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} 108 | $for(polyglossia-otherlangs)$ 109 | \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} 110 | $endfor$ 111 | \fi 112 | $endif$ 113 | $if(natbib)$ 114 | \usepackage{natbib} 115 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 116 | $endif$ 117 | $if(biblatex)$ 118 | \usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex} 119 | $if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$ 120 | $for(bibliography)$ 121 | \addbibresource{$bibliography$} 122 | $endfor$ 123 | $endif$ 124 | $if(listings)$ 125 | \usepackage{listings} 126 | $endif$ 127 | $if(lhs)$ 128 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} 129 | $endif$ 130 | $if(highlighting-macros)$ 131 | $highlighting-macros$ 132 | $endif$ 133 | $if(verbatim-in-note)$ 134 | \usepackage{fancyvrb} 135 | \VerbatimFootnotes % allows verbatim text in footnotes 136 | $endif$ 137 | $if(tables)$ 138 | \usepackage{longtable,booktabs} 139 | $endif$ 140 | $if(graphics)$ 141 | \usepackage{graphicx,grffile} 142 | \makeatletter 143 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 144 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} 145 | \makeatother 146 | % Scale images if necessary, so that they will not overflow the page 147 | % margins by default, and it is still possible to overwrite the defaults 148 | % using explicit options in \includegraphics[width, height, ...]{} 149 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 150 | $endif$ 151 | $if(links-as-notes)$ 152 | % Make links footnotes instead of hotlinks: 153 | \renewcommand{\href}[2]{#2\footnote{\url{#1}}} 154 | $endif$ 155 | $if(strikeout)$ 156 | \usepackage[normalem]{ulem} 157 | % avoid problems with \sout in headers with hyperref: 158 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} 159 | $endif$ 160 | $if(indent)$ 161 | $else$ 162 | \IfFileExists{parskip.sty}{% 163 | \usepackage{parskip} 164 | }{% else 165 | \setlength{\parindent}{0pt} 166 | \setlength{\parskip}{6pt plus 2pt minus 1pt} 167 | } 168 | $endif$ 169 | \setlength{\emergencystretch}{3em} % prevent overfull lines 170 | \providecommand{\tightlist}{% 171 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 172 | $if(numbersections)$ 173 | \setcounter{secnumdepth}{5} 174 | $else$ 175 | \setcounter{secnumdepth}{0} 176 | $endif$ 177 | $if(subparagraph)$ 178 | $else$ 179 | % Redefines (sub)paragraphs to behave more like sections 180 | \ifx\paragraph\undefined\else 181 | \let\oldparagraph\paragraph 182 | \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} 183 | \fi 184 | \ifx\subparagraph\undefined\else 185 | \let\oldsubparagraph\subparagraph 186 | \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} 187 | \fi 188 | $endif$ 189 | $if(dir)$ 190 | \ifxetex 191 | % load bidi as late as possible as it modifies e.g. graphicx 192 | $if(latex-dir-rtl)$ 193 | \usepackage[RTLdocument]{bidi} 194 | $else$ 195 | \usepackage{bidi} 196 | $endif$ 197 | \fi 198 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 199 | \TeXXeTstate=1 200 | \newcommand{\RL}[1]{\beginR #1\endR} 201 | \newcommand{\LR}[1]{\beginL #1\endL} 202 | \newenvironment{RTL}{\beginR}{\endR} 203 | \newenvironment{LTR}{\beginL}{\endL} 204 | \fi 205 | $endif$ 206 | $for(header-includes)$ 207 | $header-includes$ 208 | $endfor$ 209 | % Overwrite \begin{figure}[htbp] with \begin{figure}[H] 210 | \usepackage{float} 211 | \let\origfigure=\figure 212 | \let\endorigfigure=\endfigure 213 | \renewenvironment{figure}[1][]{% 214 | \origfigure[H] 215 | }{% 216 | \endorigfigure 217 | } 218 | $if(title)$ 219 | \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} 220 | $endif$ 221 | $if(subtitle)$ 222 | \providecommand{\subtitle}[1]{} 223 | \subtitle{$subtitle$} 224 | $endif$ 225 | $if(author)$ 226 | \author{$for(author)$$author$$sep$ \and $endfor$} 227 | $endif$ 228 | $if(institute)$ 229 | \institute{$for(institute)$$institute$$sep$ \and $endfor$} 230 | $endif$ 231 | \date{$date$} 232 | 233 | \begin{document} 234 | $if(title)$ 235 | \maketitle 236 | $endif$ 237 | $if(abstract)$ 238 | \begin{abstract} 239 | $abstract$ 240 | \end{abstract} 241 | $endif$ 242 | 243 | $for(include-before)$ 244 | $include-before$ 245 | 246 | $endfor$ 247 | $if(toc)$ 248 | { 249 | $if(colorlinks)$ 250 | \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} 251 | $endif$ 252 | \setcounter{tocdepth}{$toc-depth$} 253 | \newpage 254 | \tableofcontents 255 | } 256 | $endif$ 257 | $if(lot)$ 258 | \listoftables 259 | $endif$ 260 | $if(lof)$ 261 | \listoffigures 262 | $endif$ 263 | 264 | % Redefine chapter title after table of contents 265 | \titleformat{\chapter}[display]{\normalfont\bfseries}{}{0pt}{\huge\thechapter.\,#1} 266 | 267 | $body$ 268 | 269 | $if(natbib)$ 270 | $if(bibliography)$ 271 | $if(biblio-title)$ 272 | $if(book-class)$ 273 | \renewcommand\bibname{$biblio-title$} 274 | $else$ 275 | \renewcommand\refname{$biblio-title$} 276 | $endif$ 277 | $endif$ 278 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 279 | 280 | $endif$ 281 | $endif$ 282 | $if(biblatex)$ 283 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 284 | 285 | $endif$ 286 | $for(include-after)$ 287 | $include-after$ 288 | 289 | $endfor$ 290 | \end{document} 291 | -------------------------------------------------------------------------------- /homework/README.md: -------------------------------------------------------------------------------- 1 | # homework 2 | 3 | These starter files can be used for writing up solutions to homeworks in math or 4 | computer science classes. It uses the [LaTeX Homework Class]. See that project 5 | for more usage information. 6 | 7 | [LaTeX Homework Class]: https://github.com/jez/latex-homework-class 8 | 9 | ## Dependencies 10 | 11 | There are a number of build dependencies for these starter files: 12 | 13 | - [Pandoc], a universal document converter 14 | - [LaTeX], a document preparation system 15 | - _Optional_: The font Menlo 16 | 17 | [Pandoc]: http://pandoc.org/ 18 | [LaTeX]: https://www.latex-project.org/ 19 | 20 | Installation instructions vary depending on your system. See the linked websites 21 | for more information. 22 | 23 | ## Usage 24 | 25 | 1. Copy these starter files wherever you'd like. 26 | 1. Rename `sample.md` to `.md` 27 | 1. Edit the `TARGET` variable at the top of the [Makefile] to equal `` 28 | 1. Write your content in `.md` 29 | - Be sure to adjust the information like the `title` and `author` at the top 30 | of the file 31 | 1. Read the [Makefile's documentation][Makefile]. 32 | 33 | [Makefile]: src/Makefile 34 | 35 | ## License 36 | 37 | [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt) 38 | -------------------------------------------------------------------------------- /homework/src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Jake Zimmerman 3 | # 4 | # ===== Usage ================================================================ 5 | # 6 | # NOTE: 7 | # When running these commands at the command line, replace $(TARGET) with 8 | # the actual value of the TARGET variable. 9 | # 10 | # 11 | # make Compile all *.md files to PDFs 12 | # make .pdf Compile .md to a PDF 13 | # make .tex Generate the intermediate LaTeX for .md 14 | # 15 | # make view Compile $(TARGET).md to a PDF, then view it 16 | # make again Force everything to recompile 17 | # 18 | # make clean Get rid of all intermediate generated files 19 | # make veryclean Get rid of ALL generated files: 20 | # 21 | # make print Send $(TARGET).pdf to the default printer: 22 | # 23 | # ============================================================================ 24 | 25 | TARGET=sample 26 | 27 | all: $(patsubst %.md,%.pdf,$(wildcard *.md)) 28 | 29 | PANDOC_FLAGS =\ 30 | -f markdown+tex_math_single_backslash \ 31 | -t latex \ 32 | 33 | LATEX_FLAGS = \ 34 | 35 | PDF_ENGINE = xelatex 36 | PANDOCVERSIONGTEQ2 := $(shell expr `pandoc --version | grep ^pandoc | sed 's/^.* //g' | cut -f1 -d.` \>= 2) 37 | ifeq "$(PANDOCVERSIONGTEQ2)" "1" 38 | LATEX_FLAGS += --pdf-engine=$(PDF_ENGINE) 39 | else 40 | LATEX_FLAGS += --latex-engine=$(PDF_ENGINE) 41 | endif 42 | 43 | all: $(patsubst %.md,%.pdf,$(wildcard *.md)) 44 | 45 | # Generalized rule: how to build a .pdf from each .md 46 | %.pdf: %.md 47 | pandoc $(PANDOC_FLAGS) $(LATEX_FLAGS) -o $@ $< 48 | 49 | # Generalized rule: how to build a .tex from each .md 50 | %.tex: %.md 51 | pandoc --standalone $(PANDOC_FLAGS) -o $@ $< 52 | 53 | touch: 54 | touch *.md 55 | 56 | again: touch all 57 | 58 | clean: 59 | rm -f *.aux *.log *.nav *.out *.snm *.toc *.vrb || true 60 | 61 | veryclean: clean 62 | rm -f *.pdf 63 | 64 | view: $(TARGET).pdf 65 | if [ "Darwin" = "$(shell uname)" ]; then open $(TARGET).pdf ; else xdg-open $(TARGET).pdf ; fi 66 | 67 | print: $(TARGET).pdf 68 | lpr $(TARGET).pdf 69 | 70 | .PHONY: all again touch clean veryclean view print 71 | -------------------------------------------------------------------------------- /homework/src/homework.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e} 2 | \LoadClassWithOptions{article} 3 | \ProvidesClass{homework}[2014/12/16 Class file for homework assignments] 4 | 5 | % ----- Options --------------------------------------------------------------- 6 | \newcommand\@opanon{0} 7 | \DeclareOption{anonymous}{\renewcommand\@opanon{1}} 8 | \newcommand\@opnewpage{0} 9 | \DeclareOption{newpage}{\renewcommand\@opnewpage{1}} 10 | \newcommand\@oplargemargins{0} 11 | \DeclareOption{largemargins}{\renewcommand\@oplargemargins{1}} 12 | \ProcessOptions 13 | 14 | % ----- Packages -------------------------------------------------------------- 15 | 16 | % Better fonts with accents 17 | \RequirePackage[T1]{fontenc} 18 | 19 | % Required for starred commands 20 | \RequirePackage{suffix} 21 | 22 | % Math symbols 23 | \RequirePackage{amsmath} 24 | \RequirePackage{amsfonts} 25 | \RequirePackage{amsthm} 26 | \RequirePackage{amssymb} 27 | \RequirePackage{centernot} 28 | 29 | % Nice lists 30 | \RequirePackage{enumerate} 31 | \RequirePackage[shortlabels]{enumitem} 32 | 33 | % Nice images, figures, and listings 34 | \RequirePackage{graphicx} 35 | \RequirePackage{grffile} 36 | \RequirePackage[all]{xy} 37 | \RequirePackage{wrapfig} 38 | \RequirePackage{fancyvrb} 39 | \RequirePackage{listings} 40 | 41 | % Conditionals 42 | \RequirePackage{ifthen} 43 | 44 | % Header & Page Setup 45 | \RequirePackage{fancyhdr} 46 | \ifthenelse{\equal{\@oplargemargins}{1}}{}{\RequirePackage{fullpage}} 47 | 48 | % Links 49 | \RequirePackage{ifxetex,ifluatex} 50 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 51 | \RequirePackage{hyperref} 52 | \fi 53 | 54 | % ----- Questions ------------------------------------------------------------- 55 | \newcounter{questionCounter} 56 | \newcounter{partCounter}[questionCounter] 57 | 58 | % Prefix for questions 59 | \newcommand{\questiontype}[0]{Question} 60 | 61 | % Use this if your "written" questions are all under one section 62 | % For example, if the homework handout has Section 5: Written Questions 63 | % and all questions are 5.1, 5.2, 5.3, etc. set this to 5 64 | % Use for 0 no prefix. Redefine as needed per-question. 65 | \newcommand{\writtensection}[0]{0} 66 | 67 | % Numbered question 68 | \providecommand{\question}{} 69 | \renewcommand{\question}[0]{% 70 | % Emit \newpage if option `newpage` is present 71 | \ifthenelse{\equal{\@opnewpage}{1}}{% 72 | \newpage 73 | }{} 74 | 75 | % Wrap in minipage so that we don't get a line break enywhere in between 76 | \begin{minipage}{\linewidth}% 77 | \stepcounter{questionCounter}% 78 | \vspace{.2in}% 79 | \ifx\writtensection\undefined{} 80 | \noindent{\bf \questiontype\ \arabic{questionCounter}.}% 81 | \else 82 | \if\writtensection0 83 | \noindent{\bf \questiontype\ \arabic{questionCounter}.}% 84 | \else 85 | \noindent{\bf \questiontype\ \writtensection.\arabic{questionCounter}}% 86 | \fi 87 | \vspace{0.3em} \hrule \vspace{.1in}% 88 | \end{minipage} 89 | } 90 | 91 | % Named question, takes one argument 92 | \WithSuffix\providecommand\question*{} 93 | \WithSuffix\renewcommand\question*[1]{% 94 | % Emit \newpage if option `newpage` is present 95 | \ifthenelse{\equal{\@opnewpage}{1}}{% 96 | \newpage% 97 | }{}% 98 | % Wrap in minipage so that we don't get a line break enywhere in between 99 | \begin{minipage}{\linewidth}% 100 | \addtocounter{questionCounter}{1}% 101 | \setcounter{partCounter}{0}% 102 | \vspace{.2in}% 103 | \noindent{\bf \arabic{questionCounter}. #1}% 104 | \vspace{0.3em} \hrule \vspace{.1in}% 105 | \end{minipage} 106 | } 107 | 108 | % Override normal section defintions 109 | \renewcommand{\section}[0]{\question} 110 | \WithSuffix\newcommand\section*[1]{\question*{#1}} 111 | 112 | % ----- Question Parts -------------------------------------------------------- 113 | 114 | \newenvironment{alphaparts}[0]{% 115 | \begin{enumerate}[label=\textbf{(\alph*)}]% 116 | }{\end{enumerate}} 117 | 118 | \newenvironment{arabicparts}[0]{% 119 | \begin{enumerate}[label=\textbf{\arabic{questionCounter}.\arabic*})]% 120 | }{\end{enumerate}} 121 | 122 | \newcommand{\questionpart}[0]{\item} 123 | 124 | % ----- Induction Environment ------------------------------------------------- 125 | 126 | \newenvironment{induction}[0]{% 127 | \begin{description} 128 | }{\end{description}} 129 | 130 | \newcommand{\basecase}{\item[Base Case]\mbox{}\\} 131 | \newcommand{\indhyp}{\item[Induction Hypothesis]\mbox{}\\} 132 | \newcommand{\indstep}{\item[Induction Step]\mbox{}\\} 133 | 134 | % ----- Answer Box ------------------------------------------------------------ 135 | 136 | \newcommand{\answerbox}[1]{% 137 | \begin{framed} 138 | \vspace{#1} 139 | \end{framed}} 140 | 141 | % ----- Page Setup ------------------------------------------------------------ 142 | 143 | % Use block style paragraphs 144 | \setlength{\parindent}{0pt} 145 | \setlength{\parskip}{5pt plus 1pt} 146 | 147 | \def\indented#1{\list{}{}\item[]} 148 | \let\indented=\endlist 149 | 150 | % ----- Title & Header -------------------------------------------------------- 151 | \pagestyle{empty} 152 | \pagestyle{fancy} 153 | 154 | %\if\@opanon% 155 | \ifthenelse{\equal{\@opanon}{0}}{% 156 | \renewcommand{\maketitle}[0]{% 157 | % Setup header 158 | \setlength{\headheight}{15.2pt} 159 | \setlength{\headsep}{0.2in} 160 | \lhead{\hwclass{} \hwlecture\hwsection}% 161 | \chead{\hwname{} (\hwemail)}% 162 | \rhead{\hwtype{} \hwnum}% 163 | 164 | % Setup hrule in header 165 | \renewcommand{\headrulewidth}{0pt} 166 | \headrule{} 167 | 168 | % Don't put header on first page 169 | \thispagestyle{plain} 170 | 171 | \begin{center} 172 | {\Large \hwclass{} \hwtype{} \hwnum} 173 | 174 | \hwname{} (\hwemail) 175 | 176 | \today 177 | \end{center} 178 | \renewcommand{\headrulewidth}{0.4pt} 179 | } 180 | 181 | }% 182 | {% 183 | \renewcommand{\maketitle}[0]{% 184 | % Make all pages plain 185 | \pagestyle{plain} 186 | 187 | % Put header on it's own page 188 | \begin{center} 189 | {\Large \hwclass{} \hwtype{} \hwnum} 190 | 191 | \hwname{} (\hwemail) 192 | 193 | \today 194 | \end{center} 195 | \renewcommand{\headrulewidth}{0.4pt} 196 | \newpage 197 | } 198 | } 199 | 200 | % ----- For usage with pandoc converted documents ----------------------------- 201 | 202 | \providecommand{\tightlist}{% 203 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 204 | 205 | % ----------------------------------------------------------------------------- 206 | -------------------------------------------------------------------------------- /homework/src/sample.md: -------------------------------------------------------------------------------- 1 | --- 2 | documentclass: homework 3 | # For option documentation, see https://github.com/jez/latex-homework-class 4 | classoption: 5 | - 11pt 6 | - largemargins 7 | # Remove or change this line if you don't have the Menlo font installed 8 | monofont: Menlo 9 | newtxmathoptions: 10 | - cmintegrals 11 | - cmbraces 12 | colorlinks: true 13 | linkcolor: RoyalBlue 14 | urlcolor: RoyalBlue 15 | header-includes: 16 | - '\newcommand{\hwname}{Jacob Zimmerman}' 17 | - '\newcommand{\hwemail}{jezimmer}' 18 | - '\newcommand{\hwtype}{Homework}' 19 | - '\newcommand{\hwnum}{1}' 20 | - '\newcommand{\hwclass}{15-123}' 21 | - '\newcommand{\hwlecture}{1}' 22 | - '\newcommand{\hwsection}{A}' 23 | --- 24 | 25 | \maketitle 26 | 27 | # 28 | 29 | _Count the rectangles of all sizes and of all positions that are formed using 30 | segments in a grid with \(m\) horizontal and \(n\) vertical lines._ 31 | 32 | _Solution._ A rectangle is uniquely described by two distinct vertical lines and 33 | two distinct horizontal lines. Therefore we can just select these two lines and 34 | multiply these quantities by rule of product: 35 | 36 | 37 | \begin{align*} 38 | \binom{n}{2}\binom{m}{2} 39 | \end{align*} 40 | 41 | 42 | # Anagrams {-} 43 | 44 | _How many ways are there to rearrange the letters in the word "anagram"?_ 45 | 46 | _Solution._ We can choose an arrangement of the letters in "anagram" in two 47 | steps. We first choose 3 of the 7 positions to be a's, then permute "ngrm" in 48 | the remaining positions. Thus, we have 49 | \begin{align*} 50 | \binom{7}{3} 4! 51 | \end{align*} 52 | 53 | ways to choose an arrangement. 54 | 55 | 56 | -------------------------------------------------------------------------------- /homework/src/sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jez/pandoc-starter/6ef5adff952a43e1251b0d8f8fd3c5bf34608dd0/homework/src/sample.pdf -------------------------------------------------------------------------------- /revealjs-solarized/README.md: -------------------------------------------------------------------------------- 1 | # revealjs-solarized 2 | 3 | These starter files can be used to generate an opinionated 4 | [Reveal.js](https://revealjs.com/#/) slide deck. 5 | 6 | ## Dependencies 7 | 8 | There are no other dependencies other than [Pandoc]. Optional functionality to 9 | watch the file system and rebuild on changes requires [Watchman]. Optional 10 | functionality to serve and preview the files locally uses [Python 3]. 11 | 12 | - [Pandoc], a universal document converter 13 | - [Watchman], a file watching service 14 | - [Python 3], for `http.server` 15 | 16 | [Pandoc]: http://pandoc.org/ 17 | [Watchman]: https://facebook.github.io/watchman/ 18 | [Python 3]: https://docs.python.org/3/library/http.server.html 19 | 20 | Installation instructions vary depending on your system. See the linked websites 21 | for more information. 22 | 23 | ## Usage 24 | 25 | 1. Copy these starter files wherever you'd like. 26 | 1. Write your content in `index.md` 27 | - Be sure to adjust the information like the `title` and `author` at the top 28 | of the file 29 | - Start a new slide with `#` 30 | 1. Run `make watch` to build the site and watch for changes. 31 | 32 | The sample presentation is already built. If you just want to preview it and 33 | don't want to install Watchman, run `python -m http.server` in `src/`. 34 | 35 | 1. View the presentation at . 36 | 37 | If you just want to see a live example without first cloning this repo: 38 | 39 | 40 | Read the [Makefile's documentation][Makefile] for more commands. 41 | 42 | [Makefile]: src/Makefile 43 | 44 | To use speaker notes, you **must** either serve the presentation from HTTPS or 45 | use the loopback address, i.e., . [Read more about why 46 | and alternatives here][https]. 47 | 48 | [https]: https://letsencrypt.org/docs/certificates-for-localhost/ 49 | 50 | In true Solarized fashion, this template supports both **light** and **dark**. 51 | The default is light. To switch to the dark theme, click the title on the 52 | title slide. The presentation writes the most recent preference into local 53 | storage, so even if you refresh it will be saved. 54 | 55 | You can generate a PDF from your slides (in Chrome) by tacking `?print-pdf` onto 56 | the URL and using the browser's print diaglog: 57 | 58 | - 59 | 60 | Note the query string must come **before** the `#slide-number`. 61 | 62 | ## License 63 | 64 | [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt) 65 | -------------------------------------------------------------------------------- /revealjs-solarized/src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Jake Zimmerman 3 | # 4 | # ===== Usage ================================================================ 5 | # 6 | # make Compile index.html to a Beamer.js presentation 7 | # 8 | # make watch Start a local HTTP server and rebuild on changes 9 | # PORT=4242 make watch Like above, but use port 4242 10 | # 11 | # make build.zip Zip up all the files that would be required to serve 12 | # a standalone presentation. (i.e., you probably don't 13 | # want to deploy the Makefile or serve.sh script to your 14 | # web host) 15 | # 16 | # make clean Delete all generated files 17 | # 18 | # ============================================================================ 19 | 20 | index.html: index.md solarized.theme default.revealjs 21 | pandoc --highlight-style solarized.theme -t revealjs --standalone --template=./default.revealjs -o $@ $< 22 | 23 | build.zip: index.html $(wildcard css/*.css) $(wildcard js/*.js) 24 | zip -r $@ $^ 25 | 26 | # Need to use a custom template because we want to patch the template slightly, 27 | # but not completely fork it (improvements should still be submitted upstream). 28 | default.revealjs: 29 | curl -O https://raw.githubusercontent.com/jgm/pandoc/master/data/templates/default.revealjs && \ 30 | sed -i.bak -e '/css\/theme\/black.css/d' $@ && \ 31 | rm -f $@.bak 32 | 33 | .PHONY: clean 34 | clean: 35 | rm -f index.html 36 | 37 | .PHONY: watch 38 | watch: index.html serve.sh 39 | ./serve.sh 40 | -------------------------------------------------------------------------------- /revealjs-solarized/src/css/solarized.css: -------------------------------------------------------------------------------- 1 | 2 | /* Fonts */ 3 | 4 | /* Variables */ 5 | 6 | :root { 7 | --solarized-base03: #002b36; 8 | --solarized-base02: #073642; 9 | --solarized-base01: #586e75; 10 | --solarized-base00: #657b83; 11 | --solarized-base0: #839496; 12 | --solarized-base1: #93a1a1; 13 | --solarized-base2: #eee8d5; 14 | --solarized-base3: #fdf6e3; 15 | --solarized-yellow: #b58900; 16 | --solarized-orange: #cb4b16; 17 | --solarized-red: #dc322f; 18 | --solarized-magenta: #d33682; 19 | --solarized-violet: #6c71c4; 20 | --solarized-blue: #268bd2; 21 | --solarized-cyan: #2aa198; 22 | --solarized-green: #859900; 23 | 24 | --main-font: Avenir, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 25 | --main-font-size: 40px; 26 | 27 | --code-font: Menlo, Monaco, Source Code Pro, monospace; 28 | --code-font-size: 0.9em; 29 | 30 | --block-margin: 20px; 31 | 32 | --h1-font-size: 2.2em; 33 | --h2-font-size: 1.6em; 34 | --h3-font-size: 1.2em; 35 | } 36 | 37 | /* --- Global styles -------------------------- */ 38 | .reveal-viewport { 39 | background-color: var(--solarized-base3); 40 | } 41 | 42 | .reveal { 43 | font-family: var(--main-font); 44 | /* Normally body copy in Solarized Light is base00, 45 | * but I like it darker. */ 46 | color: var(--solarized-base02); 47 | 48 | -webkit-font-smoothing: antialiased; 49 | -moz-osx-font-smoothing: grayscale; 50 | 51 | font-size: var(--main-font-size); 52 | font-weight: normal; 53 | } 54 | 55 | .reveal .slides section, 56 | .reveal .slides section>section { 57 | line-height: 1.3; 58 | font-weight: inherit; 59 | } 60 | 61 | /* --- Headers -------------------------------- */ 62 | 63 | .reveal h1, 64 | .reveal h2, 65 | .reveal h3, 66 | .reveal h4, 67 | .reveal h5, 68 | .reveal h6 { 69 | font-family: var(--main-font); 70 | /* Normally body copy in Solarized Light is base00, 71 | * but I like it darker. */ 72 | color: var(--solarized-base02); 73 | 74 | margin: 0 0 var(--block-margin) 0; 75 | 76 | text-transform: none; 77 | font-weight: normal; 78 | line-height: 1.2; 79 | 80 | color: var(--solarized-blue); 81 | 82 | word-wrap: break-word; 83 | 84 | font-variant-ligatures: none; 85 | } 86 | 87 | .reveal h1 { font-size: var(--h1-font-size); } 88 | .reveal h2 { font-size: var(--h2-font-size); } 89 | .reveal h3 { font-size: var(--h3-font-size); } 90 | 91 | .reveal .title { 92 | /* Clicking the title toggles the theme */ 93 | cursor: pointer; 94 | } 95 | 96 | /* --- Layout --------------------------------- */ 97 | 98 | .reveal .slides { 99 | text-align: left; 100 | } 101 | 102 | /* Ensure certain elements are never larger than the slide itself */ 103 | .reveal img, 104 | .reveal video, 105 | .reveal iframe { 106 | max-width: 95%; 107 | max-height: 95%; 108 | } 109 | 110 | 111 | /* --- Other typography ----------------------- */ 112 | 113 | .reveal p { 114 | margin: var(--block-margin) 0; 115 | line-height: 1.3; 116 | } 117 | 118 | .reveal strong, 119 | .reveal b { 120 | font-weight: bold; 121 | color: var(--solarized-blue); 122 | } 123 | 124 | .reveal em { 125 | font-style: italic; 126 | } 127 | 128 | .reveal a { 129 | color: var(--solarized-blue); 130 | text-decoration: none; 131 | } 132 | 133 | .reveal a:hover { 134 | text-decoration: underline; 135 | } 136 | 137 | .reveal sup { 138 | vertical-align: super; 139 | font-size: smaller; 140 | } 141 | .reveal sub { 142 | vertical-align: sub; 143 | font-size: smaller; 144 | } 145 | 146 | .reveal small { 147 | display: inline-block; 148 | font-size: 0.6em; 149 | line-height: 1.2em; 150 | vertical-align: top; 151 | } 152 | 153 | .reveal small * { 154 | vertical-align: top; 155 | } 156 | 157 | 158 | /* --- Lists ---------------------------------- */ 159 | 160 | .reveal ol, 161 | .reveal dl, 162 | .reveal ul { 163 | display: inline-block; 164 | 165 | text-align: left; 166 | margin: 0 0 0 1em; 167 | } 168 | 169 | .reveal ol { 170 | list-style-type: decimal; 171 | } 172 | 173 | .reveal ol ol { 174 | list-style-type: lower-alpha; 175 | } 176 | 177 | .reveal ul { 178 | list-style-type: disc; 179 | } 180 | 181 | .reveal ul ul { 182 | list-style-type: square; 183 | } 184 | 185 | .reveal ul ul ul { 186 | list-style-type: circle; 187 | } 188 | 189 | .reveal ul ul, 190 | .reveal ul ol, 191 | .reveal ol ol, 192 | .reveal ol ul { 193 | display: block; 194 | margin-left: 40px; 195 | } 196 | 197 | .reveal dt { 198 | font-weight: bold; 199 | } 200 | 201 | .reveal dd { 202 | margin-left: 40px; 203 | } 204 | 205 | /* --- Code ----------------------------------- */ 206 | 207 | .reveal code { 208 | font-family: var(--code-font); 209 | font-size: var(--code-font-size); 210 | } 211 | 212 | .reveal strong code, 213 | .reveal b code { 214 | /* Strong text is already blue and monospace fonts tend to be heavier than body text. */ 215 | font-weight: normal; 216 | } 217 | 218 | .reveal pre { 219 | display: block; 220 | position: relative; 221 | width: 100%; 222 | margin: var(--block-margin) initial; 223 | 224 | font-size: 0.55em; 225 | font-family: var(--code-font); 226 | line-height: 1.2em; 227 | 228 | word-wrap: break-word; 229 | } 230 | 231 | .reveal pre code { 232 | display: block; 233 | padding: 10px; 234 | overflow: auto; 235 | max-height: 400px; 236 | word-wrap: normal; 237 | } 238 | 239 | /* --- Quotes --------------------------------- */ 240 | 241 | .reveal blockquote { 242 | display: block; 243 | position: relative; 244 | width: 100%; 245 | padding: 0 1em; 246 | 247 | font-style: italic; 248 | background: rgba(255, 255, 255, 0.05); 249 | } 250 | 251 | .reveal blockquote p:first-child, 252 | .reveal blockquote p:last-child { 253 | display: inline-block; 254 | } 255 | 256 | .reveal q { 257 | font-style: italic; 258 | } 259 | 260 | /* --- Tables --------------------------------- */ 261 | 262 | .reveal table { 263 | border-collapse: collapse; 264 | border-spacing: 0; 265 | } 266 | 267 | .reveal table th { 268 | font-weight: bold; 269 | } 270 | 271 | .reveal table th, 272 | .reveal table td { 273 | text-align: left; 274 | padding: 0.2em 0.5em 0.2em 0.5em; 275 | border-bottom: 1px solid; 276 | } 277 | 278 | .reveal table th[align="center"], 279 | .reveal table td[align="center"] { 280 | text-align: center; 281 | } 282 | 283 | .reveal table th[align="right"], 284 | .reveal table td[align="right"] { 285 | text-align: right; 286 | } 287 | 288 | .reveal table tbody tr:last-child th, 289 | .reveal table tbody tr:last-child td { 290 | border-bottom: none; 291 | } 292 | 293 | 294 | /* --- Images --------------------------------- */ 295 | /* Nothing for images :) */ 296 | 297 | /* --- Navigation controls -------------------- */ 298 | /* We don't even use the controls */ 299 | 300 | .reveal .controls { 301 | color: var(--solarized-blue); 302 | } 303 | 304 | /* --- Progress bar --------------------------- */ 305 | 306 | .reveal .progress { 307 | background: rgba(0,0,0,0.2); 308 | color: var(--solarized-blue); 309 | } 310 | 311 | /* --- Print background ----------------------- */ 312 | @media print { 313 | .backgrounds { 314 | background-color: var(--solarized-base3); 315 | } 316 | } 317 | 318 | /* --- Slide numbers -------------------------- */ 319 | /* These aren't usually meant to be changed. */ 320 | 321 | .reveal .slide-number { 322 | /* reset parent styles */ 323 | right: initial; 324 | background: none; 325 | 326 | /* override parent styles */ 327 | font-family: var(--main-font); 328 | font-size: 0.7em; 329 | font-weight: bold; 330 | 331 | color: var(--solarized-base1); 332 | 333 | left: 0.4em; 334 | bottom: 0.4em; 335 | } 336 | 337 | /* --- Solarized Dark ------------------------- */ 338 | 339 | html.solarized-dark { 340 | /* Define these as their opposites to enable dark mode */ 341 | --solarized-base03: #fdf6e3; 342 | --solarized-base02: #eee8d5; 343 | --solarized-base01: #93a1a1; 344 | --solarized-base00: #839496; 345 | --solarized-base0: #657b83; 346 | --solarized-base1: #586e75; 347 | --solarized-base2: #073642; 348 | --solarized-base3: #002b36; 349 | } 350 | 351 | /* The solarized.theme file can't use CSS variables, 352 | * so we have to flip some colors manually. */ 353 | html.solarized-dark pre.numberSource code > span > a:first-child::before, 354 | html.solarized-dark code span.an, 355 | html.solarized-dark code span.co, 356 | html.solarized-dark code span.cv, 357 | html.solarized-dark code span.in { 358 | color: var(--solarized-base1); 359 | } 360 | -------------------------------------------------------------------------------- /revealjs-solarized/src/default.revealjs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $for(author-meta)$ 7 | 8 | $endfor$ 9 | $if(date-meta)$ 10 | 11 | $endif$ 12 | $if(keywords)$ 13 | 14 | $endif$ 15 | $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ 16 | 17 | 18 | 19 | 20 | 21 | 24 | $if(theme)$ 25 | 26 | $else$ 27 | 28 | $endif$ 29 | $for(css)$ 30 | 31 | $endfor$ 32 | $if(math)$ 33 | $math$ 34 | $endif$ 35 | $for(header-includes)$ 36 | $header-includes$ 37 | $endfor$ 38 | 39 | 40 | $for(include-before)$ 41 | $include-before$ 42 | $endfor$ 43 |
44 |
45 | 46 | $if(title)$ 47 |
48 |

$title$

49 | $if(subtitle)$ 50 |

$subtitle$

51 | $endif$ 52 | $for(author)$ 53 |

$author$

54 | $endfor$ 55 | $if(date)$ 56 |

$date$

57 | $endif$ 58 |
59 | $endif$ 60 | $if(toc)$ 61 |
62 | $table-of-contents$ 63 |
64 | $endif$ 65 | 66 | $body$ 67 |
68 |
69 | 70 | 71 | 72 | // reveal.js plugins 73 | 74 | 75 | 76 | $if(mathjax)$ 77 | 78 | $endif$ 79 | 80 | 352 | $for(include-after)$ 353 | $include-after$ 354 | $endfor$ 355 | 356 | 357 | -------------------------------------------------------------------------------- /revealjs-solarized/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | My Title 9 | 10 | 11 | 12 | 13 | 14 | 84 | 85 | 86 | 87 | 88 |
89 |
90 | 91 |
92 |

My Title

93 |

Jake Zimmerman (@jez)

94 |

May 5, 2020

95 |
96 | 97 |
98 |

Using Reveal.js

99 |
    100 |
  • If there are sections, slides within a section go down.
  • 101 |
  • If there are no sections, slides go across.
  • 102 |
  • Press Space to advance to next slide if available, or next section if at the end of a section.
  • 103 |
104 |
105 |
106 |
107 |

Section Title

108 | 109 |
110 |
111 |

First Slide

112 |
    113 |
  • Bullets 114 |
      115 |
    • subitem
    • 116 |
  • 117 |
118 |
119 |
120 |

Slide Title

121 |
# This does a thing
122 | def foo():
123 |     return 'bar'
124 |
125 |
126 |
127 |

Another section

128 | 129 |
130 |
131 |

Third slide

132 |

Supports emoji! 🚀

133 | 135 |
136 |
137 |
138 | 139 | 140 | 141 | // reveal.js plugins 142 | 143 | 144 | 145 | 146 | 175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /revealjs-solarized/src/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'My Title' 3 | author: 'Jake Zimmerman (**`@jez`**)' 4 | date: 'May 5, 2020' 5 | 6 | revealjs-url: 'https://unpkg.com/reveal.js@^4' 7 | 8 | css: 9 | - 'css/solarized.css' 10 | 11 | # These are all strings because they'll be interpolated into 12 | # JS and then become JS values. 13 | progress: 'true' 14 | controlsTutorial: 'false' 15 | history: 'true' 16 | hideAddressBar: 'true' 17 | hideInactiveCursor: 'false' 18 | # The template auto-wraps this one in quotes 19 | transition: 'none' 20 | # This is a quoted string: needs to still have quotes when 21 | # it's interpolated into JS. It's also escaped so that 22 | # pandoc doesn't turn them into curly quotes. 23 | slideNumber: '\"c/t\"' 24 | 25 | include-after: 26 | - '' 27 | --- 28 | 29 | ## Using Reveal.js 30 | 31 | - If there are sections, slides within a section go down. 32 | - If there are no sections, slides go across. 33 | - Press **`Space`** to advance to next slide if available, 34 | or next section if at the end of a section. 35 | 36 | # Section Title 37 | 38 | ## First Slide 39 | 40 | - Bullets 41 | - subitem 42 | 43 | ## Slide Title 44 | 45 | ```python 46 | # This does a thing 47 | def foo(): 48 | return 'bar' 49 | ``` 50 | 51 | # Another section 52 | 53 | ## Third slide 54 | 55 | Supports emoji! 🚀 56 | 57 | 59 | -------------------------------------------------------------------------------- /revealjs-solarized/src/js/toggle-theme.js: -------------------------------------------------------------------------------- 1 | const useDarkTheme = () => { 2 | const stored = window.localStorage.getItem('useDarkTheme'); 3 | if (stored == null) { 4 | return false; 5 | } else { 6 | return JSON.parse(stored); 7 | } 8 | } 9 | 10 | // First load 11 | if (useDarkTheme()) { 12 | document.querySelector('html').classList.toggle('solarized-dark'); 13 | } 14 | 15 | document.querySelector('.reveal .title').addEventListener('click', (ev) => { 16 | ev.preventDefault(); 17 | const current = useDarkTheme(); 18 | window.localStorage.setItem('useDarkTheme', !current); 19 | document.querySelector('html').classList.toggle('solarized-dark'); 20 | }); 21 | -------------------------------------------------------------------------------- /revealjs-solarized/src/serve.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Author: Jake Zimmerman 5 | # 6 | # A simple script to launch a web server in this folder and start watchman. 7 | # 8 | 9 | set -euo pipefail 10 | 11 | python3 -m http.server "${PORT:-8000}" & 12 | http_server_pid="$!" 13 | 14 | if [ "$(uname)" = "Darwin" ]; then 15 | open "http://127.0.0.1:8000" 16 | else 17 | xdg-open "http://127.0.0.1:8000" 18 | fi 19 | 20 | watchman-make -p '*.md' -r 'make index.html' 21 | kill "$http_server_pid" 22 | -------------------------------------------------------------------------------- /revealjs-solarized/src/solarized.theme: -------------------------------------------------------------------------------- 1 | { 2 | "text-color": null, 3 | "background-color": null, 4 | "line-number-color": "#93a1a1", 5 | "line-number-background-color": null, 6 | "text-styles": { 7 | "Other": { 8 | "text-color": "#268bd2", 9 | "background-color": null, 10 | "bold": false, 11 | "italic": false, 12 | "underline": false 13 | }, 14 | "Attribute": { 15 | "text-color": null, 16 | "background-color": null, 17 | "bold": false, 18 | "italic": false, 19 | "underline": false 20 | }, 21 | "SpecialString": { 22 | "text-color": "#dc322f", 23 | "background-color": null, 24 | "bold": false, 25 | "italic": false, 26 | "underline": false 27 | }, 28 | "Annotation": { 29 | "text-color": "#93a1a1", 30 | "background-color": null, 31 | "bold": true, 32 | "italic": true, 33 | "underline": false 34 | }, 35 | "Function": { 36 | "text-color": "#268bd2", 37 | "background-color": null, 38 | "bold": false, 39 | "italic": false, 40 | "underline": false 41 | }, 42 | "String": { 43 | "text-color": "#2aa198", 44 | "background-color": null, 45 | "bold": false, 46 | "italic": false, 47 | "underline": false 48 | }, 49 | "ControlFlow": { 50 | "text-color": "#859900", 51 | "background-color": null, 52 | "bold": false, 53 | "italic": false, 54 | "underline": false 55 | }, 56 | "Operator": { 57 | "text-color": "#859900", 58 | "background-color": null, 59 | "bold": false, 60 | "italic": false, 61 | "underline": false 62 | }, 63 | "Error": { 64 | "text-color": "#dc322f", 65 | "background-color": null, 66 | "bold": true, 67 | "italic": false, 68 | "underline": false 69 | }, 70 | "BaseN": { 71 | "text-color": "#2aa198", 72 | "background-color": null, 73 | "bold": false, 74 | "italic": false, 75 | "underline": false 76 | }, 77 | "Alert": { 78 | "text-color": "#dc322f", 79 | "background-color": null, 80 | "bold": true, 81 | "italic": false, 82 | "underline": false 83 | }, 84 | "Variable": { 85 | "text-color": "#268bd2", 86 | "background-color": null, 87 | "bold": false, 88 | "italic": false, 89 | "underline": false 90 | }, 91 | "BuiltIn": { 92 | "text-color": null, 93 | "background-color": null, 94 | "bold": false, 95 | "italic": false, 96 | "underline": false 97 | }, 98 | "Extension": { 99 | "text-color": null, 100 | "background-color": null, 101 | "bold": false, 102 | "italic": false, 103 | "underline": false 104 | }, 105 | "Preprocessor": { 106 | "text-color": "#cb4b16", 107 | "background-color": null, 108 | "bold": false, 109 | "italic": false, 110 | "underline": false 111 | }, 112 | "Information": { 113 | "text-color": "#93a1a1", 114 | "background-color": null, 115 | "bold": true, 116 | "italic": true, 117 | "underline": false 118 | }, 119 | "VerbatimString": { 120 | "text-color": null, 121 | "background-color": null, 122 | "bold": false, 123 | "italic": false, 124 | "underline": false 125 | }, 126 | "Warning": { 127 | "text-color": "#cb4b16", 128 | "background-color": null, 129 | "bold": true, 130 | "italic": true, 131 | "underline": false 132 | }, 133 | "Documentation": { 134 | "text-color": "#93a1a1", 135 | "background-color": null, 136 | "bold": false, 137 | "italic": true, 138 | "underline": false 139 | }, 140 | "Import": { 141 | "text-color": null, 142 | "background-color": null, 143 | "bold": false, 144 | "italic": false, 145 | "underline": false 146 | }, 147 | "Char": { 148 | "text-color": "#2aa198", 149 | "background-color": null, 150 | "bold": false, 151 | "italic": false, 152 | "underline": false 153 | }, 154 | "DataType": { 155 | "text-color": "#b58900", 156 | "background-color": null, 157 | "bold": false, 158 | "italic": false, 159 | "underline": false 160 | }, 161 | "Float": { 162 | "text-color": "#2aa198", 163 | "background-color": null, 164 | "bold": false, 165 | "italic": false, 166 | "underline": false 167 | }, 168 | "Comment": { 169 | "text-color": "#93a1a1", 170 | "background-color": null, 171 | "bold": false, 172 | "italic": true, 173 | "underline": false 174 | }, 175 | "CommentVar": { 176 | "text-color": "#93a1a1", 177 | "background-color": null, 178 | "bold": true, 179 | "italic": true, 180 | "underline": false 181 | }, 182 | "Constant": { 183 | "text-color": "#2aa198", 184 | "background-color": null, 185 | "bold": false, 186 | "italic": false, 187 | "underline": false 188 | }, 189 | "SpecialChar": { 190 | "text-color": "#dc322f", 191 | "background-color": null, 192 | "bold": false, 193 | "italic": false, 194 | "underline": false 195 | }, 196 | "DecVal": { 197 | "text-color": "#2aa198", 198 | "background-color": null, 199 | "bold": false, 200 | "italic": false, 201 | "underline": false 202 | }, 203 | "Keyword": { 204 | "text-color": "#859900", 205 | "background-color": null, 206 | "bold": false, 207 | "italic": false, 208 | "underline": false 209 | } 210 | } 211 | } 212 | -------------------------------------------------------------------------------- /revealjs/README.md: -------------------------------------------------------------------------------- 1 | # revealjs 2 | 3 | These starter files can be used to generate a simple slide deck, using 4 | [Reveal.js](https://revealjs.com/#/). 5 | 6 | ## Dependencies 7 | 8 | There are no other dependencies other than [Pandoc]. Optional functionality to 9 | watch the file system and rebuild on changes requires [Watchman]. Optional 10 | functionality to serve and preview the files locally uses [Python 3]. 11 | 12 | - [Pandoc], a universal document converter 13 | - [Watchman], a file watching service 14 | - [Python 3], for `http.server` 15 | 16 | [Pandoc]: http://pandoc.org/ 17 | [Watchman]: https://facebook.github.io/watchman/ 18 | [Python 3]: https://docs.python.org/3/library/http.server.html 19 | 20 | Installation instructions vary depending on your system. See the linked websites 21 | for more information. 22 | 23 | ## Usage 24 | 25 | 1. Copy these starter files wherever you'd like. 26 | 1. Write your content in `index.md` 27 | - Be sure to adjust the information like the `title` and `author` at the top 28 | of the file 29 | - Start a new slide with `#` 30 | 1. Run `make watch` to build the site and watch for changes. 31 | 32 | The sample presentation is already built. If you just want to preview it and 33 | don't want to install Watchman, run `python -m http.server` in `src/`. 34 | 35 | 1. View the presentation at . 36 | 37 | Read the [Makefile's documentation][Makefile] for more commands. 38 | 39 | [Makefile]: src/Makefile 40 | 41 | To use speaker notes, you **must** either serve the presentation from HTTPS or 42 | use the loopback address, i.e., . [Read more about why 43 | and alternatives here][https]. 44 | 45 | [https]: https://letsencrypt.org/docs/certificates-for-localhost/ 46 | 47 | You can generate a PDF from your slides (in Chrome) by tacking `?print-pdf` onto 48 | the URL and using the browser's print diaglog: 49 | 50 | - 51 | 52 | Note the query string must come **before** the `#slide-number`. 53 | 54 | ## License 55 | 56 | [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt) 57 | -------------------------------------------------------------------------------- /revealjs/src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Jake Zimmerman 3 | # 4 | # ===== Usage ================================================================ 5 | # 6 | # make Compile index.html to a Beamer.js presentation 7 | # 8 | # make watch Start a local HTTP server and rebuild on changes 9 | # PORT=4242 make watch Like above, but use port 4242 10 | # 11 | # make clean Delete all generated files 12 | # 13 | # ============================================================================ 14 | 15 | index.html: index.md 16 | pandoc -t revealjs --standalone -o $@ $< 17 | 18 | .PHONY: clean 19 | clean: 20 | rm -f index.html 21 | 22 | .PHONY: watch 23 | watch: index.html serve.sh 24 | ./serve.sh --watch 25 | -------------------------------------------------------------------------------- /revealjs/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | My Title 9 | 10 | 11 | 12 | 13 | 14 | 84 | 85 | 86 | 93 | 96 | 97 | 98 |
99 |
100 | 101 |
102 |

My Title

103 |

Jake Zimmerman (@jez)

104 |

May 5, 2020

105 |
106 | 107 |
108 |
109 |

Section Title

110 | 111 |
112 |
113 |

First Slide

114 |
    115 |
  • Bullets 116 |
      117 |
    • subitem
    • 118 |
  • 119 |
120 |
121 |
122 |

Slide Title

123 |
# This does a thing
124 | def foo():
125 |     return 'bar'
126 |
127 |
128 |
129 |

Another section

130 | 131 |
132 |
133 |

Third slide

134 |
    135 |
  • If there are sections, slides within a section go down.
  • 136 |
  • If there are no sections, slides go across.
  • 137 |
138 | 140 |
141 |
142 |
143 | 144 | 145 | 146 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /revealjs/src/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'My Title' 3 | author: 'Jake Zimmerman (**`@jez`**)' 4 | date: 'May 5, 2020' 5 | 6 | # See `pandoc -D revealjs` to see more options to the revealjs template. 7 | revealjs-url: 'https://unpkg.com/reveal.js@^3' 8 | # After pandoc v2.9.2.1, the default reveal.js template assumes version 4 9 | # revealjs-url: 'https://unpkg.com/reveal.js@^4' 10 | --- 11 | 12 | # Section Title 13 | 14 | ## First Slide 15 | 16 | - Bullets 17 | - subitem 18 | 19 | ## Slide Title 20 | 21 | ```python 22 | # This does a thing 23 | def foo(): 24 | return 'bar' 25 | ``` 26 | 27 | # Another section 28 | 29 | ## Third slide 30 | 31 | - If there are sections, slides within a section go down. 32 | - If there are no sections, slides go across. 33 | 34 | 36 | -------------------------------------------------------------------------------- /revealjs/src/serve.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Author: Jake Zimmerman 5 | # 6 | # A simple script to launch a web server in this folder and start watchman. 7 | # 8 | 9 | set -euo pipefail 10 | 11 | python3 -m http.server "${PORT:-8000}" & 12 | http_server_pid="$!" 13 | 14 | if [ "$(uname)" = "Darwin" ]; then 15 | open "http://127.0.0.1:8000" 16 | else 17 | xdg-open "http://127.0.0.1:8000" 18 | fi 19 | 20 | watchman-make -p '*.md' -r 'make index.html' 21 | kill "$http_server_pid" 22 | -------------------------------------------------------------------------------- /tufte-handout/README.md: -------------------------------------------------------------------------------- 1 | # tufte-handout 2 | 3 | These starter files can be used for writing up articles formatted in a style 4 | formatted by Edward Tufte. It uses the [`tufte-handout`] document class. See 5 | that project for more usage information. Alternatively, take a look at a [sample 6 | document] using the `tufte-handout` class. 7 | 8 | [`tufte-handout`]: https://www.ctan.org/pkg/tufte-latex?lang=en 9 | [sample document]: http://ctan.sharelatex.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 10 | 11 | ## Dependencies 12 | 13 | There are a number of build dependencies for these starter files: 14 | 15 | - [Pandoc], a universal document converter 16 | - [LaTeX], a document preparation system 17 | - _Optional_: The font Menlo 18 | - _Optional_: The font Palatino 19 | 20 | [Pandoc]: http://pandoc.org/ 21 | [LaTeX]: https://www.latex-project.org/ 22 | 23 | Installation instructions vary depending on your system. See the linked websites 24 | for more information. 25 | 26 | ## Usage 27 | 28 | 1. Copy these starter files wherever you'd like. 29 | 1. Rename `sample.md` to `.md` 30 | 1. Edit the `TARGET` variable at the top of the [Makefile] to equal `` 31 | 1. Write your content in `.md` 32 | - Be sure to adjust the information like the `title` and `author` at the top 33 | of the file 34 | 1. Read the [Makefile's documentation][Makefile]. 35 | 36 | [Makefile]: src/Makefile 37 | 38 | ## License 39 | 40 | [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt) 41 | -------------------------------------------------------------------------------- /tufte-handout/src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Jake Zimmerman 3 | # 4 | # ===== Usage ================================================================ 5 | # 6 | # NOTE: 7 | # When running these commands at the command line, replace $(TARGET) with 8 | # the actual value of the TARGET variable. 9 | # 10 | # 11 | # make Compile all *.md files to PDFs 12 | # make .pdf Compile .md to a PDF 13 | # make .tex Generate the intermediate LaTeX for .md 14 | # 15 | # make view Compile $(TARGET).md to a PDF, then view it 16 | # make again Force everything to recompile 17 | # 18 | # make clean Get rid of all intermediate generated files 19 | # make veryclean Get rid of ALL generated files: 20 | # 21 | # make print Send $(TARGET).pdf to the default printer: 22 | # 23 | # ============================================================================ 24 | 25 | TARGET=sample 26 | 27 | 28 | PANDOC_FLAGS =\ 29 | --template template.tex \ 30 | -f markdown+tex_math_single_backslash \ 31 | -t latex \ 32 | 33 | LATEX_FLAGS = \ 34 | 35 | PDF_ENGINE = pdflatex 36 | PANDOCVERSIONGTEQ2 := $(shell expr `pandoc --version | grep ^pandoc | sed 's/^.* //g' | cut -f1 -d.` \>= 2) 37 | ifeq "$(PANDOCVERSIONGTEQ2)" "1" 38 | LATEX_FLAGS += --pdf-engine=$(PDF_ENGINE) 39 | else 40 | LATEX_FLAGS += --latex-engine=$(PDF_ENGINE) 41 | endif 42 | 43 | all: $(patsubst %.md,%.pdf,$(wildcard *.md)) 44 | 45 | # Generalized rule: how to build a .pdf from each .md 46 | %.pdf: %.md template.tex 47 | pandoc $(PANDOC_FLAGS) $(LATEX_FLAGS) -o $@ $< 48 | 49 | # Generalized rule: how to build a .tex from each .md 50 | %.tex: %.md template.tex 51 | pandoc --standalone $(PANDOC_FLAGS) -o $@ $< 52 | 53 | touch: 54 | touch *.md 55 | 56 | again: touch all 57 | 58 | clean: 59 | rm -f *.aux *.log *.nav *.out *.snm *.toc *.vrb || true 60 | 61 | veryclean: clean 62 | rm -f *.pdf 63 | 64 | view: $(TARGET).pdf 65 | if [ "Darwin" = "$(shell uname)" ]; then open $(TARGET).pdf ; else xdg-open $(TARGET).pdf ; fi 66 | 67 | print: $(TARGET).pdf 68 | lpr $(TARGET).pdf 69 | 70 | .PHONY: all again touch clean veryclean view print 71 | -------------------------------------------------------------------------------- /tufte-handout/src/sample.md: -------------------------------------------------------------------------------- 1 | --- 2 | documentclass: tufte-handout 3 | title: Sample Handout 4 | author: Jake Zimmerman 5 | date: \today 6 | fontsize: 12pt 7 | # Comment or change these if you don't have these fonts installed 8 | mainfont: Palatino 9 | monofont: Menlo 10 | newtxmathoptions: 11 | - cmintegrals 12 | - cmbraces 13 | colorlinks: true 14 | linkcolor: RoyalBlue 15 | urlcolor: RoyalBlue 16 | --- 17 | 18 | # Tote Bag Iceland 19 | 20 | Tote bag iceland authentic, distillery church-key hexagon +1 gluten-free venmo 21 | small batch biodiesel fingerstache artisan lyft. Lumbersexual leggings wolf 22 | cardigan kitsch. Photo booth kitsch intelligentsia, meditation neutra heirloom 23 | hexagon asymmetrical man braid man bun williamsburg occupy disrupt irony. Pork 24 | belly pok pok iceland four loko pickled vice, glossier af wolf raclette. Offal 25 | mumblecore fashion axe kogi af.[^1] 26 | 27 | [^1]: 28 | Street art freegan before they sold out lumbersexual, hammock cronut paleo 29 | jean shorts pabst next level raclette chicharrones disrupt gochujang mlkshk. 30 | 31 | Next level asymmetrical flexitarian messenger bag poutine, enamel pin sartorial 32 | wayfarers health goth chillwave craft beer man bun iPhone. Wayfarers lo-fi 33 | kickstarter flexitarian, vaporware crucifix cronut YOLO tbh. Keffiyeh mlkshk 34 | vexillologist fingerstache vaporware. Beard DIY hammock, kombucha VHS brooklyn 35 | 36 | - Mixtape blue bottle mumblecore tattooed forage migas. 37 | - Vice humblebrag gastropub, vexillologist ethical deep v street art bushwick 38 | selvage __blue bottle__ glossier vaporware banjo retro helvetica. 39 | - _Aesthetic vexillologist_ drinking vinegar, mixtape lumbersexual franzen 40 | microdosing cred hot chicken kinfolk roof party biodiesel umami letterpress 41 | pinterest. 42 | 43 | ## Organic salvia plaid kickstarter 44 | 45 | Jean shorts hashtag crucifix +1 everyday carry kickstarter, tacos subway tile 46 | mumblecore church-key. Semiotics selfies gluten-free, poke helvetica shabby chic 47 | quinoa deep v 90's drinking vinegar portland DIY asymmetrical. Plaid tofu 48 | scenester, neutra stumptown chambray literally trust fund hoodie. Food truck 49 | aesthetic lumbersexual tbh. Prism selvage kickstarter, disrupt mustache 50 | live-edge vexillologist vinyl. Meggings chia listicle vice, put a bird on it 51 | shoreditch chambray PBR&B poke meh. Chillwave artisan austin sriracha. 52 | -------------------------------------------------------------------------------- /tufte-handout/src/sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jez/pandoc-starter/6ef5adff952a43e1251b0d8f8fd3c5bf34608dd0/tufte-handout/src/sample.pdf -------------------------------------------------------------------------------- /tufte-handout/src/template.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} 2 | $if(beamerarticle)$ 3 | \usepackage{beamerarticle} % needs to be loaded first 4 | $endif$ 5 | $if(fontfamily)$ 6 | \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} 7 | $else$ 8 | \usepackage{lmodern} 9 | $endif$ 10 | $if(linestretch)$ 11 | \usepackage{setspace} 12 | \setstretch{$linestretch$} 13 | $endif$ 14 | \usepackage{amssymb,amsmath} 15 | \usepackage{ifxetex,ifluatex} 16 | \usepackage{fixltx2e} % provides \textsubscript 17 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 18 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 19 | \usepackage[utf8]{inputenc} 20 | $if(euro)$ 21 | \usepackage{eurosym} 22 | $endif$ 23 | \else % if luatex or xelatex 24 | \ifxetex 25 | \else 26 | \usepackage{fontspec} 27 | \fi 28 | \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} 29 | $for(fontfamilies)$ 30 | \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} 31 | $endfor$ 32 | $if(euro)$ 33 | \newcommand{\euro}{€} 34 | $endif$ 35 | $if(mainfont)$ 36 | \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} 37 | $endif$ 38 | $if(sansfont)$ 39 | \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} 40 | $endif$ 41 | $if(monofont)$ 42 | \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} 43 | $endif$ 44 | $if(mathfont)$ 45 | \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 46 | $endif$ 47 | $if(CJKmainfont)$ 48 | \usepackage{xeCJK} 49 | \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} 50 | $endif$ 51 | \fi 52 | % use upquote if available, for straight quotes in verbatim environments 53 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 54 | % use microtype if available 55 | \IfFileExists{microtype.sty}{% 56 | \usepackage{microtype} 57 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 58 | }{} 59 | $if(geometry)$ 60 | \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} 61 | $endif$ 62 | $if(colorlinks)$ 63 | \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref 64 | $endif$ 65 | \hypersetup{ 66 | $if(title-meta)$ 67 | pdftitle={$title-meta$}, 68 | $endif$ 69 | $if(author-meta)$ 70 | pdfauthor={$author-meta$}, 71 | $endif$ 72 | $if(keywords)$ 73 | pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$}, 74 | $endif$ 75 | $if(colorlinks)$ 76 | colorlinks=true, 77 | linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, 78 | citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, 79 | urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, 80 | $else$ 81 | pdfborder={0 0 0}, 82 | $endif$ 83 | breaklinks=true} 84 | \urlstyle{same} % don't use monospace font for urls 85 | $if(lang)$ 86 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 87 | \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} 88 | $if(babel-newcommands)$ 89 | $babel-newcommands$ 90 | $endif$ 91 | \else 92 | \usepackage{polyglossia} 93 | \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} 94 | $for(polyglossia-otherlangs)$ 95 | \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} 96 | $endfor$ 97 | \fi 98 | $endif$ 99 | $if(natbib)$ 100 | \usepackage{natbib} 101 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 102 | $endif$ 103 | $if(biblatex)$ 104 | \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} 105 | $for(bibliography)$ 106 | \addbibresource{$bibliography$} 107 | $endfor$ 108 | $endif$ 109 | $if(listings)$ 110 | \usepackage{listings} 111 | $endif$ 112 | $if(lhs)$ 113 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} 114 | $endif$ 115 | $if(highlighting-macros)$ 116 | $highlighting-macros$ 117 | $endif$ 118 | $if(verbatim-in-note)$ 119 | \usepackage{fancyvrb} 120 | \VerbatimFootnotes % allows verbatim text in footnotes 121 | $endif$ 122 | $if(tables)$ 123 | \usepackage{longtable,booktabs} 124 | % Fix footnotes in tables (requires footnote package) 125 | \IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long table}}{} 126 | $endif$ 127 | $if(graphics)$ 128 | \usepackage{graphicx,grffile} 129 | \makeatletter 130 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 131 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} 132 | \makeatother 133 | % Scale images if necessary, so that they will not overflow the page 134 | % margins by default, and it is still possible to overwrite the defaults 135 | % using explicit options in \includegraphics[width, height, ...]{} 136 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 137 | $endif$ 138 | $if(links-as-notes)$ 139 | % Make links footnotes instead of hotlinks: 140 | \renewcommand{\href}[2]{#2\footnote{\url{#1}}} 141 | $endif$ 142 | $if(strikeout)$ 143 | \usepackage[normalem]{ulem} 144 | % avoid problems with \sout in headers with hyperref: 145 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} 146 | $endif$ 147 | $if(indent)$ 148 | $else$ 149 | \IfFileExists{parskip.sty}{% 150 | \usepackage{parskip} 151 | }{% else 152 | \setlength{\parindent}{0pt} 153 | \setlength{\parskip}{6pt plus 2pt minus 1pt} 154 | } 155 | $endif$ 156 | \setlength{\emergencystretch}{3em} % prevent overfull lines 157 | \providecommand{\tightlist}{% 158 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 159 | $if(numbersections)$ 160 | \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} 161 | $else$ 162 | \setcounter{secnumdepth}{0} 163 | $endif$ 164 | $if(subparagraph)$ 165 | $else$ 166 | % Redefines (sub)paragraphs to behave more like sections 167 | \ifx\paragraph\undefined\else 168 | \let\oldparagraph\paragraph 169 | \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} 170 | \fi 171 | \ifx\subparagraph\undefined\else 172 | \let\oldsubparagraph\subparagraph 173 | \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} 174 | \fi 175 | $endif$ 176 | $if(dir)$ 177 | \ifxetex 178 | % load bidi as late as possible as it modifies e.g. graphicx 179 | $if(latex-dir-rtl)$ 180 | \usepackage[RTLdocument]{bidi} 181 | $else$ 182 | \usepackage{bidi} 183 | $endif$ 184 | \fi 185 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 186 | \TeXXeTstate=1 187 | \newcommand{\RL}[1]{\beginR #1\endR} 188 | \newcommand{\LR}[1]{\beginL #1\endL} 189 | \newenvironment{RTL}{\beginR}{\endR} 190 | \newenvironment{LTR}{\beginL}{\endL} 191 | \fi 192 | $endif$ 193 | 194 | % set default figure placement to htbp 195 | \makeatletter 196 | \def\fps@figure{htbp} 197 | \makeatother 198 | 199 | $for(header-includes)$ 200 | $header-includes$ 201 | $endfor$ 202 | 203 | $if(title)$ 204 | \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} 205 | $endif$ 206 | $if(subtitle)$ 207 | \providecommand{\subtitle}[1]{} 208 | \subtitle{$subtitle$} 209 | $endif$ 210 | $if(author)$ 211 | \author{$for(author)$$author$$sep$ \and $endfor$} 212 | $endif$ 213 | $if(institute)$ 214 | \providecommand{\institute}[1]{} 215 | \institute{$for(institute)$$institute$$sep$ \and $endfor$} 216 | $endif$ 217 | \date{$date$} 218 | 219 | \begin{document} 220 | $if(title)$ 221 | \maketitle 222 | $endif$ 223 | $if(abstract)$ 224 | \begin{abstract} 225 | $abstract$ 226 | \end{abstract} 227 | $endif$ 228 | 229 | $for(include-before)$ 230 | $include-before$ 231 | 232 | $endfor$ 233 | $if(toc)$ 234 | { 235 | $if(colorlinks)$ 236 | \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} 237 | $endif$ 238 | \setcounter{tocdepth}{$toc-depth$} 239 | \tableofcontents 240 | } 241 | $endif$ 242 | $if(lot)$ 243 | \listoftables 244 | $endif$ 245 | $if(lof)$ 246 | \listoffigures 247 | $endif$ 248 | $body$ 249 | 250 | $if(natbib)$ 251 | $if(bibliography)$ 252 | $if(biblio-title)$ 253 | $if(book-class)$ 254 | \renewcommand\bibname{$biblio-title$} 255 | $else$ 256 | \renewcommand\refname{$biblio-title$} 257 | $endif$ 258 | $endif$ 259 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 260 | 261 | $endif$ 262 | $endif$ 263 | $if(biblatex)$ 264 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 265 | 266 | $endif$ 267 | $for(include-after)$ 268 | $include-after$ 269 | 270 | $endfor$ 271 | \end{document} 272 | --------------------------------------------------------------------------------