From 24652768e009aa74580bb22517d0e436573f84e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Thu, 7 Oct 2021 10:06:23 +0200 Subject: [PATCH] fix various mistakes --- packages/environments/fancythm.pysty | 2 ++ .../environments/{thmpystyle.pysty => thmstyle.pysty} | 0 packages/lecture-notes/lectures.pysty | 2 +- packages/math/math.pysty | 6 ++++-- packages/math/mathalias.pysty | 8 +++++--- packages/math/mathfixes.pysty | 2 +- packages/math/mathfont.pysty | 2 +- packages/math/mathop.pysty | 6 ++++-- packages/misc/hypersetup.pysty | 8 +++++--- packages/misc/vocab.pysty | 6 +++--- packages/wip/proof.pysty | 8 ++++---- packages/wip/restate.pysty | 5 +++-- 12 files changed, 33 insertions(+), 22 deletions(-) rename packages/environments/{thmpystyle.pysty => thmstyle.pysty} (100%) diff --git a/packages/environments/fancythm.pysty b/packages/environments/fancythm.pysty index 71fe56d..59b7a2a 100644 --- a/packages/environments/fancythm.pysty +++ b/packages/environments/fancythm.pysty @@ -1,6 +1,8 @@ __HEADER__(Theorem-Environment Package) %Provides fancy theorem-like-environments used in the write-ups of my lecture notes +\RequirePackage{xkeyval} + __NEW_IF__(showstars,true) __NEW_IF__(showdaggers,true) __NEW_IF__(includestars,true) diff --git a/packages/environments/thmpystyle.pysty b/packages/environments/thmstyle.pysty similarity index 100% rename from packages/environments/thmpystyle.pysty rename to packages/environments/thmstyle.pysty diff --git a/packages/lecture-notes/lectures.pysty b/packages/lecture-notes/lectures.pysty index 393ca7b..a85d58f 100644 --- a/packages/lecture-notes/lectures.pysty +++ b/packages/lecture-notes/lectures.pysty @@ -81,7 +81,7 @@ __END_OPTIONS_X__ } -\iffancyhead +__IF__(fancyhead) \RequirePackage{fancyhdr} \pagestyle{fancy} diff --git a/packages/math/math.pysty b/packages/math/math.pysty index 03725ff..e6d0f58 100644 --- a/packages/math/math.pysty +++ b/packages/math/math.pysty @@ -4,9 +4,11 @@ __HEADER__(Main math package.) % Probably, you will just want to load them separately for more % customization -__LANGUAGE_OPTIONS__ +\RequirePackage{xkeyval} -__END_OPTIONS__ +__LANGUAGE_OPTIONS_X__ + +__END_OPTIONS_X__ %%%% Import the other custom math packages \RequirePackage{mkessler-mathfont} % Load this first to ensure untouched fonts diff --git a/packages/math/mathalias.pysty b/packages/math/mathalias.pysty index c368508..fbb1fcd 100644 --- a/packages/math/mathalias.pysty +++ b/packages/math/mathalias.pysty @@ -1,12 +1,14 @@ __HEADER__(Easy aliasing for math style commands) +\RequirePackage{xkeyval} + __NEW_IF__(basic,false) __NEW_IF__(extended,false) -\DeclareOption{basic}{__SET_IF__(basic,true)} -\DeclareOption{extended}{__SET_IF__(extended,true)__SET_IF__(basic,true)} +\DeclareOptionX{basic}{__SET_IF__(basic,true)} +\DeclareOptionX{extended}{__SET_IF__(extended,true)__SET_IF__(basic,true)} -__END_OPTIONS__ +__END_OPTIONS_X__ %Usage: \makealiasesforwith\{}{} % to declare commands of form \ as \{} for each diff --git a/packages/math/mathfixes.pysty b/packages/math/mathfixes.pysty index 88683ce..b3e3598 100644 --- a/packages/math/mathfixes.pysty +++ b/packages/math/mathfixes.pysty @@ -1,4 +1,4 @@ -__HEADER__(Hacky math packages for some (custom) fixes) +__HEADER__(Hacky math packages for some (custom@) fixes) % This just brings together some (possibly ugly) hacks that I use when writing math. Likely, you do not want to use this except when building around this package (like I did), or already have similar shortcuts %Proper Degree command diff --git a/packages/math/mathfont.pysty b/packages/math/mathfont.pysty index 9f8d9ec..e295dd3 100644 --- a/packages/math/mathfont.pysty +++ b/packages/math/mathfont.pysty @@ -18,7 +18,7 @@ __HEADER__(Collects several math fonts together) \let\mathfrak__PACKAGE_MACRO__(amsfonts@mathfrak) % Set \mathfrak to mathfrak from amsfonts \let\mathscr__PACKAGE_MACRO__(mathrsfs@mathscr) % Set \mathscr to mathscript from mathrsfs package \let\mathcat__PACKAGE_MACRO__(mathrsfs@mathscr) % Set \mathcat to mathscript from mathrsfs package - \let\mathcalo__PACKAGE_MACRO__(eucal@optionmathscr@mathscr) % Set \mathcom (for comic) to \mathscr from [mathscr]{eucal} package + \let\mathcalo__PACKAGE_MACRO__(eucal@optionmathscr@mathscr) % Set \mathcalo (for old calligraphic) to \mathscr from [mathscr]{eucal} package } \AtBeginDocument{__PACKAGE_MACRO__(restorefonts)} diff --git a/packages/math/mathop.pysty b/packages/math/mathop.pysty index 7bd8337..771ebca 100644 --- a/packages/math/mathop.pysty +++ b/packages/math/mathop.pysty @@ -1,9 +1,11 @@ __HEADER__(Math Operator Package) %Provides some commonly used Operators used in the write-ups of my lecture notes -__LANGUAGE_OPTIONS__ +\RequirePackage{xkeyval} -__END_OPTIONS__ +__LANGUAGE_OPTIONS_X__ + +__END_OPTIONS_X__ %%%%%Package dependencies \RequirePackage{amsmath} diff --git a/packages/misc/hypersetup.pysty b/packages/misc/hypersetup.pysty index a8ab3e8..a636cda 100644 --- a/packages/misc/hypersetup.pysty +++ b/packages/misc/hypersetup.pysty @@ -1,9 +1,11 @@ __HEADER__(Package for setting up hyperref, cleveref and some default hyperref colors) -__NEW_IF__(cleveref,false) -\DeclareOption{cleveref}{__SET_IF__(cleveref,true)} +\RequirePackage{xkeyval} -__END_OPTIONS___ +__NEW_IF__(cleveref,false) +\DeclareOptionX{cleveref}{__SET_IF__(cleveref,true)} + +__END_OPTIONS_X__ %%%Hyperref and setup \RequirePackage{xcolor} % To compute the colors below diff --git a/packages/misc/vocab.pysty b/packages/misc/vocab.pysty index b6ef8fa..b3c7b55 100644 --- a/packages/misc/vocab.pysty +++ b/packages/misc/vocab.pysty @@ -3,11 +3,11 @@ __HEADER__(Package for emphasizing vocabulary) \RequirePackage{xkeyval} -__LANGUAGE_OPTIONS__ +__LANGUAGE_OPTIONS_X__ __NEW_IF__(index,false) -\DeclareOption{index}{__SET_IF__(index,true)} -\DeclareOption{noindex}{__SET_IF__(index,false)} +\DeclareOptionX{index}{__SET_IF__(index,true)} +\DeclareOptionX{noindex}{__SET_IF__(index,false)} __END_OPTIONS_X__ diff --git a/packages/wip/proof.pysty b/packages/wip/proof.pysty index f224e50..a04ad02 100644 --- a/packages/wip/proof.pysty +++ b/packages/wip/proof.pysty @@ -2,7 +2,7 @@ __HEADER__(Automatic references to theorems in proofs. Claim counters within pro \RequirePackage{xkeyval} -__LANGUAGE_OPTIONS__ +__LANGUAGE_OPTIONS_X__ __END_OPTIONS_X__ @@ -18,15 +18,15 @@ __END_OPTIONS_X__ \newtheorem*{claim*}{__IF__(english) Claim\else Behauptung\fi} \AtBeginDocument{\def\claimautorefname{__IF__(english) Claim\else Behauptung\fi}} -\newif\ifhyperref +__NEW_IF__(hyperref,false) \AtBeginDocument{ \@ifpackageloaded{hyperref}{ - \hyperreftrue + __SET_IF__(hyperref,true) \def\grab#1{\expandafter\@firstoffive#1} \def__PACKAGE_MACRO__(blankref)#1{\expandafter\grab\csname r@#1\endcsname} \let__PACKAGE_MACRO__(autoref)\autoref }{ - \hyperreffalse + __SET_IF__(hyperref,true) \let__PACKAGE_MACRO__(blankref)\ref \let__PACKAGE_MACRO__(autoref)\ref } diff --git a/packages/wip/restate.pysty b/packages/wip/restate.pysty index 3f3039b..e7e8959 100644 --- a/packages/wip/restate.pysty +++ b/packages/wip/restate.pysty @@ -16,9 +16,10 @@ __NEW_IF__(english, true) __INFO__(Strict mode disabled. Undefined restates will now print placeholder boxes)% \fi }{ - __WARNING__({Erroneous input to key 'strict' ignored. Provide =true or =false.) + __WARNING__(Erroneous input to key 'strict' ignored. Provide =true or =false.) } -\ProcessOptionsX*\relax + +__END_OPTIONS_X__ \newcommand\restatesetup[1]{\setkeys{__FILE_NAME__}{#1}}