Browse Source

convert spaces into tabs

pull/194/head
Federico Marotta 3 years ago
parent
commit
457b8422f6
  1. BIN
      examples/documentation/main.pdf
  2. 354
      kao.sty
  3. 250
      kaobiblio.sty
  4. 36
      kaobook.cls
  5. 12
      kaohandt.cls
  6. 108
      kaorefs.sty
  7. 710
      kaotheorems.sty

BIN
examples/documentation/main.pdf

Binary file not shown.

354
kao.sty

@ -208,7 +208,7 @@
\setlength{\headmarginparsep}{\marginparsep}%
\setlength{\headmarginparwidth}{\marginparwidth}%
\setlength{\headtotal}{\headtextwidth+\headmarginparsep+\headmarginparwidth}%
\setlength{\contentwidth}{\headtotal}%
\setlength{\contentwidth}{\headtotal}%
}
\AtBeginDocument{% Recalculate the header-related lengths
@ -321,41 +321,41 @@
% Environment for a wide paragraph
\NewDocumentEnvironment{widepar}{}{%
\if@twoside%
\if@twoside%
\Ifthispageodd{%
\begin{addmargin}[0cm]{-\marginparwidth-\marginparsep}%
\begin{addmargin}[0cm]{-\marginparwidth-\marginparsep}%
}{%
\begin{addmargin}[-\marginparwidth-\marginparsep]{0cm}%
\begin{addmargin}[-\marginparwidth-\marginparsep]{0cm}%
}%
\else%
\else%
\begin{addmargin}[0cm]{-\marginparwidth-\marginparsep}%
\fi%
\fi%
}{%
\end{addmargin}%
}
% Environment for a full width paragraph
\NewDocumentEnvironment{fullwidthpar}{}{%
\if@twoside%
\Ifthispageodd{%
\begin{addmargin}[-1in-\hoffset-\oddsidemargin]{-\paperwidth+1in+\hoffset+\oddsidemargin+\textwidth}%
}{%
\begin{addmargin}[-\paperwidth+1in+\hoffset+\oddsidemargin+\textwidth]{-\paperwidth+1in+\hoffset+\oddsidemargin+\marginparsep+\marginparwidth+\textwidth}%
}%
\else%
\begin{addmargin}[-1in-\hoffset-\oddsidemargin]{-\paperwidth+1in+\hoffset+\oddsidemargin+\textwidth}%
\fi%
\if@twoside%
\Ifthispageodd{%
\begin{addmargin}[-1in-\hoffset-\oddsidemargin]{-\paperwidth+1in+\hoffset+\oddsidemargin+\textwidth}%
}{%
\begin{addmargin}[-\paperwidth+1in+\hoffset+\oddsidemargin+\textwidth]{-\paperwidth+1in+\hoffset+\oddsidemargin+\marginparsep+\marginparwidth+\textwidth}%
}%
\else%
\begin{addmargin}[-1in-\hoffset-\oddsidemargin]{-\paperwidth+1in+\hoffset+\oddsidemargin+\textwidth}%
\fi%
}{%
\end{addmargin}%
\end{addmargin}%
}
% Environment for a wide equation
\NewDocumentEnvironment{wideequation}{}{%
\begin{widepar}%
\begin{widepar}%
\begin{equation}%
}{%
\end{equation}%
\end{widepar}%
\end{widepar}%
}
%----------------------------------------------------------------------------------------
@ -529,45 +529,45 @@
% Environment to hold a margin figure (from the sidenotes package)
% We redefine it here because we want to use our own caption formatting.
\RenewDocumentEnvironment{marginfigure}{o}{%
\FloatBarrier%
\marginskip{\kaomarginskipabove}%
\begin{lrbox}{\@sidenotes@marginfigurebox}%
\FloatBarrier%
\marginskip{\kaomarginskipabove}%
\begin{lrbox}{\@sidenotes@marginfigurebox}%
\begin{minipage}{\marginparwidth}%
\captionsetup{type=figure}%
\captionsetup{type=figure}%
}{%
\end{minipage}%
\end{lrbox}%
\marginnote[#1]{\usebox{\@sidenotes@marginfigurebox}}%
\marginskip{\kaomarginskipbelow}%
\end{lrbox}%
\marginnote[#1]{\usebox{\@sidenotes@marginfigurebox}}%
\marginskip{\kaomarginskipbelow}%
}
% Environment to hold a margin table (from the sidenotes package)
\RenewDocumentEnvironment{margintable}{o}{%
\FloatBarrier%
\marginskip{\kaomarginskipabove}%
\begin{lrbox}{\@sidenotes@margintablebox}%
\FloatBarrier%
\marginskip{\kaomarginskipabove}%
\begin{lrbox}{\@sidenotes@margintablebox}%
\begin{minipage}{\marginparwidth}%
\captionsetup{type=table}%
\captionsetup{type=table}%
}{%
\end{minipage}%
\end{lrbox}%
\marginnote[#1]{\usebox{\@sidenotes@margintablebox}}%
\marginskip{\kaomarginskipbelow}%
\end{lrbox}%
\marginnote[#1]{\usebox{\@sidenotes@margintablebox}}%
\marginskip{\kaomarginskipbelow}%
}
% Environment to hold a margin listing
\newsavebox{\@sidenotes@marginlistingbox}%
\NewDocumentEnvironment{marginlisting}{o}{% The optional parameter is the vertical offset
\FloatBarrier%
\marginskip{\kaomarginskipabove}%
\begin{lrbox}{\@sidenotes@marginlistingbox}%
\FloatBarrier%
\marginskip{\kaomarginskipabove}%
\begin{lrbox}{\@sidenotes@marginlistingbox}%
\begin{minipage}{\marginparwidth}%
\captionsetup{type=lstlisting}%
\captionsetup{type=lstlisting}%
}{%
\end{minipage}%
\end{lrbox}%
\marginnote[#1]{\usebox{\@sidenotes@marginlistingbox}}%
\marginskip{\kaomarginskipbelow}%
\end{lrbox}%
\marginnote[#1]{\usebox{\@sidenotes@marginlistingbox}}%
\marginskip{\kaomarginskipbelow}%
}
% Change the position of the captions
@ -751,10 +751,10 @@
facing=no,%
capposition=above%
}%
\floatsetup[longtable]{% Captions for longtables
margins=raggedright,% Overwrite the hangright setting from the `table' environment
%LTcapwidth=table,% Set the width of the caption equal to the table's
}%
\floatsetup[longtable]{% Captions for longtables
margins=raggedright,% Overwrite the hangright setting from the `table' environment
%LTcapwidth=table,% Set the width of the caption equal to the table's
}%
\floatsetup[lstlisting]{% Captions for lstlisting
margins=hangright,% Put captions in the margin
facing=yes,%
@ -825,7 +825,7 @@
singlelinecheck=false,%
indention=0pt,%
parindent=0pt,%
aboveskip=6pt,%
aboveskip=6pt,%
belowskip=6pt,%
belowskip=-0.1cm%
}
@ -851,13 +851,13 @@
% Define the style for toc entries
\@ifpackagelater{scrbase}{2019/10/11}{%
\DeclareTOCStyleEntries[indent=0em,numwidth=2em,dynnumwidth=yes,pagenumberwidth=2.1em]{tocline}{figure,table,lstlisting}%
\DeclareTOCStyleEntries[dynnumwidth=yes]{tocline}{subsubsection,subsection,section,chapter,part}%
\DeclareTOCStyleEntries[pagenumberwidth=2.5em]{tocline}{chapter,part}%
\DeclareTOCStyleEntries[pagenumberwidth=2.1em]{tocline}{subsubsection,subsection,section}%
\DeclareTOCStyleEntries[indent=0em,numwidth=2em,dynnumwidth=yes,pagenumberwidth=2.1em]{tocline}{figure,table,lstlisting}%
\DeclareTOCStyleEntries[dynnumwidth=yes]{tocline}{subsubsection,subsection,section,chapter,part}%
\DeclareTOCStyleEntries[pagenumberwidth=2.5em]{tocline}{chapter,part}%
\DeclareTOCStyleEntries[pagenumberwidth=2.1em]{tocline}{subsubsection,subsection,section}%
}{%
\DeclareTOCStyleEntries[indent=0em,numwidth=2em,dynnumwidth=yes]{tocline}{figure,table,lstlisting}%
\DeclareTOCStyleEntries[dynnumwidth=yes]{tocline}{subsubsection,subsection,section,chapter,part}%
\DeclareTOCStyleEntries[indent=0em,numwidth=2em,dynnumwidth=yes]{tocline}{figure,table,lstlisting}%
\DeclareTOCStyleEntries[dynnumwidth=yes]{tocline}{subsubsection,subsection,section,chapter,part}%
}
% Define the names for the headings
@ -883,16 +883,16 @@
% We want to create an additional entries in the toc which is to be used for the margintoc
% We define these as mtocsection and mtocsubsection for section and subsection`
\newcommand{\mtocsection}[1]{
\etoctoccontentsline{mtocsection}{%
\ifnum\value{secnumdepth}>0 \protect\numberline{\thesection}%
\else \protect\nonumberline%
\fi #1}%
\etoctoccontentsline{mtocsection}{%
\ifnum\value{secnumdepth}>0 \protect\numberline{\thesection}%
\else \protect\nonumberline%
\fi #1}%
}
\newcommand{\mtocsubsection}[1]{
\etoctoccontentsline{mtocsubsection}{%
\ifnum\value{secnumdepth}>1 \protect\numberline{\thesubsection}%
\else \protect\nonumberline%
\fi #1}%
\etoctoccontentsline{mtocsubsection}{%
\ifnum\value{secnumdepth}>1 \protect\numberline{\thesubsection}%
\else \protect\nonumberline%
\fi #1}%
}
% Next, we redefine \section and \subsection so that they accept an additional parameter
@ -900,56 +900,56 @@
% Adapted from Frank Mittelbach's answer at Stackexchange
% https://tex.stackexchange.com/a/109560/226693
\let\oldsection\section % save the old command
\let\oldsubsection\subsection % save the old command
\let\oldsection\section % save the old command
\let\oldsubsection\subsection % save the old command
\RenewDocumentCommand\section{s o m o}{%
\IfBooleanTF{#1}{%
\oldsection*{#3}
\IfNoValueF{#2}{% if TOC arg is given create a TOC entry
\addxcontentsline{toc}{section}[\thesection]{#2}%
}%
}{% no star given
\IfNoValueTF{#2}{%
\oldsection{#3}%
}{% no TOC arg
\oldsection[#2]{#3}%
}%
\IfNoValueTF{#4}{% optional label given, if not we do nothing
% \mtocsection{#3}%
\IfNoValueTF{#2}{%
\mtocsection{#3}% when no optional toc title, use main title
}{% no TOC arg
\mtocsection{#2}% when toc optional title is given, use it
}%
}{%
\mtocsection{#4}%
}%
}%
\IfBooleanTF{#1}{%
\oldsection*{#3}
\IfNoValueF{#2}{% if TOC arg is given create a TOC entry
\addxcontentsline{toc}{section}[\thesection]{#2}%
}%
}{% no star given
\IfNoValueTF{#2}{%
\oldsection{#3}%
}{% no TOC arg
\oldsection[#2]{#3}%
}%
\IfNoValueTF{#4}{% optional label given, if not we do nothing
% \mtocsection{#3}%
\IfNoValueTF{#2}{%
\mtocsection{#3}% when no optional toc title, use main title
}{% no TOC arg
\mtocsection{#2}% when toc optional title is given, use it
}%
}{%
\mtocsection{#4}%
}%
}%
}
\RenewDocumentCommand\subsection{s o m o}{%
\IfBooleanTF{#1}{%
\oldsubsection*{#3}%
\IfNoValueF{#2}{% if TOC arg is given create a TOC entry
\addxcontentsline{toc}{subsection}[\thesubsection]{#2}%
}%
}{% no star given
\IfNoValueTF{#2}{%
\oldsubsection{#3}%
}{% no TOC arg
\oldsubsection[#2]{#3}%
}%
\IfNoValueTF{#4}{% optional label given, if not we do nothing
\IfNoValueTF{#2}{%
\mtocsubsection{#3}% when no optional toc title, use main title
}{% no TOC arg
\mtocsubsection{#2}% when toc optional title is given, use it
}%
}{%
\mtocsubsection{#4}%
}%
}%
\IfBooleanTF{#1}{%
\oldsubsection*{#3}%
\IfNoValueF{#2}{% if TOC arg is given create a TOC entry
\addxcontentsline{toc}{subsection}[\thesubsection]{#2}%
}%
}{% no star given
\IfNoValueTF{#2}{%
\oldsubsection{#3}%
}{% no TOC arg
\oldsubsection[#2]{#3}%
}%
\IfNoValueTF{#4}{% optional label given, if not we do nothing
\IfNoValueTF{#2}{%
\mtocsubsection{#3}% when no optional toc title, use main title
}{% no TOC arg
\mtocsubsection{#2}% when toc optional title is given, use it
}%
}{%
\mtocsubsection{#4}%
}%
}%
}
\etocsetlevel{mtocsection}{6}% dummy sectioning level
@ -957,69 +957,69 @@
% Command to print a table of contents in the margin
\NewDocumentCommand{\margintoc}{O{\mtocshift}}{ % The first parameter is the vertical offset; by default it is \mtocshift
\begingroup%
% Move regular section and subsection to level 6 so that they won't be included and instead set let the mtoc versions take their place.
% Adapted from https://tex.stackexchange.com/a/133559/226693
\etocsetlevel{section}{6}
\etocsetlevel{subsection}{6}
\etocsetlevel{mtocsection}{1}
\etocsetlevel{mtocsubsection}{2}
% Define default widths
\def\margintocnumwidth{-.8mm}%
\def\margintocpagenumwidth{8pt}%
\setlength{\RaggedRightParfillskip}{0pt}
% Dry run to get the needed widths
\etocsetstyle{mtocsection}%
{}%
{\setbox0\hbox{\usekomafont{section}\small\etocthenumber\kern.8mm}%%
\setbox1\hbox{\usekomafont{section}\small\etocthepage}}%
{\ifdim\wd0>\margintocnumwidth \edef\margintocnumwidth{\the\wd0} \fi%%
\ifdim\wd1>\margintocpagenumwidth \edef\margintocpagenumwidth{\the\wd1} \fi}%
{}%
\etocsetstyle{mtocsubsection}%
{}%
{\setbox0\hbox{\usekomafont{section}\small\mdseries\etocthenumber\kern.8mm}%
\setbox1\hbox{\usekomafont{section}\small\mdseries\etocthepage}}%
{\ifdim\wd0>\margintocnumwidth \edef\margintocnumwidth{\the\wd0} \fi%
\ifdim\wd1>\margintocpagenumwidth \edef\margintocpagenumwidth{\the\wd1} \fi}%
{}%
\etocsetstyle{subsubsection}%
{}%
{}%
{}%
{}%
\etocsetstyle{paragraph}%
{}%
{}%
{}%
{}%
\etocsettocstyle{}{%
\global\let\margintocnumwidth\margintocnumwidth%
\global\let\margintocpagenumwidth\margintocpagenumwidth%
}%
\localtableofcontents%
% Set the style for section entries
\etocsetstyle{mtocsection}%
{\parindent 0pt \parskip 2.5pt \parfillskip 0pt \RaggedRight}%
{\leftskip \margintocnumwidth \rightskip \margintocpagenumwidth}%
{\makebox[0pt][r]{\makebox[\margintocnumwidth][l]{\etocnumber}}\etocname\nobreak\leaders\hbox{\hbox to 1.5ex {\hss.\hss}}\hfill\rlap{\makebox[\margintocpagenumwidth][r]{\etocpage}}\par}%
{}%
\begingroup%
% Move regular section and subsection to level 6 so that they won't be included and instead set let the mtoc versions take their place.
% Adapted from https://tex.stackexchange.com/a/133559/226693
\etocsetlevel{section}{6}
\etocsetlevel{subsection}{6}
\etocsetlevel{mtocsection}{1}
\etocsetlevel{mtocsubsection}{2}
% Define default widths
\def\margintocnumwidth{-.8mm}%
\def\margintocpagenumwidth{8pt}%
\setlength{\RaggedRightParfillskip}{0pt}
% Dry run to get the needed widths
\etocsetstyle{mtocsection}%
{}%
{\setbox0\hbox{\usekomafont{section}\small\etocthenumber\kern.8mm}%%
\setbox1\hbox{\usekomafont{section}\small\etocthepage}}%
{\ifdim\wd0>\margintocnumwidth \edef\margintocnumwidth{\the\wd0} \fi%%
\ifdim\wd1>\margintocpagenumwidth \edef\margintocpagenumwidth{\the\wd1} \fi}%
{}%
\etocsetstyle{mtocsubsection}%
{}%
{\setbox0\hbox{\usekomafont{section}\small\mdseries\etocthenumber\kern.8mm}%
\setbox1\hbox{\usekomafont{section}\small\mdseries\etocthepage}}%
{\ifdim\wd0>\margintocnumwidth \edef\margintocnumwidth{\the\wd0} \fi%
\ifdim\wd1>\margintocpagenumwidth \edef\margintocpagenumwidth{\the\wd1} \fi}%
{}%
\etocsetstyle{subsubsection}%
{}%
{}%
{}%
{}%
\etocsetstyle{paragraph}%
{}%
{}%
{}%
{}%
\etocsettocstyle{}{%
\global\let\margintocnumwidth\margintocnumwidth%
\global\let\margintocpagenumwidth\margintocpagenumwidth%
}%
\localtableofcontents%
% Set the style for section entries
\etocsetstyle{mtocsection}%
{\parindent 0pt \parskip 2.5pt \parfillskip 0pt \RaggedRight}%
{\leftskip \margintocnumwidth \rightskip \margintocpagenumwidth}%
{\makebox[0pt][r]{\makebox[\margintocnumwidth][l]{\etocnumber}}\etocname\nobreak\leaders\hbox{\hbox to 1.5ex {\hss.\hss}}\hfill\rlap{\makebox[\margintocpagenumwidth][r]{\etocpage}}\par}%
{}%
% Set the style for subsection entries
\etocsetstyle{mtocsubsection}%
{\parindent 0pt \parskip 0pt \parfillskip 0pt \RaggedRight}%
{\leftskip \margintocnumwidth \rightskip \margintocpagenumwidth}%
{\makebox[0pt][r]{\makebox[\margintocnumwidth][l]{\mdseries\etocnumber}}{\mdseries\etocname\nobreak\leaders\hbox{\hbox to 1.5ex {\hss.\hss}}\hfill\rlap{\makebox[\margintocpagenumwidth][r]{\mdseries\etocpage}}}\par}%
{\parskip 2.5pt}%
\etocsetstyle{mtocsubsection}%
{\parindent 0pt \parskip 0pt \parfillskip 0pt \RaggedRight}%
{\leftskip \margintocnumwidth \rightskip \margintocpagenumwidth}%
{\makebox[0pt][r]{\makebox[\margintocnumwidth][l]{\mdseries\etocnumber}}{\mdseries\etocname\nobreak\leaders\hbox{\hbox to 1.5ex {\hss.\hss}}\hfill\rlap{\makebox[\margintocpagenumwidth][r]{\mdseries\etocpage}}}\par}%
{\parskip 2.5pt}%
% Set the global style of the toc
\etocsettocstyle{\usekomafont{section}\small}{}%
\etocsettocstyle{\usekomafont{section}\small}{}%
\etocsetnexttocdepth{\themargintocdepth}%
% Print the table of contents in the margin
\marginnote[#1]{\localtableofcontents}%
\FloatBarrier%
\endgroup%
% Print the table of contents in the margin
\marginnote[#1]{\localtableofcontents}%
\FloatBarrier%
\endgroup%
}
%----------------------------------------------------------------------------------------
@ -1043,20 +1043,20 @@
\RequirePackage{amssymb} % Must be loaded before unicode-math
\RequirePackage[force]{filehook} % Fixes an error
\RequirePackage{unicode-math} % Math fonts in xetexorluatex
\setromanfont[ % Libertinus Serif font
\setromanfont[ % Libertinus Serif font
Scale=1.04
]{Libertinus Serif}
\setsansfont[ % Libertinus Sans font
\setsansfont[ % Libertinus Sans font
Scale=1
]{Libertinus Sans}
\setmonofont[ % Libertinus Mono font
\setmonofont[ % Libertinus Mono font
Scale=.89
]{Liberation Mono}
\setmathfont{Libertinus Math} % Libertinus Math font
\ifluatex
\else
\RequirePackage{morewrites} % Fix some errors related to floats (not necessary with LuaLaTeX
\fi
\setmathfont{Libertinus Math} % Libertinus Math font
\ifluatex
\else
\RequirePackage{morewrites} % Fix some errors related to floats (not necessary with LuaLaTeX
\fi
\else
\RequirePackage[utf8]{inputenc} % utf8 encoding in the input (.tex) file
\RequirePackage[T1]{fontenc} % utf8 encoding in the output (.pdf) file
@ -1066,7 +1066,7 @@
\RequirePackage[vvarbb,smallerops,bigdelims]{newpxmath} % Math palatino font
\RequirePackage[scaled=.85]{beramono} % Monospace font
\RequirePackage[scr=rsfso,cal=boondoxo]{mathalfa} % Mathcal from STIX, unslanted a bit
\RequirePackage{morewrites} % Fix some errors related to floats
\RequirePackage{morewrites} % Fix some errors related to floats
\fi
% When using the Palatino (newpxtext) font, it is better to use a
@ -1097,8 +1097,8 @@
colorlinks=true,
%allcolors=DarkGreen,
citecolor = DarkOrange,
linkcolor = Blue,
%pagecolor = Blue,
linkcolor = Blue,
%pagecolor = Blue,
urlcolor = OliveGreen,
}
@ -1125,8 +1125,8 @@
% Redefine the \thanks command to allow users to use \label within \thanks without getting warnings
\let\oldthanks\thanks
\renewcommand\thanks[1]{%
\label{bhfn:0}%
\oldthanks{#1}%
\label{bhfn:0}%
\oldthanks{#1}%
}
% Adjust the colour of the footnotes marks using the colour defined above
@ -1162,7 +1162,7 @@
%citecolor=DarkOrange!70!black,
citecolor=OliveGreen,
filecolor=OliveGreen,
%linkcolor=Blue,
%linkcolor=Blue,
linkcolor=Black,
%menucolor=Red,
%runcolor=Red,

250
kaobiblio.sty

@ -14,8 +14,8 @@
% Set up the package options
\SetupKeyvalOptions{
family = kaobiblio,
prefix = kaobiblio@
family = kaobiblio,
prefix = kaobiblio@
}
\DeclareBoolOption{addspace}% If true, automatically add a space before printing the citation marker
@ -24,32 +24,32 @@
% Choose the default options, which will be overwritten by the options
% passed to this package.
\PassOptionsToPackage{
%style=numeric-comp,
%citestyle=authortitle-icomp,
citestyle=numeric-comp,
%bibstyle=authoryear,
bibstyle=numeric,
sorting=none,
%sorting=nyt,
%sortcites=true,
%autocite=footnote,
backend=biber, % Compile the bibliography with biber
hyperref=true,
backref=true,
citecounter=true,
pagetracker=true,
citetracker=true,
ibidtracker=context,
autopunct=true,
autocite=plain,
%style=numeric-comp,
%citestyle=authortitle-icomp,
citestyle=numeric-comp,
%bibstyle=authoryear,
bibstyle=numeric,
sorting=none,
%sorting=nyt,
%sortcites=true,
%autocite=footnote,
backend=biber, % Compile the bibliography with biber
hyperref=true,
backref=true,
citecounter=true,
pagetracker=true,
citetracker=true,
ibidtracker=context,
autopunct=true,
autocite=plain,
}{biblatex}
% Pass the unknown options to biblatex, overwriting the previous settings. Avoid passing the kao-specific options.
\DeclareDefaultOption{%
\IfBeginWith{\CurrentOption}{addspace}{}{%
\IfBeginWith{\CurrentOption}{linkeverything}{}{%
\PassOptionsToPackage{\CurrentOption}{biblatex}%
}}%
\IfBeginWith{\CurrentOption}{addspace}{}{%
\IfBeginWith{\CurrentOption}{linkeverything}{}{%
\PassOptionsToPackage{\CurrentOption}{biblatex}%
}}%
}
% Process the options
@ -72,22 +72,22 @@
% Convert months to integers
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite]{
\step[fieldsource=month, match={jan}, replace=${1}]
\step[fieldsource=month, match={feb}, replace=${2}]
\step[fieldsource=month, match={mar}, replace=${3}]
\step[fieldsource=month, match={apr}, replace=${4}]
\step[fieldsource=month, match={may}, replace=${5}]
\step[fieldsource=month, match={jun}, replace=${6}]
\step[fieldsource=month, match={jul}, replace=${7}]
\step[fieldsource=month, match={aug}, replace=${8}]
\step[fieldsource=month, match={sep}, replace=${9}]
\step[fieldsource=month, match={oct}, replace=${10}]
\step[fieldsource=month, match={nov}, replace=${11}]
\step[fieldsource=month, match={dec}, replace=${12}]
}
}
\maps[datatype=bibtex]{
\map[overwrite]{
\step[fieldsource=month, match={jan}, replace=${1}]
\step[fieldsource=month, match={feb}, replace=${2}]
\step[fieldsource=month, match={mar}, replace=${3}]
\step[fieldsource=month, match={apr}, replace=${4}]
\step[fieldsource=month, match={may}, replace=${5}]
\step[fieldsource=month, match={jun}, replace=${6}]
\step[fieldsource=month, match={jul}, replace=${7}]
\step[fieldsource=month, match={aug}, replace=${8}]
\step[fieldsource=month, match={sep}, replace=${9}]
\step[fieldsource=month, match={oct}, replace=${10}]
\step[fieldsource=month, match={nov}, replace=${11}]
\step[fieldsource=month, match={dec}, replace=${12}]
}
}
}
%----------------------------------------------------------------------------------------
@ -152,20 +152,20 @@
% Command to format the marginnote created for supercited items
\NewDocumentCommand{\formatmarginsupercitation}{m}{% The parameter is a single citation key
\supercite{#1} \citeauthor*{#1} (\citeyear{#1})%
\supercite{#1} \citeauthor*{#1} (\citeyear{#1})%
}
% The following command needs to be redefined every time \sidecite is called in order for \DeclareCiteCommand's wrapper to work correctly
\NewDocumentCommand{\kaobiblio@marginnote}{m}{%
\marginnote{#1}%
\marginnote{#1}%
}
% biblatex-like commands that also print a citation in the margin
% Usage:
% First optional argument is always vertical shift and must be given as an (empty) argument when using following a postnote and/or prenote
% Second optional argument is always the postnote if the third argument isn't specified or is the prenote if the third argument is specified (same pattern as the biblatex commands)
% Third optional argument is always the postnote
% Mandatory argument is always the citation key(s)
% First optional argument is always vertical shift and must be given as an (empty) argument when using following a postnote and/or prenote
% Second optional argument is always the postnote if the third argument isn't specified or is the prenote if the third argument is specified (same pattern as the biblatex commands)
% Third optional argument is always the postnote
% Mandatory argument is always the citation key(s)
% Command to \cite and print a citation in the margin
% First optional argument: vertical shift
@ -173,9 +173,9 @@
% Third optional argument: postnote
% Mandatory argument: citation key
\NewDocumentCommand{\sidecite}{o o o m}{%
\RenewDocumentCommand{\kaobiblio@marginnote}{m}{%
\marginnote[#1]{##1}%
}%
\RenewDocumentCommand{\kaobiblio@marginnote}{m}{%
\marginnote[#1]{##1}%
}%
\DeclareCiteCommand{\kaobiblio@sidecite}[\kaobiblio@marginnote]{%
}{%
\formatmargincitation{\thefield{entrykey}}%
@ -183,21 +183,21 @@
\\% separator between multiple citations
}{%
}%
% With this we print the marker in the text and add the item to the bibliography at the end
\IfNoValueOrEmptyTF{#2}%
{\def\@tempa{\cite{#4}\kaobiblio@sidecite{#4}}}%
{\IfNoValueOrEmptyTF{#3}%
{\IfNoValueTF{#3}%
{\def\@tempa{\cite[#2]{#4}\kaobiblio@sidecite{#4}}}%
{\def\@tempa{\cite[#2][]{#4}\kaobook@sidecite{#4}}}% postnote is empty, so pass empty postnote
}%
{\def\@tempa{\cite[#2][#3]{#4}\kaobiblio@sidecite{#4}}}%
}%
\ifkaobiblio@addspace%
\unskip~\@tempa%
\else%
\@tempa%
\fi%
% With this we print the marker in the text and add the item to the bibliography at the end
\IfNoValueOrEmptyTF{#2}%
{\def\@tempa{\cite{#4}\kaobiblio@sidecite{#4}}}%
{\IfNoValueOrEmptyTF{#3}%
{\IfNoValueTF{#3}%
{\def\@tempa{\cite[#2]{#4}\kaobiblio@sidecite{#4}}}%
{\def\@tempa{\cite[#2][]{#4}\kaobook@sidecite{#4}}}% postnote is empty, so pass empty postnote
}%
{\def\@tempa{\cite[#2][#3]{#4}\kaobiblio@sidecite{#4}}}%
}%
\ifkaobiblio@addspace%
\unskip~\@tempa%
\else%
\@tempa%
\fi%
}
% Command to \supercite and print a citation in the margin
@ -206,27 +206,27 @@
% Third optional argument: postnote
% Mandatory argument: citation key
\NewDocumentCommand{\sidesupercite}{o o o m}{%
\RenewDocumentCommand{\kaobiblio@marginnote}{m}{%
\marginnote[#1]{##1}%
}%
\DeclareCiteCommand{\kaobiblio@sidesupercite}[\kaobiblio@marginnote]{%
\RenewDocumentCommand{\kaobiblio@marginnote}{m}{%
\marginnote[#1]{##1}%
}%
\DeclareCiteCommand{\kaobiblio@sidesupercite}[\kaobiblio@marginnote]{%
}{%
\formatmarginsupercitation{\thefield{entrykey}}%
\formatmarginsupercitation{\thefield{entrykey}}%
}{%
\\% separator between multiple citations
}{%
}%
% With this we print the marker in the text and add the item to the bibliography at the end
\IfNoValueOrEmptyTF{#2}%
{\def\@tempa{\supercite{#4}\kaobiblio@sidesupercite{#4}}}%
{\IfNoValueOrEmptyTF{#3}%
{\IfNoValueTF{#3}%
{\def\@tempa{\supercite[#2]{#4}\kaobiblio@sidesupercite{#4}}}%
{\def\@tempa{\supercite[#2][]{#4}\kaobook@sidesupercite{#4}}}% postnote is empty, so pass empty postnote
}%
{\def\@tempa{\supercite[#2][#3]{#4}\kaobiblio@sidesupercite{#4}}}%
}%
\@tempa%
% With this we print the marker in the text and add the item to the bibliography at the end
\IfNoValueOrEmptyTF{#2}%
{\def\@tempa{\supercite{#4}\kaobiblio@sidesupercite{#4}}}%
{\IfNoValueOrEmptyTF{#3}%
{\IfNoValueTF{#3}%
{\def\@tempa{\supercite[#2]{#4}\kaobiblio@sidesupercite{#4}}}%
{\def\@tempa{\supercite[#2][]{#4}\kaobook@sidesupercite{#4}}}% postnote is empty, so pass empty postnote
}%
{\def\@tempa{\supercite[#2][#3]{#4}\kaobiblio@sidesupercite{#4}}}%
}%
\@tempa%
}
% Command to \textcite and print a citation in the margin
@ -245,21 +245,21 @@
\\% separator between multiple citations
}{%
}%
% With this we print the marker in the text and add the item to the bibliography at the end
% With this we print the marker in the text and add the item to the bibliography at the end
\IfNoValueOrEmptyTF{#2}%
{\def\@tempa{\textcite{#4}\kaobiblio@sidecite{#4}}}%
{\def\@tempa{\textcite{#4}\kaobiblio@sidecite{#4}}}%
{\IfNoValueOrEmptyTF{#3}%
{\IfNoValueTF{#3}%
{\def\@tempa{\textcite[#2]{#4}\kaobiblio@sidecite{#4}}}%
{\def\@tempa{\textcite[#2][]{#4}\kaobook@sidecite{#4}}}% postnote is empty, so pass empty postnote
{\def\@tempa{\textcite[#2]{#4}\kaobiblio@sidecite{#4}}}%
{\def\@tempa{\textcite[#2][]{#4}\kaobook@sidecite{#4}}}% postnote is empty, so pass empty postnote
}%
{\def\@tempa{\textcite[#2][#3]{#4}\kaobiblio@sidecite{#4}}}%
}%
\ifkaobiblio@addspace%
\unskip~\@tempa%
\else%
\@tempa%
\fi%
{\def\@tempa{\textcite[#2][#3]{#4}\kaobiblio@sidecite{#4}}}%
}%
\ifkaobiblio@addspace%
\unskip~\@tempa%
\else%
\@tempa%
\fi%
}
% Command to \parencite or \parencite* and print a citation in the margin
@ -279,33 +279,33 @@
\\% separator between multiple citations
}{%
}%
% With this we print the marker in the text and add the item to the bibliography at the end
\IfBooleanTF#1%
{\IfNoValueOrEmptyTF{#3}%
{\parencite*{#5}}%
{\IfNoValueOrEmptyTF{#4}%
{\IfNoValueTF{#4}%
{\def\@tempa{\parencite*[#3]{#5}}}%
{\def\@tempa{\parencite*[#3][]{#5}}}% postnote is empty, so pass empty postnote
}%
{\def\@tempa{\parencite*[#3][#4]{#5}}}%
}%
}%
{\IfNoValueOrEmptyTF{#3}%
{\def\@tempa{\parencite{#5}}}%
{\IfNoValueOrEmptyTF{#4}%
{\IfNoValueTF{#4}%
{\def\@tempa{\parencite[#3]{#5}}}%
{\def\@tempa{\parencite[#3][]{#5}}}% postnote is empty, so pass empty postnote
}%
{\def\@tempa{\parencite[#3][#4]{#5}}}%
}%
}%
\ifkaobiblio@addspace%
\unskip~\@tempa%
\else%
\@tempa%
\fi%
% With this we print the marker in the text and add the item to the bibliography at the end
\IfBooleanTF#1%
{\IfNoValueOrEmptyTF{#3}%
{\parencite*{#5}}%
{\IfNoValueOrEmptyTF{#4}%
{\IfNoValueTF{#4}%
{\def\@tempa{\parencite*[#3]{#5}}}%
{\def\@tempa{\parencite*[#3][]{#5}}}% postnote is empty, so pass empty postnote
}%
{\def\@tempa{\parencite*[#3][#4]{#5}}}%
}%
}%
{\IfNoValueOrEmptyTF{#3}%
{\def\@tempa{\parencite{#5}}}%
{\IfNoValueOrEmptyTF{#4}%
{\IfNoValueTF{#4}%
{\def\@tempa{\parencite[#3]{#5}}}%
{\def\@tempa{\parencite[#3][]{#5}}}% postnote is empty, so pass empty postnote
}%
{\def\@tempa{\parencite[#3][#4]{#5}}}%
}%
}%
\ifkaobiblio@addspace%
\unskip~\@tempa%
\else%
\@tempa%
\fi%
}
@ -358,13 +358,13 @@
\newbool{cbx:link}
% Include parentheses around labelyear in \textcite only in
% single citations without pre- and postnotes
\def\iflinkparens{%
\ifboolexpr{ test {\ifnumequal{\value{multicitetotal}}{0}} and
test {\ifnumequal{\value{citetotal}}{1}} and
test {\iffieldundef{prenote}} and
test {\iffieldundef{postnote}} }}
% Include parentheses around labelyear in \textcite only in
% single citations without pre- and postnotes
\def\iflinkparens{%
\ifboolexpr{ test {\ifnumequal{\value{multicitetotal}}{0}} and
test {\ifnumequal{\value{citetotal}}{1}} and
test {\iffieldundef{prenote}} and
test {\iffieldundef{postnote}} }}
\xpatchbibmacro{textcite}
{\printnames{labelname}}

36
kaobook.cls

@ -62,7 +62,7 @@
% Main matter
\let\oldmainmatter\mainmatter % Store the old command
\renewcommand{\mainmatter}{%
\oldmainmatter% Call the old command
\oldmainmatter% Call the old command
\pagestyle{scrheadings}% Use a fancy style for the header and the footer
\pagelayout{margin}% Use a 1.5 column layout
\setchapterstyle{kao} % Choose the default chapter heading style
@ -96,9 +96,9 @@
% Command to easily switch between chapter styles
\DeclareDocumentCommand{\setchapterstyle}{m}{%
\ifthenelse{\equal{plain}{#1}}{\chapterstyleplain}{}
\ifthenelse{\equal{bar}{#1}}{\chapterstylebar}{}
\ifthenelse{\equal{bar}{#1}}{\chapterstylebar}{}
\ifthenelse{\equal{lines}{#1}}{\chapterstylelines}{}
\ifthenelse{\equal{kao}{#1}}{\chapterstylekao}{}
\ifthenelse{\equal{kao}{#1}}{\chapterstylekao}{}
}
% The default definition in KOMA script
@ -108,7 +108,7 @@
\renewcommand*{\chapterformat}{%
\mbox{\chapappifchapterprefix{\nobreakspace}\thechapter%
\autodot\IfUsePrefixLine{}{\enskip}}}
\RedeclareSectionCommand[beforeskip=0cm,afterskip=10\vscale]{chapter}
\RedeclareSectionCommand[beforeskip=0cm,afterskip=10\vscale]{chapter}
\setlength{\mtocshift}{-1\vscale}
}
@ -134,7 +134,7 @@
]{\@hangfrom{##2}{##3}};
\end{tikzpicture}
}
\RedeclareSectionCommand[beforeskip=-55\vscale,afterskip=6\vscale]{chapter}
\RedeclareSectionCommand[beforeskip=-55\vscale,afterskip=6\vscale]{chapter}
\setlength{\mtocshift}{-1\vscale}
}
@ -147,22 +147,22 @@
\chapappifchapterprefix{\nobreakspace}\scalebox{3.5}{\thechapter\autodot}%
}%
\renewcommand\chapterlinesformat[3]{%
%\vspace*{-1cm}%
\leavevmode%
\makebox[0pt][l]{%
%\vspace*{-1cm}%
\leavevmode%
\makebox[0pt][l]{%
\makebox[\textwidth][l]{\hrulefill[1pt]##2}%\hfill%\par%\bigskip
\makebox[\marginparsep][l]{}%
\makebox[\marginparwidth][l]{}%
}\\
%\vspace{.5cm}
\makebox[0pt][l]{%
}\\
%\vspace{.5cm}
\makebox[0pt][l]{%
\makebox[\textwidth][l]{##3}%
\makebox[\marginparsep][l]{}%
\makebox[\marginparwidth][l]{}%
}\\
\makebox[0pt][l]{%
}\\
\makebox[0pt][l]{%
\makebox[\textwidth+\marginparsep+\marginparwidth][l]{\hrulefill[1.1pt]}%
}%
}%
}%
\RedeclareSectionCommand[beforeskip=0cm,afterskip=10\vscale]{chapter}
\setlength{\mtocshift}{-1\vscale}%
@ -198,7 +198,7 @@
\fi%
}%
\RedeclareSectionCommand[beforeskip=0cm,afterskip=10\vscale]{chapter}%
\setlength{\mtocshift}{-3.5\vscale}%
\setlength{\mtocshift}{-3.5\vscale}%
}
% Takes as input the image path and optionally the "beforeskip"
@ -207,10 +207,10 @@
\vspace*{-27\vscale}\hspace*{\dimexpr - \hoffset - \oddsidemargin - 1in}%
\includegraphics[width=\paperwidth,height=#1+27\vscale,keepaspectratio=false]{#2}%
}%
\chapterstylebar%
\chapterstylebar%
% beforeskip=-(figure_height-top_margin)
\RedeclareSectionCommand[beforeskip=-#1, afterskip=6\vscale]{chapter}%
\setlength{\mtocshift}{0cm}%
\RedeclareSectionCommand[beforeskip=-#1, afterskip=6\vscale]{chapter}%
\setlength{\mtocshift}{0cm}%
}
% By default start with the plain style

12
kaohandt.cls

@ -57,14 +57,14 @@
\setlength{\absleftindent}{0pt}% No indentation in the abstract
\if@abstrt
\renewcommand{\abstitlestyle}[1]{%
\renewcommand{\abstitlestyle}[1]{%
\vspace{-0.6cm}%
\begin{center}%
{\normalfont\bfseries\hspace{-3em} \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
}
\begin{center}%
{\normalfont\bfseries\hspace{-3em} \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
}
\else
\renewcommand{\abstitlestyle}[1]{\vspace{-.5em}\vspace{\z@}}%
\renewcommand{\abstitlestyle}[1]{\vspace{-.5em}\vspace{\z@}}%
\fi
% Set KOMA fonts

108
kaorefs.sty

@ -46,64 +46,64 @@
\newcommand{\exercisename}{}
\addto\captionsdanish{%
\renewcommand{\chapternameshort}{Kap.}
\renewcommand{\sectionname}{Sektion}
\renewcommand{\sectionnameshort}{Sek.}
\renewcommand{\subsectionname}{Undersektion}
\renewcommand{\subsectionnameplural}{Undersectioner}
\renewcommand{\subsectionnameshort}{Undersek.}
\renewcommand{\figurenameshort}{Fig.}
\renewcommand{\tablenameshort}{Tab.}
\renewcommand{\eqname}{Formel}
\renewcommand{\eqnameshort}{Frml.}
\renewcommand{\defname}{Definition}
\renewcommand{\assumname}{Hypotese}
\renewcommand{\thmname}{Sætning}
\renewcommand{\propname}{Postulat}
\renewcommand{\lemmaname}{Hjælpesætning}
\renewcommand{\remarkname}{Bemærkning}
\renewcommand{\examplename}{Eksempel}
\renewcommand{\exercisename}{Øvelse}
\renewcommand{\chapternameshort}{Kap.}
\renewcommand{\sectionname}{Sektion}
\renewcommand{\sectionnameshort}{Sek.}
\renewcommand{\subsectionname}{Undersektion}
\renewcommand{\subsectionnameplural}{Undersectioner}
\renewcommand{\subsectionnameshort}{Undersek.}
\renewcommand{\figurenameshort}{Fig.}
\renewcommand{\tablenameshort}{Tab.}
\renewcommand{\eqname}{Formel}
\renewcommand{\eqnameshort}{Frml.}
\renewcommand{\defname}{Definition}
\renewcommand{\assumname}{Hypotese}
\renewcommand{\thmname}{Sætning}
\renewcommand{\propname}{Postulat}
\renewcommand{\lemmaname}{Hjælpesætning}
\renewcommand{\remarkname}{Bemærkning}
\renewcommand{\examplename}{Eksempel}
\renewcommand{\exercisename}{Øvelse}
}
\addto\captionsenglish{%
\renewcommand{\chapternameshort}{Chap.}
\renewcommand{\sectionname}{Section}
\renewcommand{\sectionnameshort}{Sec.}
\renewcommand{\subsectionname}{Subsection}
\renewcommand{\subsectionnameplural}{Subsections}
\renewcommand{\subsectionnameshort}{Subsec.}
\renewcommand{\figurenameshort}{Fig.}
\renewcommand{\tablenameshort}{Tab.}
\renewcommand{\eqname}{Equation}
\renewcommand{\eqnameshort}{Eq.}
\renewcommand{\defname}{Definition}
\renewcommand{\assumname}{Assumption}
\renewcommand{\thmname}{Theorem}
\renewcommand{\propname}{Proposition}
\renewcommand{\lemmaname}{Lemma}
\renewcommand{\remarkname}{Remark}
\renewcommand{\examplename}{Example}
\renewcommand{\exercisename}{Exercise}
\renewcommand{\chapternameshort}{Chap.}
\renewcommand{\sectionname}{Section}
\renewcommand{\sectionnameshort}{Sec.}
\renewcommand{\subsectionname}{Subsection}
\renewcommand{\subsectionnameplural}{Subsections}
\renewcommand{\subsectionnameshort}{Subsec.}
\renewcommand{\figurenameshort}{Fig.}
\renewcommand{\tablenameshort}{Tab.}
\renewcommand{\eqname}{Equation}
\renewcommand{\eqnameshort}{Eq.}
\renewcommand{\defname}{Definition}
\renewcommand{\assumname}{Assumption}
\renewcommand{\thmname}{Theorem}
\renewcommand{\propname}{Proposition}
\renewcommand{\lemmaname}{Lemma}
\renewcommand{\remarkname}{Remark}
\renewcommand{\examplename}{Example}
\renewcommand{\exercisename}{Exercise}
}
\addto\captionsitalian{%
\renewcommand{\chapternameshort}{Cap.}
\renewcommand{\sectionname}{Sezione}
\renewcommand{\sectionnameshort}{Sez.}
\renewcommand{\subsectionname}{Sottosezione}
\renewcommand{\subsectionnameplural}{Sottosezioni}
\renewcommand{\subsectionnameshort}{Sottosezione}
\renewcommand{\figurenameshort}{Fig.}
\renewcommand{\tablenameshort}{Tab.}
\renewcommand{\eqname}{Equazione}
\renewcommand{\eqnameshort}{Eq.}
\renewcommand{\defname}{Definizione}
\renewcommand{\assumname}{Assunzione}
\renewcommand{\thmname}{Teorema}
\renewcommand{\propname}{Proposizione}
\renewcommand{\lemmaname}{Lemma}
\renewcommand{\remarkname}{Osservazione}
\renewcommand{\examplename}{Esempio}
\renewcommand{\exercisename}{Esercizio}
\renewcommand{\chapternameshort}{Cap.}
\renewcommand{\sectionname}{Sezione}
\renewcommand{\sectionnameshort}{Sez.}
\renewcommand{\subsectionname}{Sottosezione}
\renewcommand{\subsectionnameplural}{Sottosezioni}
\renewcommand{\subsectionnameshort}{Sottosezione}
\renewcommand{\figurenameshort}{Fig.}
\renewcommand{\tablenameshort}{Tab.}
\renewcommand{\eqname}{Equazione}
\renewcommand{\eqnameshort}{Eq.}
\renewcommand{\defname}{Definizione}
\renewcommand{\assumname}{Assunzione}
\renewcommand{\thmname}{Teorema}
\renewcommand{\propname}{Proposizione}
\renewcommand{\lemmaname}{Lemma}
\renewcommand{\remarkname}{Osservazione}
\renewcommand{\examplename}{Esempio}
\renewcommand{\exercisename}{Esercizio}
}
% Do you speak other languages? Please, feel free to add the captions!

710
kaotheorems.sty

@ -6,8 +6,8 @@
\RequirePackage{kvoptions} % Handle package options
\SetupKeyvalOptions{
family = kaotheorems,
prefix = kaotheorems@
family = kaotheorems,
prefix = kaotheorems@
}
\DeclareBoolOption{framed}% If true, put theorems into colorful boxes, otherwise write them like normal text
@ -38,374 +38,374 @@
%----------------------------------------------------------------------------------------
\ifkaotheorems@framed% Define the style of the mdframed boxes for theorems
\RequirePackage{tikz} % Required by mdframed
\RequirePackage[framemethod=TikZ]{mdframed} % Required for colorful boxes
\RequirePackage{tikz} % Required by mdframed
\RequirePackage[framemethod=TikZ]{mdframed} % Required for colorful boxes
% Box style
\mdfsetup{skipabove=\topskip,skipbelow=0pt}%-.5\topskip}
\mdfdefinestyle{mdfkao}{
skipabove=\topskip,
skipbelow=\topskip, % Does not work :(
rightmargin=0pt,
leftmargin=0pt,
innertopmargin=7pt,
innerbottommargin=3pt,
innerrightmargin=5pt,
innerleftmargin=5pt,
topline=false,
bottomline=false,
rightline=false,
leftline=false,
%linewidth=1pt,
%roundcorner=0pt,
%font={},
%frametitlefont={},
frametitlerule=true,
%linecolor=black,
%backgroundcolor=LightBlue,
%fontcolor=black,
%frametitlebackgroundcolor=LightBlue,
}
% Box style
\mdfsetup{skipabove=\topskip,skipbelow=0pt}%-.5\topskip}
\mdfdefinestyle{mdfkao}{
skipabove=\topskip,
skipbelow=\topskip, % Does not work :(
rightmargin=0pt,
leftmargin=0pt,
innertopmargin=7pt,
innerbottommargin=3pt,
innerrightmargin=5pt,
innerleftmargin=5pt,
topline=false,
bottomline=false,
rightline=false,
leftline=false,
%linewidth=1pt,
%roundcorner=0pt,
%font={},
%frametitlefont={},
frametitlerule=true,
%linecolor=black,
%backgroundcolor=LightBlue,
%fontcolor=black,
%frametitlebackgroundcolor=LightBlue,
}
% Theorem styles
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaoplain}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaodefinition}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaoassumption}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\footnotesize$\triangleright$\space\normalsize\NAME\space\NUMBER\space\NOTE},
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoremark}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoexample}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\small,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoexercise}
% Theorem styles
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaoplain}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaodefinition}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaoassumption}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\footnotesize$\triangleright$\space\normalsize\NAME\space\NUMBER\space\NOTE},
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoremark}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoexample}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\small,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoexercise}
% Theorems using the 'kaoplain' style
\theoremstyle{kaoplain}
\declaretheorem[
name=Theorem,
style=kaoplain,
%refname={theorem,theorems},
refname={Theorem,Theorems},
Refname={Theorem,Theorems},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@theorembackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{theorem}
\declaretheorem[
name=Proposition,
%refname={proposition,propositions},
refname={Proposition,Propositions},
Refname={Proposition,Propositions},
sibling=theorem,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@propositionbackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{proposition}
\declaretheorem[
name=Lemma,
%refname={lemma,lemmas},
refname={Lemma,Lemmas},
Refname={Lemma,Lemmas},
sibling=theorem,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@lemmabackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{lemma}
\declaretheorem[
name=Corollary,
%refname={corollary,corollaries},
refname={Corollary,Corollaries},
Refname={Corollary,Corollaries},
sibling=theorem,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@corollarybackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{corollary}
% Theorems using the 'kaoplain' style
\theoremstyle{kaoplain}
\declaretheorem[
name=Theorem,
style=kaoplain,
%refname={theorem,theorems},
refname={Theorem,Theorems},
Refname={Theorem,Theorems},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@theorembackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{theorem}
\declaretheorem[
name=Proposition,
%refname={proposition,propositions},
refname={Proposition,Propositions},
Refname={Proposition,Propositions},
sibling=theorem,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@propositionbackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{proposition}
\declaretheorem[
name=Lemma,
%refname={lemma,lemmas},
refname={Lemma,Lemmas},
Refname={Lemma,Lemmas},
sibling=theorem,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@lemmabackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{lemma}
\declaretheorem[
name=Corollary,
%refname={corollary,corollaries},
refname={Corollary,Corollaries},
Refname={Corollary,Corollaries},
sibling=theorem,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@corollarybackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{corollary}
% Theorems using the 'kaodefinition' style
\theoremstyle{kaodefinition}
\declaretheorem[
name=Definition,
%refname={definition,definitions},
refname={Definition,Definitions},
Refname={Definition,Definitions},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@definitionbackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{definition}
% Theorems using the 'kaodefinition' style
\theoremstyle{kaodefinition}
\declaretheorem[
name=Definition,
%refname={definition,definitions},
refname={Definition,Definitions},
Refname={Definition,Definitions},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@definitionbackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{definition}
% Theorems using the 'kaoassumption' style
\theoremstyle{kaoassumption}
\declaretheorem[
name=Assumption,
%refname={assumption,assumptions},
refname={Assumption,Assumptions},
Refname={Assumption,Assumptions},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@assumptionbackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{assumption}
% Theorems using the 'kaoassumption' style
\theoremstyle{kaoassumption}
\declaretheorem[
name=Assumption,
%refname={assumption,assumptions},
refname={Assumption,Assumptions},
Refname={Assumption,Assumptions},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@assumptionbackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{assumption}
% Theorems using the 'kaoremark' style
\theoremstyle{kaoremark}
\declaretheorem[
name=Remark,
%refname={remark,remarks},
refname={Remark,Remarks},
Refname={Remark,Remarks},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@remarkbackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{remark}
% Theorems using the 'kaoremark' style
\theoremstyle{kaoremark}
\declaretheorem[
name=Remark,
%refname={remark,remarks},
refname={Remark,Remarks},
Refname={Remark,Remarks},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@remarkbackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{remark}
% Theorems using the 'kaoexample' style
\theoremstyle{kaoexample}
\declaretheorem[
name=Example,
%refname={example,examples},
refname={Example,Examples},
Refname={Example,Examples},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@examplebackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{example}
% Theorems using the 'kaoexample' style
\theoremstyle{kaoexample}
\declaretheorem[
name=Example,
%refname={example,examples},
refname={Example,Examples},
Refname={Example,Examples},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@examplebackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{example}
% Theorems using the 'kaoexercise' style
\theoremstyle{kaoexercise}
\declaretheorem[
name=Exercise,
%refname={example,examples},
refname={Exercise,Exercises},
Refname={Exercise,Exercises},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@exercisebackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{exercise}
% Theorems using the 'kaoexercise' style
\theoremstyle{kaoexercise}
\declaretheorem[
name=Exercise,
%refname={example,examples},
refname={Exercise,Exercises},
Refname={Exercise,Exercises},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\kaotheorems@exercisebackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{exercise}
%\renewcommand{\thetheorem}{\arabic{chapter}.\arabic{section}.\arabic{theorem}}
%\renewcommand{\thetheorem}{\arabic{subsection}.\arabic{theorem}}
%\renewcommand{\qedsymbol}{$\blacksquare$}
%\renewcommand{\thetheorem}{\arabic{chapter}.\arabic{section}.\arabic{theorem}}
%\renewcommand{\thetheorem}{\arabic{subsection}.\arabic{theorem}}
%\renewcommand{\qedsymbol}{$\blacksquare$}
\else % If not using mdframed
% Theorem styles
\declaretheoremstyle[
spaceabove=.6\thm@preskip,
spacebelow=.1\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaoplain}
\declaretheoremstyle[
spaceabove=.6\thm@preskip,
spacebelow=.1\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaodefinition}
\declaretheoremstyle[
spaceabove=.6\thm@preskip,
spacebelow=.1\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\footnotesize$\triangleright$\space\normalsize\NAME\space\NUMBER\space\NOTE},
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoremark}
\declaretheoremstyle[
spaceabove=.6\thm@preskip,
spacebelow=.1\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoexample}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoexercise}
% Theorem styles
\declaretheoremstyle[
spaceabove=.6\thm@preskip,
spacebelow=.1\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaoplain}
\declaretheoremstyle[
spaceabove=.6\thm@preskip,
spacebelow=.1\thm@postskip,
%headfont=\normalfont\bfseries,%\scshape,
%notefont=\normalfont, notebraces={ (}{)},
bodyfont=\normalfont\itshape,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{kaodefinition}
\declaretheoremstyle[
spaceabove=.6\thm@preskip,
spacebelow=.1\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\footnotesize$\triangleright$\space\normalsize\NAME\space\NUMBER\space\NOTE},
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoremark}
\declaretheoremstyle[
spaceabove=.6\thm@preskip,
spacebelow=.1\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoexample}
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
%headfont=\normalfont\bfseries,
%notefont=\normalfont, notebraces={ (}{)},
%bodyfont=\normalfont,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
%refname={theorem,theorems},
%Refname={Theorem,Theorems},
]{kaoexercise}
% Theorems using the 'kaoplain' style
\theoremstyle{kaoplain}
\declaretheorem[
name=Theorem,
refname={theorem,theorems},
Refname={Theorem,Theorems},
numberwithin=section,
]{theorem}
\declaretheorem[
name=Proposition,
refname={proposition,propositions},
Refname={Proposition,Propositions},
sibling=theorem,
]{proposition}
\declaretheorem[
name=Lemma,
refname={lemma,lemmas},
Refname={Lemma,Lemmas},
sibling=theorem,
]{lemma}
\declaretheorem[
name=Corollary,
refname={corollary,corollaries},
Refname={Corollary,Corollaries},
sibling=theorem,
]{corollary}
% Theorems using the 'kaoplain' style
\theoremstyle{kaoplain}
\declaretheorem[
name=Theorem,
refname={theorem,theorems},
Refname={Theorem,Theorems},
numberwithin=section,
]{theorem}
\declaretheorem[
name=Proposition,
refname={proposition,propositions},
Refname={Proposition,Propositions},
sibling=theorem,
]{proposition}
\declaretheorem[
name=Lemma,
refname={lemma,lemmas},
Refname={Lemma,Lemmas},
sibling=theorem,
]{lemma}
\declaretheorem[
name=Corollary,
refname={corollary,corollaries},
Refname={Corollary,Corollaries},
sibling=theorem,
]{corollary}
% Theorems using the 'kaodefinition' style
\theoremstyle{kaodefinition}
\declaretheorem[
name=Definition,
refname={definition,definitions},
Refname={Definition,Definitions},
numberwithin=section,
]{definition}
% Theorems using the 'kaodefinition' style
\theoremstyle{kaodefinition}
\declaretheorem[
name=Definition,
refname={definition,definitions},
Refname={Definition,Definitions},
numberwithin=section,
]{definition}
% Theorems using the 'kaoremark' style
\theoremstyle{kaoremark}
\declaretheorem[
name=Remark,
refname={remark,remarks},
Refname={Remark,Remarks},
numberwithin=section,
]{remark}
% Theorems using the 'kaoremark' style
\theoremstyle{kaoremark}
\declaretheorem[
name=Remark,
refname={remark,remarks},
Refname={Remark,Remarks},
numberwithin=section,
]{remark}
% Theorems using the 'kaoexample' style
\theoremstyle{kaoexample}
\declaretheorem[
name=Example,
refname={example,examples},
Refname={Example,Examples},
numberwithin=section,
]{example}
% Theorems using the 'kaoexample' style
\theoremstyle{kaoexample}
\declaretheorem[
name=Example,
refname={example,examples},
Refname={Example,Examples},
numberwithin=section,
]{example}
% Theorems using the 'kaoexercise' style
\theoremstyle{kaoexercise}
\declaretheorem[
name=Exercise,
%refname={example,examples},
refname={Exercise,Exercises},
Refname={Exercise,Exercises},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\@exercisebackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{exercise}
% Theorems using the 'kaoexercise' style
\theoremstyle{kaoexercise}
\declaretheorem[
name=Exercise,
%refname={example,examples},
refname={Exercise,Exercises},
Refname={Exercise,Exercises},
numberwithin=section,
mdframed={
style=mdfkao,
backgroundcolor=\@exercisebackground,
%frametitlebackgroundcolor=\@theorembackground,
},
]{exercise}
%\renewcommand{\thetheorem}{\arabic{chapter}.\arabic{section}.\arabic{theorem}}
%\renewcommand{\thetheorem}{\arabic{subsection}.\arabic{theorem}}
%\renewcommand{\qedsymbol}{$\blacksquare$}
%\renewcommand{\thetheorem}{\arabic{chapter}.\arabic{section}.\arabic{theorem}}
%\renewcommand{\thetheorem}{\arabic{subsection}.\arabic{theorem}}
%\renewcommand{\qedsymbol}{$\blacksquare$}
\fi

Loading…
Cancel
Save