%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Class:       carnap-compact.cls
%
% Client:      Felix Meiner Verlag GmbH
%
% Author:      Jens Dittmar
% Copyright:   Da-TeX Gerd Blumenstein, Leipzig
% Contact:     http://www.da-tex.biz
% kontakt@da-tex.de
% +49 (0) 341 / 52 90 48 20
% Erich-Zeigner-Allee 69-73
% 04229 Leipzig
% Germany
%
% Version:     0.9.1
% Date:        2022-03-03
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This is based on book.cls after some weed out.


\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{carnap-compact}[2022/03/03 v0.9.1 Carnap critical edition]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Inherited basic setup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\@ptsize{}
\newif\if@restonecol
\newif\if@titlepage
\@titlepagetrue
\newif\if@openright
\newif\if@mainmatter \@mainmattertrue
\setlength\paperheight {297mm}%
\setlength\paperwidth  {210mm}
\renewcommand\@ptsize{0}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\DeclareOption{titlepage}{\@titlepagetrue}
\DeclareOption{notitlepage}{\@titlepagefalse}
\DeclareOption{openright}{\@openrighttrue}
\DeclareOption{openany}{\@openrightfalse}
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
\DeclareOption{openbib}{%
  \AtEndOfPackage{%
    \renewcommand\@openbib@code{%
      \advance\leftmargin\bibindent
      \itemindent -\bibindent
      \listparindent \itemindent
      \parsep \z@
    }%
    \renewcommand\newblock{\par}}%
}

\newif\if@elastic@diaries
\DeclareOption{elasticdiaries}{\@elastic@diariestrue}

\newif\if@fnAperpage
\DeclareOption{fnAperpage}{\@fnAperpagetrue}

\newif\if@fnAseparated
\DeclareOption{fnAseparated}{\@fnAseparatedtrue}

\newif\if@runningletters
\DeclareOption{runningletters}{\@runningletterstrue}

\newif\if@footnote@warning
\DeclareOption{footnotewarning}{\@footnote@warningtrue}

\newif\if@use@spotcolour
\DeclareOption{spotcolour}{\@use@spotcolourtrue}

\ExecuteOptions{twoside,onecolumn,final,openright}
\ProcessOptions

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\DeclareRobustCommand{\,}{\tmspace+\thinmuskip{.1667em}}
\RequirePackage{txfonts}%HACK: Take all, just let libertine overwrite the text definitions right after...
\RequirePackage{libertine}
\RequirePackage[T1]{fontenc}
%\input{carnapsizes.clo}%%%%% SHIPOUT INLINE
%%
%% This is based on `size10.clo',
\ProvidesFile{carnapsizes.clo}[2017/01/09 (size option)]
\renewcommand\normalsize{%
   \@setfontsize\normalsize{10.5bp}{13.5bp}%
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\normalfont\normalsize%
\newcommand\small{%
   \@setfontsize\small{9bp}{11}%
   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus2\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 4\p@ \@plus2\p@ \@minus2\p@
               \parsep 2\p@ \@plus\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}
\newcommand\footnotesize{%
   \@setfontsize\footnotesize{9bp}{11.25bp}% REQUEST 2018-03-15
   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus\p@
   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 3\p@ \@plus\p@ \@minus\p@
               \parsep 2\p@ \@plus\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}
\newcommand\scriptsize{%
  \@setfontsize\scriptsize{6.14\p@}\@viipt}
\newcommand\tiny{%
  \ClassWarning{carnap[sizes]}{unconfigured font size tiny}%
  \@setfontsize\tiny\@vpt\@vipt}

\newcommand*{\margsize}{\@setfontsize\margsize{8.75bp}{11.25bp}}

\newcommand*{\headsize}{\@setfontsize\headsize{9bp}{10bp}}
\newcommand*{\chapterheadsize}{\@setfontsize\chapterheadsize{14bp}{16bp}}
\newcommand*{\sectionsize}{\@setfontsize\sectionheadsize{10.5bp}{12bp}}%PROVISIONAL
\newcommand*{\subsectionsize}{\@setfontsize\subsectionsize{10.5bp}{12bp}}%PROVISIONAL
\newcommand*{\subsubsectionsize}{\normalsize}%PROVISIONAL
\newcommand*{\subsubsubsectionsize}{\normalsize}%PROVISIONAL

\DeclareMathSizes{10.5bp}{10.54}{6.14}{5}%normalsize

\if@twocolumn%away?
  \setlength\parindent{1em}
\else
  \setlength\parindent{15\p@}
\fi
\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@}
\setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@}
\setlength\headheight{12\p@}
\setlength\headsep   {25\p@}
\setlength\topskip   {10\p@}
\setlength\footskip{30\p@}
\if@compatibility \setlength\maxdepth{4\p@} \else
\setlength\maxdepth{.5\topskip} \fi
\def\@listi{\leftmargin\leftmargini
            \parsep 4\p@ \@plus2\p@ \@minus\p@
            \topsep 8\p@ \@plus2\p@ \@minus4\p@
            \itemsep4\p@ \@plus2\p@ \@minus\p@}
\let\@listI\@listi
\@listi
\def\@listii {\leftmargin\leftmarginii
              \labelwidth\leftmarginii
              \advance\labelwidth-\labelsep
              \topsep    4\p@ \@plus2\p@ \@minus\p@
              \parsep    2\p@ \@plus\p@  \@minus\p@
              \itemsep   \parsep}
\def\@listiii{\leftmargin\leftmarginiii
              \labelwidth\leftmarginiii
              \advance\labelwidth-\labelsep
              \topsep    2\p@ \@plus\p@\@minus\p@
              \parsep    \z@
              \partopsep \p@ \@plus\z@ \@minus\p@
              \itemsep   \topsep}
\def\@listiv {\leftmargin\leftmarginiv
              \labelwidth\leftmarginiv
              \advance\labelwidth-\labelsep}
\def\@listv  {\leftmargin\leftmarginv
              \labelwidth\leftmarginv
              \advance\labelwidth-\labelsep}
\def\@listvi {\leftmargin\leftmarginvi
              \labelwidth\leftmarginvi
              \advance\labelwidth-\labelsep}
%% End of file `carnapsizes.clo'.

\newcommand*{\sectionstyle}{\normalfont\normalcolor\sffamily}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage[paperwidth=165mm,paperheight=240mm,
textwidth=122mm,textheight=184.5mm,
top=23.3mm,
headheight=20pt,
headsep=4.7mm,
twoside,
inner=18mm,
marginparwidth=15mm,marginparsep=2mm]{geometry}[2008/12/21]

\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand\baselinestretch{}
\setlength\parskip{\z@}
\@lowpenalty   51
\@medpenalty  151
\@highpenalty 301

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Floats
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% JD: There will probably only be p-floats.
\setcounter{topnumber}{2}
\renewcommand\topfraction{.7}
\setcounter{bottomnumber}{1}
\renewcommand\bottomfraction{.3}
\setcounter{totalnumber}{3}
\renewcommand\textfraction{.2}
\renewcommand\floatpagefraction{.5}
\setcounter{dbltopnumber}{2}
\renewcommand\dbltopfraction{.7}
\renewcommand\dblfloatpagefraction{.5}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page setup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}

\newcommand*{\headstyle}{\headsize}
\newcommand*{\pnum@width}{2.55em}
\newcommand*{\mk@pnum}[1]{%
  \bgroup
  \sffamily\bfseries
  #1%
  \egroup
}
\newcommand*{\even@pnum@box}{\hb@xt@\pnum@width{\mk@pnum{\thepage}\hss}}
\newcommand*{\odd@pnum@box}{\hb@xt@\pnum@width{\hss\mk@pnum{\thepage}}}
\newcommand*{\head@strut}{\rule[-1.5mm]{0pt}{0pt}}
\newcommand*{\diary@head@suffix}{}
\newcommand*{\diary@head@prefix}{[Tagebuch \textbf{\thediarysection}]\quad}
\newcommand*{\diary@even@head}{\leavevmode\headstyle\head@strut\even@pnum@box
  \if@diary@prefixed\diary@head@prefix\fi
  \leftmark
  \if@diary@prefixed\diary@head@suffix\fi}
\newcommand*{\diary@odd@head}{\headstyle\head@strut
  \if@diary@prefixed\diary@head@prefix\fi
  \rightmark
  \if@diary@prefixed\diary@head@suffix\fi\odd@pnum@box}
