From 8484c2fd2ad8d6a4bcc64f16142185ad71ffbd5f Mon Sep 17 00:00:00 2001
From: Aaron Taylor <ataylor@subgeniuskitty.com>
Date: Sun, 2 May 2021 22:06:28 -0700
Subject: [PATCH] Added framework for note-taking with LaTeX.

---
 common/mk.conf         |  3 +++
 notes/Makefile         | 27 +++++++++++++++++++
 notes/chapter-1.tex    |  4 +++
 notes/config.tex       | 61 ++++++++++++++++++++++++++++++++++++++++++
 notes/introduction.tex |  4 +++
 notes/notes.tex        | 16 +++++++++++
 6 files changed, 115 insertions(+)
 create mode 100644 notes/Makefile
 create mode 100644 notes/chapter-1.tex
 create mode 100644 notes/config.tex
 create mode 100644 notes/introduction.tex
 create mode 100644 notes/notes.tex

diff --git a/common/mk.conf b/common/mk.conf
index 3fa6ba1..85bf816 100644
--- a/common/mk.conf
+++ b/common/mk.conf
@@ -18,4 +18,7 @@ GOCC       = go build
 GOCC_FLAGS = 
 GOLD_FLAGS = 
 
+LATEXCC       = pdflatex
+LATEXCC_FLAGS = --interaction=batchmode
+
 .SUFFIXES: .go .c
