diff options
Diffstat (limited to 'macros/latex/contrib/rbt-mathnotes/rbt-mathnotes.cls')
-rw-r--r-- | macros/latex/contrib/rbt-mathnotes/rbt-mathnotes.cls | 202 |
1 files changed, 202 insertions, 0 deletions
diff --git a/macros/latex/contrib/rbt-mathnotes/rbt-mathnotes.cls b/macros/latex/contrib/rbt-mathnotes/rbt-mathnotes.cls new file mode 100644 index 0000000000..df69338ad1 --- /dev/null +++ b/macros/latex/contrib/rbt-mathnotes/rbt-mathnotes.cls @@ -0,0 +1,202 @@ +%% rbt-mathnotes.cls +%% Copyright 2021 Rebecca B. Turner. +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Rebecca B. Turner. +% +% This work consists of the files: +% README.md +% rbt-mathnotes.tex +% rbt-mathnotes.sty +% rbt-mathnotes.cls +% rbt-mathnotes-util.sty +% rbt-mathnotes-messages.sty +% rbt-mathnotes-hw.cls +% rbt-mathnotes-formula-sheet.cls +% examples/cheat-sheet.tex +% examples/multivar.tex +% examples/topology-hw-1.tex +% and the derived files: +% rbt-mathnotes.pdf +% examples/cheat-sheet.pdf +% examples/multivar.pdf +% examples/topology-hw-1.pdf + +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{expl3} +\ProvidesExplClass{rbt-mathnotes}{2021/11/29}{1.0.2}{Styles for mathematical + note taking.} + +\PassOptionsToClass { openany, oneside } { memoir } + +\LoadClass{memoir} +\setsecnumdepth{subsubsection} +\settocdepth{subsubsection} +\nouppercaseheads +\makeevenfoot { plain } { } { } { } +\makeoddfoot { plain } { } { } { } +\makeevenhead { plain } { } { } { \thepage } +\makeoddhead { plain } { } { } { \thepage } + +\RequirePackage{etoolbox} +\RequirePackage{xparse} +\AtBeginDocument{ + \patchcmd { \@tocmaketitle } + { \thispagestyle { chapter } } + { } + { } + { } + } + +\makechapterstyle { rbt-mathnotes } + { + % allow for 99 chapters! + \settowidth{\chapindent}{\chapnumfont 999} + + \RenewDocumentCommand \chapnumfont { } + { + \normalfont + \huge + \exp:w \mn__color:n {MNsecnum} + } + \RenewDocumentCommand \chapterheadstart { } { } + \RenewDocumentCommand \printchaptername { } { } + \RenewDocumentCommand \chapternamenum { } { } + \RenewDocumentCommand \printchapternum { } + { + \noindent + \llap + { + \makebox [ \chapindent ] + { \chapnumfont \thechapter } + } + } + \RenewDocumentCommand \afterchapternum { } { } + \RenewDocumentCommand \printchaptertitle { m } + { + \raggedright + \huge + ##1 + } + \RenewDocumentCommand \afterchaptertitle { } + { + \vskip \onelineskip + \hrule + \vskip \onelineskip + } + } + +\makeheadstyles { rbt-mathnotes } + { + \chapterstyle { rbt-mathnotes } + + \setsecnumformat + { + \group_begin: + \exp:w \mn__color:n {MNsecnum} + \cs:w the##1 \cs_end: + \quad + \group_end: + } + + % Sections. + \setbeforesecskip + { + -1\onelineskip plus -0.5\onelineskip minus -0.5\onelineskip + } + \setaftersecskip + { + 1\onelineskip plus 0.1\onelineskip + } + \setsecheadstyle + { + \normalfont + \memRTLraggedright + \bfseries + \LARGE + % \scshape + % \MakeTextLowercase + } + + % Subsections. + \setbeforesubsecskip + { + -1.0\onelineskip plus -0.25\onelineskip minus -0.25\onelineskip + } + \setaftersubsecskip + { + 1.0\onelineskip plus 0.1\onelineskip + } + \setsubsecheadstyle + { + \sethangfrom { \noindent ####1 } + \normalfont + \bfseries + \memRTLraggedright + } + + % Subsubsections. + \setbeforesubsubsecskip + { + 1.0\onelineskip plus 0.5\onelineskip minus 0.2\onelineskip + } + \setaftersubsubsecskip + { + 1.0\onelineskip plus 0.1\onelineskip + } + \setsubsubsecheadstyle + { + \normalfont + \normalsize + \bfseries + \memRTLraggedright + } + + % Paragraphs. + \setbeforeparaskip + { + 1.0\onelineskip plus 0.5\onelineskip minus 0.2\onelineskip + } + \setafterparaskip { -1em } + \setparaheadstyle + { + \normalfont + \normalsize + \bfseries + } + + % Subparagraphs. + \setsubparaindent { \parindent } + \setbeforesubparaskip + { + 1.0\onelineskip plus 0.5\onelineskip minus 0.2\onelineskip + } + \setaftersubparaskip { -1em } + \setsubparaheadstyle + { + \normalfont + \normalsize + \itshape + \addperiod + } + } + +\headstyles { rbt-mathnotes } + +% \chapterstyle{hangnum} +% \cs_set:Npn \chapnumfont + % { + % \HUGE \bfseries + % \exp:w \mn__color:n {MNsecnum} + % } + +\RequirePackage { rbt-mathnotes } |