├── .gitignore ├── LICENSE.md ├── README.md ├── anon-ms-example ├── master.bib ├── svm-rmarkdown-anon-ms-example.Rmd ├── svm-rmarkdown-anon-ms-example.pdf └── svm-rmarkdown-anon-ms-example.tex ├── article-example ├── figs │ └── unnamed-chunk-3.pdf ├── master.bib ├── svm-rmarkdown-article-example.Rmd ├── svm-rmarkdown-article-example.pdf └── svm-rmarkdown-article-example.tex ├── article2-example ├── .gitignore ├── master.bib ├── svm-article2-example.Rmd ├── svm-article2-example.pdf ├── svm-article2-example.tex └── svm-article2-example_files │ └── figure-latex │ ├── pressure-1.pdf │ ├── unnamed-chunk-1-1.pdf │ └── unnamed-chunk-2-1.pdf ├── beamer-example ├── clemson-academic.png ├── figs │ ├── good-day-hypothesis.pdf │ ├── plotit.pdf │ ├── pressure.pdf │ ├── rick-astley-never-gonna-give-you-up-median-voter-theorem.pdf │ ├── rick-astley-never-gonna-give-you-up-median-voter-theorem.svg │ └── unnamed-chunk-1.pdf ├── svm-rmarkdown-beamer-example.Rmd ├── svm-rmarkdown-beamer-example.pdf └── svm-rmarkdown-beamer-example.tex ├── cover-letter-example ├── john-hancock.png ├── svm-rmarkdown-cover-letter-example.Rmd ├── svm-rmarkdown-cover-letter-example.pdf └── svm-rmarkdown-cover-letter-example.tex ├── cv-example ├── svm-rmarkdown-cv.Rmd └── svm-rmarkdown-cv.pdf ├── ioslides-example ├── svm-rmarkdown-ioslides-example.Rmd └── svm-rmarkdown-ioslides-example.html ├── letter-example ├── clemson-letterhead.pdf ├── john-hancock-signature.png ├── svm-letter-example.Rmd └── svm-letter-example.pdf ├── memo-example ├── svm-memo-example.Rmd ├── svm-memo-example.pdf ├── taylor-swift-logo-red.png └── taylor-swift-logo.png ├── resume-example ├── .gitignore ├── rick-martel-crop.jpg ├── rick-martel.jpg ├── svm-resume-example.Rmd ├── svm-resume-example.pdf └── svm-resume-example.tex ├── rmarkdown-reference.pdf ├── statement-example ├── svm-rmarkdown-statement-example.Rmd ├── svm-rmarkdown-statement-example.pdf └── svm-rmarkdown-statement-example.tex ├── svm-ioslides-css.css ├── svm-latex-anon-ms.tex ├── svm-latex-article2.tex ├── svm-latex-beamer.tex ├── svm-latex-cover-letter.tex ├── svm-latex-cv.tex ├── svm-latex-letter.tex ├── svm-latex-memo.tex ├── svm-latex-ms.tex ├── svm-latex-resume.tex ├── svm-latex-statement.tex ├── svm-latex-syllabus.tex ├── svm-rmarkdown-word.docx ├── svm-xaringan-style.css ├── syllabus-example ├── attend-grade-relationships.csv ├── figs │ └── attendplot-1.pdf ├── master.bib ├── svm-rmarkdown-syllabus-example.Rmd ├── svm-rmarkdown-syllabus-example.pdf └── svm-rmarkdown-syllabus-example.tex ├── word-example ├── svm-word-docx-example.Rmd └── svm-word-docx-example.docx └── xaringan-example ├── libs ├── DiagrammeR-styles │ └── styles.css ├── grViz-binding │ └── grViz.js ├── htmlwidgets │ └── htmlwidgets.js ├── remark-css │ └── default.css └── viz │ └── viz.js ├── svm-xaringan-example.Rmd ├── svm-xaringan-example.html ├── svm-xaringan-example.pdf └── svm-xaringan-example_files └── figure-html ├── unnamed-chunk-2-1.svg └── unnamed-chunk-3-1.svg /.gitignore: -------------------------------------------------------------------------------- 1 | # ignore temp files w/ trailing ~. I think I stopped Gedit from doing this. 2 | *~ 3 | 4 | # ignore hidden files 5 | .* 6 | 7 | # ignore files with the rolling extensions 8 | *.DS_Store 9 | *.Rhistory 10 | *.Rapp.history 11 | *.Rproj.user 12 | *.aux 13 | *.bbl 14 | *.blg 15 | *.log 16 | *.out 17 | *.toc 18 | *.spl 19 | *.synctex.gz 20 | *.bib.bak 21 | 22 | # ignore my old files and other irrelevant directories 23 | _cache 24 | _dross 25 | 26 | # don't ignore the .gitignore file 27 | !.gitignore 28 | .Rproj.user 29 | 30 | # I hate writing .gitignore files. 31 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # Released under MIT License 2 | 3 | Copyright (c) 2020 Steven V. Miller. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Check out the R Package 2 | 3 | `stevetemplates` is available on CRAN and will be hosting my R Markdown templates going forward. You can read more about it at [this Github repo](https://github.com/svmiller/stevetemplates). You can install it in R. 4 | 5 | ```r 6 | install.packages("stevetemplates") 7 | ``` 8 | 9 | ### Steve's R Markdown Templates (Legacy Repo) 10 | 11 | 12 | I love R Markdown and effectively abandoned LaTeX for it. I have a suite of R Markdown templates for 1) academic manuscripts, 2) Beamer presentations, and 3) academic syllabi. You can find them here. 13 | 14 | ### Related Reading 15 | 16 | - [Another Academic R Markdown Article/Manuscript Template](http://svmiller.com/blog/2020/09/another-rmarkdown-article-template/) 17 | - [An R Markdown Template for a Non Academic Résumé](http://svmiller.com/blog/2020/09/rmarkdown-template-non-academic-resume/) 18 | - [An R Markdown Template for Beamer Presentations](http://svmiller.com/blog/2019/08/r-markdown-template-beamer-presentations/) 19 | - [An R Markdown Template for Memos](http://svmiller.com/blog/2019/06/r-markdown-memo-template/) 20 | - [Make Your Presentations Fun in Xaringan](http://svmiller.com/blog/2018/02/r-markdown-xaringan-theme/) 21 | - [Automatically Do (Just About) Everything in Your Syllabus with R Markdown](http://svmiller.com/blog/2016/07/r-markdown-syllabus/) 22 | - [Make Your Academic CV Look Pretty in R Markdown](http://svmiller.com/blog/2016/03/svm-r-markdown-cv/) 23 | - [An R Markdown Template for Academic Manuscripts](http://svmiller.com/blog/2016/02/svm-r-markdown-manuscript/) 24 | - [Moving from Beamer to R Markdown](http://svmiller.com/blog/2015/02/moving-from-beamer-to-r-markdown/) (see Github repo and [this post](http://svmiller.com/blog/2019/08/r-markdown-template-beamer-presentations/) for current theme/tweaks) 25 | -------------------------------------------------------------------------------- /anon-ms-example/master.bib: -------------------------------------------------------------------------------- 1 | @Article{miller2013tdpi, 2 | Title = {Territorial Disputes and the Politics of Individual Well-Being}, 3 | Author = {Steven V. Miller}, 4 | Journal = {Journal of Peace Research}, 5 | Year = {2013}, 6 | Number = {6}, 7 | Pages = {677--690}, 8 | Volume = {50}, 9 | 10 | Owner = {steve}, 11 | Timestamp = {2013.07.25} 12 | } 13 | 14 | @Article{miller2017etst, 15 | Title = {Economic Threats or Societal Turmoil? Understanding Preferences for Authoritarian Political Systems}, 16 | Author = {Steven V. Miller}, 17 | Journal = {Political Behavior}, 18 | Year = {2017}, 19 | Number = {2}, 20 | Pages = {457--478}, 21 | Volume = {39}, 22 | 23 | Owner = {steve}, 24 | Timestamp = {2016.10.05} 25 | } 26 | 27 | @Article{miller2017ieea, 28 | Title = {Individual-Level Expectations of Executive Authority under Territorial Threat}, 29 | Author = {Steven V. Miller}, 30 | Journal = {Conflict Management and Peace Science}, 31 | Year = {2017}, 32 | Number = {5}, 33 | Pages = {526--545}, 34 | Volume = {34}, 35 | 36 | Owner = {steve}, 37 | Timestamp = {2015.10.13} 38 | } 39 | 40 | @Article{miller2018etttc, 41 | Title = {External Territorial Threats and Tolerance of Corruption: A Private/Government Distinction}, 42 | Author = {Steven V. Miller}, 43 | Journal = {Peace Economics, Peace Science and Public Policy}, 44 | Year = {2018}, 45 | Number = {1}, 46 | Volume = {24}, 47 | 48 | Owner = {steve}, 49 | Timestamp = {2018.06.14} 50 | } 51 | -------------------------------------------------------------------------------- /anon-ms-example/svm-rmarkdown-anon-ms-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: 3 | pdf_document: 4 | citation_package: natbib 5 | keep_tex: true 6 | fig_caption: true 7 | latex_engine: pdflatex 8 | template: ../svm-latex-anon-ms.tex 9 | title: "An Example Title with a Really Long Title: Also a Subtitle" 10 | runhead: "A Running Head" 11 | thanks: "Replication files are available on the author's Github account (http://github.com/svmiller). **Current version**: `r format(Sys.time(), '%B %d, %Y')`; **Corresponding author**: svmille@clemson.edu." 12 | author: 13 | - name: Steven V. Miller 14 | affiliation: Clemson University 15 | abstract: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin fermentum blandit felis. Nam consequat ultricies porta. Phasellus aliquet metus quis enim aliquet, id suscipit justo mollis. Vivamus dapibus erat a urna hendrerit, eu bibendum risus pretium. Praesent sit amet elementum augue, ac iaculis eros. Praesent sollicitudin pulvinar tellus ac fermentum. Integer porttitor vestibulum orci, id hendrerit turpis fringilla eu. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque sit amet pellentesque odio. Nam vitae lacinia tellus. Phasellus sit amet metus vel ipsum efficitur viverra. Nullam malesuada libero eu justo egestas efficitur. Proin eu elit ut dolor egestas consequat. Maecenas pretium, purus aliquet finibus pellentesque, mauris eros tempor magna, eget dignissim magna ligula accumsan erat. Etiam." 16 | keywords: "pandoc, r markdown, knitr" 17 | date: "`r format(Sys.time(), '%B %d, %Y')`" 18 | geometry: margin=1in 19 | fontfamily: mathpazo 20 | fontsize: 11pt 21 | bibliography: master.bib 22 | biblio-style: apsr 23 | indent: yes 24 | colorlinks: true 25 | --- 26 | 27 | # Introduction 28 | 29 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec felis placerat, suscipit risus eget, condimentum ex. Nunc laoreet mi nisi, eu volutpat orci porttitor at. Nunc a bibendum diam. Aenean condimentum, neque at gravida imperdiet, orci arcu laoreet risus, eu gravida erat leo et ante. Suspendisse tempor non eros nec vestibulum. Morbi cursus posuere nunc, semper dignissim mi lacinia non. Nunc sagittis ipsum in mattis volutpat. Morbi in mauris ut urna rhoncus pellentesque. Morbi hendrerit sodales metus, at placerat velit bibendum at. Etiam ut est id ligula hendrerit commodo et eget lorem. See my previous scholarship [@miller2013tdpi; @miller2017ieea; @miller2017etst; @miller2018etttc]. 30 | 31 | Proin vitae metus at turpis aliquet pulvinar. Suspendisse potenti. Interdum et malesuada fames ac ante ipsum primis in faucibus. Etiam tincidunt euismod mauris, pulvinar scelerisque nulla accumsan et. Praesent tempus ipsum varius enim eleifend, ut blandit arcu molestie. Vestibulum tempor est blandit ligula porta consequat. Praesent condimentum auctor ligula, ac pellentesque ante fringilla egestas. Praesent accumsan scelerisque eros nec mattis. Donec eget aliquet metus. Sed auctor, lacus mollis hendrerit lobortis, nisl felis vehicula libero, sed aliquet elit augue et eros. 32 | 33 | Etiam molestie augue ut dui vulputate, quis tempor augue pharetra. Pellentesque ac mauris eget nulla vestibulum ultrices. Sed hendrerit in tortor vitae aliquet. Sed vehicula pharetra interdum. Duis eget interdum diam, eget lacinia nunc. Duis viverra maximus euismod. Nulla interdum diam ac nisl laoreet sodales. Sed commodo diam ut massa gravida, id viverra neque semper. Vivamus vitae nibh suscipit, viverra mi convallis, posuere orci. Sed nec tempus dolor, ac facilisis quam. Aenean id diam semper leo pharetra elementum id eget justo. 34 | 35 | # The Next Section 36 | 37 | Praesent a sagittis elit, et ornare augue. Sed non urna non elit convallis faucibus eu non ante. Vivamus placerat, lorem nec porttitor ornare, dolor sapien ullamcorper nulla, vitae tempus nunc erat vel leo. Nunc non felis in tortor scelerisque venenatis. Sed nec nulla interdum, vulputate velit at, fringilla justo. Maecenas maximus volutpat mi, eu placerat augue gravida at. Vestibulum ut luctus eros, sed faucibus purus. Suspendisse scelerisque commodo gravida. Fusce tincidunt turpis ut sapien pulvinar sollicitudin. Donec ut fringilla augue. Integer semper pharetra gravida. Aenean eros justo, sodales id tincidunt ac, vulputate id mauris. In a laoreet nisi. Praesent in elit at ex dignissim consectetur. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut rhoncus eget purus ac feugiat. 38 | 39 | ## A Subsection 40 | 41 | Vestibulum efficitur finibus malesuada. Proin a tristique turpis, ut pellentesque ante. Aliquam auctor auctor dolor. Suspendisse porttitor mi eros, sed ultricies erat pharetra tincidunt. Duis molestie quis nunc ac tristique. Aenean placerat malesuada sollicitudin. Sed ac lacus orci. Morbi iaculis diam eu nulla pellentesque laoreet. Praesent quis congue libero, id gravida velit. 42 | 43 | Morbi fringilla rhoncus vestibulum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Quisque pulvinar lorem non odio posuere egestas. Phasellus quam libero, varius sed augue non, aliquet ultricies massa. Etiam posuere purus mi, ac aliquet est iaculis a. Mauris sollicitudin, ipsum id pellentesque vehicula, dui ipsum euismod ipsum, non bibendum orci augue ac quam. Phasellus elementum neque ac tempor tincidunt. Cras et diam eu nisl imperdiet gravida. Nunc nec dolor mi. Donec congue viverra lacus, eu auctor est laoreet in. Phasellus aliquam odio mi, at posuere dui venenatis in. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. 44 | 45 | Fusce iaculis nulla sit amet mauris hendrerit, in tempor dui posuere. Interdum et malesuada fames ac ante ipsum primis in faucibus. In pretium justo tellus, eu pulvinar sem gravida sit amet. Vestibulum malesuada lorem ut ante cursus condimentum. Cras vitae porta tellus, vel tempor purus. Mauris ut elit in nulla semper ultricies. Donec ultricies leo eu feugiat dictum. Vivamus lobortis, velit hendrerit ultrices accumsan, metus diam venenatis magna, sed pellentesque dui mi ut sapien. Maecenas lacinia, ante vel aliquam gravida, quam sem lacinia erat, nec egestas turpis quam id dolor. Integer et semper velit. Nam sed ipsum purus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc aliquam efficitur purus, et facilisis erat scelerisque ut. Phasellus suscipit a eros vehicula laoreet. In in mi quis elit scelerisque elementum. 46 | 47 | Nullam ac libero id nunc imperdiet posuere eget non eros. Curabitur sit amet nibh a ipsum faucibus aliquam. Duis eget dui non velit cursus vulputate. Proin pulvinar sit amet turpis vitae congue. Praesent bibendum tempor porta. Maecenas porttitor purus at dolor maximus, vel varius est blandit. Aenean mi tortor, eleifend non malesuada sed, viverra nec felis. Phasellus ac urna dignissim, euismod est nec, tristique arcu. Integer et interdum turpis, sit amet cursus enim. Aliquam pulvinar laoreet imperdiet. 48 | 49 | Mauris a nisl condimentum, molestie sem nec, eleifend tortor. Phasellus consectetur augue nulla, vel dignissim massa interdum a. Sed feugiat fermentum porttitor. Phasellus vitae erat sit amet diam vestibulum porta. Morbi consequat magna ligula, vel pellentesque mi euismod rutrum. Ut id ligula aliquam, feugiat orci id, cursus nunc. Quisque pellentesque tristique risus non pharetra. Phasellus eget venenatis velit. Aliquam non neque non orci varius auctor id vitae lorem. Donec ac est non libero faucibus ultrices. Morbi id neque tortor. Nulla faucibus dui vitae ante hendrerit, sed elementum diam molestie. 50 | 51 | Ut mollis fermentum lacinia. Cras at aliquam dui. Fusce eu nulla porta urna consectetur gravida. In molestie in lacus ut tincidunt. Maecenas blandit efficitur lacus, sit amet laoreet erat. Proin at interdum mi. Donec eleifend vestibulum pharetra. Aliquam aliquet turpis non ultrices rhoncus. Nam vestibulum leo id ipsum cursus varius. Suspendisse potenti. 52 | 53 | 54 | \newpage 55 | 56 | 64 | -------------------------------------------------------------------------------- /anon-ms-example/svm-rmarkdown-anon-ms-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/anon-ms-example/svm-rmarkdown-anon-ms-example.pdf -------------------------------------------------------------------------------- /anon-ms-example/svm-rmarkdown-anon-ms-example.tex: -------------------------------------------------------------------------------- 1 | \documentclass[11pt,]{article} 2 | \usepackage[]{mathpazo} 3 | \usepackage{amssymb,amsmath} 4 | \usepackage{ifxetex,ifluatex} 5 | \usepackage{fixltx2e} % provides \textsubscript 6 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 7 | \usepackage[T1]{fontenc} 8 | \usepackage[utf8]{inputenc} 9 | \else % if luatex or xelatex 10 | \ifxetex 11 | \usepackage{mathspec} 12 | \else 13 | \usepackage{fontspec} 14 | \fi 15 | \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} 16 | \fi 17 | % use upquote if available, for straight quotes in verbatim environments 18 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 19 | % use microtype if available 20 | \IfFileExists{microtype.sty}{% 21 | \usepackage{microtype} 22 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 23 | }{} 24 | \usepackage[margin=1in]{geometry} 25 | \usepackage[unicode=true]{hyperref} 26 | \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref 27 | \hypersetup{ 28 | pdftitle={An Example Title with a Really Long Title: Also a Subtitle}, 29 | pdfkeywords={pandoc, r markdown, knitr}, 30 | colorlinks=true, 31 | linkcolor=Maroon, 32 | citecolor=blue, 33 | urlcolor=blue, 34 | breaklinks=true} 35 | \urlstyle{same} % don't use monospace font for urls 36 | \usepackage{natbib} 37 | \bibliographystyle{apsr} 38 | \setlength{\emergencystretch}{3em} % prevent overfull lines 39 | \providecommand{\tightlist}{% 40 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 41 | \setcounter{secnumdepth}{0} 42 | % Redefines (sub)paragraphs to behave more like sections 43 | \ifx\paragraph\undefined\else 44 | \let\oldparagraph\paragraph 45 | \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} 46 | \fi 47 | \ifx\subparagraph\undefined\else 48 | \let\oldsubparagraph\subparagraph 49 | \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} 50 | \fi 51 | 52 | % set default figure placement to htbp 53 | \makeatletter 54 | \def\fps@figure{htbp} 55 | \makeatother 56 | 57 | 58 | 59 | % Stuff I added. 60 | % -------------- 61 | 62 | \usepackage{indentfirst} 63 | \usepackage[doublespacing]{setspace} 64 | \usepackage{fancyhdr} 65 | \pagestyle{fancy} 66 | \usepackage{layout} 67 | \lhead{\sc A Running Head} 68 | \chead{} 69 | \rhead{\thepage} 70 | \lfoot{} 71 | \cfoot{} 72 | \rfoot{} 73 | 74 | \renewcommand{\headrulewidth}{0.0pt} 75 | \renewcommand{\footrulewidth}{0.0pt} 76 | 77 | \usepackage{sectsty} 78 | \sectionfont{\centering} 79 | \subsectionfont{\centering} 80 | 81 | \newtheorem{hypothesis}{Hypothesis} 82 | 83 | % Begin document 84 | % -------------- 85 | 86 | \begin{document} 87 | 88 | \doublespacing 89 | 90 | 91 | \begin{center}Abstract\end{center} 92 | 93 | \noindent Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin fermentum 94 | blandit felis. Nam consequat ultricies porta. Phasellus aliquet metus 95 | quis enim aliquet, id suscipit justo mollis. Vivamus dapibus erat a urna 96 | hendrerit, eu bibendum risus pretium. Praesent sit amet elementum augue, 97 | ac iaculis eros. Praesent sollicitudin pulvinar tellus ac fermentum. 98 | Integer porttitor vestibulum orci, id hendrerit turpis fringilla eu. 99 | Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere 100 | cubilia Curae; Pellentesque sit amet pellentesque odio. Nam vitae 101 | lacinia tellus. Phasellus sit amet metus vel ipsum efficitur viverra. 102 | Nullam malesuada libero eu justo egestas efficitur. Proin eu elit ut 103 | dolor egestas consequat. Maecenas pretium, purus aliquet finibus 104 | pellentesque, mauris eros tempor magna, eget dignissim magna ligula 105 | accumsan erat. Etiam. 106 | 107 | \emph{Keywords:} pandoc, r markdown, knitr 108 | 109 | 110 | \newpage 111 | 112 | \hypertarget{introduction}{% 113 | \section{Introduction}\label{introduction}} 114 | 115 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec 116 | felis placerat, suscipit risus eget, condimentum ex. Nunc laoreet mi 117 | nisi, eu volutpat orci porttitor at. Nunc a bibendum diam. Aenean 118 | condimentum, neque at gravida imperdiet, orci arcu laoreet risus, eu 119 | gravida erat leo et ante. Suspendisse tempor non eros nec vestibulum. 120 | Morbi cursus posuere nunc, semper dignissim mi lacinia non. Nunc 121 | sagittis ipsum in mattis volutpat. Morbi in mauris ut urna rhoncus 122 | pellentesque. Morbi hendrerit sodales metus, at placerat velit bibendum 123 | at. Etiam ut est id ligula hendrerit commodo et eget lorem. See my 124 | previous scholarship 125 | \citep{miller2013tdpi, miller2017ieea, miller2017etst, miller2018etttc}. 126 | 127 | Proin vitae metus at turpis aliquet pulvinar. Suspendisse potenti. 128 | Interdum et malesuada fames ac ante ipsum primis in faucibus. Etiam 129 | tincidunt euismod mauris, pulvinar scelerisque nulla accumsan et. 130 | Praesent tempus ipsum varius enim eleifend, ut blandit arcu molestie. 131 | Vestibulum tempor est blandit ligula porta consequat. Praesent 132 | condimentum auctor ligula, ac pellentesque ante fringilla egestas. 133 | Praesent accumsan scelerisque eros nec mattis. Donec eget aliquet metus. 134 | Sed auctor, lacus mollis hendrerit lobortis, nisl felis vehicula libero, 135 | sed aliquet elit augue et eros. 136 | 137 | Etiam molestie augue ut dui vulputate, quis tempor augue pharetra. 138 | Pellentesque ac mauris eget nulla vestibulum ultrices. Sed hendrerit in 139 | tortor vitae aliquet. Sed vehicula pharetra interdum. Duis eget interdum 140 | diam, eget lacinia nunc. Duis viverra maximus euismod. Nulla interdum 141 | diam ac nisl laoreet sodales. Sed commodo diam ut massa gravida, id 142 | viverra neque semper. Vivamus vitae nibh suscipit, viverra mi convallis, 143 | posuere orci. Sed nec tempus dolor, ac facilisis quam. Aenean id diam 144 | semper leo pharetra elementum id eget justo. 145 | 146 | \hypertarget{the-next-section}{% 147 | \section{The Next Section}\label{the-next-section}} 148 | 149 | Praesent a sagittis elit, et ornare augue. Sed non urna non elit 150 | convallis faucibus eu non ante. Vivamus placerat, lorem nec porttitor 151 | ornare, dolor sapien ullamcorper nulla, vitae tempus nunc erat vel leo. 152 | Nunc non felis in tortor scelerisque venenatis. Sed nec nulla interdum, 153 | vulputate velit at, fringilla justo. Maecenas maximus volutpat mi, eu 154 | placerat augue gravida at. Vestibulum ut luctus eros, sed faucibus 155 | purus. Suspendisse scelerisque commodo gravida. Fusce tincidunt turpis 156 | ut sapien pulvinar sollicitudin. Donec ut fringilla augue. Integer 157 | semper pharetra gravida. Aenean eros justo, sodales id tincidunt ac, 158 | vulputate id mauris. In a laoreet nisi. Praesent in elit at ex dignissim 159 | consectetur. Pellentesque habitant morbi tristique senectus et netus et 160 | malesuada fames ac turpis egestas. Ut rhoncus eget purus ac feugiat. 161 | 162 | \hypertarget{a-subsection}{% 163 | \subsection{A Subsection}\label{a-subsection}} 164 | 165 | Vestibulum efficitur finibus malesuada. Proin a tristique turpis, ut 166 | pellentesque ante. Aliquam auctor auctor dolor. Suspendisse porttitor mi 167 | eros, sed ultricies erat pharetra tincidunt. Duis molestie quis nunc ac 168 | tristique. Aenean placerat malesuada sollicitudin. Sed ac lacus orci. 169 | Morbi iaculis diam eu nulla pellentesque laoreet. Praesent quis congue 170 | libero, id gravida velit. 171 | 172 | Morbi fringilla rhoncus vestibulum. Class aptent taciti sociosqu ad 173 | litora torquent per conubia nostra, per inceptos himenaeos. Quisque 174 | pulvinar lorem non odio posuere egestas. Phasellus quam libero, varius 175 | sed augue non, aliquet ultricies massa. Etiam posuere purus mi, ac 176 | aliquet est iaculis a. Mauris sollicitudin, ipsum id pellentesque 177 | vehicula, dui ipsum euismod ipsum, non bibendum orci augue ac quam. 178 | Phasellus elementum neque ac tempor tincidunt. Cras et diam eu nisl 179 | imperdiet gravida. Nunc nec dolor mi. Donec congue viverra lacus, eu 180 | auctor est laoreet in. Phasellus aliquam odio mi, at posuere dui 181 | venenatis in. Pellentesque habitant morbi tristique senectus et netus et 182 | malesuada fames ac turpis egestas. 183 | 184 | Fusce iaculis nulla sit amet mauris hendrerit, in tempor dui posuere. 185 | Interdum et malesuada fames ac ante ipsum primis in faucibus. In pretium 186 | justo tellus, eu pulvinar sem gravida sit amet. Vestibulum malesuada 187 | lorem ut ante cursus condimentum. Cras vitae porta tellus, vel tempor 188 | purus. Mauris ut elit in nulla semper ultricies. Donec ultricies leo eu 189 | feugiat dictum. Vivamus lobortis, velit hendrerit ultrices accumsan, 190 | metus diam venenatis magna, sed pellentesque dui mi ut sapien. Maecenas 191 | lacinia, ante vel aliquam gravida, quam sem lacinia erat, nec egestas 192 | turpis quam id dolor. Integer et semper velit. Nam sed ipsum purus. Cum 193 | sociis natoque penatibus et magnis dis parturient montes, nascetur 194 | ridiculus mus. Nunc aliquam efficitur purus, et facilisis erat 195 | scelerisque ut. Phasellus suscipit a eros vehicula laoreet. In in mi 196 | quis elit scelerisque elementum. 197 | 198 | Nullam ac libero id nunc imperdiet posuere eget non eros. Curabitur sit 199 | amet nibh a ipsum faucibus aliquam. Duis eget dui non velit cursus 200 | vulputate. Proin pulvinar sit amet turpis vitae congue. Praesent 201 | bibendum tempor porta. Maecenas porttitor purus at dolor maximus, vel 202 | varius est blandit. Aenean mi tortor, eleifend non malesuada sed, 203 | viverra nec felis. Phasellus ac urna dignissim, euismod est nec, 204 | tristique arcu. Integer et interdum turpis, sit amet cursus enim. 205 | Aliquam pulvinar laoreet imperdiet. 206 | 207 | Mauris a nisl condimentum, molestie sem nec, eleifend tortor. Phasellus 208 | consectetur augue nulla, vel dignissim massa interdum a. Sed feugiat 209 | fermentum porttitor. Phasellus vitae erat sit amet diam vestibulum 210 | porta. Morbi consequat magna ligula, vel pellentesque mi euismod rutrum. 211 | Ut id ligula aliquam, feugiat orci id, cursus nunc. Quisque pellentesque 212 | tristique risus non pharetra. Phasellus eget venenatis velit. Aliquam 213 | non neque non orci varius auctor id vitae lorem. Donec ac est non libero 214 | faucibus ultrices. Morbi id neque tortor. Nulla faucibus dui vitae ante 215 | hendrerit, sed elementum diam molestie. 216 | 217 | Ut mollis fermentum lacinia. Cras at aliquam dui. Fusce eu nulla porta 218 | urna consectetur gravida. In molestie in lacus ut tincidunt. Maecenas 219 | blandit efficitur lacus, sit amet laoreet erat. Proin at interdum mi. 220 | Donec eleifend vestibulum pharetra. Aliquam aliquet turpis non ultrices 221 | rhoncus. Nam vestibulum leo id ipsum cursus varius. Suspendisse potenti. 222 | 223 | \newpage 224 | 225 | \bibliography{master.bib} 226 | 227 | \end{document} 228 | 229 | -------------------------------------------------------------------------------- /article-example/figs/unnamed-chunk-3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/article-example/figs/unnamed-chunk-3.pdf -------------------------------------------------------------------------------- /article-example/master.bib: -------------------------------------------------------------------------------- 1 | @Book{xie2013ddrk, 2 | Title = {Dynamic Documents with R and knitr}, 3 | Author = {Yihui Xie}, 4 | Publisher = {Boca Raton, FL: CRC Press}, 5 | Year = {2013}, 6 | 7 | Owner = {steve}, 8 | Timestamp = {2015.09.13} 9 | } 10 | -------------------------------------------------------------------------------- /article-example/svm-rmarkdown-article-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/article-example/svm-rmarkdown-article-example.pdf -------------------------------------------------------------------------------- /article2-example/.gitignore: -------------------------------------------------------------------------------- 1 | examples 2 | -------------------------------------------------------------------------------- /article2-example/master.bib: -------------------------------------------------------------------------------- 1 | @Book{xie2013ddrk, 2 | Title = {Dynamic Documents with R and knitr}, 3 | Author = {Yihui Xie}, 4 | Publisher = {Boca Raton, FL: CRC Press}, 5 | Year = {2013}, 6 | 7 | Owner = {steve}, 8 | Timestamp = {2015.09.13} 9 | } 10 | -------------------------------------------------------------------------------- /article2-example/svm-article2-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: 3 | pdf_document: 4 | citation_package: natbib 5 | latex_engine: xelatex 6 | keep_tex: true 7 | dev: cairo_pdf 8 | template: ../svm-latex-article2.tex 9 | biblio-style: apsr 10 | title: "Another Pandoc Markdown Article Starter and Template" 11 | thanks: "Replication files are available on the author's Github account (http://github.com/svmiller/svm-r-markdown-templates). **Current version**: `r format(Sys.time(), '%B %d, %Y')`; **Corresponding author**: steven.v.miller@gmail.com." 12 | author: 13 | - name: Steven V. Miller 14 | affiliation: Clemson University 15 | - name: A Second Author Who Did Less Work 16 | affiliation: The Ohio State University 17 | - name: A Graduate Student 18 | affiliation: University of Alabama 19 | abstract: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet libero justo. Pellentesque eget nibh ex. Aliquam tincidunt egestas lectus id ullamcorper. Proin tellus orci, posuere sed cursus at, bibendum ac odio. Nam consequat non ante eget aliquam. Nulla facilisis tincidunt elit. Nunc hendrerit pellentesque quam, eu imperdiet ipsum porttitor ut. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Duis vitae nibh mauris. Duis nec sem sit amet ante dictum mattis. Suspendisse diam velit, maximus eget commodo at, faucibus et nisi. Ut a pellentesque eros, sit amet suscipit eros. Nunc tincidunt quis risus suscipit vestibulum. Quisque eu fringilla massa." 20 | keywords: "pandoc, r markdown, knitr" 21 | date: "`r format(Sys.time(), '%B %d, %Y')`" 22 | geometry: margin=1in 23 | #fontfamily: libertineotf 24 | mainfont: cochineal 25 | sansfont: Linux Biolinum O 26 | fontsize: 11pt 27 | # spacing: double 28 | endnote: no 29 | # pandocparas: TRUE 30 | sansitup: TRUE 31 | bibliography: master.bib 32 | header-includes: 33 | - \usepackage{longtable} 34 | - \LTcapwidth=.95\textwidth 35 | - \linespread{1.05} 36 | - \usepackage{hyperref} 37 | --- 38 | 39 | ```{r setup, include=FALSE} 40 | knitr::opts_chunk$set(echo = TRUE) 41 | library(tidyverse) 42 | library(stevemisc) 43 | ``` 44 | 45 | 46 | 47 | # Introduction 48 | 49 | \kant[1] 50 | 51 | ## A Subsection in the Introduction 52 | 53 | \kant[2-5] 54 | 55 | This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see . Here's an obligatory citation to @xie2013ddrk. 56 | 57 | # Literature Review 58 | 59 | \kant[6-14] 60 | 61 | # Research Design 62 | 63 | \kant[15] 64 | 65 | ## Another Subsection From Kant, Who Writes as If He Does Not Want to Be Read 66 | 67 | \kant[16-18] 68 | 69 | ## Another Subsection 70 | 71 | \kant[19-23] 72 | 73 | ```{r, echo=F, fig.cap = "A Simple ggplot with the mtcars Data in R", message=F, fig.width=8} 74 | 75 | mtcars %>% 76 | ggplot(.,aes(wt, mpg)) + geom_point() + 77 | theme_steve_web() + 78 | geom_smooth(method="lm") + 79 | labs(caption = "Data: 1974 Motor Trend US magazine", 80 | x = "Weight (1,000 Pounds)", 81 | y = "(U.S.) Miles per Gallon") 82 | 83 | ``` 84 | 85 | When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: 86 | 87 | ```{r cars} 88 | summary(cars) 89 | ``` 90 | 91 | # Results 92 | 93 | \kant[24] 94 | 95 | ## Including Plots 96 | 97 | You can also embed plots, for example: 98 | 99 | ```{r pressure, echo=FALSE} 100 | plot(pressure) 101 | ``` 102 | 103 | Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot. 104 | 105 | 106 | \kant[25-35] 107 | 108 | ```{r} 109 | plot(mtcars) 110 | ``` 111 | 112 | # Conclusion 113 | 114 | \kant[36-40] 115 | 116 | \newpage -------------------------------------------------------------------------------- /article2-example/svm-article2-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/article2-example/svm-article2-example.pdf -------------------------------------------------------------------------------- /article2-example/svm-article2-example_files/figure-latex/pressure-1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/article2-example/svm-article2-example_files/figure-latex/pressure-1.pdf -------------------------------------------------------------------------------- /article2-example/svm-article2-example_files/figure-latex/unnamed-chunk-1-1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/article2-example/svm-article2-example_files/figure-latex/unnamed-chunk-1-1.pdf -------------------------------------------------------------------------------- /article2-example/svm-article2-example_files/figure-latex/unnamed-chunk-2-1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/article2-example/svm-article2-example_files/figure-latex/unnamed-chunk-2-1.pdf -------------------------------------------------------------------------------- /beamer-example/clemson-academic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/beamer-example/clemson-academic.png -------------------------------------------------------------------------------- /beamer-example/figs/good-day-hypothesis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/beamer-example/figs/good-day-hypothesis.pdf -------------------------------------------------------------------------------- /beamer-example/figs/plotit.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/beamer-example/figs/plotit.pdf -------------------------------------------------------------------------------- /beamer-example/figs/pressure.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/beamer-example/figs/pressure.pdf -------------------------------------------------------------------------------- /beamer-example/figs/rick-astley-never-gonna-give-you-up-median-voter-theorem.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/beamer-example/figs/rick-astley-never-gonna-give-you-up-median-voter-theorem.pdf -------------------------------------------------------------------------------- /beamer-example/figs/unnamed-chunk-1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/beamer-example/figs/unnamed-chunk-1.pdf -------------------------------------------------------------------------------- /beamer-example/svm-rmarkdown-beamer-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: An Example R Markdown Document 3 | subtitle: (A Subtitle Would Go Here if This Were a Class) 4 | author: Steven V. Miller 5 | institute: Department of Political Science 6 | titlegraphic: /Dropbox/teaching/clemson-academic.png 7 | fontsize: 10pt 8 | output: 9 | beamer_presentation: 10 | template: ../svm-latex-beamer.tex 11 | keep_tex: true 12 | latex_engine: xelatex # pdflatex also works here 13 | dev: cairo_pdf # I typically comment this out if latex_engine: pdflatex 14 | slide_level: 3 15 | make149: true 16 | mainfont: "Open Sans" # Try out some font options if xelatex 17 | titlefont: "Titillium Web" # Try out some font options if xelatex 18 | --- 19 | 20 | ```{r setup, include=FALSE, cache=F, message=F, warning=F, results="hide"} 21 | knitr::opts_chunk$set(cache=TRUE) 22 | knitr::opts_chunk$set(fig.path='figs/') 23 | knitr::opts_chunk$set(cache.path='cache/') 24 | 25 | knitr::opts_chunk$set( 26 | fig.process = function(x) { 27 | x2 = sub('-\\d+([.][a-z]+)$', '\\1', x) 28 | if (file.rename(x, x2)) x2 else x 29 | } 30 | ) 31 | library(tidyverse) 32 | library(stevemisc) 33 | ``` 34 | 35 | 36 | # Pop Songs and Political Science 37 | 38 | ### Sheena Easton and Game Theory 39 | 40 | Sheena Easton describes the following scenario for her baby: 41 | 42 | 1. Takes the morning train 43 | 2. Works from nine 'til five 44 | 3. Takes another train home again 45 | 4. Finds Sheena Easton waiting for him 46 | 47 | ### A Total Conflict Game Between Sheena Easton and Her Baby 48 | 49 | | | Sheena Easton Stays Home | Sheena Easton Goes to Baby's Work | 50 | |-------------------------|---------------------|------------------| 51 | | **Baby Home Again** | -100, **100** | **100**, 0 | 52 | | **Baby Stays at Work** | **50**, 0 | -100, **100** | 53 | 54 | Sheena Easton and her baby are playing a **zero-sum (total conflict) game**. 55 | 56 | - Akin to Holmes-Moriarty game (see: von Neumann and Morgenstern) 57 | - Solution: **mixed strategy** 58 | 59 | ### Rick Astley's Re-election Platform 60 | 61 | Rick Astley's campaign promises: 62 | 63 | - Never gonna give you up. 64 | - Never gonna let you down. 65 | - Never gonna run around and desert you. 66 | - Never gonna make you cry. 67 | - Never gonna say goodbye. 68 | - Never gonna tell a lie and hurt you. 69 | 70 | Are these promises (if credible) sufficient to secure re-election? 71 | 72 | ### 73 | 74 | ```{r rick-astley-never-gonna-give-you-up-median-voter-theorem, eval = T, echo = F, fig.height=8.5, fig.width=14, message=F} 75 | 76 | df <- data.frame(x = rnorm(1000)) 77 | x <- df$x 78 | 79 | ggplot(df, aes(x)) + 80 | theme_steve_web() + 81 | stat_function(fun = dnorm, colour = "black") + 82 | scale_x_continuous(limits = c(-4, 4), 83 | breaks = c(-4, 0, 4), 84 | labels = c("Complete\nEmotional\nNeglect", 85 | "Never Gonna Give You Up\nLet You Down\nRun Around and Desert You\n(Preference of Median Voter)", 86 | "Maximum\nEmotional\nSupport")) + 87 | geom_vline(xintercept = 0) + 88 | geom_vline(xintercept = 1, linetype="dashed") + 89 | geom_vline(xintercept = -2, linetype = "dashed") + 90 | geom_vline(xintercept = -.5, linetype = "dotted") + 91 | scale_y_continuous(limits = c(0, .5), breaks = NULL, label=NULL) + 92 | xlab("A Unidimensional Continuum of the Policy Space of Emotional Support") + 93 | ylab("") + 94 | stat_function(fun = dnorm, 95 | xlim = c(-4,-2), 96 | size=0, 97 | geom = "area", fill="#f8766d", alpha=1) + 98 | stat_function(fun = dnorm, 99 | xlim = c(1, 4), 100 | size=0, 101 | geom = "area", fill="#619cff", alpha=1) + 102 | stat_function(fun = dnorm, 103 | xlim = c(-.5, 1), 104 | size=0, 105 | geom = "area", fill="#619cff", alpha=.4) + 106 | stat_function(fun = dnorm, 107 | xlim = c(-2, -.5), 108 | size=0, 109 | geom = "area", fill="#f8766d", alpha=.4) + 110 | annotate("text", label="Astley's rival is promising\nfar less in the (public?) good\nof emotional support", 111 | size = 3.5, family="Open Sans", 112 | x = -2.1, y = .4, 113 | hjust = 1) + 114 | annotate("text", 115 | label="Congressman Astley is pledging\nmore emotional support\n(i.e. never gonna make you cry/say goodbye/tell a lie/hurt you)\nthan most his constituents want", 116 | size = 3.5, family="Open Sans", 117 | x = 1.1, y = .4, 118 | hjust = 0) + 119 | annotate("text", 120 | label="Preferences\ncloser to\nAstley's\nrival", 121 | size = 3.5, family="Open Sans", 122 | x = -1.2, y = .45, 123 | hjust = .5) + 124 | annotate("text", 125 | label="Preferences\ncloser to\nCongressman\nAstley", 126 | size = 3.5, family="Open Sans", 127 | x = .5, y = .45, 128 | hjust = .5) + 129 | labs(title = "Median Voter Theorem Suggests Congressman Astley Secures Re-election Against His Rival", 130 | subtitle = "Assuming a unidimensional policy space and single-peaked preferences, Congressman Astley is closer to the median voter than his rival and wins the election.") + 131 | geom_hline(yintercept = 0) + 132 | geom_vline(xintercept = -4) 133 | 134 | 135 | 136 | 137 | ``` 138 | 139 | ### Rick Astley and Median Voter Theorem 140 | 141 | Whereas these pledges conform to the preferences of the **median voter**, we expect Congressman Astley to secure re-election. 142 | 143 | ### Caribbean Queen and Operation Urgent Fury 144 | 145 | Billy Ocean released "Caribbean Queen" in 1984. 146 | 147 | - Emphasized sharing the same dream 148 | - Hearts beating as one 149 | 150 | "Caribbean Queen" is about the poor execution of Operation Urgent Fury. 151 | 152 | - Echoed JCS chairman David Jones' frustrations with military establishment. 153 | 154 | Billy Ocean is advocating for what became the Goldwater-Nichols Act. 155 | 156 | - Wanted to take advantage of **economies of scale**, resolve **coordination problems** in U.S. military. 157 | 158 | ### The Good Day Hypothesis 159 | 160 | We know the following about Ice Cube's day. 161 | 162 | 1. The Lakers beat the Supersonics. 163 | 2. No helicopter looked for a murder. 164 | 3. Consumed Fatburger at 2 a.m. 165 | 4. Goodyear blimp: "Ice Cube's a pimp." 166 | 167 | ### The Good Day Hypothesis 168 | 169 | This leads to two different hypotheses: 170 | 171 | - $H_0$: Ice Cube's day is statistically indistinguishable from a typical day. 172 | - $H_1$: Ice Cube is having a good (i.e. greater than average) day. 173 | 174 | These hypotheses are tested using archival data of Ice Cube's life. 175 | 176 | ### 177 | 178 | ```{r good-day-hypothesis, eval = T, echo = F, fig.height=8.5, fig.width=14, message=F} 179 | interval1 <- -qnorm((1-0.9)/2) # 90% multiplier 180 | interval2 <- -qnorm((1-0.95)/2) # 95% multiplier 181 | 182 | tribble( 183 | ~variable, ~est, ~se, 184 | "Latent Estimate of\nIce Cube's Day", 1.6, .231 185 | ) %>% 186 | ggplot(.) + 187 | theme_steve_web() + 188 | geom_hline(yintercept = .5, color = "red", lty=2) + 189 | geom_linerange(aes(x = variable, ymin = est - se*interval1, 190 | ymax = est + se*interval1), 191 | lwd = 1, position = position_dodge(width = 1/2)) + 192 | geom_pointrange(aes(x = variable, y = est, ymin = est - se*interval2, 193 | ymax = est + se*interval2), 194 | lwd = 1/2, position = position_dodge(width = 1/2), 195 | fill = "WHITE") + 196 | coord_flip() + xlab("") + ylab("Latent Estimate") + 197 | labs(title = "Latent Estimates from Ice Cube's Archives Lend Support to the 'Good Day' Hypothesis", 198 | subtitle = "Latent estimates are drawn from an item response model of indicators of the quality of Ice Cube's days. These include whether he had to use his A.K.", 199 | caption = "Data: Ice Cube's Archives, obviously fictional. Red value of .5 indicate likelihood of 'good day.'") 200 | 201 | 202 | 203 | ``` -------------------------------------------------------------------------------- /beamer-example/svm-rmarkdown-beamer-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/beamer-example/svm-rmarkdown-beamer-example.pdf -------------------------------------------------------------------------------- /beamer-example/svm-rmarkdown-beamer-example.tex: -------------------------------------------------------------------------------- 1 | \documentclass[10pt,ignorenonframetext,,aspectratio=149]{beamer} 2 | \usefonttheme{serif} % use mainfont rather than sansfont for slide text 3 | \setbeamertemplate{caption}[numbered] 4 | \setbeamertemplate{caption label separator}{: } 5 | \setbeamercolor{caption name}{fg=normal text.fg} 6 | \usepackage{lmodern} 7 | \usepackage{amssymb,amsmath} 8 | \usepackage{ifxetex,ifluatex} 9 | \usepackage{fixltx2e} % provides \textsubscript 10 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 11 | \usepackage[T1]{fontenc} 12 | \usepackage[utf8]{inputenc} 13 | \else % if luatex or xelatex 14 | \ifxetex 15 | \usepackage{mathspec} 16 | \else 17 | \usepackage{fontspec} 18 | \fi 19 | \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} 20 | \newcommand{\euro}{€} 21 | \setmainfont[]{Open Sans} 22 | \fi 23 | % use upquote if available, for straight quotes in verbatim environments 24 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 25 | % use microtype if available 26 | \IfFileExists{microtype.sty}{% 27 | \usepackage{microtype} 28 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 29 | }{} 30 | \usepackage{longtable,booktabs} 31 | \usepackage{caption} 32 | % These lines are needed to make table captions work with longtable: 33 | \makeatletter 34 | \def\fnum@table{\tablename~\thetable} 35 | \makeatother 36 | \usepackage{graphicx,grffile} 37 | \makeatletter 38 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 39 | \def\maxheight{\ifdim\Gin@nat@height>\textheight0.8\textheight\else\Gin@nat@height\fi} 40 | \makeatother 41 | % Scale images if necessary, so that they will not overflow the page 42 | % margins by default, and it is still possible to overwrite the defaults 43 | % using explicit options in \includegraphics[width, height, ...]{} 44 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 45 | 46 | % Comment these out if you don't want a slide with just the 47 | % part/section/subsection/subsubsection title: 48 | \AtBeginPart{ 49 | \let\insertpartnumber\relax 50 | \let\partname\relax 51 | \frame{\partpage} 52 | } 53 | \AtBeginSection{ 54 | \let\insertsectionnumber\relax 55 | \let\sectionname\relax 56 | \frame{\sectionpage} 57 | } 58 | \AtBeginSubsection{ 59 | \let\insertsubsectionnumber\relax 60 | \let\subsectionname\relax 61 | \frame{\subsectionpage} 62 | } 63 | 64 | \setlength{\emergencystretch}{3em} % prevent overfull lines 65 | \providecommand{\tightlist}{% 66 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 67 | \setcounter{secnumdepth}{0} 68 | 69 | \title{An Example R Markdown Document} 70 | \subtitle{(A Subtitle Would Go Here if This Were a Class)} 71 | \author{Steven V. Miller} 72 | \date{} 73 | 74 | %% Here's everything I added. 75 | %%-------------------------- 76 | 77 | \usepackage{graphicx} 78 | \usepackage{rotating} 79 | %\setbeamertemplate{caption}[numbered] 80 | \usepackage{hyperref} 81 | \usepackage{caption} 82 | \usepackage[normalem]{ulem} 83 | %\mode 84 | \usepackage{wasysym} 85 | %\usepackage{amsmath} 86 | 87 | 88 | % Get rid of navigation symbols. 89 | %------------------------------- 90 | \setbeamertemplate{navigation symbols}{} 91 | 92 | % Optional institute tags and titlegraphic. 93 | % Do feel free to change the titlegraphic if you don't want it as a Markdown field. 94 | %---------------------------------------------------------------------------------- 95 | \institute{Department of Political Science} 96 | 97 | % \titlegraphic{\includegraphics[width=0.3\paperwidth]{\string~/Dropbox/teaching/clemson-academic.png}} % <-- if you want to know what this looks like without it as a Markdown field. 98 | % ----------------------------------------------------------------------------------------------------- 99 | \titlegraphic{\includegraphics[width=0.3\paperwidth]{\string~/Dropbox/teaching/clemson-academic.png}} 100 | 101 | % Some additional title page adjustments. 102 | %---------------------------------------- 103 | \setbeamertemplate{title page}[empty] 104 | %\date{} 105 | \setbeamerfont{subtitle}{size=\small} 106 | 107 | \setbeamercovered{transparent} 108 | 109 | % Some optional colors. Change or add as you see fit. 110 | %--------------------------------------------------- 111 | \definecolor{clemsonpurple}{HTML}{522D80} 112 | % \definecolor{clemsonorange}{HTML}{EA6A20} 113 | \definecolor{clemsonorange}{HTML}{F66733} 114 | \definecolor{uiucblue}{HTML}{003C7D} 115 | \definecolor{uiucorange}{HTML}{F47F24} 116 | 117 | 118 | % Some optional color adjustments to Beamer. Change as you see fit. 119 | %------------------------------------------------------------------ 120 | \setbeamercolor{frametitle}{fg=clemsonpurple,bg=white} 121 | \setbeamercolor{title}{fg=clemsonpurple,bg=white} 122 | \setbeamercolor{local structure}{fg=clemsonpurple} 123 | \setbeamercolor{section in toc}{fg=clemsonpurple,bg=white} 124 | % \setbeamercolor{subsection in toc}{fg=clemsonorange,bg=white} 125 | \setbeamercolor{footline}{fg=clemsonpurple!50, bg=white} 126 | \setbeamercolor{block title}{fg=clemsonorange,bg=white} 127 | 128 | 129 | \let\Tiny=\tiny 130 | 131 | 132 | % Sections and subsections should not get their own damn slide. 133 | %-------------------------------------------------------------- 134 | \AtBeginPart{} 135 | \AtBeginSection{} 136 | \AtBeginSubsection{} 137 | \AtBeginSubsubsection{} 138 | 139 | % Suppress some of Markdown's weird default vertical spacing. 140 | %------------------------------------------------------------ 141 | \setlength{\emergencystretch}{0em} % prevent overfull lines 142 | \setlength{\parskip}{0pt} 143 | 144 | 145 | % Allow for those simple two-tone footlines I like. 146 | % Edit the colors as you see fit. 147 | %-------------------------------------------------- 148 | \defbeamertemplate*{footline}{my footline}{% 149 | \ifnum\insertpagenumber=1 150 | \hbox{% 151 | \begin{beamercolorbox}[wd=\paperwidth,ht=.8ex,dp=1ex,center]{}% 152 | % empty environment to raise height 153 | \end{beamercolorbox}% 154 | }% 155 | \vskip0pt% 156 | \else% 157 | \Tiny{% 158 | \hfill% 159 | \vspace*{1pt}% 160 | \insertframenumber/\inserttotalframenumber \hspace*{0.1cm}% 161 | \newline% 162 | \color{clemsonpurple}{\rule{\paperwidth}{0.4mm}}\newline% 163 | \color{clemsonorange}{\rule{\paperwidth}{.4mm}}% 164 | }% 165 | \fi% 166 | } 167 | 168 | % Various cosmetic things, though I must confess I forget what exactly these do and why I included them. 169 | %------------------------------------------------------------------------------------------------------- 170 | \setbeamercolor{structure}{fg=blue} 171 | \setbeamercolor{local structure}{parent=structure} 172 | \setbeamercolor{item projected}{parent=item,use=item,fg=clemsonpurple,bg=white} 173 | \setbeamercolor{enumerate item}{parent=item} 174 | 175 | % Adjust some item elements. More cosmetic things. 176 | %------------------------------------------------- 177 | \setbeamertemplate{itemize item}{\color{clemsonpurple}$\bullet$} 178 | \setbeamertemplate{itemize subitem}{\color{clemsonpurple}\scriptsize{$\bullet$}} 179 | \setbeamertemplate{itemize/enumerate body end}{\vspace{.6\baselineskip}} % So I'm less inclined to use \medskip and \bigskip in Markdown. 180 | 181 | % Automatically center images 182 | % --------------------------- 183 | % Note: this is for ![](image.png) images 184 | % Use "fig.align = "center" for R chunks 185 | 186 | \usepackage{etoolbox} 187 | 188 | \AtBeginDocument{% 189 | \letcs\oig{@orig\string\includegraphics}% 190 | \renewcommand<>\includegraphics[2][]{% 191 | \only#3{% 192 | {\centering\oig[{#1}]{#2}\par}% 193 | }% 194 | }% 195 | } 196 | 197 | % I think I've moved to xelatex now. Here's some stuff for that. 198 | % -------------------------------------------------------------- 199 | % I could customize/generalize this more but the truth is it works for my circumstances. 200 | 201 | \ifxetex 202 | \setbeamerfont{title}{family=\fontspec{Titillium Web}} 203 | \setbeamerfont{frametitle}{family=\fontspec{Titillium Web}} 204 | \usepackage[font=small,skip=0pt]{caption} 205 | \else 206 | \fi 207 | 208 | % Okay, and begin the actual document... 209 | 210 | \begin{document} 211 | \frame{\titlepage} 212 | 213 | \hypertarget{pop-songs-and-political-science}{% 214 | \section{Pop Songs and Political 215 | Science}\label{pop-songs-and-political-science}} 216 | 217 | \begin{frame}{Sheena Easton and Game Theory} 218 | \protect\hypertarget{sheena-easton-and-game-theory}{} 219 | 220 | Sheena Easton describes the following scenario for her baby: 221 | 222 | \begin{enumerate} 223 | \tightlist 224 | \item 225 | Takes the morning train 226 | \item 227 | Works from nine 'til five 228 | \item 229 | Takes another train home again 230 | \item 231 | Finds Sheena Easton waiting for him 232 | \end{enumerate} 233 | 234 | \end{frame} 235 | 236 | \begin{frame}{A Total Conflict Game Between Sheena Easton and Her Baby} 237 | \protect\hypertarget{a-total-conflict-game-between-sheena-easton-and-her-baby}{} 238 | 239 | \begin{longtable}[]{@{}lll@{}} 240 | \toprule 241 | & Sheena Easton Stays Home & Sheena Easton Goes to Baby's 242 | Work\tabularnewline 243 | \midrule 244 | \endhead 245 | \textbf{Baby Home Again} & -100, \textbf{100} & \textbf{100}, 246 | 0\tabularnewline 247 | \textbf{Baby Stays at Work} & \textbf{50}, 0 & -100, 248 | \textbf{100}\tabularnewline 249 | \bottomrule 250 | \end{longtable} 251 | 252 | Sheena Easton and her baby are playing a \textbf{zero-sum (total 253 | conflict) game}. 254 | 255 | \begin{itemize} 256 | \tightlist 257 | \item 258 | Akin to Holmes-Moriarty game (see: von Neumann and Morgenstern) 259 | \item 260 | Solution: \textbf{mixed strategy} 261 | \end{itemize} 262 | 263 | \end{frame} 264 | 265 | \begin{frame}{Rick Astley's Re-election Platform} 266 | \protect\hypertarget{rick-astleys-re-election-platform}{} 267 | 268 | Rick Astley's campaign promises: 269 | 270 | \begin{itemize} 271 | \tightlist 272 | \item 273 | Never gonna give you up. 274 | \item 275 | Never gonna let you down. 276 | \item 277 | Never gonna run around and desert you. 278 | \item 279 | Never gonna make you cry. 280 | \item 281 | Never gonna say goodbye. 282 | \item 283 | Never gonna tell a lie and hurt you. 284 | \end{itemize} 285 | 286 | Are these promises (if credible) sufficient to secure re-election? 287 | 288 | \end{frame} 289 | 290 | \begin{frame}{} 291 | \protect\hypertarget{section}{} 292 | 293 | \includegraphics{figs/rick-astley-never-gonna-give-you-up-median-voter-theorem.pdf} 294 | 295 | \end{frame} 296 | 297 | \begin{frame}{Rick Astley and Median Voter Theorem} 298 | \protect\hypertarget{rick-astley-and-median-voter-theorem}{} 299 | 300 | Whereas these pledges conform to the preferences of the \textbf{median 301 | voter}, we expect Congressman Astley to secure re-election. 302 | 303 | \end{frame} 304 | 305 | \begin{frame}{Caribbean Queen and Operation Urgent Fury} 306 | \protect\hypertarget{caribbean-queen-and-operation-urgent-fury}{} 307 | 308 | Billy Ocean released ``Caribbean Queen'' in 1984. 309 | 310 | \begin{itemize} 311 | \tightlist 312 | \item 313 | Emphasized sharing the same dream 314 | \item 315 | Hearts beating as one 316 | \end{itemize} 317 | 318 | ``Caribbean Queen'' is about the poor execution of Operation Urgent 319 | Fury. 320 | 321 | \begin{itemize} 322 | \tightlist 323 | \item 324 | Echoed JCS chairman David Jones' frustrations with military 325 | establishment. 326 | \end{itemize} 327 | 328 | Billy Ocean is advocating for what became the Goldwater-Nichols Act. 329 | 330 | \begin{itemize} 331 | \tightlist 332 | \item 333 | Wanted to take advantage of \textbf{economies of scale}, resolve 334 | \textbf{coordination problems} in U.S. military. 335 | \end{itemize} 336 | 337 | \end{frame} 338 | 339 | \begin{frame}{The Good Day Hypothesis} 340 | \protect\hypertarget{the-good-day-hypothesis}{} 341 | 342 | We know the following about Ice Cube's day. 343 | 344 | \begin{enumerate} 345 | \tightlist 346 | \item 347 | The Lakers beat the Supersonics. 348 | \item 349 | No helicopter looked for a murder. 350 | \item 351 | Consumed Fatburger at 2 a.m. 352 | \item 353 | Goodyear blimp: ``Ice Cube's a pimp.'' 354 | \end{enumerate} 355 | 356 | \end{frame} 357 | 358 | \begin{frame}{The Good Day Hypothesis} 359 | \protect\hypertarget{the-good-day-hypothesis-1}{} 360 | 361 | This leads to two different hypotheses: 362 | 363 | \begin{itemize} 364 | \tightlist 365 | \item 366 | \(H_0\): Ice Cube's day is statistically indistinguishable from a 367 | typical day. 368 | \item 369 | \(H_1\): Ice Cube is having a good (i.e.~greater than average) day. 370 | \end{itemize} 371 | 372 | These hypotheses are tested using archival data of Ice Cube's life. 373 | 374 | \end{frame} 375 | 376 | \begin{frame}{} 377 | \protect\hypertarget{section-1}{} 378 | 379 | \includegraphics{figs/good-day-hypothesis.pdf} 380 | 381 | \end{frame} 382 | 383 | 384 | \section[]{} 385 | \frame{\small \frametitle{Table of Contents} 386 | \tableofcontents} 387 | \end{document} 388 | -------------------------------------------------------------------------------- /cover-letter-example/john-hancock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/cover-letter-example/john-hancock.png -------------------------------------------------------------------------------- /cover-letter-example/svm-rmarkdown-cover-letter-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: 3 | pdf_document: 4 | keep_tex: TRUE 5 | latex_engine: xelatex 6 | template: ../svm-latex-cover-letter.tex 7 | geometry: margin=1in 8 | header-includes: 9 | - \linespread{1.05} 10 | 11 | author: Steven V. Miller 12 | address: | 13 | | 698 Candlewood Lane 14 | | Cabot Cove, ME USA 15 | email: "svmille@clemson.edu" 16 | url: svmiller.com 17 | phone: +1 555 867 5309 18 | fontsize: 11pt 19 | mainfont: cochineal 20 | monofont: Fira Code 21 | 22 | fontawesome: TRUE 23 | date: "`r format(Sys.time(), '%d %B %Y')`" 24 | greetings: "Dear Sir or Madam:" 25 | --- 26 | 27 | ```{r setup, include=F} 28 | 29 | 30 | place <- "ACME Corp." 31 | jobtitle <- "data scientist and haberdasher" 32 | 33 | 34 | ``` 35 | 36 | I write to apply for your recently advertised opening of `r jobtitle` at `r place`. I think I would be awesome there if you gave me money to do stuff for you. Please give me money to do stuff for you. 37 | 38 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac ipsum vel lacus eleifend ultrices. Donec metus lectus, pulvinar faucibus pretium id, sollicitudin vel purus. Nulla et metus eu quam tincidunt interdum. Phasellus mi urna, pellentesque et auctor nec, pharetra ultrices ex. Curabitur pretium velit porttitor risus efficitur condimentum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras et semper elit. Ut interdum semper venenatis. Nunc vitae massa ut ipsum laoreet posuere. Nulla non libero sed risus finibus mollis a at tellus. Suspendisse egestas sodales lorem. Vivamus eu massa quis lacus blandit mattis. Proin consectetur nunc at elit egestas scelerisque. Morbi vitae metus metus. 39 | 40 | Donec mi felis, placerat vitae metus eu, lobortis suscipit quam. Vivamus finibus aliquam tempus. Nulla interdum interdum risus ut rhoncus. Nulla interdum ligula ac ligula porta convallis. Duis rutrum ante quis dolor dignissim maximus. Phasellus at vulputate tortor, vitae laoreet felis. Pellentesque sed orci vulputate, vestibulum magna et, tincidunt justo. Sed elementum libero quis sapien vestibulum, sit amet consectetur est porttitor. Etiam in turpis in erat vehicula sollicitudin id eget libero. Suspendisse potenti. Phasellus in felis nibh. Proin laoreet laoreet arcu accumsan finibus. 41 | 42 | Morbi auctor pulvinar metus et facilisis. Cras eget mollis lorem. In hac habitasse platea dictumst. Fusce facilisis nec ligula in egestas. Maecenas turpis tortor, accumsan eget lacus facilisis, interdum egestas nibh. In efficitur dictum accumsan. Etiam a porta ante. Ut dui nibh, vestibulum in aliquet et, mollis nec enim. 43 | 44 | Best regards, 45 | 46 | ```{r eval=T, echo=FALSE, out.width='30%'} 47 | knitr::include_graphics('john-hancock.png', error=FALSE) 48 | ``` 49 | 50 | Firstname Lastname -------------------------------------------------------------------------------- /cover-letter-example/svm-rmarkdown-cover-letter-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/cover-letter-example/svm-rmarkdown-cover-letter-example.pdf -------------------------------------------------------------------------------- /cover-letter-example/svm-rmarkdown-cover-letter-example.tex: -------------------------------------------------------------------------------- 1 | % Options for packages loaded elsewhere 2 | \PassOptionsToPackage{unicode}{hyperref} 3 | \PassOptionsToPackage{hyphens}{url} 4 | % 5 | \documentclass[ 6 | 11pt, 7 | ]{article} 8 | \usepackage{lmodern} 9 | \usepackage{amssymb,amsmath} 10 | \usepackage{ifxetex,ifluatex} 11 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 12 | \usepackage[T1]{fontenc} 13 | \usepackage[utf8]{inputenc} 14 | \usepackage{textcomp} % provide euro and other symbols 15 | \else % if luatex or xetex 16 | \usepackage{unicode-math} 17 | \defaultfontfeatures{Scale=MatchLowercase} 18 | \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} 19 | \setmainfont[]{cochineal} 20 | \setmonofont[]{Fira Code} 21 | \fi 22 | % Use upquote if available, for straight quotes in verbatim environments 23 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 24 | \IfFileExists{microtype.sty}{% use microtype if available 25 | \usepackage[]{microtype} 26 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 27 | }{} 28 | \makeatletter 29 | \@ifundefined{KOMAClassName}{% if non-KOMA class 30 | \IfFileExists{parskip.sty}{% 31 | \usepackage{parskip} 32 | }{% else 33 | \setlength{\parindent}{0pt} 34 | \setlength{\parskip}{6pt plus 2pt minus 1pt} 35 | } 36 | }{% if KOMA class 37 | \KOMAoptions{parskip=half}} 38 | \makeatother 39 | \usepackage{xcolor} 40 | \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available 41 | \urlstyle{same} % disable monospaced font for URLs 42 | \usepackage[margin=1in]{geometry} 43 | \setlength{\emergencystretch}{3em} % prevent overfull lines 44 | \providecommand{\tightlist}{% 45 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 46 | \setcounter{secnumdepth}{-\maxdimen} % remove section numbering 47 | 48 | \ifluatex 49 | \usepackage{selnolig} % disable illegal ligatures 50 | \fi 51 | 52 | \author{Steven V. Miller} 53 | \date{26 October 2020} 54 | 55 | % Jesus, okay, everything above this comment is default Pandoc LaTeX template. ----- 56 | % ---------------------------------------------------------------------------------- 57 | % I think I had assumed beamer and LaTex were somehow different templates. 58 | 59 | 60 | \usepackage{kantlipsum} 61 | 62 | \usepackage{abstract} 63 | \renewcommand{\abstractname}{} % clear the title 64 | \renewcommand{\absnamepos}{empty} % originally center 65 | 66 | \renewenvironment{abstract} 67 | {{% 68 | \setlength{\leftmargin}{0mm} 69 | \setlength{\rightmargin}{\leftmargin}% 70 | }% 71 | \relax} 72 | {\endlist} 73 | 74 | \makeatletter 75 | \def\@maketitle{% 76 | \newpage 77 | % \null 78 | % \vskip 2em% 79 | % \begin{center}% 80 | \let \footnote \thanks 81 | {\fontsize{18}{20}\selectfont\raggedright \setlength{\parindent}{0pt} \@title \par} 82 | } 83 | %\fi 84 | \makeatother 85 | 86 | 87 | 88 | 89 | 90 | %\author{\Large \vspace{0.05in} \newline\normalsize\emph{} } 91 | 92 | 93 | \date{} 94 | 95 | \usepackage{titlesec} 96 | 97 | % 98 | \titleformat*{\section}{\large\bfseries} 99 | \titleformat*{\subsection}{\normalsize\itshape} % \small\uppercase 100 | \titleformat*{\subsubsection}{\normalsize\itshape} 101 | \titleformat*{\paragraph}{\normalsize\itshape} 102 | \titleformat*{\subparagraph}{\normalsize\itshape} 103 | 104 | % add some other packages ---------- 105 | 106 | % \usepackage{multicol} 107 | % This should regulate where figures float 108 | % See: https://tex.stackexchange.com/questions/2275/keeping-tables-figures-close-to-where-they-are-mentioned 109 | \usepackage[section]{placeins} 110 | 111 | 112 | 113 | \makeatletter 114 | \@ifpackageloaded{hyperref}{}{% 115 | \ifxetex 116 | \PassOptionsToPackage{hyphens}{url}\usepackage[setpagesize=false, % page size defined by xetex 117 | unicode=false, % unicode breaks when used with xetex 118 | xetex]{hyperref} 119 | \else 120 | \PassOptionsToPackage{hyphens}{url}\usepackage[draft,unicode=true]{hyperref} 121 | \fi 122 | } 123 | 124 | \@ifpackageloaded{color}{ 125 | \PassOptionsToPackage{usenames,dvipsnames}{color} 126 | }{% 127 | \usepackage[usenames,dvipsnames]{color} 128 | } 129 | \makeatother 130 | \hypersetup{breaklinks=true, 131 | bookmarks=true, 132 | pdfauthor={ ()}, 133 | pdfkeywords = {}, 134 | pdftitle={}, 135 | colorlinks=true, 136 | citecolor=blue, 137 | urlcolor=blue, 138 | linkcolor=magenta, 139 | pdfborder={0 0 0}} 140 | \urlstyle{same} % don't use monospace font for urls 141 | 142 | % Add an option for endnotes. ----- 143 | 144 | 145 | 146 | % This will better treat References as a section when using natbib 147 | % https://tex.stackexchange.com/questions/49962/bibliography-title-fontsize-problem-with-bibtex-and-the-natbib-package 148 | 149 | % set default figure placement to htbp 150 | \makeatletter 151 | \def\fps@figure{htbp} 152 | \makeatother 153 | 154 | 155 | 156 | \linespread{1.05} 157 | 158 | \newtheorem{hypothesis}{Hypothesis} 159 | 160 | \usepackage{fontawesome} 161 | 162 | \newcommand{\blankline}{\quad\pagebreak[2]} 163 | \usepackage{graphicx} 164 | 165 | \begin{document} 166 | 167 | 168 | 169 | \hfill 170 | \begin{minipage}[t]{1\textwidth} 171 | \raggedleft% 172 | {\bfseries Steven V. Miller }\\[.35ex] 173 | \emph{\small 698 Candlewood Lane\\ 174 | Cabot Cove, ME USA} \\[.35ex] 175 | \faPhone \hspace{1 mm} \small{+1 555 867 5309} \\ 176 | \faEnvelopeO \hspace{1 mm} \small{\tt \href{mailto:svmille@clemson.edu}{\nolinkurl{svmille@clemson.edu}}} \\ 177 | \faGlobe \hspace{1 mm} \small{\href{http://svmiller.com}{\tt svmiller.com}}\\ 178 | \hspace{1cm} \\ 179 | 26 October 2020 \\ 180 | \end{minipage} 181 | 182 | % \vspace*{1em} 183 | 184 | \vspace*{1em} 185 | 186 | Dear Sir or Madam: 187 | 188 | \vspace*{1em} 189 | 190 | 191 | % 26 October 2020 192 | % 193 | % \vspace*{1em} 194 | % 195 | 196 | % % \setlength{\parindent}{16pt} 197 | % \setlength{\parskip}{0pt} 198 | % 199 | I write to apply for your recently advertised opening of data scientist 200 | and haberdasher at ACME Corp.. I think I would be awesome there if you 201 | gave me money to do stuff for you. Please give me money to do stuff for 202 | you. 203 | 204 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac 205 | ipsum vel lacus eleifend ultrices. Donec metus lectus, pulvinar faucibus 206 | pretium id, sollicitudin vel purus. Nulla et metus eu quam tincidunt 207 | interdum. Phasellus mi urna, pellentesque et auctor nec, pharetra 208 | ultrices ex. Curabitur pretium velit porttitor risus efficitur 209 | condimentum. Cum sociis natoque penatibus et magnis dis parturient 210 | montes, nascetur ridiculus mus. Cras et semper elit. Ut interdum semper 211 | venenatis. Nunc vitae massa ut ipsum laoreet posuere. Nulla non libero 212 | sed risus finibus mollis a at tellus. Suspendisse egestas sodales lorem. 213 | Vivamus eu massa quis lacus blandit mattis. Proin consectetur nunc at 214 | elit egestas scelerisque. Morbi vitae metus metus. 215 | 216 | Donec mi felis, placerat vitae metus eu, lobortis suscipit quam. Vivamus 217 | finibus aliquam tempus. Nulla interdum interdum risus ut rhoncus. Nulla 218 | interdum ligula ac ligula porta convallis. Duis rutrum ante quis dolor 219 | dignissim maximus. Phasellus at vulputate tortor, vitae laoreet felis. 220 | Pellentesque sed orci vulputate, vestibulum magna et, tincidunt justo. 221 | Sed elementum libero quis sapien vestibulum, sit amet consectetur est 222 | porttitor. Etiam in turpis in erat vehicula sollicitudin id eget libero. 223 | Suspendisse potenti. Phasellus in felis nibh. Proin laoreet laoreet arcu 224 | accumsan finibus. 225 | 226 | Morbi auctor pulvinar metus et facilisis. Cras eget mollis lorem. In hac 227 | habitasse platea dictumst. Fusce facilisis nec ligula in egestas. 228 | Maecenas turpis tortor, accumsan eget lacus facilisis, interdum egestas 229 | nibh. In efficitur dictum accumsan. Etiam a porta ante. Ut dui nibh, 230 | vestibulum in aliquet et, mollis nec enim. 231 | 232 | Best regards, 233 | 234 | \includegraphics[width=0.3\linewidth]{john-hancock} 235 | 236 | Firstname Lastname 237 | 238 | \end{document} 239 | 240 | -------------------------------------------------------------------------------- /cv-example/svm-rmarkdown-cv.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: 3 | pdf_document: 4 | latex_engine: pdflatex 5 | template: ../svm-latex-cv.tex 6 | geometry: margin=1in 7 | 8 | title: "CV" 9 | author: William Sealy Gosset 10 | 11 | jobtitle: "Chief Brewer, Arthur Guinness & Son" 12 | address: "Guinness Brewery · Park Royal · London NW10 7RR, UK" 13 | fontawesome: yes 14 | email: guinness@consumer-care.net 15 | # github: svmiller 16 | # twitter: stevenvmiller 17 | #osf: "Enter 5 digit osf string here" 18 | phone: "+353 1 408 4800" 19 | web: guinness.com 20 | updated: no 21 | 22 | keywords: R Markdown, academic CV, template 23 | 24 | fontfamily: mathpazo 25 | fontfamilyoptions: sc, osf 26 | fontsize: 11pt 27 | linkcolor: blue 28 | urlcolor: blue 29 | --- 30 | 31 | # Employment 32 | 33 | *Arthur Guinness & Son* 34 | 35 | Chief Brewer (Park Royal) \hfill 1935-1937 36 | 37 | Researcher (Dublin) \hfill 1899-1935 38 | 39 | # Education 40 | 41 | *New College, Oxford University*, B.A. Chemistry \hfill 1899 42 | 43 | 44 | # Publications 45 | 46 | ## Books 47 | 48 | Pearson, E.S. and John Wishart (eds.). 1943. *"Student's" Collected Papers* London: Biometrika Office. 49 | 50 | ## Journal Articles 51 | 52 | Student. 1938. "Comparison between Balanced and Random Arrangements on Field Plots." *Biometrika* 29(3-4): 363--378. 53 | 54 | Student. 1936. "Co-operation in Large Scale Experiments." *Supplement to Journal of the Royal Statistical Society* 3(2): 115--136. 55 | 56 | Student. 1931. "On the *z* Test." *Biometrika* 23(3-4): 407-408. 57 | 58 | Student. 1931. "The Lanarkshire Milk Experiment." *Biometrika* 23(3-4): 398--406. 59 | 60 | Student. 1929. "Statistics in Biological Research." *Nature* 124: 93 61 | 62 | Student. 1927. "Errors of Routine Analysis." *Biometrika* 19(1-2): 151--164. 63 | 64 | Student. 1926. "Mathematics and Agronomy." *Journal of the American Society of Agronomy* 18. 65 | 66 | Student. 1925. "New Tables for Testing the Significance of Observations." *Metron* 5(3): 105--108. 67 | 68 | Student. 1923. "On Testing Varieties of Cereals." *Biometrika* 15(3-4): 271--293. 69 | 70 | Student. 1921. "An Experimental Determination of the Probable Error of Dr. Spearman's Correlation Co-efficient" *Biometrika* 13(2-3): 263--282. 71 | 72 | Student. 1917. "Tables for Estimating the Probability That the Given Mean of a Unique Sample of Observations Lies between $-\infty$ and Any Given Distance of the Mean of the Population from Which the Sample Is Drawn." *Biometrika* 11(4): 414--417. 73 | 74 | Student. 1909. "The Distribution of the Means of Samples Which Are Not Drawn at Random." *Biometrika* 7(1-2): 210--214. 75 | 76 | Student. 1908. "Probable Error of a Correlation Coefficient." *Biometrika* 6(2-3): 302--310. 77 | 78 | Student. 1908. "The Probable Error of a Mean." *Biometrika* 6(1): 1--25. 79 | 80 | Student. 1907. "On the Error of Counting with a Haemacytometer." *Biometrika* 5(3): 351--360. 81 | 82 | ## Other Publications 83 | 84 | Student. 1905. "The Pearson Co-efficient of Correlation." Supplement to Report of 1904, Arthur Guinness Son & Company. 85 | 86 | Student. 1904. "The Application of the 'Law of Error' to the Work of the Brewery." Report, Arthur Guinness Son & Company. 87 | 88 | # References 89 | 90 | Available upon request, though likely would include Karl Pearson and Ronald A. Fisher. Please send corrections, feedback, or details of missed publications (of which there are probably a few) to svmille@clemson.edu. -------------------------------------------------------------------------------- /cv-example/svm-rmarkdown-cv.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/cv-example/svm-rmarkdown-cv.pdf -------------------------------------------------------------------------------- /ioslides-example/svm-rmarkdown-ioslides-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: An Example R Markdown Document 3 | subtitle: (A Subtitle Would Go Here if This Were a Class) 4 | author: Steven V. Miller 5 | institute: Department of Political Science 6 | titlegraphic: /Dropbox/teaching/clemson-academic.png 7 | fontsize: 10pt 8 | output: 9 | ioslides_presentation: 10 | smaller: true 11 | logo: ~/Dropbox/teaching/clemson-paw-transparent.png 12 | css: ../svm-ioslides-css.css 13 | --- 14 | 15 | 16 | 17 | 18 | # Pop Songs and Political Science 19 | 20 | ## Sheena Easton and Game Theory 21 | 22 | Sheena Easton describes the following scenario for her baby: 23 | 24 | 1. Takes the morning train 25 | 2. Works from nine 'til five 26 | 3. Takes another train home again 27 | 4. Finds Sheena Easton waiting for him 28 | 29 | Sheena Easton and her baby are playing a **zero-sum (total conflict) game**. 30 | 31 | - Akin to Holmes-Moriarty game (see: von Neumann and Morgenstern) 32 | - Solution: **mixed strategy** 33 | 34 | ## Rick Astley's Re-election Platform 35 | 36 | Rick Astley's campaign promises: 37 | 38 | - Never gonna give you up. 39 | - Never gonna let you down. 40 | - Never gonna run around and desert you. 41 | - Never gonna make you cry. 42 | - Never gonna say goodbye. 43 | - Never gonna tell a lie and hurt you. 44 | 45 | Whereas these pledges conform to the preferences of the **median voter**, we expect Congressman Astley to secure re-election. 46 | 47 | ## Caribbean Queen and Operation Urgent Fury 48 | 49 | Billy Ocean released "Caribbean Queen" in 1984. 50 | 51 | - Emphasized sharing the same dream 52 | - Hearts beating as one 53 | 54 | "Caribbean Queen" is about the poor execution of Operation Urgent Fury. 55 | 56 | - Coordination problems plagued its execution from the start. 57 | - Echoed JCS chairman David Jones' frustrations with military establishment. 58 | 59 | Billy Ocean is advocating for what became the Goldwater-Nichols Act. 60 | 61 | - Wanted to take advantage of **economies of scale**, resolve **coordination problems** in U.S. military. 62 | 63 | ## The Good Day Hypothesis 64 | 65 | We know the following about Ice Cube's day. 66 | 67 | 1. The Lakers beat the Supersonics. 68 | 2. No helicopter looked for a murder. 69 | 3. Consumed Fatburger at 2 a.m. 70 | 4. Goodyear blimp: "Ice Cube's a pimp." 71 | 72 | This leads to two different hypotheses: 73 | 74 | - $H_0$: Ice Cube's day is statistically indistinguishable from a typical day. 75 | - $H_1$: Ice Cube is having a good (i.e. greater than average) day. 76 | 77 | These hypotheses are tested using archival data of Ice Cube's life. 78 | 79 | # Example R code 80 | ## Example R stuff 81 | 82 | ```{r cars, echo = TRUE} 83 | summary(cars) 84 | ``` 85 | 86 | ## Slide with Plot 87 | 88 | ```{r pressure} 89 | plot(pressure) 90 | ``` 91 | 92 | ## ggplot code 93 | 94 | ```{r createdata, echo=TRUE, eval=FALSE} 95 | df <- data.frame(x = rnorm(1000)) 96 | x <- df$x 97 | base <- ggplot(df, aes(x)) + geom_density() + scale_x_continuous(limits = c(-5, 5)) 98 | base + stat_function(fun = dnorm, colour = "red") 99 | ``` 100 | 101 | 102 | ## Another Plot 103 | 104 | ```{r plotit, echo=FALSE} 105 | library(ggplot2) 106 | df <- data.frame(x = rnorm(1000)) 107 | x <- df$x 108 | base <- ggplot(df, aes(x)) + geom_density() + scale_x_continuous(limits = c(-5, 5)) 109 | base + stat_function(fun = dnorm, colour = "red") 110 | ``` -------------------------------------------------------------------------------- /letter-example/clemson-letterhead.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/letter-example/clemson-letterhead.pdf -------------------------------------------------------------------------------- /letter-example/john-hancock-signature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/letter-example/john-hancock-signature.png -------------------------------------------------------------------------------- /letter-example/svm-letter-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: 3 | pdf_document: 4 | citation_package: natbib 5 | fig_caption: yes 6 | keep_tex: no 7 | latex_engine: pdflatex 8 | header-includes: 9 | - \linespread{1.05} 10 | - \newcommand{\blankline}{\quad\pagebreak[2]} 11 | - \usepackage{eso-pic} 12 | - \usepackage{graphicx} 13 | - \newcommand\BackgroundPic{\put(0,0){\parbox[b][\paperheight]{\paperwidth}{\vfill\centering \includegraphics[width=\paperwidth,height=\paperheight, keepaspectratio]{clemson-letterhead.pdf} \vfill }}} 14 | geometry: top=1.5in, left=1.75in, bottom=1in, right=1in 15 | # fontfamily: mathpazo 16 | fontfamilyoptions: sc, osf 17 | fontsize: 10pt 18 | urlcolor: blue 19 | --- 20 | 21 | \AddToShipoutPicture*{\BackgroundPic} 22 | \pagenumbering{gobble} 23 | 24 | `r format(Sys.time(), '%B %d, %Y')` 25 | 26 | \blankline 27 | 28 | Dear Professor So-and-so: 29 | 30 | \blankline 31 | 32 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque non pretium turpis. Etiam nibh nibh, pharetra vel semper quis, rhoncus non sapien. Nunc gravida, elit nec malesuada elementum, purus orci consequat lacus, et gravida felis felis eu lacus. Aenean ac dapibus purus, eget consequat eros. Sed eros odio, rutrum vitae posuere id, facilisis eu elit. Duis sed lorem et tortor consectetur mattis. In nisi arcu, aliquet a purus in, sodales pulvinar sapien. Nulla auctor, orci id sodales consequat, augue odio egestas libero, tincidunt fringilla eros neque at orci. Duis accumsan tellus sapien, id cursus odio egestas in. Integer in nibh suscipit mauris auctor gravida. 33 | 34 | Aenean dapibus placerat laoreet. Maecenas id arcu semper, feugiat urna eget, placerat ipsum. Maecenas porta sit amet ante vel finibus. Quisque porttitor urna gravida commodo ullamcorper. Nullam dapibus sodales lacus vitae facilisis. Praesent nec velit eget quam congue aliquet vitae sed urna. Duis venenatis ornare sagittis. Nullam dolor odio, porttitor pulvinar aliquet in, rutrum id dolor. Nullam vestibulum ligula diam, at fringilla tellus aliquet eu. In sit amet magna ac ante efficitur laoreet ut eget lectus. Aenean mauris quam, accumsan fermentum massa ac, blandit hendrerit arcu. Proin dignissim sapien quis maximus faucibus. Aenean lobortis tellus nec nulla fringilla, vitae sagittis felis pretium. Pellentesque nec luctus urna. 35 | 36 | Cras velit neque, pulvinar vitae eros eget, commodo dignissim mauris. Mauris ac facilisis tortor. Mauris imperdiet diam quis justo posuere convallis non et felis. Donec vel justo orci. In et volutpat est. Integer lacinia faucibus tellus, non vehicula enim faucibus eget. Pellentesque sagittis tortor sed dignissim congue. Cras id dui eu risus malesuada congue a ac augue. Vivamus dignissim lacinia neque, eu malesuada metus cursus nec. 37 | 38 | Quisque molestie venenatis libero quis sollicitudin. Morbi luctus id tortor non dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus sagittis est tortor, in facilisis ante scelerisque sed. Sed laoreet sapien eget dui congue placerat. In gravida magna tortor, ac aliquet urna mattis in. Suspendisse potenti. 39 | 40 | Cras elit dui, sagittis ac magna et, ullamcorper elementum justo. Proin nibh orci, condimentum at magna a, euismod pretium sem. Sed consequat posuere nisi, porttitor feugiat lectus vestibulum mattis. Duis sagittis elit nisi. In sagittis diam in metus pellentesque gravida. Praesent malesuada magna nec lacus facilisis, interdum eleifend sem porta. Mauris commodo in nibh quis mattis. Vestibulum erat odio, convallis non dui vitae, iaculis tempus arcu. Phasellus nec rhoncus tellus. Cras vel dolor sit amet sapien mollis feugiat sit amet vestibulum massa. Aenean eget molestie turpis. Phasellus convallis porta est, vitae condimentum urna tincidunt eget. 41 | 42 | Best regards, 43 | 44 | ```{r echo=FALSE, out.width='30%'} 45 | knitr::include_graphics('john-hancock-signature.png') 46 | ``` 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /letter-example/svm-letter-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/letter-example/svm-letter-example.pdf -------------------------------------------------------------------------------- /memo-example/svm-memo-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: 3 | pdf_document: 4 | citation_package: natbib 5 | keep_tex: false 6 | latex_engine: pdflatex 7 | template: ../svm-latex-memo.tex 8 | fontfamily: mathpazo 9 | fontsize: 11pt 10 | geometry: margin=1in 11 | header-includes: 12 | - \linespread{1.05} 13 | 14 | from: Taylor Swift 15 | to: Jake Gyllenhaal (reportedly) 16 | subject: We Are Never Ever Getting Back Together 17 | date: "`r format(as.Date('2012-08-13'), '%d %B, %Y')`" 18 | memorandum: true 19 | graphics: true 20 | width: .3 21 | logoposition: right 22 | logo: taylor-swift-logo.png 23 | --- 24 | 25 | I remember when we broke up the first time 26 | Saying, "This is it, I've had enough," 'cause like 27 | We hadn't seen each other in a month 28 | When you said you needed space. (What?) 29 | Then you come around again and say 30 | "Baby, I miss you and I swear I'm gonna change, trust me." 31 | Remember how that lasted for a day? 32 | I say, "I hate you," we break up, you call me, "I love you." 33 | 34 | Ooh, we called it off again last night 35 | But ooh, this time I'm telling you, I'm telling you 36 | 37 | We are never ever ever getting back together, 38 | We are never ever ever getting back together, 39 | You go talk to your friends, talk to my friends, talk to me 40 | But we are never ever ever ever getting back together 41 | 42 | Like, ever... 43 | 44 | I'm really gonna miss you picking fights 45 | And me falling for it screaming that I'm right 46 | And you would hide away and find your peace of mind 47 | With some indie record that's much cooler than mine 48 | 49 | Ooh, you called me up again tonight 50 | But ooh, this time I'm telling you, I'm telling you 51 | 52 | We are never, ever, ever getting back together 53 | We are never, ever, ever getting back together 54 | You go talk to your friends, talk to my friends, talk to me (talk to me) 55 | But we are never ever ever ever getting back together 56 | 57 | Ooh, yeah, ooh yeah, ooh yeah 58 | Oh oh oh 59 | 60 | I used to think that we were forever ever 61 | And I used to say, "Never say never..." 62 | Uggg... so he calls me up and he's like, "I still love you," 63 | And I'm like... "I just... I mean this is exhausting, you know, like, 64 | We are never getting back together. Like, ever" 65 | 66 | No! 67 | 68 | We are never ever ever getting back together 69 | We are never ever ever getting back together 70 | You go talk to your friends, talk to my friends, talk to me 71 | But we are never ever ever ever getting back together 72 | 73 | We, ooh, getting back together, ohhh, 74 | We, ooh, getting back together 75 | 76 | You go talk to your friends, talk to my friends, talk to me (talk to me) 77 | But we are never ever ever ever getting back together 78 | 79 | 80 | --- 81 | 82 | Songwriters: Taylor Swift / Max Martin / Johan Shellback 83 | We Are Never Ever Getting Back Together lyrics © Kobalt Music Publishing Ltd., Sony/ATV Music Publishing LLC 84 | Send hate mail to svmille@clemson.edu -------------------------------------------------------------------------------- /memo-example/svm-memo-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/memo-example/svm-memo-example.pdf -------------------------------------------------------------------------------- /memo-example/taylor-swift-logo-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/memo-example/taylor-swift-logo-red.png -------------------------------------------------------------------------------- /memo-example/taylor-swift-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/memo-example/taylor-swift-logo.png -------------------------------------------------------------------------------- /resume-example/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore examples 2 | examples 3 | -------------------------------------------------------------------------------- /resume-example/rick-martel-crop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/resume-example/rick-martel-crop.jpg -------------------------------------------------------------------------------- /resume-example/rick-martel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/resume-example/rick-martel.jpg -------------------------------------------------------------------------------- /resume-example/svm-resume-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Résumé" 3 | author: "Rick Martel" 4 | date: "8/31/2020" 5 | output: 6 | pdf_document: 7 | latex_engine: xelatex 8 | keep_tex: true 9 | dev: cairo_pdf 10 | template: ../svm-latex-resume.tex 11 | fontawesome: TRUE 12 | # How can we get a hold of you? 13 | email: FanServices@wwe.com 14 | phone: 833-225-5993 15 | location: "Cocoa Beach, FL (or Montréal, QC)" 16 | github: svmiller 17 | web: wwe.com/superstars/rick-martel 18 | twitter: "@rickmartelWWE" 19 | linkedin: "steven-miller-05b6851b3" 20 | geometry: "top=.5in, left =.5in, right=.5in, bottom=.75in" 21 | mainfont: cochineal 22 | sansfont: Fira Sans 23 | # monofont: Fira Code # I want to use this, but seems to choke on @ 24 | urlcolor: blue 25 | fontsize: 11pt 26 | 27 | includephoto: TRUE 28 | myphoto: rick-martel-crop.jpg 29 | # shift: "7in,-.25in" # this is default 30 | photobigness: 1.75cm 31 | # photozoom: ".2\textwidth" # this is default 32 | --- 33 | 34 | 35 | 36 | 37 | :::::: {.columns} 38 | ::: {.column width="60%" data-latex="{0.60\textwidth}"} 39 | 40 | # Professional Experience 41 | 42 | ## World Championship Wrestling 43 | 44 | - Successfully feuded with Booker T, elevating his singles career. 45 | - Defenestrated on national television by Perry Saturn. It was technically a glass door, but I love the term "defenestration" and I don't get to use it much so I'm rolling with that. 46 | - Career effectively ended at Superbrawl VIII (:() 47 | 48 | ## World Wrestling Federation 49 | 50 | - Runner-up in 1993 Intercontinental Championship Battle Royal (to Razor Ramon). 51 | - Wrestled Shawn Michaels to a countout draw in front of 80,000 fans in Wembley Stadium at Summerslam 1992. 52 | - Carried Tito Santana like dead weight to tag team prominence, before [tiring of him at Wrestlemania V](https://www.youtube.com/watch?v=VKnWAxg4R68). 53 | - Had two amazing entrance themes where somehow the least amazing of the two is [the one done by Robbie Dupree](https://www.youtube.com/watch?v=1bNr3144GDI). 54 | - Successfully cultivated "The Model" persona, relocating to Cocoa Beach for a gimmick that was years ahead of its time. 55 | - Launched successful line of cologne, *Arrogance*, and advertised it in [some amazing vignettes](https://www.youtube.com/watch?v=zm9AbH7CnBc). 56 | - [Temporarily blinded Jake "The Snake" Roberts](https://www.youtube.com/watch?v=cs7sxJboGWA), incapacitating him for the better part of 1990. 57 | - Successfully teamed with Tony Garea and briefly with Tom Zenk before Tom Zenk got apparently got weird about pay disparities. 58 | 59 | ## American Wrestling Association 60 | 61 | - [Beat Jumbo goddamn Tsuruta for AWA World Heavyweight Championship](https://www.youtube.com/watch?v=c3O_jGZd6EI). 62 | - I'm going to make that another entry because seriously how cool is Jumbo as a proverbial notch on the belt? Jumbo Tsuruta was *the* Japanese pro-wrestler of the 1980s. 63 | - Wrestled several matches with then-NWA World Champion Ric Flair. 64 | 65 | ## Other Territories 66 | 67 | - Emerged as top talent in the Pacific Northwest territory for the NWA. 68 | - Successfully teamed with Roddy Piper, winning a total of four tag team championships. 69 | - Feature attraction in multiple territories in Canada (e.g. Stampede Wrestling), Puerto Rico (World Wrestling Council), and the United States (e.g. Georgia Championship Wrestling) 70 | 71 | 72 | 73 | ::: 74 | ::: {.column width="2%" data-latex="{0.02\textwidth}"} 75 | \ 76 | 77 | ::: 78 | :::::: {.column width="38%" data-latex="{0.38\textwidth}"} 79 | 80 | # Education 81 | 82 | To continue the theme of this résumé, pro wrestlers of the time were typically not the kind that had university degrees, but you can insert your own here. 83 | 84 | ## Postgraduate Program 85 | 86 | Ph.D. in Boston Crab Studies 87 | 88 | ## Undergraduate Program 89 | 90 | B.A. in something or other. 91 | 92 | # Technical Skills (or Accomplishments) 93 | 94 | Put your technical skills here, or, if you're Rick Martel, list your pro-wrestling accolades. 95 | 96 | ## Championships 97 | 98 | - AWA World Heavyweight Championship (1984) 99 | - WCW World Television Championship (1998) 100 | - NWA Pacific Northwest Heavyweight Championship (1980) 101 | - NWA Pacific International Championship (1978) 102 | - WWF Tag Team Championship (2x with Tony Garea, 1x with dead-weight Tito Santana) 103 | - NWA Pacific Northwest Tag Team Championship (3x, with Roddy Piper in 1980) 104 | - WWC North American Tag Team Championship (with Pierre Martel) 105 | 106 | ## Awards and Distinctions 107 | 108 | - Pro Wrestling Hall of Fame (Class of 2015) 109 | - New England Pro Wrestling Hall of Fame (Class of 2011) 110 | - Ranked #48 of the 500 best singles wrestlers ("PWI Years", 2003) 111 | - Ranked #70 (with dead-weight Tito Santana) of the 100 best tag teams ("PWI Years", 2003) 112 | - World's Strongest Tag Determination League Fighting Spirit Award (1986) 113 | 114 | ::: 115 | :::::: 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /resume-example/svm-resume-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/resume-example/svm-resume-example.pdf -------------------------------------------------------------------------------- /resume-example/svm-resume-example.tex: -------------------------------------------------------------------------------- 1 | % Options for packages loaded elsewhere 2 | \PassOptionsToPackage{unicode}{hyperref} 3 | \PassOptionsToPackage{hyphens}{url} 4 | \PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} 5 | % 6 | \documentclass[ 7 | 11pt, 8 | ]{article} 9 | 10 | \usepackage{lmodern} 11 | \usepackage{amssymb,amsmath} 12 | \usepackage{ifxetex,ifluatex} 13 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 14 | \usepackage[T1]{fontenc} 15 | \usepackage[utf8]{inputenc} 16 | \usepackage{textcomp} % provide euro and other symbols 17 | \else % if luatex or xetex 18 | \usepackage{unicode-math} 19 | \defaultfontfeatures{Scale=MatchLowercase} 20 | \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} 21 | \setmainfont[]{cochineal} 22 | \setsansfont[]{Fira Sans} 23 | \fi 24 | 25 | % Use upquote if available, for straight quotes in verbatim environments 26 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 27 | \IfFileExists{microtype.sty}{% use microtype if available 28 | \usepackage[]{microtype} 29 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 30 | }{} 31 | \makeatletter 32 | \@ifundefined{KOMAClassName}{% if non-KOMA class 33 | \IfFileExists{parskip.sty}{% 34 | \usepackage{parskip} 35 | }{% else 36 | \setlength{\parindent}{0pt} 37 | \setlength{\parskip}{6pt plus 2pt minus 1pt}} 38 | }{% if KOMA class 39 | \KOMAoptions{parskip=half}} 40 | \makeatother 41 | \usepackage{xcolor} 42 | \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available 43 | \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} 44 | \hypersetup{ 45 | pdftitle={Résumé}, 46 | pdfauthor={Rick Martel}, 47 | colorlinks=true, 48 | linkcolor=Maroon, 49 | filecolor=Maroon, 50 | citecolor=Blue, 51 | urlcolor=blue, 52 | pdfcreator={LaTeX via pandoc}} 53 | \urlstyle{same} % disable monospaced font for URLs 54 | \usepackage[top=.5in, left =.5in, right=.5in, bottom=.75in]{geometry} 55 | \setlength{\emergencystretch}{3em} % prevent overfull lines 56 | \providecommand{\tightlist}{% 57 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 58 | \setcounter{secnumdepth}{-\maxdimen} % remove section numbering 59 | 60 | \title{Résumé} 61 | \usepackage{authblk} 62 | \author{Rick Martel} 63 | \date{8/31/2020} 64 | 65 | 66 | %% should be top-aligned in case of uneven vertical length) 67 | \newenvironment{columns}[1][]{}{} 68 | %% 69 | \newenvironment{column}[1]{\begin{minipage}[t]{#1}\ignorespaces}{% 70 | \end{minipage} 71 | \ifhmode\unskip\fi 72 | \aftergroup\useignorespacesandallpars} 73 | %% 74 | \def\useignorespacesandallpars#1\ignorespaces\fi{% 75 | #1\fi\ignorespacesandallpars} 76 | %% 77 | \makeatletter 78 | \def\ignorespacesandallpars{% 79 | \@ifnextchar\par 80 | {\expandafter\ignorespacesandallpars\@gobble}% 81 | {}% 82 | } 83 | \makeatother 84 | 85 | % Use fontawesome. Note: you'll need TeXLive 2015. Update. 86 | \usepackage{fontawesome} 87 | 88 | % Mess with sections 89 | \usepackage{titlesec} 90 | \usepackage{sectsty} 91 | % \sectionfont{\rmfamily\mdseries\large\bf\underline} 92 | \sectionfont{\normalfont\sffamily\large\bfseries\sectionrule{0pt}{0pt}{-4pt}{1pt}} 93 | \subsectionfont{\rmfamily\mdseries\normalsize\scshape} 94 | \titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{4pt plus 2pt minus 2pt} 95 | \titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{4pt plus 2pt minus 2pt} 96 | 97 | \usepackage{enumitem} 98 | \setlist[itemize]{leftmargin=*} 99 | 100 | \usepackage{graphicx} 101 | \usepackage{tikz} 102 | \usepackage{tikzpagenodes} 103 | \usetikzlibrary{calc} 104 | 105 | 106 | % Make AP style (kinda) dates for the updated/today field 107 | 108 | \usepackage{datetime} 109 | \newdateformat{apstylekinda}{% 110 | \shortmonthname[\THEMONTH]. \THEDAY, \THEYEAR} 111 | 112 | % Fancyhdr, as I tend to do with these personal documents. 113 | \usepackage{fancyhdr,lastpage} 114 | \pagestyle{fancy} 115 | \renewcommand{\headrulewidth}{0.0pt} 116 | \renewcommand{\footrulewidth}{0.0pt} 117 | \lhead{} 118 | \chead{} 119 | \rhead{} 120 | \lfoot{ 121 | \cfoot{\scriptsize Rick Martel - Résumé - \emph{Updated:} \apstylekinda\today }} 122 | \rfoot{\scriptsize \thepage/{\hypersetup{linkcolor=black}\pageref{LastPage}}} 123 | 124 | 125 | 126 | % Always load hyperref last. 127 | \usepackage{hyperref} 128 | \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref 129 | 130 | \hypersetup{unicode=true, 131 | pdftitle={Rick Martel (R\'{e}sum\'{e})}, 132 | pdfauthor={Rick Martel}, 133 | colorlinks=true, 134 | linkcolor=Maroon, 135 | citecolor=Blue, 136 | urlcolor=blue, 137 | breaklinks=true, bookmarks=true} 138 | 139 | \begin{document} 140 | % shift=(current page.north east) 141 | %\begin{wrapfigure}{r}{\textwidth} 142 | 143 | \begin{tikzpicture}[remember picture,overlay, shift={(7in,-0.25in)}] 144 | \clip (0,0) circle (1.75cm) node {\includegraphics[width=.2\textwidth]{rick-martel-crop.jpg}}; 145 | \end{tikzpicture} 146 | 147 | % includephoto 148 | %\end{wrapfigure} 149 | 150 | \flushleft{\huge \bfseries Rick Martel} 151 | 152 | \flushleft{\footnotesize 153 | 154 | \faEnvelopeO \hspace{1 mm} \href{mailto:}{\tt \href{mailto:FanServices@wwe.com}{\nolinkurl{FanServices@wwe.com}}} \hspace{1 mm} 155 | \faPhone \hspace{1 mm} 833-225-5993 \hspace{1 mm} 156 | \faMapMarker \hspace{1 mm} Cocoa Beach, FL (or Montréal, QC) \hspace{1 mm} 157 | } 158 | \vspace{-1em} 159 | \flushleft{\footnotesize 160 | \faGlobe \hspace{1 mm} \href{http://wwe.com/superstars/rick-martel}{\tt wwe.com/superstars/rick-martel} \hspace{1 mm} 161 | \faTwitter \hspace{1 mm} \href{http://twitter.com/@rickmartelWWE}{\tt @rickmartelWWE} \hspace{1 mm} 162 | \faLinkedin \hspace{1 mm} \href{https://www.linkedin.com/in/steven-miller-05b6851b3}{\tt steven-miller-05b6851b3} \hspace{1 mm} 163 | \faGithub \hspace{1 mm} \href{http://github.com/svmiller}{\tt svmiller} \hspace{1 mm} 164 | } 165 | 166 | \begin{columns}[T] 167 | \begin{column}{0.60\textwidth} 168 | 169 | \hypertarget{professional-experience}{% 170 | \section{Professional Experience}\label{professional-experience}} 171 | 172 | \hypertarget{world-championship-wrestling}{% 173 | \subsection{World Championship 174 | Wrestling}\label{world-championship-wrestling}} 175 | 176 | \begin{itemize} 177 | \tightlist 178 | \item 179 | Successfully feuded with Booker T, elevating his singles career. 180 | \item 181 | Defenestrated on national television by Perry Saturn. It was 182 | technically a glass door, but I love the term ``defenestration'' and I 183 | don't get to use it much so I'm rolling with that. 184 | \item 185 | Career effectively ended at Superbrawl VIII (:() 186 | \end{itemize} 187 | 188 | \hypertarget{world-wrestling-federation}{% 189 | \subsection{World Wrestling 190 | Federation}\label{world-wrestling-federation}} 191 | 192 | \begin{itemize} 193 | \tightlist 194 | \item 195 | Runner-up in 1993 Intercontinental Championship Battle Royal (to Razor 196 | Ramon). 197 | \item 198 | Wrestled Shawn Michaels to a countout draw in front of 80,000 fans in 199 | Wembley Stadium at Summerslam 1992. 200 | \item 201 | Carried Tito Santana like dead weight to tag team prominence, before 202 | \href{https://www.youtube.com/watch?v=VKnWAxg4R68}{tiring of him at 203 | Wrestlemania V}. 204 | \item 205 | Had two amazing entrance themes where somehow the least amazing of the 206 | two is \href{https://www.youtube.com/watch?v=1bNr3144GDI}{the one done 207 | by Robbie Dupree}. 208 | \item 209 | Successfully cultivated ``The Model'' persona, relocating to Cocoa 210 | Beach for a gimmick that was years ahead of its time. 211 | \item 212 | Launched successful line of cologne, \emph{Arrogance}, and advertised 213 | it in \href{https://www.youtube.com/watch?v=zm9AbH7CnBc}{some amazing 214 | vignettes}. 215 | \item 216 | \href{https://www.youtube.com/watch?v=cs7sxJboGWA}{Temporarily blinded 217 | Jake ``The Snake'' Roberts}, incapacitating him for the better part of 218 | 1990. 219 | \item 220 | Successfully teamed with Tony Garea and briefly with Tom Zenk before 221 | Tom Zenk got apparently got weird about pay disparities. 222 | \end{itemize} 223 | 224 | \hypertarget{american-wrestling-association}{% 225 | \subsection{American Wrestling 226 | Association}\label{american-wrestling-association}} 227 | 228 | \begin{itemize} 229 | \tightlist 230 | \item 231 | \href{https://www.youtube.com/watch?v=c3O_jGZd6EI}{Beat Jumbo goddamn 232 | Tsuruta for AWA World Heavyweight Championship}. 233 | \item 234 | I'm going to make that another entry because seriously how cool is 235 | Jumbo as a proverbial notch on the belt? Jumbo Tsuruta was \emph{the} 236 | Japanese pro-wrestler of the 1980s. 237 | \item 238 | Wrestled several matches with then-NWA World Champion Ric Flair. 239 | \end{itemize} 240 | 241 | \hypertarget{other-territories}{% 242 | \subsection{Other Territories}\label{other-territories}} 243 | 244 | \begin{itemize} 245 | \tightlist 246 | \item 247 | Emerged as top talent in the Pacific Northwest territory for the NWA. 248 | \item 249 | Successfully teamed with Roddy Piper, winning a total of four tag team 250 | championships. 251 | \item 252 | Feature attraction in multiple territories in Canada (e.g.~Stampede 253 | Wrestling), Puerto Rico (World Wrestling Council), and the United 254 | States (e.g.~Georgia Championship Wrestling) 255 | \end{itemize} 256 | 257 | \end{column} 258 | 259 | \begin{column}{0.02\textwidth} 260 | 261 | ~ 262 | 263 | \end{column} 264 | 265 | \begin{column}{0.38\textwidth} 266 | 267 | \hypertarget{education}{% 268 | \section{Education}\label{education}} 269 | 270 | To continue the theme of this résumé, pro wrestlers of the time were 271 | typically not the kind that had university degrees, but you can insert 272 | your own here. 273 | 274 | \hypertarget{postgraduate-program}{% 275 | \subsection{Postgraduate Program}\label{postgraduate-program}} 276 | 277 | Ph.D.~in Boston Crab Studies 278 | 279 | \hypertarget{undergraduate-program}{% 280 | \subsection{Undergraduate Program}\label{undergraduate-program}} 281 | 282 | B.A. in something or other. 283 | 284 | \hypertarget{technical-skills-or-accomplishments}{% 285 | \section{Technical Skills (or 286 | Accomplishments)}\label{technical-skills-or-accomplishments}} 287 | 288 | Put your technical skills here, or, if you're Rick Martel, list your 289 | pro-wrestling accolades. 290 | 291 | \hypertarget{championships}{% 292 | \subsection{Championships}\label{championships}} 293 | 294 | \begin{itemize} 295 | \tightlist 296 | \item 297 | AWA World Heavyweight Championship (1984) 298 | \item 299 | WCW World Television Championship (1998) 300 | \item 301 | NWA Pacific Northwest Heavyweight Championship (1980) 302 | \item 303 | NWA Pacific International Championship (1978) 304 | \item 305 | WWF Tag Team Championship (2x with Tony Garea, 1x with dead-weight 306 | Tito Santana) 307 | \item 308 | NWA Pacific Northwest Tag Team Championship (3x, with Roddy Piper in 309 | 1980) 310 | \item 311 | WWC North American Tag Team Championship (with Pierre Martel) 312 | \end{itemize} 313 | 314 | \hypertarget{awards-and-distinctions}{% 315 | \subsection{Awards and Distinctions}\label{awards-and-distinctions}} 316 | 317 | \begin{itemize} 318 | \tightlist 319 | \item 320 | Pro Wrestling Hall of Fame (Class of 2015) 321 | \item 322 | New England Pro Wrestling Hall of Fame (Class of 2011) 323 | \item 324 | Ranked \#48 of the 500 best singles wrestlers (``PWI Years'', 2003) 325 | \item 326 | Ranked \#70 (with dead-weight Tito Santana) of the 100 best tag teams 327 | (``PWI Years'', 2003) 328 | \item 329 | World's Strongest Tag Determination League Fighting Spirit Award 330 | (1986) 331 | \end{itemize} 332 | 333 | \end{column} 334 | \end{columns} 335 | 336 | \end{document} 337 | 338 | -------------------------------------------------------------------------------- /rmarkdown-reference.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/rmarkdown-reference.pdf -------------------------------------------------------------------------------- /statement-example/svm-rmarkdown-statement-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/statement-example/svm-rmarkdown-statement-example.pdf -------------------------------------------------------------------------------- /svm-ioslides-css.css: -------------------------------------------------------------------------------- 1 | slides > slide.backdrop { 2 | background: white; 3 | border-bottom: 0px; 4 | box-shadow: 0 0 0; 5 | } 6 | 7 | 8 | slides > slide { 9 | font-family: 'Open Sans', Helvetica, Arial, sans-serif; 10 | border-bottom: 3px solid #F66733; 11 | box-shadow: 0 3px 0 #522D80; 12 | 13 | } 14 | 15 | .title-slide hgroup h1 { 16 | color: #522D80; 17 | font-size: 48px; 18 | 19 | } 20 | 21 | .title-slide hgroup h2 { 22 | font-size: 28px; 23 | } 24 | 25 | 26 | h2 { 27 | 28 | color: #522D80; 29 | } 30 | 31 | slides > slide.dark { 32 | background: #522D80 !important; 33 | border-bottom: 0; 34 | box-shadow: 0 0 0; 35 | } 36 | 37 | .segue h2 { 38 | color: white; 39 | } 40 | 41 | slides > slide.title-slide { 42 | border-bottom: 0; 43 | box-shadow: 0 0 0; 44 | } 45 | 46 | ol, ul { 47 | 48 | padding-bottom: 10px; 49 | 50 | } 51 | 52 | slides > slide:not(.nobackground):before { 53 | font-size: 12pt; 54 | content: ""; 55 | position: absolute; 56 | bottom: 20px; 57 | left: 60px; 58 | background: no-repeat 0 50%; 59 | -webkit-background-size: 30px 30px; 60 | -moz-background-size: 30px 30px; 61 | -o-background-size: 30px 30px; 62 | background-size: 30px 30px; 63 | padding-left: 40px; 64 | height: 30px; 65 | line-height: 1.9; 66 | } 67 | -------------------------------------------------------------------------------- /svm-latex-anon-ms.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 | \usepackage{mathspec} 26 | \else 27 | \usepackage{fontspec} 28 | \fi 29 | \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} 30 | $for(fontfamilies)$ 31 | \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} 32 | $endfor$ 33 | $if(euro)$ 34 | \newcommand{\euro}{€} 35 | $endif$ 36 | $if(mainfont)$ 37 | \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} 38 | $endif$ 39 | $if(sansfont)$ 40 | \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} 41 | $endif$ 42 | $if(monofont)$ 43 | \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} 44 | $endif$ 45 | $if(mathfont)$ 46 | \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 47 | $endif$ 48 | $if(CJKmainfont)$ 49 | \usepackage{xeCJK} 50 | \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} 51 | $endif$ 52 | \fi 53 | % use upquote if available, for straight quotes in verbatim environments 54 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 55 | % use microtype if available 56 | \IfFileExists{microtype.sty}{% 57 | \usepackage{microtype} 58 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 59 | }{} 60 | $if(geometry)$ 61 | \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} 62 | $endif$ 63 | \usepackage[unicode=true]{hyperref} 64 | $if(colorlinks)$ 65 | \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref 66 | $endif$ 67 | \hypersetup{ 68 | $if(title-meta)$ 69 | pdftitle={$title-meta$}, 70 | $endif$ 71 | $if(author-meta)$ 72 | pdfauthor={Anonymous}, 73 | $endif$ 74 | $if(keywords)$ 75 | pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$}, 76 | $endif$ 77 | $if(colorlinks)$ 78 | colorlinks=true, 79 | linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, 80 | citecolor=$if(citecolor)$$citecolor$$else$blue$endif$, 81 | urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, 82 | $else$ 83 | pdfborder={0 0 0}, 84 | $endif$ 85 | breaklinks=true} 86 | \urlstyle{same} % don't use monospace font for urls 87 | $if(lang)$ 88 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 89 | \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} 90 | $if(babel-newcommands)$ 91 | $babel-newcommands$ 92 | $endif$ 93 | \else 94 | \usepackage{polyglossia} 95 | \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} 96 | $for(polyglossia-otherlangs)$ 97 | \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} 98 | $endfor$ 99 | \fi 100 | $endif$ 101 | $if(natbib)$ 102 | \usepackage{natbib} 103 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 104 | $endif$ 105 | $if(biblatex)$ 106 | \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} 107 | $for(bibliography)$ 108 | \addbibresource{$bibliography$} 109 | $endfor$ 110 | $endif$ 111 | $if(listings)$ 112 | \usepackage{listings} 113 | $endif$ 114 | $if(lhs)$ 115 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} 116 | $endif$ 117 | $if(highlighting-macros)$ 118 | $highlighting-macros$ 119 | $endif$ 120 | $if(verbatim-in-note)$ 121 | \usepackage{fancyvrb} 122 | \VerbatimFootnotes % allows verbatim text in footnotes 123 | $endif$ 124 | $if(tables)$ 125 | \usepackage{longtable,booktabs} 126 | % Fix footnotes in tables (requires footnote package) 127 | \IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long table}}{} 128 | $endif$ 129 | $if(graphics)$ 130 | \usepackage{graphicx,grffile} 131 | \makeatletter 132 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 133 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} 134 | \makeatother 135 | % Scale images if necessary, so that they will not overflow the page 136 | % margins by default, and it is still possible to overwrite the defaults 137 | % using explicit options in \includegraphics[width, height, ...]{} 138 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 139 | $endif$ 140 | $if(links-as-notes)$ 141 | % Make links footnotes instead of hotlinks: 142 | \renewcommand{\href}[2]{#2\footnote{\url{#1}}} 143 | $endif$ 144 | $if(strikeout)$ 145 | \usepackage[normalem]{ulem} 146 | % avoid problems with \sout in headers with hyperref: 147 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} 148 | $endif$ 149 | $if(indent)$ 150 | $else$ 151 | \IfFileExists{parskip.sty}{% 152 | \usepackage{parskip} 153 | }{% else 154 | \setlength{\parindent}{0pt} 155 | \setlength{\parskip}{6pt plus 2pt minus 1pt} 156 | } 157 | $endif$ 158 | \setlength{\emergencystretch}{3em} % prevent overfull lines 159 | \providecommand{\tightlist}{% 160 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 161 | $if(numbersections)$ 162 | \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} 163 | $else$ 164 | \setcounter{secnumdepth}{0} 165 | $endif$ 166 | $if(subparagraph)$ 167 | $else$ 168 | % Redefines (sub)paragraphs to behave more like sections 169 | \ifx\paragraph\undefined\else 170 | \let\oldparagraph\paragraph 171 | \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} 172 | \fi 173 | \ifx\subparagraph\undefined\else 174 | \let\oldsubparagraph\subparagraph 175 | \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} 176 | \fi 177 | $endif$ 178 | $if(dir)$ 179 | \ifxetex 180 | % load bidi as late as possible as it modifies e.g. graphicx 181 | $if(latex-dir-rtl)$ 182 | \usepackage[RTLdocument]{bidi} 183 | $else$ 184 | \usepackage{bidi} 185 | $endif$ 186 | \fi 187 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 188 | \TeXXeTstate=1 189 | \newcommand{\RL}[1]{\beginR #1\endR} 190 | \newcommand{\LR}[1]{\beginL #1\endL} 191 | \newenvironment{RTL}{\beginR}{\endR} 192 | \newenvironment{LTR}{\beginL}{\endL} 193 | \fi 194 | $endif$ 195 | 196 | % set default figure placement to htbp 197 | \makeatletter 198 | \def\fps@figure{htbp} 199 | \makeatother 200 | 201 | $for(header-includes)$ 202 | $header-includes$ 203 | $endfor$ 204 | 205 | 206 | % Stuff I added. 207 | % -------------- 208 | 209 | \usepackage{indentfirst} 210 | \usepackage[doublespacing]{setspace} 211 | \usepackage{fancyhdr} 212 | \pagestyle{fancy} 213 | \usepackage{layout} 214 | \lhead{\sc $if(runhead)$$runhead$$else$$title$$endif$} 215 | \chead{} 216 | \rhead{\thepage} 217 | \lfoot{} 218 | \cfoot{} 219 | \rfoot{} 220 | 221 | \renewcommand{\headrulewidth}{0.0pt} 222 | \renewcommand{\footrulewidth}{0.0pt} 223 | 224 | \usepackage{sectsty} 225 | \sectionfont{\centering} 226 | \subsectionfont{\centering} 227 | 228 | \newtheorem{hypothesis}{Hypothesis} 229 | 230 | % Begin document 231 | % -------------- 232 | 233 | \begin{document} 234 | 235 | \doublespacing 236 | 237 | $if(abstract)$ 238 | 239 | \begin{center}Abstract\end{center} 240 | 241 | \noindent $abstract$ 242 | 243 | $if(keywords)$\emph{Keywords:} $keywords$$endif$ 244 | 245 | $endif$ 246 | 247 | \newpage 248 | 249 | $for(include-before)$ 250 | $include-before$ 251 | 252 | $endfor$ 253 | $if(toc)$ 254 | { 255 | $if(colorlinks)$ 256 | \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} 257 | $endif$ 258 | \setcounter{tocdepth}{$toc-depth$} 259 | \tableofcontents 260 | } 261 | $endif$ 262 | $if(lot)$ 263 | \listoftables 264 | $endif$ 265 | $if(lof)$ 266 | \listoffigures 267 | $endif$ 268 | $body$ 269 | 270 | $if(natbib)$ 271 | $if(bibliography)$ 272 | $if(biblio-title)$ 273 | $if(book-class)$ 274 | \renewcommand\bibname{$biblio-title$} 275 | $else$ 276 | \renewcommand\refname{$biblio-title$} 277 | $endif$ 278 | $endif$ 279 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 280 | 281 | $endif$ 282 | $endif$ 283 | $if(biblatex)$ 284 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 285 | 286 | $endif$ 287 | $for(include-after)$ 288 | $include-after$ 289 | 290 | $endfor$ 291 | \end{document} 292 | 293 | -------------------------------------------------------------------------------- /svm-latex-beamer.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(handout)$handout,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$$if(make149)$,aspectratio=149$endif$]{$documentclass$} 2 | $if(theme)$ 3 | \usetheme{$theme$} 4 | $endif$ 5 | $if(colortheme)$ 6 | \usecolortheme{$colortheme$} 7 | $endif$ 8 | $if(fonttheme)$ 9 | \usefonttheme{$fonttheme$} 10 | $endif$ 11 | $if(mainfont)$ 12 | \usefonttheme{serif} % use mainfont rather than sansfont for slide text 13 | $endif$ 14 | $if(innertheme)$ 15 | \useinnertheme{$innertheme$} 16 | $endif$ 17 | $if(outertheme)$ 18 | \useoutertheme{$outertheme$} 19 | $endif$ 20 | \setbeamertemplate{caption}[numbered] 21 | \setbeamertemplate{caption label separator}{: } 22 | \setbeamercolor{caption name}{fg=normal text.fg} 23 | $if(fontfamily)$ 24 | \usepackage[$fontfamilyoptions$]{$fontfamily$} 25 | $else$ 26 | \usepackage{lmodern} 27 | $endif$ 28 | \usepackage{amssymb,amsmath} 29 | \usepackage{ifxetex,ifluatex} 30 | \usepackage{fixltx2e} % provides \textsubscript 31 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 32 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 33 | \usepackage[utf8]{inputenc} 34 | $if(euro)$ 35 | \usepackage{eurosym} 36 | $endif$ 37 | \else % if luatex or xelatex 38 | \ifxetex 39 | \usepackage{mathspec} 40 | \else 41 | \usepackage{fontspec} 42 | \fi 43 | \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} 44 | \newcommand{\euro}{€} 45 | $if(mainfont)$ 46 | \setmainfont[$mainfontoptions$]{$mainfont$} 47 | $endif$ 48 | $if(sansfont)$ 49 | \setsansfont[$sansfontoptions$]{$sansfont$} 50 | $endif$ 51 | $if(monofont)$ 52 | \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$monofontoptions$$endif$]{$monofont$} 53 | $endif$ 54 | $if(mathfont)$ 55 | \setmathfont(Digits,Latin,Greek)[$mathfontoptions$]{$mathfont$} 56 | $endif$ 57 | $if(CJKmainfont)$ 58 | \usepackage{xeCJK} 59 | \setCJKmainfont[$CJKoptions$]{$CJKmainfont$} 60 | $endif$ 61 | \fi 62 | % use upquote if available, for straight quotes in verbatim environments 63 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 64 | % use microtype if available 65 | \IfFileExists{microtype.sty}{% 66 | \usepackage{microtype} 67 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 68 | }{} 69 | $if(lang)$ 70 | \ifxetex 71 | \usepackage{polyglossia} 72 | \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} 73 | $for(polyglossia-otherlangs)$ 74 | \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} 75 | $endfor$ 76 | \else 77 | \usepackage[shorthands=off,$babel-lang$]{babel} 78 | \fi 79 | $endif$ 80 | $if(natbib)$ 81 | \usepackage{natbib} 82 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 83 | $endif$ 84 | $if(biblatex)$ 85 | \usepackage{biblatex} 86 | $for(bibliography)$ 87 | \addbibresource{$bibliography$} 88 | $endfor$ 89 | $endif$ 90 | $if(listings)$ 91 | \usepackage{listings} 92 | $endif$ 93 | $if(lhs)$ 94 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} 95 | $endif$ 96 | $if(highlighting-macros)$ 97 | $highlighting-macros$ 98 | $endif$ 99 | $if(verbatim-in-note)$ 100 | \usepackage{fancyvrb} 101 | \VerbatimFootnotes % allows verbatim text in footnotes 102 | $endif$ 103 | $if(tables)$ 104 | \usepackage{longtable,booktabs} 105 | \usepackage{caption} 106 | % These lines are needed to make table captions work with longtable: 107 | \makeatletter 108 | \def\fnum@table{\tablename~\thetable} 109 | \makeatother 110 | $endif$ 111 | $if(graphics)$ 112 | \usepackage{graphicx,grffile} 113 | \makeatletter 114 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 115 | \def\maxheight{\ifdim\Gin@nat@height>\textheight0.8\textheight\else\Gin@nat@height\fi} 116 | \makeatother 117 | % Scale images if necessary, so that they will not overflow the page 118 | % margins by default, and it is still possible to overwrite the defaults 119 | % using explicit options in \includegraphics[width, height, ...]{} 120 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 121 | $endif$ 122 | 123 | % Comment these out if you don't want a slide with just the 124 | % part/section/subsection/subsubsection title: 125 | \AtBeginPart{ 126 | \let\insertpartnumber\relax 127 | \let\partname\relax 128 | \frame{\partpage} 129 | } 130 | \AtBeginSection{ 131 | \let\insertsectionnumber\relax 132 | \let\sectionname\relax 133 | \frame{\sectionpage} 134 | } 135 | \AtBeginSubsection{ 136 | \let\insertsubsectionnumber\relax 137 | \let\subsectionname\relax 138 | \frame{\subsectionpage} 139 | } 140 | 141 | $if(links-as-notes)$ 142 | % Make links footnotes instead of hotlinks: 143 | \renewcommand{\href}[2]{#2\footnote{\url{#1}}} 144 | $endif$ 145 | $if(strikeout)$ 146 | \usepackage[normalem]{ulem} 147 | % avoid problems with \sout in headers with hyperref: 148 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} 149 | $endif$ 150 | \setlength{\emergencystretch}{3em} % prevent overfull lines 151 | \providecommand{\tightlist}{% 152 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 153 | $if(numbersections)$ 154 | \setcounter{secnumdepth}{5} 155 | $else$ 156 | \setcounter{secnumdepth}{0} 157 | $endif$ 158 | $if(dir)$ 159 | \ifxetex 160 | % load bidi as late as possible as it modifies e.g. graphicx 161 | $if(latex-dir-rtl)$ 162 | \usepackage[RTLdocument]{bidi} 163 | $else$ 164 | \usepackage{bidi} 165 | $endif$ 166 | \fi 167 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 168 | \TeXXeTstate=1 169 | \newcommand{\RL}[1]{\beginR #1\endR} 170 | \newcommand{\LR}[1]{\beginL #1\endL} 171 | \newenvironment{RTL}{\beginR}{\endR} 172 | \newenvironment{LTR}{\beginL}{\endL} 173 | \fi 174 | $endif$ 175 | 176 | $if(title)$ 177 | \title{$title$} 178 | $endif$ 179 | $if(subtitle)$ 180 | \subtitle{$subtitle$} 181 | $endif$ 182 | $if(author)$ 183 | \author{$for(author)$$author$$sep$ \and $endfor$} 184 | $endif$ 185 | \date{$date$} 186 | $for(header-includes)$ 187 | $header-includes$ 188 | $endfor$ 189 | 190 | %% Here's everything I added. 191 | %%-------------------------- 192 | 193 | \usepackage{graphicx} 194 | \usepackage{rotating} 195 | %\setbeamertemplate{caption}[numbered] 196 | \usepackage{hyperref} 197 | \usepackage{caption} 198 | \usepackage[normalem]{ulem} 199 | %\mode 200 | \usepackage{wasysym} 201 | %\usepackage{amsmath} 202 | 203 | 204 | % Get rid of navigation symbols. 205 | %------------------------------- 206 | \setbeamertemplate{navigation symbols}{} 207 | 208 | % Optional institute tags and titlegraphic. 209 | % Do feel free to change the titlegraphic if you don't want it as a Markdown field. 210 | %---------------------------------------------------------------------------------- 211 | $if(institute)$\institute{$institute$}$endif$ 212 | 213 | % \titlegraphic{\includegraphics[width=0.3\paperwidth]{\string~/Dropbox/teaching/clemson-academic.png}} % <-- if you want to know what this looks like without it as a Markdown field. 214 | % ----------------------------------------------------------------------------------------------------- 215 | $if(titlegraphic)$\titlegraphic{\includegraphics[width=0.3\paperwidth]{\string~$titlegraphic$}}$endif$ 216 | 217 | % Some additional title page adjustments. 218 | %---------------------------------------- 219 | \setbeamertemplate{title page}[empty] 220 | %\date{} 221 | \setbeamerfont{subtitle}{size=\small} 222 | 223 | \setbeamercovered{transparent} 224 | 225 | % Some optional colors. Change or add as you see fit. 226 | %--------------------------------------------------- 227 | \definecolor{clemsonpurple}{HTML}{522D80} 228 | \definecolor{clemsonorange}{HTML}{F66733} 229 | \definecolor{uiucblue}{HTML}{003C7D} 230 | \definecolor{uiucorange}{HTML}{F47F24} 231 | 232 | 233 | % Some optional color adjustments to Beamer. Change as you see fit. 234 | %------------------------------------------------------------------ 235 | \setbeamercolor{frametitle}{fg=clemsonpurple,bg=white} 236 | \setbeamercolor{title}{fg=clemsonpurple,bg=white} 237 | \setbeamercolor{local structure}{fg=clemsonpurple} 238 | \setbeamercolor{section in toc}{fg=clemsonpurple,bg=white} 239 | % \setbeamercolor{subsection in toc}{fg=clemsonorange,bg=white} 240 | \setbeamercolor{footline}{fg=clemsonpurple!50, bg=white} 241 | \setbeamercolor{block title}{fg=clemsonorange,bg=white} 242 | 243 | 244 | \let\Tiny=\tiny 245 | 246 | 247 | % Sections and subsections should not get their own damn slide. 248 | %-------------------------------------------------------------- 249 | \AtBeginPart{} 250 | \AtBeginSection{} 251 | \AtBeginSubsection{} 252 | \AtBeginSubsubsection{} 253 | 254 | % Suppress some of Markdown's weird default vertical spacing. 255 | %------------------------------------------------------------ 256 | \setlength{\emergencystretch}{0em} % prevent overfull lines 257 | \setlength{\parskip}{0pt} 258 | 259 | 260 | % Allow for those simple two-tone footlines I like. 261 | % Edit the colors as you see fit. 262 | %-------------------------------------------------- 263 | \defbeamertemplate*{footline}{my footline}{% 264 | \ifnum\insertpagenumber=1 265 | \hbox{% 266 | \begin{beamercolorbox}[wd=\paperwidth,ht=.8ex,dp=1ex,center]{}% 267 | % empty environment to raise height 268 | \end{beamercolorbox}% 269 | }% 270 | \vskip0pt% 271 | \else% 272 | \Tiny{% 273 | \hfill% 274 | \vspace*{1pt}% 275 | \insertframenumber/\inserttotalframenumber \hspace*{0.1cm}% 276 | \newline% 277 | \color{clemsonpurple}{\rule{\paperwidth}{0.4mm}}\newline% 278 | \color{clemsonorange}{\rule{\paperwidth}{.4mm}}% 279 | }% 280 | \fi% 281 | } 282 | 283 | % Various cosmetic things, though I must confess I forget what exactly these do and why I included them. 284 | %------------------------------------------------------------------------------------------------------- 285 | \setbeamercolor{structure}{fg=blue} 286 | \setbeamercolor{local structure}{parent=structure} 287 | \setbeamercolor{item projected}{parent=item,use=item,fg=clemsonpurple,bg=white} 288 | \setbeamercolor{enumerate item}{parent=item} 289 | 290 | % Adjust some item elements. More cosmetic things. 291 | %------------------------------------------------- 292 | \setbeamertemplate{itemize item}{\color{clemsonpurple}$$\bullet$$} 293 | \setbeamertemplate{itemize subitem}{\color{clemsonpurple}\scriptsize{$$\bullet$$}} 294 | \setbeamertemplate{itemize/enumerate body end}{\vspace{.6\baselineskip}} % So I'm less inclined to use \medskip and \bigskip in Markdown. 295 | 296 | % Automatically center images 297 | % --------------------------- 298 | % Note: this is for ![](image.png) images 299 | % Use "fig.align = "center" for R chunks 300 | 301 | \usepackage{etoolbox} 302 | 303 | \AtBeginDocument{% 304 | \letcs\oig{@orig\string\includegraphics}% 305 | \renewcommand<>\includegraphics[2][]{% 306 | \only#3{% 307 | {\centering\oig[{#1}]{#2}\par}% 308 | }% 309 | }% 310 | } 311 | 312 | % I think I've moved to xelatex now. Here's some stuff for that. 313 | % -------------------------------------------------------------- 314 | % I could customize/generalize this more but the truth is it works for my circumstances. 315 | 316 | \ifxetex 317 | \setbeamerfont{title}{family=\fontspec{$if(titlefont)$$titlefont$$else$serif$endif$}} 318 | \setbeamerfont{frametitle}{family=\fontspec{$if(titlefont)$$titlefont$$else$serif$endif$}} 319 | \usepackage[font=small,skip=0pt]{caption} 320 | \else 321 | \fi 322 | 323 | % Okay, and begin the actual document... 324 | 325 | \begin{document} 326 | $if(title)$ 327 | \frame{\titlepage} 328 | $endif$ 329 | 330 | $for(include-before)$ 331 | $include-before$ 332 | 333 | $endfor$ 334 | $if(toc)$ 335 | \begin{frame} 336 | \tableofcontents[hideallsubsections] 337 | \end{frame} 338 | 339 | $endif$ 340 | $body$ 341 | 342 | $if(natbib)$ 343 | $if(bibliography)$ 344 | $if(biblio-title)$ 345 | $if(book-class)$ 346 | \renewcommand\bibname{$biblio-title$} 347 | $else$ 348 | \renewcommand\refname{$biblio-title$} 349 | $endif$ 350 | $endif$ 351 | \begin{frame}[allowframebreaks]{$biblio-title$} 352 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 353 | \end{frame} 354 | 355 | $endif$ 356 | $endif$ 357 | $if(biblatex)$ 358 | \begin{frame}[allowframebreaks]{$biblio-title$} 359 | \printbibliography[heading=none] 360 | \end{frame} 361 | 362 | $endif$ 363 | $for(include-after)$ 364 | $include-after$ 365 | 366 | $endfor$ 367 | 368 | \section[]{} 369 | \frame{\small \frametitle{Table of Contents} 370 | \tableofcontents} 371 | \end{document} 372 | -------------------------------------------------------------------------------- /svm-latex-cv.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(fontfamily)$ 3 | \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} 4 | $else$ 5 | \usepackage{lmodern} 6 | $endif$ 7 | $if(linestretch)$ 8 | \usepackage{setspace} 9 | \setstretch{$linestretch$} 10 | $endif$ 11 | \usepackage{amssymb,amsmath} 12 | \usepackage{ifxetex,ifluatex} 13 | \usepackage{fixltx2e} % provides \textsubscript 14 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 15 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 16 | \usepackage[utf8]{inputenc} 17 | $if(euro)$ 18 | \usepackage{eurosym} 19 | $endif$ 20 | \else % if luatex or xelatex 21 | \ifxetex 22 | \usepackage{mathspec} 23 | \else 24 | \usepackage{fontspec} 25 | \fi 26 | \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} 27 | $if(euro)$ 28 | \newcommand{\euro}{€} 29 | $endif$ 30 | $if(mainfont)$ 31 | \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} 32 | $endif$ 33 | $if(sansfont)$ 34 | \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} 35 | $endif$ 36 | $if(monofont)$ 37 | \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} 38 | $endif$ 39 | $if(mathfont)$ 40 | \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 41 | $endif$ 42 | $if(CJKmainfont)$ 43 | \usepackage{xeCJK} 44 | \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} 45 | $endif$ 46 | \fi 47 | % use upquote if available, for straight quotes in verbatim environments 48 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 49 | % use microtype if available 50 | \IfFileExists{microtype.sty}{% 51 | \usepackage{microtype} 52 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 53 | }{} 54 | $if(geometry)$ 55 | \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} 56 | $endif$ 57 | 58 | 59 | $if(lang)$ 60 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 61 | \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} 62 | $if(babel-newcommands)$ 63 | $babel-newcommands$ 64 | $endif$ 65 | \else 66 | \usepackage{polyglossia} 67 | \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} 68 | $for(polyglossia-otherlangs)$ 69 | \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} 70 | $endfor$ 71 | \fi 72 | $endif$ 73 | $if(natbib)$ 74 | \usepackage{natbib} 75 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 76 | $endif$ 77 | $if(biblatex)$ 78 | \usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex} 79 | $if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$ 80 | $for(bibliography)$ 81 | \addbibresource{$bibliography$} 82 | $endfor$ 83 | $endif$ 84 | $if(listings)$ 85 | \usepackage{listings} 86 | $endif$ 87 | $if(lhs)$ 88 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} 89 | $endif$ 90 | $if(highlighting-macros)$ 91 | $highlighting-macros$ 92 | $endif$ 93 | $if(verbatim-in-note)$ 94 | \usepackage{fancyvrb} 95 | \VerbatimFootnotes % allows verbatim text in footnotes 96 | $endif$ 97 | $if(tables)$ 98 | \usepackage{longtable,booktabs} 99 | $endif$ 100 | $if(graphics)$ 101 | \usepackage{graphicx,grffile} 102 | \makeatletter 103 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 104 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} 105 | \makeatother 106 | % Scale images if necessary, so that they will not overflow the page 107 | % margins by default, and it is still possible to overwrite the defaults 108 | % using explicit options in \includegraphics[width, height, ...]{} 109 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 110 | $endif$ 111 | $if(links-as-notes)$ 112 | % Make links footnotes instead of hotlinks: 113 | \renewcommand{\href}[2]{#2\footnote{\url{#1}}} 114 | $endif$ 115 | $if(strikeout)$ 116 | \usepackage[normalem]{ulem} 117 | % avoid problems with \sout in headers with hyperref: 118 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} 119 | $endif$ 120 | $if(indent)$ 121 | $else$ 122 | 123 | 124 | $endif$ 125 | \setlength{\emergencystretch}{3em} % prevent overfull lines 126 | \providecommand{\tightlist}{% 127 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 128 | $if(numbersections)$ 129 | \setcounter{secnumdepth}{5} 130 | $else$ 131 | \setcounter{secnumdepth}{0} 132 | $endif$ 133 | $if(subparagraph)$ 134 | $else$ 135 | % Redefines (sub)paragraphs to behave more like sections 136 | \ifx\paragraph\undefined\else 137 | \let\oldparagraph\paragraph 138 | \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} 139 | \fi 140 | \ifx\subparagraph\undefined\else 141 | \let\oldsubparagraph\subparagraph 142 | \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} 143 | \fi 144 | $endif$ 145 | $if(dir)$ 146 | \ifxetex 147 | % load bidi as late as possible as it modifies e.g. graphicx 148 | $if(latex-dir-rtl)$ 149 | \usepackage[RTLdocument]{bidi} 150 | $else$ 151 | \usepackage{bidi} 152 | $endif$ 153 | \fi 154 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 155 | \TeXXeTstate=1 156 | \newcommand{\RL}[1]{\beginR #1\endR} 157 | \newcommand{\LR}[1]{\beginL #1\endL} 158 | \newenvironment{RTL}{\beginR}{\endR} 159 | \newenvironment{LTR}{\beginL}{\endL} 160 | \fi 161 | $endif$ 162 | $for(header-includes)$ 163 | $header-includes$ 164 | $endfor$ 165 | 166 | % Now begins the stuff that I added. 167 | % ---------------------------------- 168 | 169 | % Custom section fonts 170 | \usepackage{sectsty} 171 | \sectionfont{\rmfamily\mdseries\large\bf} 172 | \subsectionfont{\rmfamily\mdseries\normalsize\scshape} 173 | 174 | 175 | % Make lists without bullets 176 | \renewenvironment{itemize}{ 177 | \begin{list}{}{ 178 | \setlength{\leftmargin}{1.5em} 179 | } 180 | }{ 181 | \end{list} 182 | } 183 | 184 | 185 | % Make parskips rather than indent with lists. 186 | \usepackage{parskip} 187 | \usepackage{titlesec} 188 | \titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{4pt plus 2pt minus 2pt} 189 | \titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{4pt plus 2pt minus 2pt} 190 | 191 | % Use fontawesome. Note: you'll need TeXLive 2015. Update. 192 | $if(fontawesome)$\usepackage{fontawesome}$endif$ 193 | 194 | % Fancyhdr, as I tend to do with these personal documents. 195 | \usepackage{fancyhdr,lastpage} 196 | \pagestyle{fancy} 197 | \renewcommand{\headrulewidth}{0.0pt} 198 | \renewcommand{\footrulewidth}{0.0pt} 199 | \lhead{} 200 | \chead{} 201 | \rhead{} 202 | \lfoot{ 203 | \cfoot{\scriptsize $author-meta$ - $title$ }} 204 | \rfoot{\scriptsize \thepage/{\hypersetup{linkcolor=black}\pageref{LastPage}}} 205 | 206 | % Always load hyperref last. 207 | \usepackage{hyperref} 208 | $if(colorlinks)$ 209 | \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref 210 | $endif$ 211 | 212 | \hypersetup{unicode=true, 213 | $if(title-meta)$ 214 | pdftitle={$if(author-meta)$$author-meta$: $endif$ $title-meta$ (Curriculum Vitae)}, 215 | $endif$ 216 | $if(author-meta)$ 217 | pdfauthor={$author-meta$}, 218 | $endif$ 219 | $if(keywords)$ 220 | pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$}, 221 | $endif$ 222 | colorlinks=true, 223 | linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, 224 | citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, 225 | urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, 226 | breaklinks=true, bookmarks=true} 227 | \urlstyle{same} % don't use monospace font for urls 228 | 229 | % Make AP style (kinda) dates for the updated/today field 230 | 231 | \usepackage{datetime} 232 | \newdateformat{apstylekinda}{% 233 | \shortmonthname[\THEMONTH]. \THEDAY, \THEYEAR} 234 | 235 | \begin{document} 236 | 237 | 238 | \centerline{\huge \bf $author$} 239 | 240 | \vspace{2 mm} 241 | 242 | \hrule 243 | 244 | \vspace{2 mm} 245 | 246 | $if(jobtitle)$\moveleft.5\hoffset\centerline{$jobtitle$}$endif$ 247 | $if(address)$\moveleft.5\hoffset\centerline{$address$}$endif$ 248 | \moveleft.5\hoffset\centerline{ $if(email)$$if(fontawesome)$\faEnvelopeO \hspace{1 mm}$else$\emph{E-mail:}$endif$ \href{mailto:}{\tt $email$} \hspace{1 mm}$endif$ $if(phone)$$if(fontawesome)$ \faPhone \hspace{1 mm}$else$\emph{Phone:}$endif$ $phone$ \hspace{1 mm} $endif$ $if(github)$$if(fontawesome)$\faGithub \hspace{1 mm}$else$\emph{Github:}$endif$ \href{http://github.com/$github$}{\tt $github$} \hspace{1 mm} $endif$ $if(twitter)$$if(fontawesome)$\faTwitter \hspace{1 mm}$else$\emph{Twitter:}$endif$ \href{https:/twitter.com/$twitter$}{\tt $twitter$} \hspace{1 mm} $endif$ $if(osf)$$if(fontawesome)$\faUnlock \hspace{1 mm}$else$\emph{osf:}$endif$ \href{https:/osf.io/$osf$}{\tt osf.io/$osf$} \hspace{1 mm} $endif$ $if(web)$$if(fontawesome)$\faGlobe \hspace{1 mm}$else$\emph{Web:}$endif$ \href{http://$web$}{\tt $web$} $endif$ $if(updated)$ | \emph{Updated:} \apstylekinda\today$endif$} 249 | 250 | \vspace{2 mm} 251 | 252 | \hrule 253 | 254 | 255 | $body$ 256 | 257 | $if(natbib)$ 258 | $if(bibliography)$ 259 | $if(biblio-title)$ 260 | $if(book-class)$ 261 | \renewcommand\bibname{$biblio-title$} 262 | $else$ 263 | \renewcommand\refname{$biblio-title$} 264 | $endif$ 265 | $endif$ 266 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 267 | 268 | $endif$ 269 | $endif$ 270 | $if(biblatex)$ 271 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 272 | 273 | $endif$ 274 | $for(include-after)$ 275 | $include-after$ 276 | 277 | $endfor$ 278 | \end{document} 279 | 280 | -------------------------------------------------------------------------------- /svm-latex-letter.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{letter} 2 | $if(fontfamily)$ 3 | \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} 4 | $else$ 5 | \usepackage{lmodern} 6 | $endif$ 7 | $if(linestretch)$ 8 | \usepackage{setspace} 9 | \setstretch{$linestretch$} 10 | $endif$ 11 | \usepackage{amssymb,amsmath} 12 | \usepackage{ifxetex,ifluatex} 13 | \usepackage{fixltx2e} % provides \textsubscript 14 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 15 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 16 | \usepackage[utf8]{inputenc} 17 | $if(euro)$ 18 | \usepackage{eurosym} 19 | $endif$ 20 | \else % if luatex or xelatex 21 | \ifxetex 22 | \usepackage{mathspec} 23 | \else 24 | \usepackage{fontspec} 25 | \fi 26 | \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} 27 | $for(fontfamilies)$ 28 | \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} 29 | $endfor$ 30 | $if(euro)$ 31 | \newcommand{\euro}{€} 32 | $endif$ 33 | $if(mainfont)$ 34 | \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} 35 | $endif$ 36 | $if(sansfont)$ 37 | \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} 38 | $endif$ 39 | $if(monofont)$ 40 | \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} 41 | $endif$ 42 | $if(mathfont)$ 43 | \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 44 | $endif$ 45 | $if(CJKmainfont)$ 46 | \usepackage{xeCJK} 47 | \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} 48 | $endif$ 49 | \fi 50 | % use upquote if available, for straight quotes in verbatim environments 51 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 52 | % use microtype if available 53 | \IfFileExists{microtype.sty}{% 54 | \usepackage{microtype} 55 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 56 | }{} 57 | $if(geometry)$ 58 | \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} 59 | $endif$ 60 | \usepackage[unicode=true]{hyperref} 61 | $if(colorlinks)$ 62 | \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref 63 | $endif$ 64 | \hypersetup{ 65 | $if(title-meta)$ 66 | pdftitle={$title-meta$}, 67 | $endif$ 68 | $if(author-meta)$ 69 | pdfauthor={$author-meta$}, 70 | $endif$ 71 | $if(keywords)$ 72 | pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, 73 | $endif$ 74 | $if(colorlinks)$ 75 | colorlinks=true, 76 | linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, 77 | citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, 78 | urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, 79 | $else$ 80 | pdfborder={0 0 0}, 81 | $endif$ 82 | breaklinks=true} 83 | \urlstyle{same} % don't use monospace font for urls 84 | $if(lang)$ 85 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 86 | \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} 87 | $if(babel-newcommands)$ 88 | $babel-newcommands$ 89 | $endif$ 90 | \else 91 | \usepackage{polyglossia} 92 | \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} 93 | $for(polyglossia-otherlangs)$ 94 | \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} 95 | $endfor$ 96 | \fi 97 | $endif$ 98 | $if(natbib)$ 99 | \usepackage{natbib} 100 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 101 | $endif$ 102 | $if(biblatex)$ 103 | \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} 104 | $for(bibliography)$ 105 | \addbibresource{$bibliography$} 106 | $endfor$ 107 | $endif$ 108 | $if(listings)$ 109 | \usepackage{listings} 110 | $endif$ 111 | $if(lhs)$ 112 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} 113 | $endif$ 114 | $if(highlighting-macros)$ 115 | $highlighting-macros$ 116 | $endif$ 117 | $if(verbatim-in-note)$ 118 | \usepackage{fancyvrb} 119 | \VerbatimFootnotes % allows verbatim text in footnotes 120 | $endif$ 121 | $if(tables)$ 122 | \usepackage{longtable,booktabs} 123 | % Fix footnotes in tables (requires footnote package) 124 | \IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long table}}{} 125 | $endif$ 126 | $if(graphics)$ 127 | \usepackage{graphicx,grffile} 128 | \makeatletter 129 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 130 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} 131 | \makeatother 132 | % Scale images if necessary, so that they will not overflow the page 133 | % margins by default, and it is still possible to overwrite the defaults 134 | % using explicit options in \includegraphics[width, height, ...]{} 135 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 136 | $endif$ 137 | $if(links-as-notes)$ 138 | % Make links footnotes instead of hotlinks: 139 | \renewcommand{\href}[2]{#2\footnote{\url{#1}}} 140 | $endif$ 141 | $if(strikeout)$ 142 | \usepackage[normalem]{ulem} 143 | % avoid problems with \sout in headers with hyperref: 144 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} 145 | $endif$ 146 | $if(indent)$ 147 | $else$ 148 | \IfFileExists{parskip.sty}{% 149 | \usepackage{parskip} 150 | }{% else 151 | \setlength{\parindent}{0pt} 152 | \setlength{\parskip}{6pt plus 2pt minus 1pt} 153 | } 154 | $endif$ 155 | \setlength{\emergencystretch}{3em} % prevent overfull lines 156 | \providecommand{\tightlist}{% 157 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 158 | $if(numbersections)$ 159 | \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} 160 | $else$ 161 | \setcounter{secnumdepth}{0} 162 | $endif$ 163 | $if(subparagraph)$ 164 | $else$ 165 | % Redefines (sub)paragraphs to behave more like sections 166 | \ifx\paragraph\undefined\else 167 | \let\oldparagraph\paragraph 168 | \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} 169 | \fi 170 | \ifx\subparagraph\undefined\else 171 | \let\oldsubparagraph\subparagraph 172 | \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} 173 | \fi 174 | $endif$ 175 | $if(dir)$ 176 | \ifxetex 177 | % load bidi as late as possible as it modifies e.g. graphicx 178 | $if(latex-dir-rtl)$ 179 | \usepackage[RTLdocument]{bidi} 180 | $else$ 181 | \usepackage{bidi} 182 | $endif$ 183 | \fi 184 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 185 | \TeXXeTstate=1 186 | \newcommand{\RL}[1]{\beginR #1\endR} 187 | \newcommand{\LR}[1]{\beginL #1\endL} 188 | \newenvironment{RTL}{\beginR}{\endR} 189 | \newenvironment{LTR}{\beginL}{\endL} 190 | \fi 191 | $endif$ 192 | 193 | % set default figure placement to htbp 194 | \makeatletter 195 | \def\fps@figure{htbp} 196 | \makeatother 197 | 198 | $if(signature)$ 199 | \usepackage{graphicx,grffile} 200 | \signature{$if(signature-before)$\vspace*{$signature-before$}$endif$\includegraphics{$signature$}$if(author)$\\$if(signature-after)$\vspace*{$signature-after$}$endif$$for(author)$$author$$sep$\\$endfor$$endif$} 201 | $else$ 202 | $if(author)$ 203 | \signature{$for(author)$$author$$sep$\\$endfor$} 204 | $endif$ 205 | $endif$ 206 | 207 | $if(date)$ 208 | \date{$date$} 209 | $endif$ 210 | 211 | $for(header-includes)$ 212 | $header-includes$ 213 | $endfor$ 214 | \address{$for(return-address)$$return-address$$sep$\\$endfor$} 215 | 216 | $if(blockquote)$ 217 | \usepackage{mdframed} % color is loaded by mdframed 218 | \definecolor{greyborder}{RGB}{221,221,221} 219 | \definecolor{greytext}{RGB}{119,119,119} 220 | \newmdenv[rightline=false,bottomline=false,topline=false,linewidth=3pt,linecolor=greyborder,skipabove=\parskip]{blockquote} 221 | \renewenvironment{quote}{\begin{blockquote}\list{}{\rightmargin=0em\leftmargin=0em}% 222 | \item\relax\color{greytext}\ignorespaces}{\unskip\unskip\endlist\end{blockquote}} 223 | $endif$ 224 | 225 | $if(letterhead)$ 226 | \usepackage[dvipsnames]{color} 227 | \usepackage{wallpaper} 228 | \ThisULCornerWallPaper{1}{$letterhead$} 229 | $endif$ 230 | 231 | \begin{document} 232 | 233 | $for(include-before)$ 234 | $include-before$ 235 | 236 | $endfor$ 237 | $if(toc)$ 238 | { 239 | $if(colorlinks)$ 240 | \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} 241 | $endif$ 242 | \setcounter{tocdepth}{$toc-depth$} 243 | \tableofcontents 244 | } 245 | $endif$ 246 | 247 | \begin{letter}{$for(address)$$address$$sep$\\$endfor$} 248 | 249 | $if(opening)$ 250 | \opening{$opening$} 251 | $endif$ 252 | 253 | $body$ 254 | 255 | $if(closing)$ 256 | $if(closing-indentation)$ 257 | \longindentation=$closing-indentation$ 258 | $endif$ 259 | \closing{$closing$} 260 | $endif$ 261 | $if(encl)$ 262 | \encl{$for(encl)$$encl$$sep$\\$endfor$} 263 | $endif$ 264 | $if(cc)$ 265 | \cc{$for(cc)$$cc$$sep$\\$endfor$} 266 | $endif$ 267 | $if(ps)$ 268 | \ps{$ps$} 269 | $endif$ 270 | 271 | \end{letter} 272 | 273 | $if(natbib)$ 274 | $if(bibliography)$ 275 | $if(biblio-title)$ 276 | $if(book-class)$ 277 | \renewcommand\bibname{$biblio-title$} 278 | $else$ 279 | \renewcommand\refname{$biblio-title$} 280 | $endif$ 281 | $endif$ 282 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 283 | 284 | $endif$ 285 | $endif$ 286 | $if(biblatex)$ 287 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 288 | 289 | $endif$ 290 | $for(include-after)$ 291 | $include-after$ 292 | 293 | $endfor$ 294 | \end{document} 295 | 296 | -------------------------------------------------------------------------------- /svm-latex-memo.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{article} 2 | \usepackage[$geometry$]{geometry} 3 | \newcommand*{\authorfont}{\fontfamily{phv}\selectfont} 4 | $if(fontfamily)$ 5 | \usepackage[$fontfamilyoptions$]{$fontfamily$} 6 | $else$ 7 | \usepackage{lmodern} 8 | $endif$ 9 | \usepackage{abstract} 10 | \renewcommand{\abstractname}{} % clear the title 11 | \renewcommand{\absnamepos}{empty} % originally center 12 | \newcommand{\blankline}{\quad\pagebreak[2]} 13 | 14 | \providecommand{\tightlist}{% 15 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 16 | \usepackage{longtable,booktabs} 17 | 18 | \usepackage{parskip} 19 | \usepackage{titlesec} 20 | \titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{6pt plus 2pt minus 2pt} 21 | \titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{6pt plus 2pt minus 2pt} 22 | 23 | \usepackage{titling} 24 | \setlength{\droptitle}{-.25cm} 25 | 26 | %\setlength{\parindent}{0pt} 27 | %\setlength{\parskip}{6pt plus 2pt minus 1pt} 28 | %\setlength{\emergencystretch}{3em} % prevent overfull lines 29 | \setlength{\parskip}{12pt} 30 | 31 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 32 | \usepackage[utf8]{inputenc} 33 | \linespread{1.05} 34 | 35 | \usepackage{fancyhdr} 36 | \pagestyle{fancy} 37 | \usepackage{lastpage} 38 | \renewcommand{\headrulewidth}{0.0pt} 39 | \renewcommand{\footrulewidth}{0.0pt} 40 | 41 | \lhead{} 42 | \chead{} 43 | 44 | \rhead{} 45 | 46 | 47 | \fancypagestyle{firststyle} 48 | { 49 | \renewcommand{\headrulewidth}{0pt}% 50 | \fancyhf{} 51 | \fancyfoot[C]{\small \thepage/\pageref*{LastPage}} 52 | } 53 | 54 | %\def\labelitemi{--} 55 | %\usepackage{enumitem} 56 | %\setitemize[0]{leftmargin=25pt} 57 | %\setenumerate[0]{leftmargin=25pt} 58 | 59 | 60 | \usepackage{titlesec} 61 | 62 | \titleformat*{\subsection}{\itshape} 63 | \titleformat*{\subsubsection}{\itshape} 64 | 65 | \makeatletter 66 | \@ifpackageloaded{hyperref}{}{% 67 | \ifxetex 68 | \usepackage[setpagesize=false, % page size defined by xetex 69 | unicode=false, % unicode breaks when used with xetex 70 | xetex]{hyperref} 71 | \else 72 | \usepackage[unicode=true]{hyperref} 73 | \fi 74 | } 75 | \@ifpackageloaded{color}{ 76 | \PassOptionsToPackage{usenames,dvipsnames}{color} 77 | }{% 78 | \usepackage[usenames,dvipsnames]{color} 79 | } 80 | \makeatother 81 | \hypersetup{breaklinks=true, 82 | bookmarks=true, 83 | pdfauthor={$from$}, 84 | pdfkeywords = {$if(keywords)$$keywords$$endif$}, 85 | pdftitle={$subject$}, 86 | colorlinks=true, 87 | citecolor=$if(citecolor)$$citecolor$$else$blue$endif$, 88 | urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, 89 | linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, 90 | pdfborder={0 0 0}} 91 | \urlstyle{same} % don't use monospace font for urls 92 | 93 | 94 | \setcounter{secnumdepth}{0} 95 | 96 | $if(listings)$ 97 | \usepackage{listings} 98 | $endif$ 99 | $if(lhs)$ 100 | \lstnewenvironment{code}{\lstset{language=r,basicstyle=\small\ttfamily}}{} 101 | $endif$ 102 | $if(highlighting-macros)$ 103 | $highlighting-macros$ 104 | $endif$ 105 | $if(verbatim-in-note)$ 106 | \usepackage{fancyvrb} 107 | $endif$ 108 | $if(tables)$ 109 | \usepackage{longtable} 110 | $endif$ 111 | 112 | $if(graphics)$ 113 | \usepackage{graphicx} 114 | % We will generate all images so they have a width \maxwidth. This means 115 | % that they will get their normal width if they fit onto the page, but 116 | % are scaled down if they would overflow the margins. 117 | \makeatletter 118 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth 119 | \else\Gin@nat@width\fi} 120 | \makeatother 121 | \let\Oldincludegraphics\includegraphics 122 | \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}} 123 | $endif$ 124 | 125 | 126 | $if(natbib)$ 127 | \usepackage{natbib} 128 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 129 | $endif$ 130 | $if(biblatex)$ 131 | \usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex} 132 | $if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$ 133 | $for(bibliography)$ 134 | \addbibresource{$bibliography$} 135 | $endfor$ 136 | $endif$ 137 | $if(listings)$ 138 | \usepackage{listings} 139 | $endif$ 140 | 141 | \usepackage{setspace} 142 | 143 | $if(graphics)$ 144 | \usepackage[export]{adjustbox} 145 | $endif$ 146 | 147 | $for(header-includes)$ 148 | $header-includes$ 149 | $endfor$ 150 | 151 | 152 | 153 | \def\citeapos#1{\citeauthor{#1}'s (\citeyear{#1})} 154 | \begin{document} 155 | 156 | 157 | 158 | \thispagestyle{plain} 159 | % Here's where it starts to differ from my statement template ---- 160 | 161 | $if(graphics)$$if(logo)$\Oldincludegraphics[width=$if(width)$$width$$else$0.3$endif$\textwidth, $if(logoposition)$$logoposition$$else$right$endif$]{$logo$}$else$$endif$$endif$ 162 | 163 | 164 | 165 | 166 | $if(memorandum)$ 167 | \begin{center} 168 | \Large \bfseries{\scshape{Memorandum}} 169 | \end{center} 170 | $endif$ 171 | 172 | \setlength{\tabcolsep}{1em} 173 | \renewcommand{\arraystretch}{1.5} 174 | \begin{tabular}{@{}ll@{}} 175 | \textbf{FROM:} & $from$ \\ 176 | % & \\ 177 | \textbf{TO:} & $to$ \\ 178 | % & \\ 179 | \textbf{SUBJECT:} & $subject$ \\ 180 | % & \\ 181 | \textbf{DATE:} & $date$ \\ 182 | % & \\ 183 | \end{tabular} 184 | 185 | \vspace{.5 em} 186 | 187 | 188 | \hrule 189 | 190 | 191 | 192 | \vspace{6 mm} 193 | 194 | 195 | 196 | $body$ 197 | 198 | 199 | 200 | 201 | $if(natbib)$ 202 | $if(bibliography)$ 203 | $if(biblio-title)$ 204 | $if(book-class)$ 205 | \renewcommand\bibname{$biblio-title$} 206 | $else$ 207 | \renewcommand\refname{$biblio-title$} 208 | $endif$ 209 | $endif$ 210 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 211 | 212 | $endif$ 213 | $endif$ 214 | $if(biblatex)$ 215 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 216 | 217 | 218 | 219 | 220 | $endif$ 221 | $for(include-after)$ 222 | $include-after$ 223 | 224 | $endfor$ 225 | \end{document} 226 | 227 | \makeatletter 228 | \def\@maketitle{% 229 | \newpage 230 | % \null 231 | % \vskip 2em% 232 | % \begin{center}% 233 | \let \footnote \thanks 234 | {\fontsize{18}{20}\selectfont\raggedright \setlength{\parindent}{0pt} \@title \par}% 235 | } 236 | %\fi 237 | \makeatother 238 | -------------------------------------------------------------------------------- /svm-latex-ms.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{article} 2 | \usepackage[left=1in,top=1in,right=1in,bottom=1in]{geometry} 3 | \newcommand*{\authorfont}{\fontfamily{phv}\selectfont} 4 | $if(fontfamily)$ 5 | \usepackage[$fontfamilyoptions$]{$fontfamily$} 6 | $else$ 7 | \usepackage{lmodern} 8 | $endif$ 9 | 10 | 11 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 12 | \usepackage[utf8]{inputenc} 13 | 14 | 15 | 16 | 17 | \usepackage{abstract} 18 | \renewcommand{\abstractname}{} % clear the title 19 | \renewcommand{\absnamepos}{empty} % originally center 20 | 21 | \renewenvironment{abstract} 22 | {{% 23 | \setlength{\leftmargin}{0mm} 24 | \setlength{\rightmargin}{\leftmargin}% 25 | }% 26 | \relax} 27 | {\endlist} 28 | 29 | \makeatletter 30 | \def\@maketitle{% 31 | \newpage 32 | % \null 33 | % \vskip 2em% 34 | % \begin{center}% 35 | \let \footnote \thanks 36 | {\fontsize{18}{20}\selectfont\raggedright \setlength{\parindent}{0pt} \@title \par}% 37 | } 38 | %\fi 39 | \makeatother 40 | 41 | 42 | $if(appendix)$ 43 | \renewcommand*\thetable{$appendixletter$.\arabic{table}} 44 | \renewcommand*\thefigure{$appendixletter$.\arabic{figure}} 45 | $endif$ 46 | 47 | 48 | \setcounter{secnumdepth}{0} 49 | 50 | $if(listings)$ 51 | \usepackage{listings} 52 | $endif$ 53 | $if(lhs)$ 54 | \lstnewenvironment{code}{\lstset{language=r,basicstyle=\small\ttfamily}}{} 55 | $endif$ 56 | $if(highlighting-macros)$ 57 | $highlighting-macros$ 58 | $endif$ 59 | $if(verbatim-in-note)$ 60 | \usepackage{fancyvrb} 61 | $endif$ 62 | $if(tables)$ 63 | \usepackage{longtable,booktabs} 64 | $endif$ 65 | 66 | $if(graphics)$ 67 | \usepackage{graphicx,grffile} 68 | \makeatletter 69 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 70 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} 71 | \makeatother 72 | % Scale images if necessary, so that they will not overflow the page 73 | % margins by default, and it is still possible to overwrite the defaults 74 | % using explicit options in \includegraphics[width, height, ...]{} 75 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 76 | $endif$ 77 | 78 | 79 | $if(title)$ 80 | \title{$title$$if(subtitle)$: $subtitle$$endif$ $if(anonymous)$$else$$if(thanks)$\thanks{$thanks$} $endif$$endif$ } 81 | $endif$ 82 | 83 | 84 | 85 | $if(anonymous)$$else$\author{$for(author)$\Large $author.name$\vspace{0.05in} \newline\normalsize\emph{$author.affiliation$} $sep$ \and $endfor$}$endif$ 86 | 87 | 88 | \date{} 89 | 90 | \usepackage{titlesec} 91 | 92 | \titleformat*{\section}{\normalsize\bfseries} 93 | \titleformat*{\subsection}{\normalsize\itshape} 94 | \titleformat*{\subsubsection}{\normalsize\itshape} 95 | \titleformat*{\paragraph}{\normalsize\itshape} 96 | \titleformat*{\subparagraph}{\normalsize\itshape} 97 | 98 | 99 | $if(natbib)$ 100 | \usepackage{natbib} 101 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 102 | \usepackage[strings]{underscore} % protect underscores in most circumstances 103 | $endif$ 104 | 105 | $if(biblatex)$ 106 | \usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex} 107 | $if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$ 108 | $for(bibliography)$ 109 | \addbibresource{$bibliography$} 110 | $endfor$ 111 | $endif$ 112 | $if(listings)$ 113 | \usepackage{listings} 114 | $endif$ 115 | 116 | 117 | \newtheorem{hypothesis}{Hypothesis} 118 | \usepackage{setspace} 119 | 120 | 121 | % set default figure placement to htbp 122 | \makeatletter 123 | \def\fps@figure{htbp} 124 | \makeatother 125 | 126 | $for(header-includes)$ 127 | $header-includes$ 128 | $endfor$ 129 | 130 | % move the hyperref stuff down here, after header-includes, to allow for - \usepackage{hyperref} 131 | 132 | \makeatletter 133 | \@ifpackageloaded{hyperref}{}{% 134 | \ifxetex 135 | \PassOptionsToPackage{hyphens}{url}\usepackage[setpagesize=false, % page size defined by xetex 136 | unicode=false, % unicode breaks when used with xetex 137 | xetex]{hyperref} 138 | \else 139 | \PassOptionsToPackage{hyphens}{url}\usepackage[draft,unicode=true]{hyperref} 140 | \fi 141 | } 142 | 143 | \@ifpackageloaded{color}{ 144 | \PassOptionsToPackage{usenames,dvipsnames}{color} 145 | }{% 146 | \usepackage[usenames,dvipsnames]{color} 147 | } 148 | \makeatother 149 | \hypersetup{breaklinks=true, 150 | bookmarks=true, 151 | pdfauthor={$if(anonymous)$$else$$for(author)$$author.name$ ($author.affiliation$)$sep$ and $endfor$$endif$}, 152 | pdfkeywords = {$if(keywords)$$keywords$$endif$}, 153 | pdftitle={$title$$if(subtitle)$: $subtitle$$endif$}, 154 | colorlinks=true, 155 | citecolor=$if(citecolor)$$citecolor$$else$blue$endif$, 156 | urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, 157 | linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, 158 | pdfborder={0 0 0}} 159 | \urlstyle{same} % don't use monospace font for urls 160 | 161 | % Add an option for endnotes. ----- 162 | 163 | $if(endnotes)$ 164 | \usepackage{endnotes} 165 | \renewcommand{\enotesize}{\normalsize} 166 | \let\footnote=\endnote 167 | $endif$ 168 | 169 | % add tightlist ---------- 170 | \providecommand{\tightlist}{% 171 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 172 | 173 | % add some other packages ---------- 174 | 175 | % \usepackage{multicol} 176 | % This should regulate where figures float 177 | % See: https://tex.stackexchange.com/questions/2275/keeping-tables-figures-close-to-where-they-are-mentioned 178 | \usepackage[section]{placeins} 179 | 180 | 181 | \begin{document} 182 | 183 | % \pagenumbering{arabic}% resets `page` counter to 1 184 | %$if(appendix)$ 185 | %\renewcommand*{\thepage}{$appendixletter$--\arabic{page}} 186 | %$endif$ 187 | 188 | $if(removetitleabstract)$ 189 | $else$ 190 | $if(title)$ 191 | % \maketitle 192 | 193 | {% \usefont{T1}{pnc}{m}{n} 194 | \setlength{\parindent}{0pt} 195 | \thispagestyle{plain} 196 | {\fontsize{18}{20}\selectfont\raggedright 197 | \maketitle % title \par 198 | 199 | } 200 | 201 | { 202 | \vskip 13.5pt\relax \normalsize\fontsize{11}{12} 203 | $if(anonymous)$\hfill $else$$for(author)$\textbf{\authorfont $author.name$} \hskip 15pt \emph{\small $author.affiliation$} $sep$ \par $endfor$ $endif$ 204 | 205 | } 206 | 207 | } 208 | 209 | 210 | $endif$ 211 | 212 | 213 | 214 | $if(abstract)$ 215 | 216 | 217 | 218 | \begin{abstract} 219 | 220 | \hbox{\vrule height .2pt width 39.14pc} 221 | 222 | \vskip 8.5pt % \small 223 | 224 | \noindent $abstract$ 225 | 226 | $if(keywords)$ 227 | 228 | \vskip 8.5pt \noindent \emph{Keywords}: $keywords$ \par 229 | 230 | \hbox{\vrule height .2pt width 39.14pc} 231 | 232 | 233 | $else$ 234 | 235 | \hbox{\vrule height .2pt width 39.14pc} 236 | 237 | $endif$ 238 | 239 | \end{abstract} 240 | 241 | $endif$ 242 | 243 | \vskip -8.5pt 244 | 245 | $if(toc)$ 246 | { 247 | \hypersetup{linkcolor=black} 248 | \setcounter{tocdepth}{$toc-depth$} 249 | \tableofcontents 250 | } 251 | $endif$ 252 | 253 | $endif$ % removetitleabstract 254 | 255 | \noindent $if(anonymous)$\doublespacing$else$$if(spacing)$\$spacing$spacing$endif$$endif$ 256 | $if(twocol)$ \begin{multicols}{2}$endif$ 257 | $body$ 258 | $if(twocol)$ \end{multicols}$endif$ 259 | 260 | $if(endnotes)$ 261 | \newpage 262 | 263 | \theendnotes 264 | $endif$ 265 | 266 | 267 | 268 | \newpage 269 | \singlespacing 270 | $if(natbib)$ 271 | $if(bibliography)$ 272 | $if(biblio-title)$ 273 | $if(book-class)$ 274 | \renewcommand\bibname{$biblio-title$} 275 | $else$ 276 | \renewcommand\refname{$biblio-title$} 277 | $endif$ 278 | $endif$ 279 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 280 | 281 | $endif$ 282 | $endif$ 283 | $if(biblatex)$ 284 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 285 | 286 | $endif$ 287 | $for(include-after)$ 288 | $include-after$ 289 | 290 | $endfor$ 291 | \end{document} 292 | -------------------------------------------------------------------------------- /svm-latex-statement.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{article} 2 | \usepackage[$geometry$]{geometry} 3 | \newcommand*{\authorfont}{\fontfamily{phv}\selectfont} 4 | $if(fontfamily)$ 5 | \usepackage[$fontfamilyoptions$]{$fontfamily$} 6 | $else$ 7 | \usepackage{lmodern} 8 | $endif$ 9 | \usepackage{abstract} 10 | \renewcommand{\abstractname}{} % clear the title 11 | \renewcommand{\absnamepos}{empty} % originally center 12 | \newcommand{\blankline}{\quad\pagebreak[2]} 13 | 14 | \providecommand{\tightlist}{% 15 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 16 | \usepackage{longtable,booktabs} 17 | 18 | \usepackage{parskip} 19 | \usepackage{titlesec} 20 | \titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{6pt plus 2pt minus 2pt} 21 | \titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{6pt plus 2pt minus 2pt} 22 | 23 | \usepackage{titling} 24 | \setlength{\droptitle}{-.25cm} 25 | 26 | %\setlength{\parindent}{0pt} 27 | %\setlength{\parskip}{6pt plus 2pt minus 1pt} 28 | %\setlength{\emergencystretch}{3em} % prevent overfull lines 29 | 30 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 31 | \usepackage[utf8]{inputenc} 32 | \linespread{1.05} 33 | 34 | \usepackage{fancyhdr} 35 | \pagestyle{fancy} 36 | \usepackage{lastpage} 37 | \renewcommand{\headrulewidth}{0.3pt} 38 | \renewcommand{\footrulewidth}{0.0pt} 39 | \lhead{\footnotesize \textbf{$author$}} 40 | \chead{} 41 | \rhead{\footnotesize \emph{$title$}} 42 | %\lfoot{} 43 | %\cfoot{\small \thepage/\pageref*{LastPage}} 44 | %\rfoot{} 45 | 46 | \fancypagestyle{firststyle} 47 | { 48 | \renewcommand{\headrulewidth}{0pt}% 49 | \fancyhf{} 50 | \fancyfoot[C]{\small \thepage/\pageref*{LastPage}} 51 | } 52 | 53 | %\def\labelitemi{--} 54 | %\usepackage{enumitem} 55 | %\setitemize[0]{leftmargin=25pt} 56 | %\setenumerate[0]{leftmargin=25pt} 57 | 58 | 59 | \usepackage{titlesec} 60 | 61 | \titleformat*{\subsection}{\itshape} 62 | 63 | \makeatletter 64 | \@ifpackageloaded{hyperref}{}{% 65 | \ifxetex 66 | \usepackage[setpagesize=false, % page size defined by xetex 67 | unicode=false, % unicode breaks when used with xetex 68 | xetex]{hyperref} 69 | \else 70 | \usepackage[unicode=true]{hyperref} 71 | \fi 72 | } 73 | \@ifpackageloaded{color}{ 74 | \PassOptionsToPackage{usenames,dvipsnames}{color} 75 | }{% 76 | \usepackage[usenames,dvipsnames]{color} 77 | } 78 | \makeatother 79 | \hypersetup{breaklinks=true, 80 | bookmarks=true, 81 | pdfauthor={$for(author)$$author.name$ ($author.affiliation$)$sep$ and $endfor$}, 82 | pdfkeywords = {$if(keywords)$$keywords$$endif$}, 83 | pdftitle={$title$$if(subtitle)$: $subtitle$$endif$}, 84 | colorlinks=true, 85 | citecolor=$if(citecolor)$$citecolor$$else$blue$endif$, 86 | urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, 87 | linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, 88 | pdfborder={0 0 0}} 89 | \urlstyle{same} % don't use monospace font for urls 90 | 91 | 92 | \setcounter{secnumdepth}{0} 93 | 94 | $if(listings)$ 95 | \usepackage{listings} 96 | $endif$ 97 | $if(lhs)$ 98 | \lstnewenvironment{code}{\lstset{language=r,basicstyle=\small\ttfamily}}{} 99 | $endif$ 100 | $if(highlighting-macros)$ 101 | $highlighting-macros$ 102 | $endif$ 103 | $if(verbatim-in-note)$ 104 | \usepackage{fancyvrb} 105 | $endif$ 106 | $if(tables)$ 107 | \usepackage{longtable} 108 | $endif$ 109 | 110 | $if(graphics)$ 111 | \usepackage{graphicx} 112 | % We will generate all images so they have a width \maxwidth. This means 113 | % that they will get their normal width if they fit onto the page, but 114 | % are scaled down if they would overflow the margins. 115 | \makeatletter 116 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth 117 | \else\Gin@nat@width\fi} 118 | \makeatother 119 | \let\Oldincludegraphics\includegraphics 120 | \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}} 121 | $endif$ 122 | 123 | 124 | $if(natbib)$ 125 | \usepackage{natbib} 126 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 127 | $endif$ 128 | $if(biblatex)$ 129 | \usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex} 130 | $if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$ 131 | $for(bibliography)$ 132 | \addbibresource{$bibliography$} 133 | $endfor$ 134 | $endif$ 135 | $if(listings)$ 136 | \usepackage{listings} 137 | $endif$ 138 | 139 | \usepackage{setspace} 140 | 141 | $if(title)$ 142 | \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} 143 | $endif$ 144 | $if(subtitle)$ 145 | \providecommand{\subtitle}[1]{} 146 | \subtitle{$subtitle$} 147 | $endif$ 148 | $if(author)$ 149 | \author{$for(author)$$author$$sep$ \and $endfor$} 150 | $endif$ 151 | \date{$date$} 152 | 153 | 154 | \def\citeapos#1{\citeauthor{#1}'s (\citeyear{#1})} 155 | 156 | % header includes! 157 | $for(header-includes)$ 158 | $header-includes$ 159 | $endfor$ 160 | 161 | 162 | \begin{document} 163 | 164 | 165 | 166 | \thispagestyle{plain} 167 | 168 | \begin{flushleft}\Large \bf $title$ \end{flushleft} 169 | \vspace{1 mm} 170 | $author$ \\ 171 | \emph{$affiliation$} \\ 172 | $if(email)$\texttt{$email$}$else$TBD$endif$ \\ 173 | 174 | % \blankline 175 | 176 | 177 | \hrule 178 | 179 | \vspace{6 mm} 180 | 181 | 182 | 183 | $body$ 184 | 185 | 186 | 187 | 188 | $if(natbib)$ 189 | $if(bibliography)$ 190 | $if(biblio-title)$ 191 | $if(book-class)$ 192 | \renewcommand\bibname{$biblio-title$} 193 | $else$ 194 | \renewcommand\refname{$biblio-title$} 195 | $endif$ 196 | $endif$ 197 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 198 | 199 | $endif$ 200 | $endif$ 201 | $if(biblatex)$ 202 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 203 | 204 | 205 | 206 | 207 | $endif$ 208 | $for(include-after)$ 209 | $include-after$ 210 | 211 | $endfor$ 212 | \end{document} 213 | 214 | \makeatletter 215 | \def\@maketitle{% 216 | \newpage 217 | % \null 218 | % \vskip 2em% 219 | % \begin{center}% 220 | \let \footnote \thanks 221 | {\fontsize{18}{20}\selectfont\raggedright \setlength{\parindent}{0pt} \@title \par}% 222 | } 223 | %\fi 224 | \makeatother 225 | -------------------------------------------------------------------------------- /svm-latex-syllabus.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{article} 2 | \usepackage[$geometry$]{geometry} 3 | \newcommand*{\authorfont}{\fontfamily{phv}\selectfont} 4 | $if(fontfamily)$ 5 | \usepackage[$fontfamilyoptions$]{$fontfamily$} 6 | $else$ 7 | \usepackage{lmodern} 8 | $endif$ 9 | \usepackage{abstract} 10 | \renewcommand{\abstractname}{} % clear the title 11 | \renewcommand{\absnamepos}{empty} % originally center 12 | \newcommand{\blankline}{\quad\pagebreak[2]} 13 | 14 | \providecommand{\tightlist}{% 15 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 16 | \usepackage{longtable,booktabs} 17 | 18 | \usepackage{parskip} 19 | \usepackage{titlesec} 20 | \titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{6pt plus 2pt minus 2pt} 21 | \titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{6pt plus 2pt minus 2pt} 22 | 23 | \titleformat*{\subsubsection}{\normalsize\itshape} 24 | 25 | \usepackage{titling} 26 | \setlength{\droptitle}{-.25cm} 27 | 28 | %\setlength{\parindent}{0pt} 29 | %\setlength{\parskip}{6pt plus 2pt minus 1pt} 30 | %\setlength{\emergencystretch}{3em} % prevent overfull lines 31 | 32 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 33 | \usepackage[utf8]{inputenc} 34 | 35 | \usepackage{fancyhdr} 36 | \pagestyle{fancy} 37 | \usepackage{lastpage} 38 | \renewcommand{\headrulewidth}{0.3pt} 39 | \renewcommand{\footrulewidth}{0.0pt} 40 | \lhead{} 41 | \chead{} 42 | \rhead{\footnotesize $title$ -- $date$} 43 | \lfoot{} 44 | \cfoot{\small \thepage/\pageref*{LastPage}} 45 | \rfoot{} 46 | 47 | \fancypagestyle{firststyle} 48 | { 49 | \renewcommand{\headrulewidth}{0pt}% 50 | \fancyhf{} 51 | \fancyfoot[C]{\small \thepage/\pageref*{LastPage}} 52 | } 53 | 54 | %\def\labelitemi{--} 55 | %\usepackage{enumitem} 56 | %\setitemize[0]{leftmargin=25pt} 57 | %\setenumerate[0]{leftmargin=25pt} 58 | 59 | 60 | 61 | 62 | \makeatletter 63 | \@ifpackageloaded{hyperref}{}{% 64 | \ifxetex 65 | \usepackage[setpagesize=false, % page size defined by xetex 66 | unicode=false, % unicode breaks when used with xetex 67 | xetex]{hyperref} 68 | \else 69 | \usepackage[unicode=true]{hyperref} 70 | \fi 71 | } 72 | \@ifpackageloaded{color}{ 73 | \PassOptionsToPackage{usenames,dvipsnames}{color} 74 | }{% 75 | \usepackage[usenames,dvipsnames]{color} 76 | } 77 | \makeatother 78 | \hypersetup{breaklinks=true, 79 | bookmarks=true, 80 | pdfauthor={$for(author)$$author.name$ ($author.affiliation$)$sep$ and $endfor$}, 81 | pdfkeywords = {$if(keywords)$$keywords$$endif$}, 82 | pdftitle={$title$$if(subtitle)$: $subtitle$$endif$}, 83 | colorlinks=true, 84 | citecolor=$if(citecolor)$$citecolor$$else$blue$endif$, 85 | urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, 86 | linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, 87 | pdfborder={0 0 0}} 88 | \urlstyle{same} % don't use monospace font for urls 89 | 90 | 91 | \setcounter{secnumdepth}{0} 92 | 93 | $if(listings)$ 94 | \usepackage{listings} 95 | $endif$ 96 | $if(lhs)$ 97 | \lstnewenvironment{code}{\lstset{language=r,basicstyle=\small\ttfamily}}{} 98 | $endif$ 99 | $if(highlighting-macros)$ 100 | $highlighting-macros$ 101 | $endif$ 102 | $if(verbatim-in-note)$ 103 | \usepackage{fancyvrb} 104 | $endif$ 105 | $if(tables)$ 106 | \usepackage{longtable} 107 | $endif$ 108 | 109 | $if(graphics)$ 110 | \usepackage{graphicx} 111 | % We will generate all images so they have a width \maxwidth. This means 112 | % that they will get their normal width if they fit onto the page, but 113 | % are scaled down if they would overflow the margins. 114 | \makeatletter 115 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth 116 | \else\Gin@nat@width\fi} 117 | \makeatother 118 | \let\Oldincludegraphics\includegraphics 119 | \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}} 120 | $endif$ 121 | 122 | 123 | $if(natbib)$ 124 | \usepackage{natbib} 125 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 126 | $endif$ 127 | $if(biblatex)$ 128 | \usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex} 129 | $if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$ 130 | $for(bibliography)$ 131 | \addbibresource{$bibliography$} 132 | $endfor$ 133 | $endif$ 134 | $if(listings)$ 135 | \usepackage{listings} 136 | $endif$ 137 | 138 | \usepackage{setspace} 139 | 140 | $if(title)$ 141 | \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} 142 | $endif$ 143 | $if(subtitle)$ 144 | \providecommand{\subtitle}[1]{} 145 | \subtitle{$subtitle$} 146 | $endif$ 147 | $if(author)$ 148 | \author{$for(author)$$author$$sep$ \and $endfor$} 149 | $endif$ 150 | \date{$date$} 151 | 152 | 153 | \begin{document} 154 | 155 | $if(title)$ 156 | \maketitle 157 | $endif$ 158 | 159 | 160 | \thispagestyle{firststyle} 161 | 162 | % \thispagestyle{empty} 163 | 164 | 165 | \noindent \begin{tabular*}{\textwidth}{ @{\extracolsep{\fill}} lr @{\extracolsep{\fill}}} 166 | 167 | 168 | E-mail: $if(email)$\texttt{$email$}$else$TBD$endif$ & Web: $if(web)$\href{http://$web$}{\tt $web$}$else$TBD$endif$\\ 169 | Office Hours: $if(officehours)$$officehours$$else$TBD$endif$ & Class Hours: $if(classhours)$$classhours$$else$TBD$endif$\\ 170 | Office: $if(office)$$office$$else$TBD$endif$ & Class Room: $if(classroom)$$classroom$$else$TBD$endif$\\ 171 | & \\ 172 | \hline 173 | \end{tabular*} 174 | 175 | \vspace{2mm} 176 | 177 | 178 | 179 | $body$ 180 | 181 | 182 | 183 | 184 | $if(natbib)$ 185 | $if(bibliography)$ 186 | $if(biblio-title)$ 187 | $if(book-class)$ 188 | \renewcommand\bibname{$biblio-title$} 189 | $else$ 190 | \renewcommand\refname{$biblio-title$} 191 | $endif$ 192 | $endif$ 193 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 194 | 195 | $endif$ 196 | $endif$ 197 | $if(biblatex)$ 198 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 199 | 200 | 201 | 202 | 203 | $endif$ 204 | $for(include-after)$ 205 | $include-after$ 206 | 207 | $endfor$ 208 | \end{document} 209 | 210 | \makeatletter 211 | \def\@maketitle{% 212 | \newpage 213 | % \null 214 | % \vskip 2em% 215 | % \begin{center}% 216 | \let \footnote \thanks 217 | {\fontsize{18}{20}\selectfont\raggedright \setlength{\parindent}{0pt} \@title \par}% 218 | } 219 | %\fi 220 | \makeatother 221 | -------------------------------------------------------------------------------- /svm-rmarkdown-word.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/svm-rmarkdown-word.docx -------------------------------------------------------------------------------- /svm-xaringan-style.css: -------------------------------------------------------------------------------- 1 | /* Let's load some fonts */ 2 | 3 | @import url('https://fonts.googleapis.com/css?family=Titillium+Web:200,200i,300,300i,400,400i,600,600i'); 4 | @import url('https://fonts.googleapis.com/css?family=Open+Sans'); 5 | @import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic); 6 | 7 | /* Generic stuff */ 8 | 9 | .remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; } 10 | 11 | body { font-family: 'Open Sans' } 12 | 13 | .grViz { 14 | margin-left:auto; margin-right:auto; display:block; 15 | } 16 | 17 | /* Pretty sure this is all me messing with the title slide */ 18 | 19 | 20 | div.remark-slide-container h1 { 21 | font-family: 'Titillium Web', sans-serif; 22 | color: #522D80; 23 | letter-spacing: -1px; 24 | font-size: 36px; 25 | } 26 | 27 | .inverse h1 { 28 | line-height: 0.5em; 29 | } 30 | .title-slide h1 { 31 | 32 | margin-top: -130px; 33 | } 34 | 35 | div.remark-slide-container h2 { 36 | font-family: 'Open Sans', sans-serif; 37 | color: #522D80; 38 | letter-spacing: -1px; 39 | font-size: 20px 40 | } 41 | 42 | div.remark-slide-container h3 { 43 | font-family: 'Open Sans', sans-serif; 44 | color: #000; 45 | letter-spacing: -1px; 46 | font-size: 18px; 47 | padding-top: 50px 48 | } 49 | 50 | .title-slide { 51 | background-color: #fff; 52 | background-image: url(/home/steve/Dropbox/teaching/clemson-academic.png); 53 | background-position: center bottom 170px; 54 | background-size: 30%; 55 | border-bottom: 0px solid #522D80; 56 | box-shadow: 0 55px 0 #fff; 57 | } 58 | 59 | 60 | 61 | 62 | .title-slide .remark-slide-number { 63 | display: none; 64 | } 65 | 66 | /* Hmm. How about the slide number. */ 67 | 68 | 69 | .remark-slide-number { 70 | font-family: 'Open Sans', sans-serif; 71 | font-size: 14px; 72 | color: #522D80; 73 | } 74 | 75 | /* Okay, now let's add a simple bottom border */ 76 | 77 | 78 | div.remark-slide { 79 | border-bottom: 3px solid #522D80; 80 | box-shadow: 0 5px 0 #F66733; 81 | 82 | } 83 | 84 | /* Let's play with .inverse and a new class, .fullscale, a little more */ 85 | 86 | .inverse { 87 | color: #fafafa; 88 | text-shadow: 0 0 0px #333; 89 | } 90 | 91 | div.remark-slide-container .fullscale { 92 | color: #d6d6d6; 93 | text-shadow: 0 0 20px #333; 94 | } 95 | 96 | div.remark-slide-container .fullscale h1 { 97 | color: #fff; 98 | 99 | } 100 | 101 | div.remark-slide-container .fullscale p { 102 | color: #000; 103 | 104 | } 105 | .remark-slide-content { 106 | font-size: 18px; 107 | text-shadow: 0 0 0px #333; 108 | 109 | } 110 | -------------------------------------------------------------------------------- /syllabus-example/figs/attendplot-1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/syllabus-example/figs/attendplot-1.pdf -------------------------------------------------------------------------------- /syllabus-example/master.bib: -------------------------------------------------------------------------------- 1 | % This file was created with JabRef 2.10. 2 | % Encoding: UTF-8 3 | 4 | 5 | @Book{vasquez2009twp, 6 | Title = {The War Puzzle Revisited}, 7 | Author = {Vasquez, John A}, 8 | Publisher = {New York, NY: Cambridge University Press}, 9 | Year = {2009} 10 | } 11 | 12 | @Book{wagner2007ws, 13 | Title = {War and the State: The Theory of International Politics}, 14 | Author = {R. Harrison Wagner}, 15 | Publisher = {Ann Arbor, MI: The University of Michigan Press}, 16 | Year = {2007}, 17 | 18 | Owner = {steve}, 19 | Timestamp = {2016.02.12} 20 | } 21 | 22 | @Book{xie2013ddrk, 23 | title = {Dynamic Documents with {R} and knitr}, 24 | author = {Yihui Xie}, 25 | publisher = {Chapman and Hall/CRC}, 26 | address = {Boca Raton, Florida}, 27 | year = {2015}, 28 | edition = {2nd}, 29 | note = {ISBN 978-1498716963}, 30 | url = {https://yihui.name/knitr/}, 31 | } 32 | -------------------------------------------------------------------------------- /syllabus-example/svm-rmarkdown-syllabus-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: 3 | pdf_document: 4 | keep_tex: true 5 | fig_caption: yes 6 | latex_engine: pdflatex 7 | template: ../svm-latex-syllabus.tex 8 | geometry: margin=1in 9 | 10 | title: "POSC 0000: A Class with an R Markdown Syllabus" 11 | author: Steven V. Miller 12 | date: "Fall 2016" 13 | 14 | email: "svmille@clemson.edu" 15 | web: "svmiller.com/teaching" 16 | officehours: "W 09:00-11:30 a.m." 17 | office: "230A Brackett Hall" 18 | classroom: "*online*" 19 | classhours: "TR 02:00-03:45 p.m." 20 | 21 | fontfamily: mathpazo 22 | fontsize: 11pt 23 | header-includes: 24 | - \linespread{1.05} 25 | --- 26 | 27 | ```{r setup, include=FALSE, cache=F, message=F, warning=F, results="hide"} 28 | knitr::opts_chunk$set(cache=TRUE) 29 | knitr::opts_chunk$set(fig.path='figs/') 30 | knitr::opts_chunk$set(cache.path='_cache/') 31 | knitr::opts_chunk$set(warning=F, message=F) 32 | # knitr::opts_knit$get(kable.force.latex = TRUE) 33 | ``` 34 | 35 | 36 | 37 | ```{r dates_bib, include=FALSE} 38 | knitr::opts_chunk$set(cache=FALSE, dev='pdf') 39 | mon <- as.Date("2016-08-15") 40 | # fri <- as.Date("2016-01-08") 41 | 42 | advdate <- function(obj, adv) { 43 | tmon <- obj + 7*(adv-1) 44 | tfri <- obj + 4 + 7*(adv-1) 45 | tmon <- format(tmon, format="%m/%d") 46 | tfri <- format(tfri, format="%m/%d") 47 | zadv <- sprintf("%02d", adv) 48 | tmp <- paste("Week ",zadv,sep='',", ", tmon," - ",tfri) 49 | return(tmp) 50 | } 51 | 52 | library(RefManageR) 53 | # library(knitcitations) 54 | # library(rcrossref) 55 | bib <- ReadBib("master.bib") 56 | myopts <- BibOptions(bib.style = "authoryear", style="latex", first.inits=FALSE, max.names = 20) 57 | 58 | ``` 59 | 60 | # Course Description 61 | 62 | You'll learn stuff in this class, I hope. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas scelerisque elit sapien, eu consequat dui blandit in. Vestibulum dignissim feugiat mauris, at pretium turpis blandit nec. Aliquam porta scelerisque tortor, eget imperdiet quam dapibus et. Sed ut sollicitudin orci, id elementum arcu. Sed arcu quam, vestibulum molestie mattis sed, ultricies sed est. Phasellus eu nunc et urna volutpat pharetra. Donec interdum ante vitae odio malesuada blandit. Fusce at condimentum libero, eu elementum arcu. Aenean posuere id lorem in varius. Sed bibendum neque pretium dolor faucibus, in cursus ipsum suscipit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam erat volutpat. Phasellus mollis egestas risus, non maximus nisl euismod sit amet. Vestibulum laoreet et urna vitae rutrum. Donec quis dui elit. 63 | 64 | # Course Objectives 65 | 66 | 1. You'll learn this 67 | 68 | 2. And also that 69 | 70 | 3. Perhaps some of this too. 71 | 72 | # Required Readings 73 | 74 | ```{r, echo = FALSE, results="asis"} 75 | bib["vasquez2009twp", "wagner2007ws"] 76 | ``` 77 | 78 | 79 | # Course Policy 80 | 81 | I will detail the policy for this course below. Basically, don't cheat and try to learn stuff. Don't be that guy. 82 | 83 | ## Grading Policy 84 | 85 | - **20%** of your grade will be determined by a midterm during normal class hours. 86 | 87 | - **20%** of your grade will be determined by a term paper that documents your appreciation of Foghat's "Slow Ride", the most important song ever written. "Slow Ride" is what Mozart wishes *Don Giovanni* could have been. 88 | 89 | - **10%** of your grade will be determined by your attendance and participation in class. Generally, ask questions and answer them. 90 | 91 | - **20%** of your grade will be determined by a 20-page term paper on when exactly "The Love Boat" jumped the proverbial shark. You will address whether this shark-jumping can be attributed to Ted McGinley, the introduction of Jill Whelan as "Vicki", or some other cause. 92 | 93 | - **30%** of your grade will be determined by a final exam. 94 | 95 | ## Attendance Policy 96 | 97 | ```{r, include=FALSE} 98 | options(scipen=999) 99 | Attend <- read.csv("attend-grade-relationships.csv") 100 | M1 <- lm(rgrade ~ perattend, Attend) 101 | M2 <- lm(rgrade ~ perattend, data=subset(Attend, perattend >= 75)) 102 | library(broom) 103 | 104 | M1df <- tidy(M1) 105 | M2df <- tidy(M2) 106 | library(ggplot2) 107 | library(kfigr) 108 | ``` 109 | 110 | > *Showing up is 80 percent of life* -- Woody Allen, [via Marshall Brickman](http://quoteinvestigator.com/2013/06/10/showing-up/#note-6553-1) 111 | 112 | Students should be weary of skipping class. I deduct *all* participation points for a class after five unexcused absences and this can have important implications for a student's overall grade in the class. There is already a strong positive correlation between the percentage of classes a student has attended in the course and the student's final grade for the semester (*r* = `r round(cor(Attend$perattend, Attend$rgrade, use="complete.obs"), 3)`) for all `r nrow(Attend)` students I have taught since Fall 2014. 113 | 114 | A simple linear regression of a student's final grade on percentage of classes attended for the semester for all classes I have taught since Fall 2014 suggests an increase of one percent in attendance for the semester leads to an estimated increase of `r round(M1$coefficients[2], 3)` in the student's final grade. Whereas one missed classes constitutes about a five-percent decrease in percentage attendance for the semester, one missed class means an estimated decrease of `r round(M1$coefficients[2], 3)*5` in the overall grade. The effect of attendance on the final grade for the class is precise (*t* = `r round(M1df$statistic[2], 3)`) and the likelihood that there is no actual relationship between attendance and final grade for the semester is almost zero. This simple linear model with just one predictor (attendance) provides a good fit as well (R$^2$ = `r round(summary(M1)$r.squared, 3)`). See `r figr("attendplot", TRUE, type="Figure")` in this document. 115 | 116 | ```{r attendplot, echo = FALSE, results="asis", cache=FALSE, fig.cap="A Scatterplot of the Relationship between Class Attendance and Final Grade", fig.height=4, fig.pos="H"} 117 | Graph <- ggplot(Attend, aes(x = perattend, y = rgrade)) 118 | Graph + geom_point() + labs(x="Percent Attendance in Class", y="Final Grade in Class (0-100)") + 119 | geom_smooth(method=lm) 120 | ``` 121 | 122 | A student might object that attendance is partly endogenous to a grade since past classes deducted all participation points after five unexcused absences. This is true, but the findings hold even when I subset the data to cases where attendance is greater than 75% (i.e. roughly the threshold below which I deduct all participation points). Students who just meet the threshold for full participation points nevertheless get an estimated decrease of `r round(M2$coefficients[2], 3)*5` in their overall grade for each missed class. This effect is also precise (*t* = `r round(M2df$statistic[2], 3)`). Put another way, we would have observed this effect in my data if there were no *true* effect of attendance on grades about `r round(summary(M2)$coefficients[2,4]*100000)` times in 100,000 "trials" (i.e. *p* = `r round(summary(M2)$coefficients[2,4], 5)`), on average. That probability is effectively zero. *Attend class*. 123 | 124 | ## Late Arrival of the Professor Policy 125 | 126 | My current university, from what I have been told, asks professors to have policies written into their syllabus about what students should do if the professor is more than 15 minutes late to class. This seems like an anachronism. I will inform students via e-mail in advance of class if class is cancelled for the day. I will also contact our department secretary if something happened on the way to work. Failing that, assume the worst happened to me. I ask the students make sure that my story gets the proper treatment on an *Investigation Discovery* show. I also ask that my story be narrated by Keith Morrison. 127 | 128 | ## E-mail Policy 129 | 130 | I am usually quick to respond to student e-mails. However, student e-mails tend to do several things that try my patience. I have a new policy, effective Fall 2016, that outlines why I will not respond to certain e-mails students send. Multiple rationales follow. 131 | 132 | 1. The student could answer his/her own inquiry by reading the syllabus. 133 | 2. The student missed class for which there was no exam. I do not need to know the exact reason for a missed class. Students with excusable absences are responsible for giving me a note *in hard copy* that documents the reason for the missed class. An e-mail is unnecessary unless the impromptu absence involved missing a midterm or final. 134 | 3. The student wants to know what topics s/he missed during a class s/he skipped. The answer is always "you missed what was on the syllabus." 135 | 4. The student is protesting a grade without reference to specific points of objection. See the policy on protesting a grade in the syllabus. These e-mails tend to be expressive utility on the part of the student and do not require a response from me. Students interested in improving their knowledge of material should see me during office hours. 136 | 5. The students wants to know how many classes s/he missed at some point during the semester. I assume the student has a better answer to that question than me until the end of the semester. 137 | 6. The student is requesting an extension on an assignment for which the syllabus already established the deadline. The answer is always "no". 138 | 7. The student is ["grade grubbing"](https://www.math.uh.edu/~tomforde/GradeGrubbing.html) or asking to round up a grade. The answer is always "no". 139 | 8. The student is asking for an extra credit opportunity, a request that amounts to more grading for the professor. The answer is "no". 140 | 141 | 142 | ## Make-Up Exam Policy 143 | 144 | There are **NO** make-ups for missed exams. Don't bother asking. 145 | 146 | ## Academic Dishonesty Policy 147 | 148 | Don’t cheat. Don’t be that guy. Yes, you. You know exactly what I’m talking about too. 149 | 150 | ## Disabilities Policy 151 | 152 | Federal law mandates the provision of services at the university-level to qualified students with disabilities. Make sure to include all that relevant information here. 153 | 154 | 155 | \newpage 156 | 157 | # Class Schedule 158 | 159 | Students must read the following before Tuesday's class session. Important: class readings are subject to change, contingent on mitigating circumstances and the progress we make as a class. Students are encouraged to attend lectures and check the course website for updates. 160 | 161 | ## `r advdate(mon, 1)`: Syllabus Day 162 | 163 | *No class Thursday (Political scientists usually have a conference to start the semester).* 164 | 165 | Read *all* associated documents on course website. 166 | 167 | - [Taking Good Notes](http://svmiller.com/blog/2014/09/taking-good-notes/) 168 | - [Dos and Dont's of Writing for Students](http://svmiller.com/blog/2015/06/dos-and-donts-of-writing-for-students/) 169 | - [Assorted Tips for Students on Writing Research Papers](http://svmiller.com/blog/2015/12/assorted-tips-students-research-papers/) 170 | - [Exam Grading Policy](https://www.dropbox.com/s/apihjs7di81aqcv/svm-exam-grading-policy.pdf?dl=0) 171 | - [Fun with Attendance and Grades (i.e. Students Should Attend Class)](http://svmiller.com/blog/2016/05/fun-with-attendance-grades/) 172 | 173 | 174 | ## `r advdate(mon, 2)`: The First Topic Where We Read John Vasquez 175 | 176 | ```{r, echo = FALSE, results="asis"} 177 | bib[author = "vasquez"] 178 | ``` 179 | 180 | ## `r advdate(mon, 3)`: Read the Nos. 90-97 Items in My Bib 181 | 182 | ```{r, echo = FALSE, results="asis", eval=F} 183 | bib[90:97] 184 | ``` 185 | 186 | *Your "Slow Ride" appreciation paper is due in Thursday's class*. 187 | 188 | ## `r advdate(mon, 4)`: Read Bib Item No. 120 189 | 190 | ```{r, echo = FALSE, results="asis", eval=F} 191 | bib[120] 192 | ``` 193 | 194 | 195 | 196 | ## `r advdate(mon, 5)`: The Fourth Topic with Bib Item No. 510 197 | 198 | ```{r, echo = FALSE, results="asis", eval=F} 199 | bib[510] 200 | ``` 201 | 202 | ## `r advdate(mon, 6)`: Keep 203 | ## `r advdate(mon, 7)`: Going 204 | ## `r advdate(mon, 8)`: Down 205 | 206 | ## `r advdate(mon, 9)`: the 207 | 208 | ## `r advdate(mon, 10)`: Line 209 | 210 | ## `r advdate(mon, 11)`: Until 211 | 212 | ## `r advdate(mon, 12)`: You 213 | 214 | ## `r advdate(mon, 13)`: Are 215 | 216 | ## `r advdate(mon, 14)`: Done 217 | 218 | ## `r advdate(mon, 15)`: with 219 | 220 | 221 | ## `r advdate(mon, 16)`: your 222 | 223 | 224 | ## `r advdate(mon, 17)`: Syllabus 225 | 226 | -------------------------------------------------------------------------------- /syllabus-example/svm-rmarkdown-syllabus-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/syllabus-example/svm-rmarkdown-syllabus-example.pdf -------------------------------------------------------------------------------- /word-example/svm-word-docx-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Untitled (Note: This is a still a work in progress and also MS Word suuuuuucks." 3 | author: "Steven V. Miller" 4 | output: 5 | word_document: 6 | reference_docx: ../svm-rmarkdown-word.docx 7 | --- 8 | 9 | ```{r setup, include=FALSE} 10 | knitr::opts_chunk$set(echo = TRUE) 11 | ``` 12 | 13 | # Section 14 | 15 | ## Subsection 16 | 17 | ### Third subsection 18 | 19 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed commodo consequat mi in fermentum. Phasellus id nisi at nibh sollicitudin volutpat non et massa. Nam nec sapien porttitor, sollicitudin erat vitae, auctor mauris. Nam nisl enim, sagittis vitae semper vitae, suscipit id turpis. Aliquam vel lacinia libero, sit amet dapibus nunc. Nullam vitae bibendum orci. Vestibulum hendrerit maximus volutpat. Nulla a placerat sapien. Integer ullamcorper dapibus magna, eget scelerisque orci consequat quis. Fusce suscipit mi tortor, ultricies faucibus arcu finibus at. Quisque blandit velit in hendrerit pulvinar. 20 | 21 | Integer vitae consequat mi, sit amet pulvinar massa. Quisque at dui lectus. Mauris malesuada mattis arcu nec ultricies. Integer quis condimentum nulla. Nullam lacinia vel diam condimentum hendrerit. Quisque sed rhoncus dolor. Vivamus at sem vitae nisi imperdiet hendrerit a sed felis. Quisque sollicitudin ex nec enim malesuada iaculis. Nam in interdum sapien. Fusce pellentesque volutpat metus faucibus vulputate. In turpis odio, ornare tempus facilisis vel, malesuada sed est. 22 | 23 | Vivamus bibendum velit in magna blandit fringilla. Nullam fermentum euismod nisi, eu consectetur odio fermentum at. Suspendisse egestas sed quam ac scelerisque. Nullam venenatis ipsum semper tortor sagittis tempor. Integer nec leo at est placerat fringilla. Integer mollis vitae enim in condimentum. Pellentesque pulvinar volutpat feugiat. Donec enim tortor, facilisis sit amet vulputate eu, auctor efficitur diam. 24 | 25 | Aenean eleifend sem at massa placerat molestie. Phasellus eget sapien sapien. Ut bibendum mauris sit amet placerat semper. Curabitur sed dui in libero tempus sollicitudin in sit amet odio. In ullamcorper lorem vitae sollicitudin cursus. Nulla id blandit sapien. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam mi orci, maximus a mattis aliquam, finibus eu dolor. Suspendisse ullamcorper dui a orci bibendum, in mollis dolor ullamcorper. 26 | 27 | Aenean in purus sapien. Suspendisse malesuada orci justo, eget sollicitudin neque rhoncus nec. Suspendisse nibh metus, volutpat vel tempor in, vestibulum vitae erat. Ut velit nisl, venenatis vitae condimentum molestie, facilisis eget odio. Nulla ornare vehicula risus, vitae commodo metus aliquet vitae. Nulla nunc metus, rutrum sit amet mauris non, auctor tristique dolor. Phasellus ut nibh at risus scelerisque maximus. Maecenas vitae enim et ligula tempus malesuada. Suspendisse auctor sed ligula vitae semper. Phasellus eu turpis volutpat, luctus leo eget, consectetur lacus. In condimentum erat eu egestas congue. Aenean ut mi ut eros condimentum viverra a quis sapien. Morbi in diam mauris. Sed eu eleifend eros, nec euismod lectus. 28 | 29 | 30 | ## R Markdown 31 | 32 | This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see . 33 | 34 | When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: 35 | 36 | ```{r cars} 37 | summary(cars) 38 | ``` 39 | 40 | ## Including Plots 41 | 42 | You can also embed plots, for example: 43 | 44 | ```{r pressure, echo=FALSE} 45 | plot(pressure) 46 | ``` 47 | 48 | Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot. 49 | -------------------------------------------------------------------------------- /word-example/svm-word-docx-example.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/word-example/svm-word-docx-example.docx -------------------------------------------------------------------------------- /xaringan-example/libs/DiagrammeR-styles/styles.css: -------------------------------------------------------------------------------- 1 | .DiagrammeR,.grViz pre { 2 | white-space: pre-wrap; /* CSS 3 */ 3 | white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ 4 | white-space: -pre-wrap; /* Opera 4-6 */ 5 | white-space: -o-pre-wrap; /* Opera 7 */ 6 | word-wrap: break-word; /* Internet Explorer 5.5+ */ 7 | } 8 | 9 | .DiagrammeR g .label { 10 | font-family: Helvetica; 11 | font-size: 14px; 12 | color: #333333; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /xaringan-example/libs/grViz-binding/grViz.js: -------------------------------------------------------------------------------- 1 | HTMLWidgets.widget({ 2 | 3 | name: 'grViz', 4 | 5 | type: 'output', 6 | 7 | initialize: function(el, width, height) { 8 | 9 | return { 10 | // TODO: add instance fields as required 11 | } 12 | 13 | }, 14 | 15 | renderValue: function(el, x, instance) { 16 | // use this to sort of make our diagram responsive 17 | // or at a minimum fit within the bounds set by htmlwidgets 18 | // for the parent container 19 | function makeResponsive(el){ 20 | var svg = el.getElementsByTagName("svg")[0]; 21 | if(svg){ 22 | if(svg.width) {svg.removeAttribute("width")}; 23 | if(svg.height) {svg.removeAttribute("height")}; 24 | svg.style.width = "100%"; 25 | svg.style.height = "100%"; 26 | } 27 | }; 28 | 29 | if ( x.diagram != "" ) { 30 | 31 | if ( typeof x.config === "undefined" ){ 32 | x.config = {}; 33 | x.config.engine = "dot"; 34 | x.config.options = {}; 35 | } 36 | 37 | try { 38 | el.innerHTML = Viz( x.diagram, format="svg", engine=x.config.engine, options=x.config.options ); 39 | 40 | makeResponsive(el); 41 | 42 | // set up a container for tasks to perform after completion 43 | // one example would be add callbacks for event handling 44 | // styling 45 | if (!(typeof x.tasks === "undefined") ){ 46 | if ( (typeof x.tasks.length === "undefined") || 47 | (typeof x.tasks === "function" ) ) { 48 | // handle a function not enclosed in array 49 | // should be able to remove once using jsonlite 50 | x.tasks = [x.tasks]; 51 | } 52 | x.tasks.map(function(t){ 53 | // for each tasks add it to the mermaid.tasks with el 54 | t.call(el); 55 | }) 56 | } 57 | } catch(e){ 58 | var p = document.createElement("pre") 59 | p.innerText = e; 60 | el.appendChild(p); 61 | } 62 | } 63 | 64 | }, 65 | 66 | resize: function(el, width, height, instance) { 67 | 68 | } 69 | 70 | 71 | }); 72 | -------------------------------------------------------------------------------- /xaringan-example/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right ~ * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /xaringan-example/svm-xaringan-example.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Steve's Xaringan Presentation" 3 | subtitle: "POSC 0000 -- It Would Be Cool If This Were an Actual Class Presentation" 4 | author: "Steven V. Miller