\newcommand*{\letter@even@head}{\leavevmode\headstyle\head@strut\even@pnum@box\leftmark}
\newcommand*{\letter@odd@head}{\headstyle\head@strut\rightmark\odd@pnum@box}
\newcommand*{\standard@even@head}{\leavevmode\headstyle\head@strut\even@pnum@box\leftmark}
\newcommand*{\standard@odd@head}{\headstyle\head@strut\rightmark\odd@pnum@box}
\newcommand*{\plain@even@head}{\leavevmode\headstyle\head@strut\even@pnum@box}
\newcommand*{\plain@odd@head}{\headstyle\head@strut\odd@pnum@box}
\fancypagestyle{diary}{%
  \fancyhf{}%
  \fancyhead[LE]{\diary@even@head}%
  \fancyhead[RO]{\diary@odd@head}%
}
\fancypagestyle{diaryplain}{%
  \fancyhf{}%
  \renewcommand*\headrulewidth{0pt}%
  \fancyhead[LE]{\let\diary@head@prefix\relax\diary@even@head}%
  \fancyhead[RO]{\let\diary@head@prefix\relax\diary@odd@head}%
}
\fancypagestyle{letter}{%
  \fancyhf{}%
  \renewcommand*\headrulewidth{0pt}%
  \fancyhead[LE]{\letter@even@head}%
  \fancyhead[RO]{\letter@odd@head}%
}
\fancypagestyle{letterplain}{%
  \fancyhf{}%
  \renewcommand*\headrulewidth{0pt}%
  \fancyhead[LE]{\letter@even@head}%
  \fancyhead[RO]{\letter@odd@head}%
}
\fancypagestyle{plain}{%
  \fancyhf{}%
  \renewcommand*\headrulewidth{0pt}%
  % \fancyhead[LE]{\plain@even@head}%
  % \fancyhead[RO]{\plain@odd@head}%
}
\fancypagestyle{standard}{%
  \fancyhf{}%
  \fancyhead[LE]{\sectionstyle\standard@even@head}%
  \fancyhead[RO]{\sectionstyle\standard@odd@head}%
}
\def\headrulewidth{\z@}%2018-04-03

