Skip to content

Instantly share code, notes, and snippets.

@mw3i
Last active May 28, 2022 17:11
Show Gist options
  • Save mw3i/da81c1dcf8d4fc62e6aa116220058aad to your computer and use it in GitHub Desktop.
Save mw3i/da81c1dcf8d4fc62e6aa116220058aad to your computer and use it in GitHub Desktop.
Markdown + Latex Template for a Masters or Dissertation Thesis (following the guidelines of Binghamton University)
documentclass bibliography csl fontsize classoption link-citations color-links urlcolor indent header-includes
book
./path/to/bibfile.bib
.csl
12pt
oneside
true
true
blue
true
\usepackage[utf8]{inputenc} \usepackage{indentfirst} \usepackage{setspace} \usepackage{titlesec} \usepackage{ragged2e} \usepackage{setspace} \usepackage{tabu} \usepackage{geometry} \geometry{a4paper,top=2.0in,bottom=1.0in, left=1.5in,right=1.0in,headsep=0.0in,footskip=0.5in} \usepackage{graphicx} \graphicspath{ {./figures/} } \usepackage[sorting=none, style=apa]{biblatex} \addbibresource{.bib} \pagestyle{plain} \justifying \usepackage{nomencl} \makenomenclature \renewcommand{\nomname}{List of Abbreviations} \usepackage{blindtext} \usepackage{subfiles} \usepackage{tocloft} \renewcommand{\cfttoctitlefont}{\hspace*{\fill}\Huge\bfseries} \renewcommand{\cftaftertoctitle}{\hspace*{\fill}} \renewcommand{\cftlottitlefont}{\hspace*{\fill}\Huge\bfseries} \renewcommand{\cftafterlottitle}{\hspace*{\fill}} \renewcommand{\cftloftitlefont}{\hspace*{\fill}\Huge\bfseries} \renewcommand{\cftafterloftitle}{\hspace*{\fill}}

\pagenumbering{roman}

\begin{titlepage} \begin{center}

TITLE\

\vspace{6.5cm}

BY

\vspace{0.7cm}

AUTHOR NAME

\vspace{0.7cm}

BA, A College, YEAR \ MS, Another College, YEAR \

\vfill \vspace{0.8cm}

DISSERTATION

\vspace{0.8cm}

Submitted in partial fulfillment of the requirements for\ the degree of ''degree name''\ in the Graduate School of\ ''college name''\ ''college name line 2''\ YEAR

\end{center} \end{titlepage}

\newpage

\begin{center}

\thispagestyle{empty}

\null

\vfill

\copyright\ Copyright by Author Name YEAR

\

All Rights Reserved

\end{center}

\newpage \addtocounter{page}{1}

\null

\baselineskip = 10pt

\vfill

\centerline{Accepted in partial fulfillment of the requirements for} \centerline{the degree of ''degree name''} \centerline{in the Graduate School of} \centerline{''college name''} \centerline{''college name line 2''} \centerline{YEAR}

\

\centerline{May 10, 2022}

\

\centerline{''Name Of Chairperson'', Chair} \centerline{Department of ''department'', ''college name''} \

\centerline{''Name Of Committee Member'', Member} \centerline{Department of ''department'', ''college name''} \

\centerline{''Name Of Committee Member'', Member} \centerline{Department of ''department'', ''college name''} \

\centerline{''Name Of Outside Examiner'', Outside Examiner} \centerline{Department of ''department'', ''college name''}

\newpage

\newgeometry{a4paper,top=1.0in,bottom=1.0in,left=1.5in,right=1.0in,headsep=0.0in,footskip=0.5in}

\newcommand{\chapfnt}{\fontsize{18}{18}} \newcommand{\secfnt}{\fontsize{14}{14}} \newcommand{\ssecfnt}{\fontsize{12}{12}} \setstretch{2.0}

\chapter*{\centering Abstract}

This is a template for a master's thesis or dissertation, following Binghamton Univesrity's formatting guides.

You can build it to a pdf with pandoc, which will treat it as a markdown file but pretty seemlessly handle any latex you throw in as well

Build with:

pandoc thesis.md --bibliography=path/to/bibfile.bib -o output.pdf

if you want a specific citation style (like apa); get the csl and do:

pandoc thesis.md --bibliography=path/to/bibfile.bib --csl=path/to/apa.csl -o output.pdf

\newpage

\chapter*{\centering Acknowledgements}

Some acknowledgements...

\newpage

\setstretch{1.0} \tableofcontents

\newpage \listoftables \addcontentsline{toc}{chapter}{List of Tables}

\newpage \listoffigures \addcontentsline{toc}{chapter}{List of Figures}

\mainmatter \setstretch{2.0}

\chapter{\centering Introduction}

You can type markdown from here on out. I used \chapter{} instead of # Heading... for formatting reasons, but all subjects can use ## Subheading..., ### Subsubheading..., and so on.

If you want to include citations, it's super convenient; you just:

  • have a .bib file with a bunch of bibtex entries
  • cite in text with: @entryName. If you want the in text citation to be in parentheses, you do: [@entryName].
    • multiple parenthetical citations: [@entryName1; @entryName2; @entryName3]
    • even cooler: you should be able to include text as well [as noted by @entryName1; though see @entryName2].

Subheading

Figures can be included by just doing normal markdown images. You can reference figures and it will autonumber and all that (see Figure \ref{fig:ref2fig}).

Figure Caption...{#fig:ref2fig}

Tables work too, you just used normal markdown pipe table format (see Table \ref{tbl:ref2table}):

this is a table
here is some data
and some more data

Table: Table caption... \label{tbl:ref2table}

Another Subheading

Math works pretty seemlessly too, just do something like: $$y = mx + b$$ where $m = \frac{rise}{run}$, $x$, $b$, and $y$ ...

^ just use the typical latex math equation syntax

Also, footnotes are super easy to do^[here's an example of a footnote]

\chapter{\centering Appendix}

\chapter{\centering References}

\setstretch{1.0} \setlength{\parskip}{12pt}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment