From ec3406fb7ae7141b0b163f74f3b24620fb41342b Mon Sep 17 00:00:00 2001
From: Ian Jauslin <jauslin@ias.edu>
Date: Tue, 19 Sep 2017 16:14:31 +0000
Subject: Update to v0.1

Fixed: deleted erroneous reference to Kramers and Wannier.

Fixed: changed boundary conditions.

Fixed: definition of \mathbb S(X).

Fixed: miscellaneous minor tweaks, formatting and typos.

Added: informal description of Gaunt-Fisher configurations.

Changed: title.

Changed: reformulate main theorem.
---
 libs/ian.cls | 39 ++++++++++++++++++++++++++-------------
 1 file changed, 26 insertions(+), 13 deletions(-)

(limited to 'libs/ian.cls')

diff --git a/libs/ian.cls b/libs/ian.cls
index 84980f9..f847d0a 100644
--- a/libs/ian.cls
+++ b/libs/ian.cls
@@ -6,7 +6,7 @@
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
 
 %% class name
-\ProvidesClass{ian}[2017/06/06]
+\ProvidesClass{ian}[2017/09/15]
 
 %% boolean to signal that this class is being used
 \newif\ifianclass
@@ -300,7 +300,8 @@
 % space between the item symbol and the text
 \setlength\itemizeseparator{5pt}
 % penalty preceding an itemize
-\def\itemizepenalty{0}
+\newcount\itemizepenalty
+\itemizepenalty=0
 % counter counting the itemize level
 \newcounter{itemizecount}
 
@@ -316,17 +317,17 @@
 
 \newlength\current@itemizeskip
 \setlength\current@itemizeskip{0pt}
-\def\itemize{
-  \par\penalty\itemizepenalty\medskip\penalty\itemizepenalty
-  \addtocounter{itemizecount}{1}
-  \addtolength\current@itemizeskip{\itemizeskip}
-  \leftskip\current@itemizeskip
-}
-\def\enditemize{
-  \addtocounter{itemizecount}{-1}
-  \addtolength\current@itemizeskip{-\itemizeskip}
-  \par\leftskip\current@itemizeskip
-  \medskip
+\def\itemize{%
+  \par\expandafter\penalty\the\itemizepenalty\medskip\expandafter\penalty\the\itemizepenalty%
+  \addtocounter{itemizecount}{1}%
+  \addtolength\current@itemizeskip{\itemizeskip}%
+  \leftskip\current@itemizeskip%
+}
+\def\enditemize{%
+  \addtocounter{itemizecount}{-1}%
+  \addtolength\current@itemizeskip{-\itemizeskip}%
+  \par\expandafter\penalty\the\itemizepenalty\leftskip\current@itemizeskip%
+  \medskip\expandafter\penalty\the\itemizepenalty%
 }
 \newlength\itempt@total
 \def\item{
@@ -337,6 +338,18 @@
   \hskip-\itempt@total\itemizept\theitemizecount\hskip\itemizeseparator
 }
 
+
+%% prevent page breaks after itemize
+\newcount\previtemizepenalty
+\def\nopagebreakafteritemize{
+  \previtemizepenalty=\itemizepenalty
+  \itemizepenalty=10000
+}
+%% back to previous value
+\def\restorepagebreakafteritemize{
+  \itemizepenalty=\previtemizepenalty
+}
+
 %% enumerate
 \newcounter{enumerate@count}
 \def\enumerate{
-- 
cgit v1.3