\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
    \hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page I
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Lamport style will probably go...
  \if@titlepage
  \newcommand\maketitle{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \null\vskip30mm
  \begingroup\fontsize{13bp}{9.5mm}\selectfont\sffamily\centering
    \@title \par
  \endgroup
  \@thanks
  \vfil\null
  \end{titlepage}%
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
\else
\ClassError{\@currname}{Option notitlepage is not supported.}{Give up.}
\newcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@% Prevents figures from going at top of page.
      \@maketitle
    \fi
    \thispagestyle{plain}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
\def\@maketitle{%
  \newpage
  \null
  \vskip 2em%
  \begin{center}%
  \let \footnote \thanks
    {\LARGE \@title \par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \vskip 1em%
    {\large \@date}%
  \end{center}%
  \par
  \vskip 1.5em}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sectioning
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{secnumdepth}{4}
% \newcounter {part}
\newcounter {chapter}
\newcounter {section}[chapter]
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {subsubsubsection}[subsubsection]
\renewcommand\thesection{\@Alph\c@section}
\renewcommand\thesubsection{\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}
\renewcommand\thesubsubsubsection{\thesubsubsection.\@arabic\c@subsubsubsection}

\newcommand\chapter{%
  \if@openright\cleardoublepage\else\clearpage\fi
  \thispagestyle{plain}%
  \global\@topnum\z@
  \@afterindentfalse
  \secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  \if@mainmatter
  \refstepcounter{chapter}%
  \typeout{\@chapapp\space\thechapter.}%
  \addcontentsline{toc}{\chapter@toc@type}%
  % {\protect\numberline{\thechapter}#1}%
  {#1}%
  \else
  \addcontentsline{toc}{chapter}{#1}%
  \fi
  \else
  \addcontentsline{toc}{chapter}{#1}%
  \fi
  \chaptermark{#1}%
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
  \if@twocolumn
  \@topnewpage[\@makechapterhead{#2}]%
  \else
  \@makechapterhead{#2}%
  \@afterheading
  \fi}
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright
    \interlinepenalty\@M
    \sectionstyle\chapterheadsize #1\par\nobreak
    \vskip 40\p@ \@plus 5\p@ \@minus 5\p@
  }}
\def\@schapter#1{%
  \pdfbookmark{#1}{toc}%
  \if@twocolumn
  \@topnewpage[\@makeschapterhead{#1}]%
  \else
  \@makeschapterhead{#1}%
  \@afterheading
  \fi}
\def\@makeschapterhead#1{%
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \sectionstyle\chapterheadsize #1\par\nobreak
    \vskip 40\p@ \@plus 5\p@ \@minus 5\p@
  }}
\let\@makechapterhead\@makeschapterhead

%PROVISIONAL
\def\@seccntformat@nodot#1{\upshape{\csname the#1\endcsname}\hskip.5em}
\def\@seccntformat@dot#1{\upshape{\csname the#1\endcsname.}\hskip.5em}
\let\@seccntformat\@seccntformat@nodot
\newcommand\section{%
  \let\@seccntformat\@seccntformat@dot
  \@startsection {section}{1}{\z@}%
  % {-9mm \@plus -1ex}%
  % {4.5mm \@plus.5ex}%
  {-27bp}%
  {13.5bp}%
  {\sectionstyle\sectionsize\bfseries}}
\newcommand\subsection{%
  \let\@seccntformat\@seccntformat@dot
  \@startsection{subsection}{2}{\z@}%
  % {-10mm}%
  % {4.5mm}%
  {-27bp}%
  {13.5bp}%
  {\sectionstyle\subsectionsize\itshape}}
\newcommand\subsubsection{%
  \let\@seccntformat\@seccntformat@nodot
  \@startsection{subsubsection}{3}{\z@}%
  % {-4mm \@plus 1mm}%
  {-27bp}%
  {13.5bp}%
  {\sectionstyle\subsubsectionsize}}
\newcommand\subsubsubsection{%
  \let\@seccntformat\@seccntformat@nodot
  \@startsection{subsubsubsection}{4}{\z@}%
  {-27bp}%
  {13.5bp}%
  {\sectionstyle\subsubsubsectionsize\itshape}}

\newcommand\semester{\@startsection{subsection}{2}{\z@}%
                                     {-5mm}%
                                     {4.5mm}%
                                     {\sectionstyle\normalsize}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Lists
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%JD: leftover from book.cls
% enumitem needs at least \descriptionlabel
\if@twocolumn
  \setlength\leftmargini  {2em}
\else
  \setlength\leftmargini  {2.5em}
\fi
\leftmargin  \leftmargini
\setlength\leftmarginii  {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv  {1.7em}
\if@twocolumn
  \setlength\leftmarginv  {.5em}
  \setlength\leftmarginvi {.5em}
\else
  \setlength\leftmarginv  {1em}
  \setlength\leftmarginvi {1em}
\fi
\setlength  \labelsep  {.5em}
\setlength  \labelwidth{\leftmargini}
\addtolength\labelwidth{-\labelsep}
\@beginparpenalty -\@lowpenalty
\@endparpenalty   -\@lowpenalty
\@itempenalty     -\@lowpenalty
\renewcommand\theenumi{\@arabic\c@enumi}
\renewcommand\theenumii{\@alph\c@enumii}
\renewcommand\theenumiii{\@roman\c@enumiii}
\renewcommand\theenumiv{\@Alph\c@enumiv}
\newcommand\labelenumi{\theenumi.}
\newcommand\labelenumii{(\theenumii)}
\newcommand\labelenumiii{\theenumiii.}
\newcommand\labelenumiv{\theenumiv.}
\renewcommand\p@enumii{\theenumi}
\renewcommand\p@enumiii{\theenumi(\theenumii)}
\renewcommand\p@enumiv{\p@enumiii\theenumiii}
\newcommand\labelitemi{\textbullet}
\newcommand\labelitemii{\normalfont\bfseries \textendash}
\newcommand\labelitemiii{\textasteriskcentered}
\newcommand\labelitemiv{\textperiodcentered}
\newenvironment{description}
               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
                        \let\makelabel\descriptionlabel}}
               {\endlist}
\newcommand*\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\bfseries #1}
\newenvironment{verse}
               {\let\\\@centercr
                \list{}{\itemsep      \z@
                        \itemindent   -1.5em%
                        \listparindent\itemindent
                        \rightmargin  \leftmargin
                        \advance\leftmargin 1.5em}%
                \item\relax}
               {\endlist}
\newenvironment{quotation}
               {\list{}{\listparindent \parindent
                   \itemindent    \parindent
                   \leftmargin\parindent
                        \rightmargin   \z@
                        \parsep        \z@
                        \topsep \baselineskip
                      \rmfamily}%
                \item\noindent\ignorespaces}
                {\endlist}
% \newenvironment{quote}
%                {\list{}{\rightmargin\leftmargin}%
%                 \item\relax}
%                {\endlist}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Titlepage II
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{titlepage}
    {%
      \cleardoublepage
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse\newpage
      \fi
      \thispagestyle{empty}%
      \setcounter{page}\@ne
    }%
    {\if@restonecol\twocolumn \else \newpage \fi
     \if@twoside\else
        \setcounter{page}\@ne
     \fi
    }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Appendix
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\appendix{%
  \cleardoublepage
  \thispagestyle{empty}%
  \null\vskip30mm
  \begingroup\fontsize{14bp}{20bp}\selectfont\sffamily\centering
  \textls{ANHANG}\par
  \endgroup
  \addtocontents{toc}{\newpage\noindent{\fontsize{10bp}{11bp}\selectfont\sffamily\textls{ANHANG}\par}}%
  \cleardoublepage
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \gdef\@chapapp{\appendixname}%
  \gdef\thechapter{\@Alph\c@chapter}%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Misc configuration
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tables
\setlength\arraycolsep{5\p@}
\setlength\tabcolsep{6\p@}
\setlength\arrayrulewidth{.4\p@}
\setlength\doublerulesep{2\p@}
\setlength\tabbingsep{\labelsep}
\skip\@mpfootins = \skip\footins
% Framed boxes
\setlength\fboxsep{3\p@}
\setlength\fboxrule{.4\p@}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ToC
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\@pnumwidth{7mm}
\newcommand\@tocrmarg{2.55em}
\newcommand\@dotsep{3}
\setcounter{tocdepth}{1}
\newcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\contentsname}%
    \@mkboth{\contentsname}{\contentsname}%
    \vspace*{-6mm}%
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    }

\def\@dottedtocline#1#2#3#4#5#6#7{%
  \ifnum #1>\c@tocdepth \else
    \vskip #2\relax
    {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent\z@\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima #3\relax
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
     \advance\rightskip\z@\@plus1fil
     {\csname toc@title@style@#4\endcsname#6}\nobreak
     \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill
     \nobreak
     \hb@xt@\@pnumwidth{\csname toc@pnum@style@#5\endcsname\fontsize{9.8bp}{10bp}\selectfont\hfil#7}%
     \par\vskip#3\relax}%
  \fi}

% \newcommand*\l@part[2]{%
%   \ifnum \c@tocdepth >-2\relax
%     \addpenalty{-\@highpenalty}%
%     \addvspace{2.25em \@plus\p@}%
%     \setlength\@tempdima{3em}%
%     \begingroup
%       \parindent \z@ \rightskip \@pnumwidth
%       \parfillskip -\@pnumwidth
%       {\leavevmode
%        \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
%        \nobreak
%          \global\@nobreaktrue
%          \everypar{\global\@nobreakfalse\everypar{}}%
%     \endgroup
%   \fi}
% \newcommand*\l@chapter[2]{%
%   \ifnum \c@tocdepth >\m@ne
%     \addpenalty{-\@highpenalty}%
%     \addvspace{.5em \@plus\p@}%
%     \setlength\@tempdima{1.5em}%
%     \begingroup
%       \parindent \z@ \rightskip \@pnumwidth
%       \parfillskip -\@pnumwidth
%       \leavevmode\fontsize{11bp}{13bp}% \bfseries
%       \advance\leftskip\@tempdima
%       \hskip -\leftskip
%       #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
%       \penalty\@highpenalty
%     \endgroup
%   \fi}

% The dot is a HACK.
\renewcommand*{\numberline}[1]{#1.\hskip.5em}

\newcommand*{\chapter@toc@type}{}
\newcommand*{\setchaptertoctype}[1]{\edef\chapter@toc@type{#1}}
\setchaptertoctype{chapter}
\newcommand*{\addToCspace}{\addtocontents{toc}{\vskip4mm}}

\newcommand*{\toc@title@style@chapter}{\fontfamily{fxb}\fontseries{b}\fontsize{10bp}{14bp}\selectfont
  \color{standout}}
\newcommand*{\toc@title@style@section}{\fontfamily{fxb}\fontseries{m}\fontsize{10bp}{14bp}\selectfont
  \color{black}}
\newcommand*{\toc@title@style@diary}{\fontfamily{fxl}\fontseries{m}\fontsize{10.5bp}{14bp}\selectfont
  \color{black}}
\newcommand*{\toc@pnum@style@standout}{\fontfamily{fxb}\fontseries{b}\selectfont\color{standout}}
\newcommand*{\toc@pnum@style@normal}{\fontfamily{fxb}\fontseries{m}\selectfont\color{black}}

\newcommand*\l@chapter{\@dottedtocline{1}{5mm}{1.5mm}{chapter}{standout}}
\newcommand*\l@section{\@dottedtocline{1}{.7mm}{0pt}{section}{normal}}
\newcommand*\l@subsection{\@dottedtocline{2}{.7mm}{0pt}{section}{normal}}
\newcommand*\l@subsubsection{\@dottedtocline{3}{1.5em}{2.3em}{}{}}
\newcommand*\l@subsubsubsection{\@dottedtocline{3}{1.5em}{2.3em}{}{}}

\newcommand*\l@diary{\@dottedtocline{1}{.7mm}{0pt}{diary}{normal}}
\newcommand*\l@letterset{\@dottedtocline{1}{\z@}{2.3em}{}{}}
\let\l@letterset\l@chapter%NOTE in flow

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Index
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\indexsize}{\fontsize{9bp}{10.6bp}\selectfont}
\newenvironment{theindex}
{\if@twocolumn
  \@restonecolfalse
  \else
  \@restonecoltrue
  \fi
  \cleardoublepage\phantomsection
  \twocolumn[\@makeschapterhead{\indexname}]%
  \@mkboth{\indexname}%
  {\indexname}%
  \phantomsection
  \addcontentsline{toc}{\chapter@toc@type}{\indexname}%
  \pagestyle{standard}%
  \thispagestyle{plain}\parindent\z@
  %\fontsize{9bp}{10.6bp}\selectfont
  \indexsize
  % \parskip\z@ \@plus .3\p@\relax
  \parskip\z@
  % \raggedright
  \RaggedRightRightskip\z@\@plus 5em
  \RaggedRight
  \columnseprule\z@
  \columnsep 35\p@
  \let\item\@idxitem\nobalance
}
{\if@restonecol\onecolumn\else\clearpage\fi}
\newcommand\@@idxitem{\par\hangindent 15\p@}
\newcommand\@idxitem@default{\@@idxitem}
\newcommand\subitem@default{\@@idxitem\hspace*{15\p@}}
\newif\if@newitem
\newcommand\@idxitem@works{\@@idxitem\hangindent 12\p@\@newitemtrue}
\newcommand\subitem@works{\if@newitem\nopagebreak\fi
  \@@idxitem\hangindent 12\p@\leavevmode
  \if@newitem\hspace*{12\p@}\else\hb@xt@ 12\p@{---\space}\fi%
  \@newitemfalse
}
\newcommand\subsubitem{\@idxitem\hangindent40\p@\hspace*{30\p@}}
\newcommand*{\setupworks}{%
  \let\@idxitem\@idxitem@works
  \let\subitem\subitem@works
}
\newcommand\@idxitem{}
\newcommand\subitem{}
\let\@idxitem\@idxitem@default
\let\subitem\subitem@default

\newcommand*{\indexdelim}{\hskip.5em}

%\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
\newcommand\indexspace{\par\vskip\baselineskip\relax}

\RequirePackage[makeindex]{splitidx}

\newindex[Personenregister]{nam}
\newindex[Sachregister]{sach}
\newindex[Ortsregister]{ort}
\newindex[Institutionenregister]{inst}
\newindex[Register der Werke Carnaps]{carnap}
\newindex[Register der Werke Dritter]{werke}
\newindex[Register der Filme]{filme}

%Index-Befehle
\newcommand*{\indexmark}[2]{\textcolor{#1}{\textsuperscript{\bfseries#2\!}}}
\newcommand*{\hushindex}{\let\indexmark\@gobbletwo}
\newcommand*{\hushall}{\hushindex\let\blockade\@gobble}
\newenvironment{silentindex}{\hushindex}{}
\newcommand{\IN}[1]{\indexmark{blue}{n}\sindex[nam]{#1}}
\newcommand{\IS}[1]{\indexmark{cyan}{s}\sindex[sach]{#1}}
\newcommand{\IO}[1]{\indexmark{green}{o}\sindex[ort]{#1}}
\newcommand{\II}[1]{\indexmark{orange}{i}\sindex[inst]{#1}}
\newcommand{\IC}[1]{\indexmark{red}{c}\sindex[carnap]{#1}}
\newcommand*{\ICHmark}[1]{\unskip\nobreak\indexdelim\ensuremath{\lozenge}}
\newcommand{\ICH}[1]{\indexmark{red}{c}\sindex[carnap]{#1|ICHmark}}
\newcommand{\IW}[1]{\indexmark{magenta}{w}\sindex[werke]{#1}}
\newcommand*{\IWHmark}[1]{\unskip\nobreak\indexdelim\ensuremath{\lozenge}}
\newcommand{\IWH}[1]{\indexmark{magenta}{w}\sindex[werke]{#1|IWHmark}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Footnotes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% footins starts as 12+4-4
%\addtolength{\skip\footins}{2\p@}
\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule\@height.25bp%\@width.4\columnwidth
  \kern2.6\p@
\kern2\p@}
\@addtoreset{footnote}{chapter}
\RequirePackage[stable,multiple,bottom,% hang
]{footmisc}
\footnotemargin4mm
\footnotesep3mm
\renewcommand*{\footnotelayout}{\footnotesize\sffamily}
  \long\def\@makefntext#1{%
    \ifFN@hangfoot
      \bgroup
      \setbox\@tempboxa\hbox{%
        \ifdim\footnotemargin>0pt
          \hb@xt@\footnotemargin{\raisebox{1mm}{\fontsize{5.25bp}{\z@}\sffamily\@thefnmark}\hss}%PATCH
        \else
          \@makefnmark
        \fi
      }%
      \leftmargin\wd\@tempboxa
      \rightmargin\z@
      \linewidth \columnwidth
      \advance \linewidth -\leftmargin
      \parshape \@ne \leftmargin \linewidth
      \footnotesize
      \@setpar{{\@@par}}%
      \leavevmode
      \llap{\box\@tempboxa}%
      \parskip\hangfootparskip\relax
      \parindent\hangfootparindent\relax
      \else
      WTF
    \fi
  }
%%%%% Multiple apparatus
\RequirePackage{multido}
\DeclareRobustCommand*{\@starred}[1]{\multido{}{#1}{*}}
\DeclareRobustCommand*{\@alphcyclic}[1]{%
  \@tempcnta=#1%
  \ifnum\@tempcnta>26
  \advance\@tempcnta by -26
  \@alphcyclic{\@tempcnta}%
  \else
  \@alph{\@tempcnta}%
  \fi
}
\RequirePackage{bigfoot}
\DeclareNewFootnote{C}[starred]%Carnap
\skip\footins5bp%2mm%REQUEST 2018-03-15
\DeclareNewFootnote[para]{A}[alphcyclic]%textkritisch
\DeclareNewFootnote{E}%\fnE  
\DeclareNewFootnote{M}%Herausgeber

\MakeSortedPerPage{footnoteC}

\if@fnAperpage
\MakeSortedPerPage{footnoteA}
\else
\MakeSorted{footnoteA}
\fi
\MakeSorted{footnoteE}
\@addtoreset{footnoteE}{chapter}
\MakeSorted{footnoteM}
\DeclareRobustCommand*{\thefootnoteM}{\thefootnoteA\arabic{footnoteM}}
\@addtoreset{footnoteM}{footnoteA}
\skip\footins14.0pt plus 4.0pt minus 4.0pt

%\interfootnotelinepenalty10000
\long\def\@makefntext@low#1{%
      \setbox\@tempboxa\hbox{%
        \ifdim\footnotemargin>0pt
          \hb@xt@2em{\hss\@textsubscript{\fontsize{5.25bp}{\z@}\sffamily\@thefnmark}}%
        \else
          \@makefnmark
        \fi
      }%
      \leftmargin\z@
      \rightmargin\z@
      \linewidth \columnwidth
      \advance \linewidth -\leftmargin
      \parshape \@ne \leftmargin \linewidth
      \footnotesize
      \@setpar{{\@@par}}%
      \leavevmode
      \llap{\box\@tempboxa\hskip2mm}%
      \parskip\hangfootparskip\relax
      \parindent\hangfootparindent\relax
      \footnotelayout#1}
\long\def\@makefntext@serif#1{%
      \setbox\@tempboxa\hbox{%
        \ifdim\footnotemargin>0pt
          \hb@xt@2em{\hss\raisebox{1mm}{\fontsize{5.25bp}{\z@}\sffamily\@thefnmark}}%
        \else
          \@makefnmark
        \fi
      }%
      \leftmargin\z@
      \rightmargin\z@
      \linewidth \columnwidth
      \advance \linewidth -\leftmargin
      \parshape \@ne \leftmargin \linewidth
      \footnotesize
      \@setpar{{\@@par}}%
      \par\leavevmode
      \llap{\box\@tempboxa\hskip2mm}%
      \parskip\hangfootparskip\relax
      \parindent\hangfootparindent\relax
      \footnotelayout\rmfamily#1}
\long\def\@makefntext@para@low#1{%
  \setbox\@tempboxa\hbox{%
    \hb@xt@1em{\hss\@textsubscript{\fontsize{5.25bp}{\z@}\sffamily\@thefnmark}}%
      }%
      \leftmargin\z@
      \rightmargin\z@
      \linewidth \columnwidth
      \advance \linewidth -\leftmargin
      \parshape \@ne \leftmargin \linewidth
      \footnotesize
      \@setpar{{\@@par}}%
      \leavevmode
      \llap{\box\@tempboxa\hskip2mm}%
      \parskip\hangfootparskip\relax
      \parindent\hangfootparindent\relax
      \let\@makefnmark\@fnmark@inpara
      \footnotelayout#1}

\newcommand*{\@fnmark@inpara}{\raisebox{1mm}{\fontsize{5.25bp}{\z@}\sffamily\@thefnmark}}
\FootnoteSpecific{C}\long\def\@makefntext{\@makefntext@serif}
\FootnoteSpecific{A}\long\def\@makefntext{\@makefntext@para@low}
\FootnoteSpecific{E}\long\def\@makefntext{\@makefntext@low}
\FootnoteSpecific{M}\long\def\@makefntext{\@makefntext@low}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Names of things
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\contentsname{Contents}
\newcommand\listfigurename{List of Figures}
\newcommand\listtablename{List of Tables}
\newcommand\bibname{Bibliography}
\newcommand\indexname{Index}
\newcommand\figurename{Figure}
\newcommand\tablename{Table}
\newcommand\partname{Part}
\newcommand\chaptername{Chapter}
\newcommand\appendixname{Appendix}
\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Last configuration before diving in
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength\columnsep{10\p@}
\setlength\columnseprule{0\p@}
\pagestyle{standard}
\renewcommand*\chaptermark[1]{\markboth{#1}{#1}}
\def\sectionmark#1{\markright{#1}}
\let\subsubsubsectionmark\@gobble
\pagenumbering{arabic}

\clubpenalty\@M
\widowpenalty\@M

%\raggedbottom
\flushbottom

\RequirePackage{graphicx}

\RequirePackage[ngerman]{babel}
\AtBeginDocument{\renewcommand*{\contentsname}{Inhalt}}

\RequirePackage{nicefrac}

\RequirePackage[colorlinks,bookmarksopen]{hyperref}
\urlstyle{same}
\RequirePackage{bookmark}

% \newcommand*{\osf@orig@hyperpage}{}
% \let\osf@orig@hyperpage\hyperpage
% \renewcommand*{\hyperpage}[1]{\Lonum{\osf@orig@hyperpage{#1}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Colours
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{xcolor}%%%%% SHIPOUT UNCOMMENT
\InputIfFileExists{colorhook}{}{\definecolor{standout}{cmyk}{0.0 0.65 1.0 0.05}}

\definecolor{Black}{cmyk}{0,0,0,1}
\definecolor{White}{cmyk}{0,0,0,0}
\color{Black}% NOTE define \normalcolor?
\definecolor{orange}{rgb}{1,0.5,0}

\RequirePackage{textcomp}
\RequirePackage{balance}

\let\textsubscript\relax%NOTE Graz HACK
\let\@textsubscript\relax%NOTE Graz HACK
\DeclareRobustCommand*\textsubscript[1]{%
  \@textsubscript{\selectfont#1}%
}
\newcommand{\@textsubscript}[1]{%
  {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}%
}

%\input{carnap-common}%%%%% SHIPOUT INLINE
\ProvidesFile{carnap-common}[2018/04/03 Carnap editorial markup]

\RequirePackage{ifthen} %if-then-Befehle
\RequirePackage{scrdate} %berechnet den Wochentag zu einem Datum

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% enhanced underlines
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage[normalem]{ulem}
\ULdepth2pt%
% JD: patched in a hook for coloured underline
\def\ULset{\UL@setULdepth
  \def\UL@leadtype{\leaders \hbox{{\ul@leader@hook\vrule \@height\dimen@ \@depth\ULdepth}}}%
  \ifmmode \ULdepth-4\p@ \fi
  \dimen@-\ULdepth \advance\dimen@\ULthickness \ULon}
% patch for space between multiple underlines
\def\UL@onin#1{\leavevmode\UL@ender % when nested, do multiple underlining
  \dimen@\ULthickness \advance\ULdepth\ULdepth%patched here%\thr@@\dimen@
  \advance\dimen@-\ULdepth
  \setbox\UL@box\hbox{{#1}}\let\UL@start\relax\UL@putbox\egroup}
\newcommand*{\ul@leader@hook}{}
\newcommand*{\ul@black@hook}{\color{black}}
\newcommand*{\ul@color@hook}{\color{standout}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% running head
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Folgende Umdefinition von \rightmark und \leftmark ermoeglicht die Anzeige des genauen Datumbereichs der Tagebucheintraege auf einer Doppelseite ::
% bewirkt, dass die Sektion-Markierung immer vom LETZTEN Wert bei SEITENENDE genommmen wird: (vgl.) KOMA-Handbuch s. 519:
% MOVE?
\renewcommand*{\rightmark}{%
	\expandafter\@rightmark\botmark\@empty\@empty%
}
% bewirkt, dass die Chapter-Markierung immer vom ERSTEN Wert bei SEITENANFANG genommmen wird: (vgl.) KOMA-Handbuch s. 519:
\renewcommand*{\leftmark}{%
	\expandafter\@leftmark\firstmark\@empty\@empty%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% auxillary
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% roemische Zahl aus arabischer Zahl generieren:
\newcommand*{\rom}[1]{\expandafter\@slowromancap\romannumeral #1@} % macht eine roemische Ziffer
% Tagesnamen in zwei Buchstabenform generieren
\newcommand{\wochentag}[3]{\wotaku{\DayName{#3}{#2}{#1}}}
\newcommand{\wotaku}[1]{%
 \ifthenelse{\equal{#1}{Montag}}{Mo}{%
  \ifthenelse{\equal{#1}{Dienstag}}{Di}{%
   \ifthenelse{\equal{#1}{Mittwoch}}{Mi}{%
    \ifthenelse{\equal{#1}{Donnerstag}}{Do}{%
     \ifthenelse{\equal{#1}{Freitag}}{Fr}{%
      \ifthenelse{\equal{#1}{Samstag}}{Sa}{So}}}}}}%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% inline editorial markup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unterstreichung bei durchgestrichenem Text (Reformatierung erforderlich)
% JD: Ugly hack for \markoverwith version, allows for \ulinesp to place its rule correctly inside \ulinestr
\newif\if@inul
% JD: The test for negative \ULdepth handles the case inside \sout. Sort of.
\newcommand{\ulinestr}[1]{{\@inultrue\ifdim\ULdepth<\z@\ULdepth1\p@\fi\let\ul@leader@hook\ul@black@hook\uline{#1}}}
% JD: bad hack for \sout inside \uline
\newcommand*{\soutinul}{\bgroup \ULdepth=-.3ex \let\ul@leader@hook\ul@black@hook\ULset}
% spaetere Unterstreichung
\newcommand*{\ulinesp}[1]{{\let\ul@leader@hook\ul@color@hook\uline{#1}}}
% spaetere Eintragungen
\newcommand{\textsp}[1]{\textcolor{standout}{#1}}
% linke und rechte Hakenklammer
\newcommand*{\lhaken}{\ensuremath{\color{black}\ulcorner}\ifhmode\else\nobreak\fi\kern-.5pt}
\newcommand*{\rhaken}{\ifhmode\else\nobreak\fi\kern-.5pt\ensuremath{\color{black}\urcorner}}

\newcommand*{\textspkl}[1]{\textsp{\lhaken#1\rhaken}}

% Klammern fuer Textwiederholungen mit " vom Vortag
\newcommand{\textwh}[1]{\ensuremath{\lozenge}\kern0pt\relax#1\kern0pt\ensuremath{\lozenge}}

% linke und rechte spitze Klammer
\newcommand{\lspitz}{\ensuremath{\ddagger}}
\newcommand{\rspitz}{\ensuremath{\ddagger}}

% linke und rechte Hakenklammer oben
\newcommand{\lohaken}{\ensuremath{\lceil}}
\newcommand{\rohaken}{\ensuremath{\rceil}}

\RequirePackage{tikz}%breaks spot color
\DeclareRobustCommand*{\diamondize}[1]{%
  \tikz[inner sep=0,baseline=.2em]{%
    \draw[black,line width=.05em%.5bp
    ](0,0) -- (.5em,.5em) -- (0,1em) -- (-.5em,.5em) -- cycle;
    \node[scale=.8] at (0,.5em) {#1};
  }%
}
\DeclareRobustCommand*{\diamondizeNoBlack}[1]{%
  \tikz[inner sep=0,baseline=.2em]{%
    \draw[line width=.05em%.5bp
    ](0,0) -- (.5em,.5em) -- (0,1em) -- (-.5em,.5em) -- cycle;
    \node[scale=.8] at (0,.5em) {#1};
  }%
}

% gestrichene nicht zu entziffernde Passage
\newcommand{\gestrunl}{\diamondize{\sout{?}}}
\newcommand{\gestrunlNoBlack}{\diamondizeNoBlack{\sout{?}}}
% nicht zu entzifferndes Wort oder Wortteil
\newcommand{\unl}{\diamondize{?}}
\newcommand{\unlNoBlack}{\diamondizeNoBlack{?}}
% mehrere nicht zu entziffernde Woerter
\newcommand{\unll}{\diamondize{?}\diamondize{?}}

% Luecke, die Carnap gelassen und nicht aufgefuellt hat
\newcommand{\luecke}{\ensuremath{\langle\ldots\rangle}}

% kleiner Kreis
\newcommand{\kreis}{{\small\ensuremath{\circ}}}
% kleines Kreuz
\newcommand{\kreuz}{{\small\ensuremath{+}}} % WIE SIEHT DAS KREUZ AUS ???? noch unklar ...
% kleiner Strich
\newcommand{\strich}{\funnything{strich}\textendash} % Notloesung sollte schraeg sein!! mit rotatebox o.dgl. probieren ... \rotatebox{20}{\textendash}
% Dreieck
\newcommand{\dreieck}{{\ensuremath{\scriptstyle\bigtriangleup}}}

% Blockade: zur Markierung Kommentierungs- und/oder Ueberpruefungsbeduerftiger Passagen
\newcommand{\blockadeanmerkung}[1]{\ifthenelse{\equal{#1}{}}{}{\textcolor{red}{\scriptsize (#1)}}}
\newcommand{\blockade}[1]{\textcolor{red}{\ensuremath{\blacksquare}}\blockadeanmerkung{#1}}

% Herausgeberzusaetze (statt der ueblichen eckigen Klammern)
\newcommand{\editor}[1]{||#1||}
% Streichungen der Herausgeber:
\newcommand{\editorstr}[1]{\lohaken\dotuline{#1}\rohaken}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% late additions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\langschrift}[1]{\textit{#1}}% Use?
\newcommand*{\unsicher}[1]{\ensuremath{\ddagger}\kern.1em#1\kern.1em\ensuremath{\ddagger}}
\newcommand*{\neueseite{}}{\textbrokenbar}
\newcommand*{\kopfsp}[1]{\textbackslash#1\textbackslash}

\newcommand*{\subscriptbo}{\ensuremath{_{B\varnothing}}}
\newcommand*{\subscriptb}{\ensuremath{_{B}}}
\newcommand*{\subscripto}{\ensuremath{_{\varnothing}}}

\RequirePackage{marginnote}
\newcommand*{\grafik}[1]{\marginnote{\leavevmode\margsize\color{red}#1}}
\newcommand*{\foto}[1]{\marginnote{\leavevmode\margsize\color{red}FOTO\linebreak#1}}

% END OF carnap-common
%\input{carnap-diaries}%%%%% SHIPOUT INLINE
\ProvidesFile{carnap-diaries}[2018/04/03 Carnap diary markup]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Diaries
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\if@diaryopenright
\@diaryopenrighttrue

\newcommand*{\narrowlayout}{%
  \newgeometry{textwidth=111mm,textheight=184.5mm,
    twoside,
    inner=18mm,marginparwidth=27mm,marginparsep=4mm}%
  \headwidth\textwidth
  \iffalse
  \advance\headwidth\marginparsep
  \advance\headwidth\marginparwidth
  \fi
  \let\marginnotetextwidth\textwidth
}

\newenvironment{diaries}[2][]{%
  \cleardoublepage
  \thispagestyle{empty}%
  \phantomsection
  \null\vskip30mm
  \begingroup\fontsize{14bp}{20bp}\selectfont\sffamily\centering
    #2\par
  \endgroup
  \vfil\null
  \pagestyle{diary}%
  \parindent\z@
  \tolerance500%%%%%?
  \edef\@tempa{#1}%
  \ifx\@tempa\@empty
  \addcontentsline{toc}{chapter}{#2}%
  \else
  \addcontentsline{toc}{chapter}{#1}%
  \fi
  \narrowlayout
}{}

\newcounter{diarysection}

\newif\if@diary@prefixed
\@diary@prefixedtrue
\newcommand*{\@diary@write@toc}[3]{%
  \addcontentsline{toc}{diary}{\if@diary@prefixed\texorpdfstring{\hb@xt@22mm{Tagebuch\space#1\hss}}{Tagebuch\space#1\space}\fi
    #2#3}%
}
\newcommand*{\@diary}[3][]{%
  \if@diaryopenright\cleardoublepage\else\clearpage\fi
  \setcounter{footnoteE}{0}%
  \phantomsection\protected@edef\@currentlabel{#2}\label{diary:#2}%
  \bgroup
  \fontsize{11bp}{14bp}\selectfont
  \sffamily\if@diary@prefixed\textbf{#2}\hskip.5em\relax Tagebuch\fi
  \edef\@tempa{#1}%
  \ifx\@tempa\@empty\else\space [#1]\fi
  \space#3\par
  \egroup
  \edef\@tempa{#1}%
  \ifx\@tempa\@empty
  \def\@tempb{}%
  \else
  \edef\@tempb{[\@tempa]\space}%
  \fi
  %\addcontentsline{toc}{diary}{\if@diary@prefixed#1. Tagebuch\quad\fi #2}%
  % \addcontentsline{toc}{diary}{\if@diary@prefixed Tagebuch \textbf{#2} \fi
  % #3}%
  \@diary@write@toc{#2}{\@tempb}{#3}%
  \renewcommand*{\diary@head@prefix}{TB \textbf{\thediarysection}%
    \edef\@tempa{#1}%
    \ifx\@tempa\@empty\else\space[#1]\fi\quad}
  \thispagestyle{diaryplain}%
  \vskip2bp
  \hrule height.5bp
  \vskip6.6mm plus 1mm minus 1mm%avoid overfull pages
  \@afterheading
  \@diaryopenrightfalse
  \setcounter{footnote}{0}%
  \if@diary@prefixed\setcounter{diarysection}{#2}\fi
}
\newcommand*{\diary}{%
  \@diary@prefixedtrue
  \@diary
}
\newcommand*{\diarylike}[1]{%
  \markboth{#1}{#1}
  \@diary@prefixedfalse
  \@diary{}{#1}
}

\def\toclevel@diary{1}
\def\toclevel@letterset{0}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% diary entries
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tagebucheintrag
% Tag/Monat/Jahr/Ergaenzung
\newcommand*{\last@entry}{}
\newcommand*{\funnything}[1]{\typeout{Warning: #1 in entry \last@entry}}
\newcommand*{\funnychar}[1]{\typeout{funny character #1 in entry \last@entry}}
\newcommand*{\store@entry@label}[3]{%
  \protected@edef\@currentlabel{#1.\,\rom{#2}.\,#3}%
  \protected@edef\@currentlabel@name{tbentry:#1.#2.#3}%
}
\newcommand*{\tbentry}[4]{%
  \xdef\last@entry{#1-#2-#3}%
  \ifthenelse{#1=1\and#2=1}{\tbentryllong{#1}{#2}{#3}{#4}}{%
    \ifthenelse{#1=1}{\tbentrylong{#1}{#2}{#3}{#4}}{%
      \tbentrynormal{#1}{#2}{#3}{#4}}}%
  \ignorespaces}

\newcommand*{\tbmanyentries}[1]{%
  \start@tbentry
  \begingroup\entryheads@inlinetrue#1\hskip\entryheadsep\endgroup
}
\newcommand*{\topsout}[1]{%
  \setbox\@tempboxa\hbox{#1}%
  \@tempdima\wd\@tempboxa
  \rlap{\box\@tempboxa}%
  \setbox\@tempboxa\hb@xt@\@tempdima{}%
  \sout{\box\@tempboxa}%
}
% Datumsangabe in der Kopfzeile schreiben
%\newcommand{\datumkopfzeile}[2]{\rom{#1}\,/\,#2}%JD removed
% Abstand der Box vom Text festlegen
%\newcommand{\boxeinrichten}{\setlength{\fboxsep}{1pt}}
% Anmkerkungen im vierten Argument zum Tagebucheintrag passend formatieren
\newcommand{\datumanmerkung}[1]{\ifthenelse{\equal{#1}{}}{}{~\small#1}}
%JD
\newlength{\aboveentryskip}
\if@elastic@diaries
\setlength{\aboveentryskip}{2.1mm plus 2mm}
\else
\setlength{\aboveentryskip}{2.1mm}
\fi

\fboxsep.8mm% Better define locally?
\newif\if@noentryskip
\newcommand*{\beforeentryskip}{%
  \if@noentryskip\else
  % \vskip\aboveentryskip
  \addvspace{\aboveentryskip}%
  \fi
  \@noentryskipfalse
}
\definecolor{entryhead}{cmyk}{0,0,0,.15}
\newif\ifentryheads@inline
\newlength{\entryheadsep}
\setlength{\entryheadsep}{.5em}
\newcommand*{\start@tbentry}{%
  \par
  \beforeentryskip
  \noindent}
\newcommand*{\@makeentryhead}[1]{%
  \ifentryheads@inline\else\start@tbentry\fi
  \phantomsection\label{\@currentlabel@name}%
  \colorbox{entryhead}{\kern-.3mm\relax#1\kern-.3mm}\ifentryheads@inline\else\hskip\entryheadsep\ignorespaces\fi
}

\newcommand*{\mark@equally}[1]{%
  \markboth{#1}{#1}%
}
\newcommand*{\date@to@head}[2]{%
  \mark@equally{\textit{\rom{#1}}\kern.2em/\textit{#2}}%
}

% Tagebucheintrag normal, ohne Monatsangabe
\newcommand{\tbentrynormal}[4]{%
  \store@entry@label{#1}{#2}{#3}%
  \@makeentryhead{\wochentag{#1}{#2}{#3}\,#1\datumanmerkung{#4}}\date@to@head{#2}{#3}}
% Tagebucheintrag lang, mit Monatsangabe
\newcommand{\tbentrylong}[4]{%
  \store@entry@label{#1}{#2}{#3}%
  \@makeentryhead{\wochentag{#1}{#2}{#3}\,#1.\,\rom{#2}.\datumanmerkung{#4}}\date@to@head{#2}{#3}}
% Tagebucheintrag lang, mit Monatsangabe UND Jahresangabe
\newcommand{\tbentryllong}[4]{%
  \store@entry@label{#1}{#2}{#3}%
  \@makeentryhead{\wochentag{#1}{#2}{#3}\,#1.\,\rom{#2}.\,#3\datumanmerkung{#4}}\date@to@head{#2}{#3}}

% Tagebucheintrag spaeter unterstrichen
% JD: Wo?
\newcommand{\tbentrysp}[4]{\ifthenelse{#1=1\and#2=1}{\tbentryllongsp{#1}{#2}{#3}{#4}}{%
	\ifthenelse{#1=1}{\tbentrylongsp{#1}{#2}{#3}{#4}}{%
	 \tbentrynormalsp{#1}{#2}{#3}{#4}}}}
% Tagebucheintrag normal, ohne Monatsangabe
\newcommand{\tbentrynormalsp}[4]{%
  \store@entry@label{#1}{#2}{#3}%
  \@makeentryhead{\ulinesp{\wochentag{#1}{#2}{#3}\,#1\datumanmerkung{#4}}}\date@to@head{#2}{#3}}
% Tagebucheintrag lang, mit Monatsangabe
\newcommand{\tbentrylongsp}[4]{%
  \store@entry@label{#1}{#2}{#3}%
  \@makeentryhead{\ulinesp{\wochentag{#1}{#2}{#3}\,#1.\,\rom{#2}.\datumanmerkung{#4}}}\date@to@head{#2}{#3}}
% Tagebucheintrag lang, mit Monatsangabe UND Jahresangabe
\newcommand{\tbentryllongsp}[4]{%
  \store@entry@label{#1}{#2}{#3}%
  \@makeentryhead{\ulinesp{\wochentag{#1}{#2}{#3}\,#1.\,\rom{#2}.\,#3\datumanmerkung{#4}}}\date@to@head{#2}{#3}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Blocks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% vertikale linie
\newcommand*{\@dickelinie}[2]{\leavevmode\unitlength12pt\linethickness{1.2pt}\marginnote{\color{standout}\begin{picture}(0,0)
\put(0,#1){\line(0,1){#2}}
\end{picture}}}
\newcommand{\dickeliniea}{\@dickelinie{-0.3}{1}}
\newcommand{\dickelinieb}{\@dickelinie{-1.3}{2}}
\newcommand{\dickeliniec}{\@dickelinie{-2.3}{3}}
\newcommand{\dickelinied}{\@dickelinie{-3.3}{4}}
\newcommand{\dickeliniee}{\@dickelinie{-4.3}{5}}

% geschweifte Klammern
\RequirePackage{ragged2e}
\newcommand*{\errate@footnote}[1]{%
  \if@footnote@warning
  \PackageWarning{carnap}{Footnote in klammerabsatz,\MessageBreak better split into \string\footnotemark\space and \string\footnotetext}%
  \textcolor{red}{\footnotemark}%
  \else
  \PackageError{carnap}{Footnote in klammerabsatz}{Split the \string\footnote\space into \string\footnotemark\space and \string\footnotetext.}%
  \fi
}
\newcommand*{\jd@mangle}{\let\\\par\@noentryskiptrue}
\newlength{\klammerabsatzlinks}
\newlength{\klammerabsatzrechts}
\newcommand{\klammerabsatz}[3]{%
  \setlength{\klammerabsatzlinks}{#1\textwidth}%
  \setlength{\klammerabsatzrechts}{\textwidth}%
  \addtolength{\klammerabsatzrechts}{-#1\textwidth}%
  \addtolength{\klammerabsatzrechts}{-3.5mm}%
  % \hspace{-6.2pt}%
  \par\beforeentryskip%We may be in the place of a whole entry even inside another \klammerabsatz.
  $\left.
    \kern-1.2\p@\hbox{\parbox{\klammerabsatzlinks}{\jd@mangle\let\footnote\errate@footnote#2}}
    \kern2\p@
  \right\}\hbox{\parbox[c]{\klammerabsatzrechts}{\small\fussy\let\footnote\errate@footnote\RaggedRight#3}}
  $%
  \@noentryskipfalse% in case this is an inner block
}
\newcommand{\klammerleseliste}[3]{%
  \setlength{\klammerabsatzlinks}{#1\textwidth}%
  \setlength{\klammerabsatzrechts}{\textwidth}%
  \addtolength{\klammerabsatzrechts}{-#1\textwidth}%
  \addtolength{\klammerabsatzrechts}{-3.5mm}%
  % \hspace{-6.2pt}%
  \par
  $\left.
    \kern-1.2\p@\hbox{\parbox{\klammerabsatzlinks}{\jd@mangle\let\footnote\errate@footnote#2}}
    \kern2\p@
  \right\}\hbox{\parbox[c]{\klammerabsatzrechts}{\small\fussy\let\footnote\errate@footnote\RaggedRight#3}}
  $%
  \@noentryskipfalse% in case this is an inner block
}

\newcommand*{\setort}[1]{\renewcommand{\diary@head@suffix}{\textit{,  #1}}\global\let\diary@head@suffix\diary@head@suffix}
\newcommand*{\ort}[1]{\marginnote{\margsize\textit{#1}}\setort{#1}}

% END OF carnap-diaries
%\input{carnap-letters}%%%%% SHIPOUT INLINE
\ProvidesFile{carnap-letters}[2018/04/10 Carnap letter markup]
\newcounter{letter}
\newif\if@lettershipped

\RequirePackage{marginnote}
\newcommand*{\fnAmargin}{\ClassError{Carnap class}{\noexpand\fnAmargin\space only defined for letters}{Do you really need this?}}
\newcommand*{\@fnAmargin}[1]{\marginnote{\let\@makefnmark\@makefnmarklow\footnotemarkA}\footnotetextA{#1}}
\newcommand*{\@fnAmarginmark}{\marginnote{\let\@makefnmark\@makefnmarklow\footnotemarkA}}
\newcommand*{\@fnAmargintext}[1]{\footnotetextA{#1}}

\newenvironment{letterset}[1]{%
  \cleardoublepage
  \thispagestyle{empty}%
  \phantomsection
  \null\vskip30mm
  \begingroup\fontsize{13bp}{9.5mm}\selectfont\sffamily\centering
    #1\par
  \endgroup
  \vfil\null
  \pagestyle{letter}%
  \parindent1em
  \tolerance500%%%%%?
  \addcontentsline{toc}{letterset}{#1}%
  \chaptermark{Briefe}%
  \@lettershippedfalse
  \let\fnAmargin\@fnAmargin
  \let\fnAmarginmark\@fnAmarginmark
  \let\fnAmargintext\@fnAmargintext
  \setcounter{footnoteA}{0}%
  \setcounter{footnoteE}{0}%
  \let\carnap\carnap@letters
}{}

\newcommand*{\ltx@include}{}
\let\ltx@include\include

\newcommand*{\includeletterset}[1]{%
  \begingroup
  \@tempswatrue
  \if@partsw
    \@tempswafalse
    \edef\reserved@b{#1}%
    \@for\reserved@a:=\@partlist\do
      {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
  \fi
  \if@tempswa
  \filename@parse{#1}%
  \begin{letterset}{Briefe \filename@base}%
    \ltx@include{#1}%
  \end{letterset}%
  \else
    \ltx@include{#1}%
  \fi
  \endgroup
}

\newenvironment*{letters}{%
  \let\include\includeletterset
}{}

\newcommand*{\brief}{\@ifstar{\@sbrief}{\@brief}}
\newcommand*{\@brief}{}
\newcommand*{\@sbrief}{}

\newcommand*{\@brief@running}[2]{%
  \if@lettershipped
  \par\addvspace{3\baselineskip}%{2em}%
  \@make@letterheading{#1}{#2}%
  \@@brief
  \else
  \@@brief@clearing{#1}{#2}%
  \fi
}
\newcommand*{\@brief@clearing}[2]{%
  \if@runningletters
  \@brief@running{#1}{#2}%
  \else
  \@@brief@clearing{#1}{#2}%
  \fi
}
\newcommand*{\@@brief@clearing}[2]{%
  \clearpage
  \thispagestyle{letterplain}%
  \@make@letterheading{#1}{#2}%
  \@@brief
}

\newcommand*{\@make@letterheading}[2]{%
  \bgroup
  \refstepcounter{letter}%
  \parindent\z@
  \sffamily\selectfont\samepage\@hangfrom{\textbf{\theletter}\quad}#1\vphantom{y}\raggedright
  \markright{#2}%
  \par
  \egroup\nobreak
  \vskip2bp\nobreak
  \hrule height.5bp
  \vskip2.4mm%7.2
  \nobreak
}

\newcommand*{\@@brief}{%
  \@lettershippedtrue
  \nobreak\vskip\baselineskip\nobreak
  \@afterheading
}

\let\@brief\@brief@clearing
\let\@sbrief\@brief@running

% Letter head
\DeclareRobustCommand*{\empfaenger}[1]{\par\nobreak\noindent\parbox{\textwidth}{%
    \ignorespaces#1%
  }\par
}
\newcommand*{\adresse}[2]{%
  \par\vskip0pt%3mm
  \noindent\parbox{\textwidth}{\raggedleft#1%
    \par\vskip2mm#2%
  }\par\nobreak
}
% No letter heads!
\let\empfaenger\@gobbletwo
\let\adresse\@gobbletwo

\newcommand*{\betreff}[1]{\par
  \addvspace{.5em}%
  \noindent{#1}\par\nobreak}
\newcommand*{\anrede}[1]{\par
  \addvspace{0pt}%{.5em}%
  \noindent#1\@afterindentfalse\@afterheading\par\nobreak\vskip2mm\nobreak}
\newcommand{\haupttext}[1]{\par\ignorespaces#1\par}
\newcommand*{\grussformel}[1]{\par\nobreak\addvspace{2mm}\vtop{\raggedleft#1}}
\newcommand*{\ebericht}[1]{\par\vskip2em\bgroup\parindent\z@\small\sffamily#1\par\egroup}

% Putting the argument into math mode makes for quadruple output of footnotes!
\newcommand*{\carnap@letters}[1]{\ensuremath{\langle}\textrm{#1}\ensuremath{\rangle}}
\newcommand*{\paraphrase}[1]{\par\addvspace{1em}%
  \bgroup
  \sffamily||#1||%
  \par\egroup
  \vskip1em}

\def\@makefntext@para@rule#1{%
  \leftmargin\z@
  \rightmargin\z@
  \rule{.7\hsize}{.25bp}#1}%

\newcommand*{\fnAseparator}{%
  \begingroup
  \let\@makefntext@para\@makefntext@para@rule
  \footnotetextA{}%
  \endgroup
}

% END OF carnap-letters
\def\TeX{T\kern-.08em\lower.8ex\hbox{E}\kern-.08emX\@}
\DeclareRobustCommand{\LaTeX}{L\kern-.25em%36
        {\sbox\z@ T%
         \vbox to\ht\z@{\hbox{\check@mathfonts
                              \fontsize\sf@size\z@
                              \math@fontsfalse\selectfont
                              A}%
                        \vss}%
        }%
        \kern-.08em%
        \TeX}
%\input{encoding.tex}%%%%% SHIPOUT INLINE
\ProvidesFile{encoding}[2017/06/22 input character encoding]
\RequirePackage[utf8x]{inputenc}
\DeclareUnicodeCharacter{8960}{% \funnychar{2300 (diameter)}
  \ensuremath{\varnothing}}% provisional
\DeclareUnicodeCharacter{9675}{% \funnychar{25CB (circle)}
   \ensuremath{\circ}}% provisional, check size
\DeclareUnicodeCharacter{9472}{\funnychar{2500}--}% provisional
\DeclareUnicodeCharacter{8208}{\funnychar{8208}-}

\def\@makefnmarklow{\hbox{\@textsubscript{\normalfont\@thefnmark}}}
\newcommand*{\fnC}{\footnoteC}
\newcommand*{\fnA}[1]{\begingroup\let\@makefnmark\@makefnmarklow\footnoteA{#1}\endgroup}
\newcommand*{\fnM}[1]{\begingroup\let\@makefnmark\@makefnmarklow\footnoteM{#1}\endgroup}
\newcommand*{\fnE}[1]{\begingroup\let\@makefnmark\@makefnmarklow\footnoteE{#1}\endgroup}
%
\newcommand*{\fnCmark}{%
  \ensuremath{\text{\footnotemarkC}}%
}
\newcommand*{\fnAmark}{%
  \ensuremath{\text{\let\@makefnmark\@makefnmarklow\footnotemarkA}}%
}
\newcommand*{\fnMmark}{%
  \ensuremath{\text{\let\@makefnmark\@makefnmarklow\footnotemarkM}}%
}
\newcommand*{\fnEmark}{%
  \ensuremath{\text{\let\@makefnmark\@makefnmarklow\footnotemarkE}}%
}
%
\newcommand*{\fnCtext}[1]{%
  \stepcounter{footnoteC}%
  \footnotetextC{#1}%
}
\newcommand*{\fnAtext}[1]{%
  \stepcounter{footnoteA}%
  \footnotetextA{#1}%
}
\newcommand*{\fnMtext}[1]{%
  \stepcounter{footnoteM}%
  \footnotetextM{#1}%
}
\newcommand*{\fnEtext}[1]{%
  \stepcounter{footnoteE}%
  \footnotetextE{#1}%
}

\InputIfFileExists{dtx-localhook}{\typeout{Loading local hook.}}{\typeout{No local hook.}}

\def\pp@g@FN@totalid{0}%Why the frell is this necessary?
\gdef\pp@g@footnoteC{0}%NOTE Graz HACK
\gdef\pp@g@footnoteA{0}%NOTE Graz HACK
\gdef\pp@g@footnoteE{0}%NOTE Graz HACK
\gdef\pp@g@footnoteM{0}%NOTE Graz HACK

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{array,tabularx}% nur für Markup-Tabelle, nicht für das Buch
\RequirePackage{marvosym} % für das Pfund-Symbol (altes deutsches Gewichtsmaß, nicht Währung)
\RequirePackage{tikz} % für eingekreiste Ziffern
\RequirePackage{accents}

\RequirePackage{graphicx} % Für Stammbäume
%\RequirePackage{epstopdf}

\RequirePackage{letterspace} % gesperrt
\newcommand{\gesperrt}[1]{\textls{#1}}
\RequirePackage{xstring}

% % % % % % % % BEFEHLE DIE IN DEN STYLE ÜBERNOMMEN WERDEN SOLLTEN ANFANG
\renewcommand{\foto}[1]{}

\newcounter{abbildungen}
\newcommand{\abbildung}[1]{\noindent Abbildung~\refstepcounter{abbildungen}\theabbildungen: #1}

\newcounter{faksimile}
\newcommand{\faksimile}[1]{\noindent Faksimile~\refstepcounter{faksimile}\thefaksimile: #1}


\newcounter{baustellen}
\newcommand{\baustelle}[1]{\refstepcounter{baustellen}\textcolor{red}{\footnotesize\textbf{#1~BST\thebaustellen}}}
\newcommand{\baustellex}[1]{}
% Die Zahl der genau 443 bis 25.11.2019 identifizierten Stellen wird eingefrohren. Für weitere Stellen ist der folgende Befehl gedacht, dessen Nummerierung mit 444 beginnt.
\newcounter{baustellena}
\newcommand{\baustellea}[1]{\refstepcounter{baustellena}\textcolor{blue}{\footnotesize\textbf{#1~BST\thebaustellena}}}
\newcommand{\baustelleax}[1]{}


\newcounter{kurzschrift}
\newcommand{\ksr}{\refstepcounter{kurzschrift}\textcolor{red}{\footnotesize\textbf{KSR~\thekurzschrift}}}
\newcommand{\ksrx}{\refstepcounter{kurzschrift}}

\renewcommand{\IO}[1]{}

\newcommand*{\original}[1]{\ensuremath{\langle}\textrm{#1}\ensuremath{\rangle}}

\newcounter{leseliste}

\newcommand{\lesehalle}{\rotatebox[]{90}{\!F}}
\newcommand{\anderebib}{\begingroup\ooalign{L\cr $\,\cdot$}\endgroup}    %{$\mathsf{L}\!\!\cdot$}
\newcommand{\privat}{\begingroup\ooalign{P\cr L}\endgroup}
\newcommand{\gekauft}{\scalebox{.95}{\ensuremath{\mathcal{K}}}}
\newcommand{\geschenkt}{\scalebox{.95}{\ensuremath{\mathcal{G}}}}
\newcommand{\vorgelesen}{\scalebox{.95}{\ensuremath{\mathcal{V}}}}
\newcommand{\umgedrehtesl}{\ensuremath{\Gamma}}
\newcommand{\senkrechtkreis}{\rotatebox[]{90}{\,$\multimap$}}

\newcommand{\leselistenr}[1]{\colorbox{entryhead}{\kern-.3mm\relax#1\kern-.3mm}}
% Für die Bearbeitung:
%\newcommand{\leseliste}[4]{\refstepcounter{leseliste}\label{#1}\par\noindent{\leselistenr{#1} #2} \newline \textsf{[#3, #4]}}
%\newcommand{\leselistea}[4]{\refstepcounter{leseliste}\label{#1}\par\noindent{\leselistenr{#1}A: #2} \newline \textsf{[#3, #4]}}
%Für den Druck:
\newcommand{\leseliste}[4]{\refstepcounter{leseliste}\label{#1}\par\@hangfrom{\leselistenr{\theleseliste}\hskip.5em}#2\IW{#3!#4}\rightskip\fill\par}
\newcommand{\leselistex}[4]{\refstepcounter{leseliste}\label{#1}\par\@hangfrom{\leselistenr{\theleseliste}\hskip.5em}#2\IW{#4}\rightskip\fill\par}
% DAS DANN DA REIN:
\newcommand{\leselistea}[4]{\refstepcounter{leseliste}\label{#1}\par\@hangfrom{\leselistenr{\theleseliste}\hskip.5em}#2\rightskip\fill\par}

%Befehle für die Anpassung der Formatierung in den Leselisten:
\newcommand{\editorstrl}[1]{}
\newcommand{\soutl}[1]{}
\newcommand{\textwhl}[1]{#1}
\newcommand{\editorl}[1]{#1}
\newcommand{\textspl}[1]{#1}

\newcommand{\nichtabgedruckt}[1]{}
\newcommand{\entwurf}[1]{}

%\newcommand{\klammerleseliste}[3]{\klammerabsatz{#1}{#2}{#3}}

\newcommand{\kurrent}[1]{#1}
\newcommand{\kurzschrift}[1]{\emph{#1}}
\newcommand{\INL}[1]{\IN{#1}}

\newcommand{\fnEz}{}
\newcommand{\fnEv}{}

\newcommand{\fnED}[1]{\hspace{-1,5mm}\fnE{#1}}
\newcommand{\fnAD}[1]{\hspace{-1,5mm}\fnA{#1}}
\newcommand{\fnADmark}{\hspace{-1,5mm}\fnAmark}

\newcommand{\kino}[2]{\indexmark{yellow}{f}\sindex[filme]{#2!#1}} % Erstes Argument: Filmtitel, Zweites Argument: Jahr
\newcommand{\textkritik}[1]{\editor{#1}}

%Tricks zum Überprüfen der Register --- FÜR GEWÖHNLICH AUSKOMMENTIEREN!!!!!!!!!!!!!!!
%\renewcommand{\IN}[1]{\par\textbf{IN: }\emph{#1}\par} %DO HOTS NO WOS    %Dafür müssen die Namen-Querverweise auskommentiert werden!
%\renewcommand{\IS}[1]{\par\textcolor{cyan}{\textbf{IS:} #1}\par}
%\renewcommand{\IO}[1]{\par\textbf{IO(#1)}\par}
%\renewcommand{\II}[1]{\par\textcolor{orange}{\textbf{\textbackslash II:} #1}\par}
%\renewcommand{\IC}[1]{\par\textcolor{red}{\textbf{\textbackslash IC:} #1}\par}
%\renewcommand{\IW}[1]{\par\textcolor{magenta}{\textbf{\textbackslash IW:} #1}\par}

\newcommand{\textnachtrag}[1]{\textcolor{red}{#1}}

\newcommand{\textspns}[1]{\textsp{\textbackslash{#1}\textbackslash}}
\newcommand{\tabellenachlinks}{\hspace*{-6pt}}

\newcommand{\lithrsg}[1]{}
\newcommand{\lithrsga}[1]{}
\newcommand{\lithrsgb}[1]{}
\newcommand{\lithrsgab}[1]{}

\newcommand{\lithrsgcarnap}[1]{}
\newcommand{\lithrsgcarnapa}[1]{}
\newcommand{\lithrsgcarnapb}[1]{}
\newcommand{\lithrsgcarnapab}[1]{}


\newenvironment{vorlesungen}{%
  \parskip0pt \parindent0pt \raggedright
  \def\lititem{\hangindent=15pt \hangafter1}%
  }{%
  \par\ignorespaces}



% % % % % % % % % % % % % BEFEHLE DIE IN DEN STYLE ÜBERNOMMEN WERDEN SOLLTEN ENDE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput


