Skip to content

Commit

Permalink
formalism: Use subfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
mirryi committed May 31, 2023
1 parent 53829c0 commit be93dfa
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
16 changes: 5 additions & 11 deletions formalism/formalism.tex
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
\documentclass{article}
\input{preamble/preamble}
\usepackage[margin=1in]{geometry}

\makeatletter
\renewcommand\tableofcontents{%
\@starttoc{toc}%
}
\makeatother
\input{preamble/preamble}
\usepackage{subfiles}

\begin{document}
\setcounter{tocdepth}{2}
\tableofcontents

\renewcommand{\thesection}{\Alph{section}}

\input{marked}
\subfile{marked}
\newpage
\input{untyped}
\subfile{untyped}
\newpage
\input{typed}
\subfile{typed}

\end{document}
5 changes: 5 additions & 0 deletions formalism/marked.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
\documentclass[formalism.tex]{subfiles}

\begin{document}
\section{Marked Lambda Calculus}
The \emph{marked lambda calculus} is a judgmental framework for bidirectional type error
localization and recovery. Below is the complete formalization of the calculus on a gradually typed
Expand Down Expand Up @@ -953,3 +956,5 @@ \subsubsection{Localize to First}

\input{patterned}
\input{polymorphism}

\end{document}
13 changes: 13 additions & 0 deletions formalism/preamble/preamble.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
\hbadness=99999

\usepackage{iftex}
\ifPDFTeX
\usepackage{libertinust1math}
Expand All @@ -7,6 +9,8 @@
\fi
\usepackage[scaled=0.8]{FiraMono}

\usepackage[margin=1in]{geometry}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
Expand All @@ -15,6 +19,8 @@
\usepackage{mathtools}
\usepackage{mathpartir}
\usepackage{stmaryrd}
\SetSymbolFont{stmry}{bold}{U}{stmry}{m}{n}

\usepackage{bm}
\usepackage{relsize}
\usepackage{centernot}
Expand All @@ -32,3 +38,10 @@
\declaretheorem[name=Definition, parent=section, style=definition]{definition}

\input{preamble/symbols}

\makeatletter
\renewcommand\tableofcontents{%
\@starttoc{toc}%
}
\makeatother
\setcounter{tocdepth}{2}
6 changes: 6 additions & 0 deletions formalism/typed.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
\documentclass[formalism.tex]{subfiles}

\begin{document}
\section{Typed Hazelnut}

\subsection{Syntax}
Expand Down Expand Up @@ -116,6 +119,7 @@ \subsubsection{Type Cursor Erasure}
\subsubsection{Expression Cursor Erasure}
\judgbox{\ensuremath{\cursorErase{\ZMV}}} is a metafunction defined as follows:
%
\newcommand{\cursorErasesToRow}[2]{\ensuremath{\cursorErase{#1} & = & #2}}
\[\begin{array}{rcl}
\cursorErasesToRow{\ZCursor{\ECMV}}{\ECMV} \\
\cursorErasesToRow{(\ZLamT{x}{\ZTMV}{\ECMV})}{\ECLam{x}{\cursorErase{\ZTMV}}{\ECMV}} \\
Expand Down Expand Up @@ -937,3 +941,5 @@ \subsubsection{Metatheorems}
$\AAEActionIter{\ctx}{\ZMV}{\ZMV''}{\TMV}{\AMV}$, then $\ZMV' = \ZMV''$.
\end{enumerate}
\end{theorem}

\end{document}
5 changes: 5 additions & 0 deletions formalism/untyped.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
\documentclass[formalism.tex]{subfiles}

\begin{document}
\section{Untyped Hazelnut}

\subsection{Syntax}
Expand Down Expand Up @@ -692,3 +695,5 @@ \subsubsection{Metatheorems}
% $\AUEAction{\ZCursor{\EMV}}{\ZMV}{\AMV}$.
% \end{enumerate}
% \end{theorem}

\end{document}

0 comments on commit be93dfa

Please sign in to comment.