From b5ad4850acae824de3497c15df4ab578e3dec5b8 Mon Sep 17 00:00:00 2001
From: Richard Zach <rzach@ucalgary.ca>
Date: Mon, 21 Aug 2017 15:09:33 -0600
Subject: [PATCH] make content independent of memoir class (issue #151)

---
 open-logic-complete.tex  |  2 +-
 open-logic-debug.tex     |  2 +-
 sty/open-logic-debug.sty | 15 +++++++++++++++
 sty/open-logic.sty       | 24 ++++++++++++------------
 4 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/open-logic-complete.tex b/open-logic-complete.tex
index 469e2713..b03b4106 100644
--- a/open-logic-complete.tex
+++ b/open-logic-complete.tex
@@ -23,7 +23,7 @@
 
 \let\cleardoublepage\clearpage
 
-\pagestyle{openlogic}
+\pagestyle{plain}
 
 \begin{document}
 
diff --git a/open-logic-debug.tex b/open-logic-debug.tex
index eef2576c..c91dbcb3 100644
--- a/open-logic-debug.tex
+++ b/open-logic-debug.tex
@@ -1,4 +1,4 @@
-% open-logic-dev.tex
+% open-logic-debug.tex
 % master file to produce debug version
 % includes all references, markup, etc.
 
diff --git a/sty/open-logic-debug.sty b/sty/open-logic-debug.sty
index ac870e9a..b725f929 100644
--- a/sty/open-logic-debug.sty
+++ b/sty/open-logic-debug.sty
@@ -5,6 +5,8 @@
 \RequirePackage{xparse}
 \RequirePackage{xcolor}
 
+% oldebugnote puts a note in the margin
+
 \DeclareDocumentCommand \oldebugnote { s o m } {
   \IfBooleanTF{#1}{\reversemarginpar}{}
   \marginnote{\tiny
@@ -32,3 +34,16 @@
   \photocredits
   \bibliographystyle{\olpath/bib/natbib-oup}
   \bibliography{\olpath/bib/open-logic}}
+
+% put file info in footer (depends on memoir)
+
+\copypagestyle{openlogic}{plain}
+\makeevenfoot{openlogic}{\thepage}{}{\shortollicense}
+\makeoddfoot{openlogic}{\shortollicense}{}{\thepage}
+
+% adjust section number widths (depends on memoir)
+
+\setlength{\cftpartnumwidth}{2.2em}
+\setlength{\cftchapternumwidth}{2.2em}
+\setlength{\cftsectionnumwidth}{2.8em}
+
diff --git a/sty/open-logic.sty b/sty/open-logic.sty
index 2e9519fd..bf664ad9 100644
--- a/sty/open-logic.sty
+++ b/sty/open-logic.sty
@@ -15,15 +15,17 @@
 \RequirePackage{framed}
 \RequirePackage{bussproofs}
 \RequirePackage{graphicx}
+
 \RequirePackage{natbib}
 \setcitestyle{authoryear}
 
 \RequirePackage{tikz}
-\usetikzlibrary{arrows}
 \RequirePackage{tikzscale}
+\usetikzlibrary{arrows,automata}
 
 \RequirePackage{wrapfig}
 \RequirePackage{catchfile}
+\RequirePackage{tocloft}
 
 \RequirePackage{xcolor}
 \definecolor{dark-gray}{gray}{0.2}
@@ -40,9 +42,7 @@
 \RequirePackage{thmtools}
 \RequirePackage[nameinlink]{cleveref} % always after hyperref!
 
-\usepackage{pgf}
-\usepackage{tikz}
-\usetikzlibrary{arrows,automata}
+%\usepackage{pgf}
 
 \makeatletter
 
@@ -69,6 +69,10 @@
 
 \newcommand*{\DeclareDocumentMacro}[2]{\def#1{#2}}
 
+% We loading \oljobname-config.sty and \oljobname-envs.sty. Initialize
+% \oljobname to \jobname -- this way you can use the same config files
+% for differnt jobs.
+
 \ifdefined\oljobname\relax\else\let\oljobname\jobname\fi
 
 % Load configuration file, then custom changes if available
@@ -165,7 +169,6 @@
   \ifgitinfo\ by \href{http://openlogicproject.org/}{OLP} /
   \href{http://creativecommons.org/licenses/by/4.0/}{CC--BY}}
 
-
 \newcommand*{\oluselicense}[2]{%
 \begin{minipage}[b]{.9cm}
 \includegraphics[width=.9cm]{\olpath/assets/logos/by}
@@ -187,18 +190,15 @@
 \hfill
 \href{http://openlogicproject.org/}{\includegraphics[width=2.7cm]{\olpath/assets/logos/openlogic-logo-bw}}}
 
-\copypagestyle{openlogic}{plain}
-\makeevenfoot{openlogic}{\thepage}{}{\shortollicense}
-\makeoddfoot{openlogic}{\shortollicense}{}{\thepage}
+\newcommand*{\shortoluselicense}[2]{\ollicensefont
+  \textit{#1}
+  by #2 based on \href{http://openlogicproject.org/}{OLP} /
+  \href{http://creativecommons.org/licenses/by/4.0/}{CC--BY}}
 
 \newcommand\gitissue[1]
   {\href{https://github.com/OpenLogicProject/OpenLogic/issues/#1}{issue
     \##1}}
 
-\setlength{\cftpartnumwidth}{2.2em}
-\setlength{\cftchapternumwidth}{2.2em}
-\setlength{\cftsectionnumwidth}{2.8em}
-
 \makeatother
 
 % Photos