Department of Political Science" 5 | institute: Department of Political Science 6 | output: 7 | xaringan::moon_reader: 8 | css: ["default", "../svm-xaringan-style.css"] 9 | lib_dir: libs 10 | nature: 11 | highlightStyle: github 12 | highlightLines: true 13 | countIncrementalSlides: false 14 | --- 15 | 16 | ```{r setup, include=FALSE} 17 | options(htmltools.dir.version = FALSE) 18 | knitr::opts_chunk$set(dev = 'svg') 19 | options(device = function(file, width, height) { 20 | svg(tempfile(), width = width, height = height) 21 | }) 22 | library(tidyverse) 23 | library(stevemisc) 24 | ``` 25 | 26 | 27 | 28 | # Install Xaringan First 29 | 30 | Install the **xaringan** package from [Github](https://github.com/yihui/xaringan): 31 | 32 | ```{r eval=FALSE, tidy=FALSE} 33 | devtools::install_github("yihui/xaringan") 34 | ``` 35 | 36 | 37 | You are recommended to use the [RStudio IDE](https://www.rstudio.com/products/rstudio/), but you do not have to. 38 | 39 | - Create a new R Markdown document from the menu `File -> New File -> R Markdown -> From Template -> Ninja Presentation`;1 40 | - Click the `Knit` button to compile it. 41 | 42 | --- 43 | 44 | # remark.js Maximizes the Presentation Value 45 | 46 | Press `h` or `?` to see controls you have in remark.js. 47 | 48 | Hit `Esc` to exit that screen. 49 | 50 | 51 | 52 | --- 53 | 54 | class: center, middle 55 | 56 | # You can do this to your slides if you want 57 | ## Add `class: center, middle` to the start of your slide. 58 | ### Perhaps you want the appearance of a secondary title slide, which is what this will do. 59 | 60 | For example, check this out... 61 | 62 | --- 63 | 64 | class: center, middle 65 | 66 | # Pop Music and Political Science 67 | ## POSC 0000 -- It Would Be Cool If This Were an Actual Class Presentation 68 | ### I am not funny and you will be forgiven for thinking of me as impossibly uncool. 69 | 70 | 71 | 72 | --- 73 | 74 | # Sheena Easton and Total Conflict 75 | 76 | Sheena Easton describes the following scenario for her baby: 77 | 78 | - Takes the morning train 79 | - Works from nine 'til five 80 | - Takes another train home again 81 | - Finds Sheena Easton waiting for him 82 | 83 | -- 84 | 85 | Sheena Easton and her baby are playing a **zero-sum (total conflict)** game. 86 | 87 | - Akin to Holmes-Moriarty game (see: von Neumann and Morgenstern), or "matching pennies." 88 | - Useful for modeling strategic counterterrorism dilemmas between a government and terrorist group. 89 | 90 | 91 | --- 92 | 93 | # A Total Conflict Between Sheena Easton and Her Baby 94 | 95 | | | Sheena Easton Stays Home | Sheena Easton Goes to Baby's Work | 96 | |-------------------------|---------------------|------------------| 97 | | **Baby Home Again** | -100, **100** | **100**, 0 | 98 | | **Baby Stays at Work** | **50**, 0 | -100, **100** | 99 | 100 | -- 101 | 102 |
103 | 104 | Notice we have no pure strategies, and no Nash equilibrium. 105 | 106 | - Sheena Easton wants to proverbially "match pennies." 107 | - Her baby has diametrically opposed preferences, fearing for his safety. 108 | 109 | Solution: mixed strategy. 110 | 111 | --- 112 | background-image: url(https://media.giphy.com/media/dqZSIfquVhSg0/giphy.gif) 113 | background-position: 50% 50% 114 | background-size: 100% 115 | class: center, bottom, fullscale 116 | 117 | # Run... 118 | 119 | --- 120 | 121 | # Congressman Astley's Re-election Platform 122 | 123 | Assume Congressman Astley presides over a competitive district in which he seeks reappointment. He promises he's: 124 | 125 | - Never gonna give you up. 126 | - Never gonna let you down. 127 | - Never gonna run around and desert you. 128 | - Never gonna make you cry. 129 | - Never gonna say goodbye. 130 | - Never gonna tell a lie and hurt you. 131 | 132 | Are these promises (if credible) sufficient to secure re-election? 133 | 134 | --- 135 | 136 | ```{r, eval = T, echo = F, fig.width=11, fig.height = 8, message=F, dev='svg', fig.cap = "SDFSFDSFS"} 137 | 138 | df <- data.frame(x = rnorm(1000)) 139 | x <- df$x 140 | 141 | ggplot(df, aes(x)) + 142 | theme_steve_web() + 143 | stat_function(fun = dnorm, colour = "black") + 144 | scale_x_continuous(limits = c(-4, 4), 145 | breaks = c(-4, 0, 4), 146 | labels = c("Complete\nEmotional\nNeglect", 147 | "Never Gonna Give You Up\nLet You Down\nRun Around and Desert You\n(Preference of Median Voter)", 148 | "Maximum\nEmotional\nSupport")) + 149 | geom_vline(xintercept = 0) + 150 | geom_vline(xintercept = 1, linetype="dashed") + 151 | geom_vline(xintercept = -2, linetype = "dashed") + 152 | geom_vline(xintercept = -.5, linetype = "dotted") + 153 | scale_y_continuous(limits = c(0, .5), breaks = NULL, label=NULL) + 154 | xlab("A Unidimensional Continuum of the Policy Space of Emotional Support") + 155 | ylab("") + 156 | stat_function(fun = dnorm, 157 | xlim = c(-4,-2), 158 | size=0, 159 | geom = "area", fill="#f8766d", alpha=1) + 160 | stat_function(fun = dnorm, 161 | xlim = c(1, 4), 162 | size=0, 163 | geom = "area", fill="#619cff", alpha=1) + 164 | stat_function(fun = dnorm, 165 | xlim = c(-.5, 1), 166 | size=0, 167 | geom = "area", fill="#619cff", alpha=.4) + 168 | stat_function(fun = dnorm, 169 | xlim = c(-2, -.5), 170 | size=0, 171 | geom = "area", fill="#f8766d", alpha=.4) + 172 | annotate("text", label="Astley's rival is promising\nfar less in the (public?) good\nof emotional support", 173 | size = 3.5, family="Open Sans", 174 | x = -2.1, y = .4, 175 | hjust = 1) + 176 | annotate("text", 177 | label="Congressman Astley is pledging\nmore emotional support\n(i.e. never gonna make you cry/say goodbye/tell a lie/hurt you)\nthan most his constituents want", 178 | size = 3.5, family="Open Sans", 179 | x = 1.1, y = .4, 180 | hjust = 0) + 181 | annotate("text", 182 | label="Preferences\ncloser to\nAstley's\nrival", 183 | size = 3.5, family="Open Sans", 184 | x = -1.2, y = .45, 185 | hjust = .5) + 186 | annotate("text", 187 | label="Preferences\ncloser to\nCongressman\nAstley", 188 | size = 3.5, family="Open Sans", 189 | x = .5, y = .45, 190 | hjust = .5) + 191 | labs(title = "Median Voter Theorem Suggests Congressman Astley Secures Re-election Against His Rival", 192 | subtitle = "Assuming a unidimensional policy space and single-peaked preferences, Congressman Astley is closer to the median voter than his rival and wins the election.") + 193 | geom_hline(yintercept = 0) + 194 | geom_vline(xintercept = -4) 195 | 196 | 197 | 198 | 199 | ``` 200 | 201 | --- 202 | background-image: url(https://media.giphy.com/media/Vuw9m5wXviFIQ/giphy.gif) 203 | background-position: 50% 50% 204 | background-size: 100% 205 | class: center, bottom, fullscale 206 | 207 | # Re-election Dance 208 | 209 | 210 | 211 | --- 212 | 213 | # Caribbean Queen and Operation Urgent Fury 214 | 215 | .pull-left[ 216 | 217 | Billy Ocean released "Caribbean Queen" in 1984. 218 | 219 | - Emphasized sharing the same dream 220 | - Hearts beating as one 221 | 222 | "Caribbean Queen" is about the poor execution of Operation Urgent Fury. 223 | 224 | - Coordination problems plagued its execution from the start. 225 | - Echoed JCS chairman David Jones' frustrations with military establishment. 226 | ] 227 | 228 | .pull-right[ 229 | 230 | ![](http://wearethemighty.wpengine.netdna-cdn.com/wp-content/uploads/2016/05/GrenadaNewsCartoon.jpg) 231 | 232 | *This seriously happened, btw..* 233 | ] 234 | 235 | Billy Ocean is advocating for what became the Goldwater-Nichols Act. 236 | 237 | - Wanted to take advantage of **economies of scale**, resolve **coordination problems** in U.S. military. 238 | 239 | --- 240 | 241 | background-image: url(https://i.makeagif.com/media/9-05-2015/auHafh.gif) 242 | background-position: 50% 50% 243 | background-size: 100% 244 | class: center, bottom, fullscale 245 | 246 | # The military establishment was the tiger we wanted to tame all along. 247 | 248 | 249 | --- 250 | 251 | # The Good Day Hypothesis 252 | 253 | We know the following about Ice Cube's day. 254 | 255 | 1. The Lakers beat the Supersonics. 256 | 2. No helicopter looked for a murder. 257 | 3. Consumed Fatburger at 2 a.m. 258 | 4. Goodyear blimp: "Ice Cube's a pimp." 259 | 260 | -- 261 | 262 | This leads to two different hypotheses: 263 | 264 | - $H_0$: Ice Cube's day is statistically indistinguishable from a typical day. 265 | - $H_1$: Ice Cube is having a good day. 266 | 267 | These hypotheses are tested using archival data from Ice Cube's life to estimate an item response model of the "goodness" of Ice Cube's days. 268 | 269 | --- 270 | 271 | ```{r, eval = T, echo = F, fig.width=11, fig.height = 8, message=F, dev='svg', fig.cap = "SDFSFDSFS"} 272 | interval1 <- -qnorm((1-0.9)/2) # 90% multiplier 273 | interval2 <- -qnorm((1-0.95)/2) # 95% multiplier 274 | 275 | tribble( 276 | ~variable, ~est, ~se, 277 | "Latent Estimate of\nIce Cube's Day", 1.6, .231 278 | ) %>% 279 | ggplot(.) + theme_steve_web() + 280 | geom_hline(yintercept = .5, color = "red", lty=2) + 281 | geom_linerange(aes(x = variable, ymin = est - se*interval1, 282 | ymax = est + se*interval1), 283 | lwd = 1, position = position_dodge(width = 1/2)) + 284 | geom_pointrange(aes(x = variable, y = est, ymin = est - se*interval2, 285 | ymax = est + se*interval2), 286 | lwd = 1/2, position = position_dodge(width = 1/2), 287 | fill = "WHITE") + 288 | coord_flip() + xlab("") + ylab("Latent Estimate") + 289 | labs(title = "Latent Estimates from Ice Cube's Archives Lend Support to the 'Good Day' Hypothesis", 290 | subtitle = "Latent estimates are drawn from an item response model of indicators of the quality of Ice Cube's days. These include whether he had to use his A.K.", 291 | caption = "Data: Ice Cube's Archives, obviously fictional. Red value of .5 indicate likelihood of 'good day.'") 292 | 293 | 294 | 295 | ``` 296 | 297 | --- 298 | 299 | background-image: url(https://media.giphy.com/media/cgh25bl5dgK3u/giphy.gif) 300 | background-position: 50% 50% 301 | background-size: 100% 302 | class: center, bottom, fullscale 303 | 304 | --- 305 | 306 | class: center, middle 307 | 308 | # You Can Do Other Stuff in Xaringan Too 309 | ## POSC 0000 -- It Would Be Cool If This Were an Actual Class Presentation 310 | ### I might use it mostly for the ability to put GIFs in class presentations, but it's flexible enough to do almost anything. 311 | 312 | --- 313 | 314 | Show some R code and execute it if you'd like. 315 | 316 | ```{r} 317 | pi 318 | 319 | 3+5 320 | 321 | rnorm(10) 322 | 323 | ``` 324 | 325 | 326 | --- 327 | 328 | Here's a simple ultimatum game, a la Fearon (1995). Done via `DiagrammeR`. 329 | 330 | ```{r, echo=F, eval=T} 331 | library(DiagrammeR) 332 | grViz(" 333 | digraph { 334 | # Multiple level nodes 335 | node [shape = square, color=CornflowerBlue] 336 | A [label = 'A']; 337 | 0 [label = '0', shape = none]; 338 | B [label = 'B']; 339 | 1 [label = '1', shape = none]; 340 | Accept [label = '1 - x, x', shape = none]; 341 | N; 342 | Awins [shape = none, label = '1 - k, k']; 343 | Bwins [shape = none, label = '-k, 1 - k'] 344 | 345 | 346 | 347 | # Connect nodes with edges and labels 348 | A -> 0 [arrowhead= none] 349 | A -> B 350 | A -> 1 [arrowhead = none] 351 | B -> Accept [headlabel = 'Accept', labeldistance = 5, labelangle=75] 352 | B -> N [label = ' Reject'] 353 | N -> Awins [headlabel = 'A wins (1 - p)', labeldistance=4.5 , 354 | labelangle=75] 355 | N -> Bwins [label = 'B wins (p)'] 356 | } 357 | 358 | [1]: 'A' 359 | [2]: '0' 360 | [3]: paste0('Model 3\\n Split 3') 361 | [4]: paste0('Model 6\\n Split 4') 362 | ") 363 | 364 | ``` 365 | 366 | --- 367 | 368 | # Conclusion 369 | 370 | Xaringan is a nifty Rstudio add-on/package for creating HTML presentations. 371 | 372 | - I think I'm still more inclined toward Beamer but Xaringan has tons of flexibility. 373 | - Have an interactive component to your presentation (e.g. `leaflet` or a Shiny app)? You probably want Xaringan. 374 | 375 | Plus, you can put GIFs into your presentation with Xaringan. That's nifty. Maybe students will like that. 376 | 377 | 378 | 379 | --- 380 | 381 | background-image: url(https://i.imgur.com/IHeUeZ9.gif) 382 | background-position: 50% 50% 383 | background-size: 100% 384 | class: center, bottom, fullscale 385 | 386 | Questions? Hate mail? Stay out of my mentions @stevenvmiller -------------------------------------------------------------------------------- /xaringan-example/svm-xaringan-example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Steve’s Xaringan Presentation 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 288 | 289 | 290 | 334 | 335 | 345 | 346 | 365 | 366 | 376 | 377 | 378 | -------------------------------------------------------------------------------- /xaringan-example/svm-xaringan-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svmiller/svm-r-markdown-templates/d8c9c172da3426badf585de82012999e65a6ca76/xaringan-example/svm-xaringan-example.pdf --------------------------------------------------------------------------------