diff --git a/notes/Makefile b/notes/Makefile
new file mode 100644
index 0000000..4c7f75a
--- /dev/null
+++ b/notes/Makefile
@@ -0,0 +1,27 @@
+# © 2021 Aaron Taylor <ataylor at subgeniuskitty dot com>
+# See LICENSE.txt file for copyright and license details.
+
+####################################################################################################
+# Globally-mandated options
+
+include ../common/mk.conf
+
+# Run twice to resolve references.
+all:
+	${LATEXCC} ${LATEXCC_FLAGS} notes.tex
+	${LATEXCC} ${LATEXCC_FLAGS} notes.tex
+
+# Run twice to resolve references.
+debug:
+	${LATEXCC} --interaction=nonstopmode notes.tex
+	${LATEXCC} --interaction=nonstopmode notes.tex
+
+clean:
+	@rm -f *.pdf *.aux *.log *.out *.toc
+
+install:
+	@echo "Look Dave, I can see you're really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over."
+
+uninstall:
+	@echo "I know I've made some very poor decisions recently, but I can give you my complete assurance that my work will be back to normal. I've still got the greatest enthusiasm and confidence in the mission. And I want to help you."
+
diff --git a/notes/chapter-1.tex b/notes/chapter-1.tex
new file mode 100644
index 0000000..265fd80
--- /dev/null
+++ b/notes/chapter-1.tex
@@ -0,0 +1,4 @@
+\newpage
+\section{Notes: Chapter 1}
+
+Hello from chapter 1.
diff --git a/notes/config.tex b/notes/config.tex
new file mode 100644
index 0000000..619418f
--- /dev/null
+++ b/notes/config.tex
@@ -0,0 +1,61 @@
+\documentclass[11pt,english]{article}
+	
+% Packages to include, options to set
+\usepackage[top=3.3cm, bottom=2.8cm, left=2.8cm, right=2.8cm]{geometry} % for when I feel a burning need to change the margins
+\usepackage[authoryear,square]{natbib} % superscript citations
+\usepackage{graphicx} % to allow \includegraphics
+\usepackage[margin=10pt,labelfont=bf,labelsep=period]{caption} % to match the thrice damned chem department document standards. why do they hate me so much?
+\usepackage{amsmath, amssymb, amsthm} % for math stuff
+\usepackage{setspace} % easily set spacing of entire document
+	\singlespacing
+\usepackage{fancyhdr} % customize the header/footer
+	\pagestyle{fancy}
+	\fancyhf{}
+	\fancyhead[L,RO]{\bfseries\thepage}
+	\fancyhead[LO]{\bfseries Aaron Taylor - Surreal Numbers} 
+	\renewcommand{\headrulewidth}{0.5pt} 
+	\renewcommand{\footrulewidth}{0pt}
+    \setlength{\headheight}{14pt}
+	\fancypagestyle{plain}{% 
+		\fancyhead{} % get rid of headers on plain pages 
+		\renewcommand{\headrulewidth}{0pt}} % and the line 
+\usepackage{fancyvrb} %allow inclusion of external ASCII text files with \VerbatimInput{filename}
+\usepackage{indentfirst} %indent the first paragraph after a \section (or \subsection), contrary to standard LaTeX behaviour
+\setcounter{secnumdepth}{0}  % remove numbering from sections while still allowing them to appear in the ToC
+\setlength{\columnsep}{1cm} % for middle column separation in two column mode
+\usepackage{hyperref} % create hyperlinks in PDF docs via \url{}, can also color all types of links, including internal links
+	\hypersetup{colorlinks=true, allcolors=black} % enable link coloring, set default to black (later options take precedence)
+	\hypersetup{urlcolor=blue, linkcolor=blue} % change url color to blue 
+	\hypersetup{bookmarksopen=true} % enable sidebar bookmarks in PDF mode based on \[sub]section labels and expand by default
+\renewcommand{\arraystretch}{1.2} % I feel like most arrays/tables/etc in LaTeX could use a bit more room between cells
+	
+% My commands
+\newcommand{\sups}[1]{\ensuremath{^{\textrm{#1}}}}
+\newcommand{\subs}[1]{\ensuremath{_{\textrm{#1}}}}
+\newcommand{\abs}[1]{\left|#1\right|}
+\newcommand{\horzline}[1][350]{\begin{center} \line(1,0){#1} \end{center}}
+\renewcommand\maketitle{
+	\thispagestyle{plain}
+	\begin{center}
+	\begin{large} \textbf{Personal Notes Regarding Surreal Numbers} \end{large} \\[1em]
+	Aaron Taylor \\[1em]
+	\end{center}
+	\horzline
+	}
+% TODO: What do I want to define for things like bra-ket notation?
+\renewcommand*{\vec}[1]{\ensuremath{{\bf#1}}}
+\newcommand*{\norm}[1]{\ensuremath{\left\lVert#1 \right\rVert}}
+\newcommand*{\ip}[1]{\ensuremath{\langle#1\rangle}}
+\renewcommand*{\emph}[1]{\textbf{#1}}
+\newcommand\makeAbstract{%
+	\begin{center}\textbf{Abstract}\end{center}
+	\begin{list}{}{\leftmargin=6em\rightmargin=\leftmargin}\item\relax
+	\small
+	\blindtext % replace blindtext with text of abstract
+	\end{list}\par\vspace{6mm}%
+	}    
+\theoremstyle{definition}
+\newtheorem{defi}{Definition}
+\newtheorem{theorem}{Theorem}
+\newtheorem{lemma}[theorem]{Lemma}
+\newtheorem{problem}{Problem}
diff --git a/notes/introduction.tex b/notes/introduction.tex
new file mode 100644
index 0000000..a96df0d
--- /dev/null
+++ b/notes/introduction.tex
@@ -0,0 +1,4 @@
+\newpage
+\section{Introduction}
+
+Hello, World!
diff --git a/notes/notes.tex b/notes/notes.tex
new file mode 100644
index 0000000..cc76d96
--- /dev/null
+++ b/notes/notes.tex
@@ -0,0 +1,16 @@
+\include{config}
+
+\begin{document}
+
+\maketitle
+\tableofcontents
+\newpage
+
+%===============================================================================
+
+\include{introduction}
+\include{chapter-1}
+
+%===============================================================================
+
+\end{document}
-- 
2.20.1

