Part-übergreifende Querverweise

Fragen und Probleme, die nicht den obigen Kategorien zugeordnet werden können


aasaa00
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 99
Registriert: Do 1. Mär 2018, 11:43

Re: Part-übergreifende Querverweise

Beitrag von aasaa00 »

Ich habe den Fehler jetzt reproduzieren können, indem ich den gesamten Code (mitsamt den Fehlermeldungen) nun wiedergebe. Es handelt sich also nicht um ein MWE, da ich sonst die Fehler nicht darstellen kann.

\RequirePackage[patch]{kvoptions} 
\documentclass[open=any,12pt,headings=standardclasses]{scrbook} %headsepline
\let\Tiny=\tiny

\usepackage{scrbase}
\providecommand*{\Ifstr}{\ifstr}
\usepackage[automark]{scrlayer-scrpage}


\usepackage{cleveref}

% um Kapitel mit Part zu referenzieren
%\RedeclareSectionCommand[counterwithin=part]{chapter}
\renewcommand{\thechapter}{\arabic{chapter}}
%\renewcommand{\partmark}[1]{\markboth{#1}{}}
%\renewcommand{\part}[1]{\both{#1}{}}
\makeatletter
\def\p@chapter{\IfPartNot{\thepart}}% Präfix für chapter-Labels
\def\p@section{\IfPartNot{\thepart}}% Präfix für section-Labels
\def\p@subsection{\IfPartNot{\thepart}}% Präfix für subsection-Labels
\makeatother
\DeclareRobustCommand{\IfPartNot}[1]{%
  \Ifstr{\thepart}{#1}{}{#1.}%
}

\usepackage{xpatch}
\xapptocmd\addparttocentry{%
  \addxcontentsline{lof}{part}[{#1}]{#2}%
}{}{\PatchFailed}



\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry}
\usepackage{graphicx}
\usepackage{pdfpages}

\usepackage{changepage}

\usepackage{setspace}
\onehalfspacing
%\usepackage[style=authoryear, backend=biber]{biblatex} 
% [style=iest] authoryear=Angenedt 2002
% Festlegung Art der Zitierung - Havardmethode: Abkuerzung Autor + Jahr
%\bibliographystyle{alphadin}

\makeatletter %Abstände Text zu section
\renewcommand\section{\@startsection 
   {section}{1}{0mm}%         % name, ebene, einzug 
   {4\baselineskip}%            % vor-abstand 
   {2\baselineskip}%            % nach-abstand 
   {\bfseries\Large}%      % layout 
   } 
\makeatother 
\makeatletter %Abstände Text zu subsection
\renewcommand\subsection{\@startsection 
   {subsection}{2}{0mm}%      % name, ebene, einzug 
   {4\baselineskip}%            % vor-abstand 
   {2\baselineskip}%            % nach-abstand 
   {\bfseries\large}%           % layout 
   } 
\makeatother 
\makeatletter %Abstände Text zu subsection
\renewcommand\subsubsection{\@startsection 
   {subsubsection}{2}{0mm}%      % name, ebene, einzug 
   {3\baselineskip}%            % vor-abstand 
   {1\baselineskip}%            % nach-abstand 
   {\bfseries\large}%           % layout 
   } 
\makeatother

\makeatletter% siehe De-TeX-FAQ 
\g@addto@macro\quotation{\setstretch{1}\noindent\ignorespaces} 
\makeatother% siehe \makeatletter 


\renewenvironment{quote}
{\small\list{}{\rightmargin=0.9cm \leftmargin=0.9cm}%
\item\relax}
{\endlist}
\usepackage{rotating}
\usepackage{pdflscape}

\usepackage{xcolor}
\usepackage{smartdiagram}
\usepackage{wrapfig}
\usepackage[margin=10pt,font=small,labelfont=bf,belowskip=4pt]{caption}
%\captionsetup[figure]{labelfont=bf,textfont=it}

\usepackage{verse} %Dell neu
\renewcommand{\poemtitlefont}{\normalfont\bfseries\large\left} % Define the poem title style
\setlength{\stanzaskip}{0.75\baselineskip}



\usepackage{pgfplots}

\usepackage{tikz}

\newcommand{\udensdash}[1]{%
    \tikz[baseline=(todotted.base)]{
        \node[inner sep=1pt,outer sep=0pt] (todotted) {#1};
        \draw[densely dashed] (todotted.south west) -- (todotted.south east);
    }%
}%


\usepackage{tikz-qtree}

%\usepackage{mathrsfs}
\usetikzlibrary{mindmap}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows.meta,arrows,chains,positioning} 
\tikzset{
    %Define standard arrow tip
    >=stealth',
    %Define style for boxes
    punkt/.style={
 %          rectangle,
 %          rounded corners,
  %         draw=black, very thick,
   %        text width=6.5em,
    %       minimum height=2em,
      },
    % Define arrow style
    pil/.style={
           ->,
					align=left,
      execute at begin node=,
           thin,
           shorten <=2pt,
           shorten >=-4pt,}
}



\usetikzlibrary{matrix, positioning, shapes}

\pgfplotsset{compat=newest,width=3cm,height=5cm,plotstyle/.style={line width=1.2pt,smooth,samples=100,domain=-0.05:1.01}} 



\usepackage{etoolbox}
\BeforeBeginEnvironment{wrapfigure}{\setlength{\intextsep}{2pt}} %für Textabstand zwischen Text und wrapfigure

\makeatletter
\patchcmd{\backmatter}
{\@mainmatterfalse}
{\@mainmatterfalse\pagenumbering{roman}}
{}
{}
\makeatother

%\restylefloat{figure}
%\usepackage{scrextend}      % allows some KOMA-Script features

\usepackage{yfonts}
%\usepackage[utf8]{inputenc} bei Verwendung von xelatex unnötig
%\usepackage[T1]{fontenc} bei Verwendung von xelatex unnötig
\usepackage{tgtermes} %Times-Schriftart-Kopie
\usepackage{fontspec}



\usepackage{microtype}% verbesserter Randausgleich
%\usepackage{lmodern}

\SetProtrusion
   { encoding = {TU},
     family   = Times New Roman }
   {}


\usepackage{tabularx}


% Abstand zwischen chapter subsection,...
\makeatletter
    \renewcommand\section{\@startsection
       {section}{1}{0mm}%         % name, ebene, einzug
       {1.6\baselineskip}%            % vor-abstand
       {1\baselineskip}%            % nach-abstand
     {\bfseries\rmfamily\Large}%      % layout
       }
    \makeatother
    \makeatletter
    \renewcommand\subsection{\@startsection
       {subsection}{2}{0mm}%      % name, ebene, einzug
       {2.6\baselineskip}%            % vor-abstand
       {1.5\baselineskip}%            % nach-abstand
      {\bfseries\rmfamily\large}%           % layout
       }
    \makeatother
    \makeatletter
    \renewcommand\subsubsection{\@startsection
       {subsubsection}{3}{0mm}%      % name, ebene, einzug
       {1.5\baselineskip}%            % vor-abstand
       {1.1\baselineskip}%            % nach-abstand
     {\bfseries\rmfamily\large}%           % layout
       }
    \makeatother



%von schlosser video übernommen
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5cm
\hfuzz 0.3pt\widowpenalty=10000
\vfuzz
\hfuzz
% \raggedbottom Wenn das nicht aktiviert ist, bleibt Fußnote am Seitenende; Wenn an, wird Fußnote näher am Text

\renewcommand\footnoterule{\kern-.75\skip\footins 
\hrule width 1.9cm height .4pt\kern -.4pt\kern.75\skip\footins}

\deffootnote[]{1.5em}{1em}{\textsuperscript{\thefootnotemark}\enskip} %für mehr platz bei Fußnote zw Ziffer und Text 
 

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist %Damit Einzug bei Zwischenanmerkungen in Listen verschwindet 

\usepackage{paralist}
\usepackage{alphalph}
\usepackage{enumitem}
%\setdefaultenum{}{}{1.}{} %ändert item in enumitem an dritter Stelle
\makeatletter
\newalphalph{\alphmult}[mult]{\@alph}{26} 
\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname} 
\def\@enumalphalphcnt#1{\alphmult{#1}} 
\makeatother 
\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{mm} 
\setenumerate{label=\arabic} 
\setenumerate[2]{label=\enumalphalphcnt)} 





%\renewcommand{\thesection}{\alphalph{\value{section}}}


\setlist[enumerate]{nosep}
\newlist{citemize}{itemize}{14} 
\setlist[citemize]{label=-,nosep}

\usepackage{imakeidx}
\makeindex[name=Ort,title={Geographische Namen}]
\makeindex[name=sach,title={Sachregister}]
\makeindex[name=Personen,title={Personenregister}]
\makeindex[name=modern,title={Moderne Autoren}]
\makeindex
%HSS
%Sachen
%\indexsetup{level=\section}
%\indexsetup{level=\section,toclevel=section,noclearpage}
%\indexsetup{level=\chapter*}

%\makeatletter
%\renewcommand*{\idx@@heading}{\section}
%\makeatother



\renewcommand{\seename}{siehe}

%\usepackage[initsep = 15pt]{idxlayout}

%\usepackage[ngerman]{babel} %damit kein "`3. Kapitel"' steht in Titel - unvereinbar mit Polyglossia
\AtBeginDocument{\renewcommand{\chaptername}{}}% muss nach babel stehen!


%\usepackage[autostyle]{csquotes}

%\usepackage[backend=biber,style=authoryear]{biblatex}
%\addbibresource{bibliography.bib}

%\usepackage{hyperref} % für ref index
\usepackage{xfrac} %für Bruchzahlen
\usepackage{supertabular}
\usepackage{tabu,longtable} %lange Tabellen
\usepackage[longtable]{multirow} 
\usepackage{footnotehyper}
\makesavenoteenv{longtable}
\usepackage{float} %float mit [H]: Gleitumgebung mit dem Bild oder der Tabelle an die richtige Stelle, nämlich (H)ere platziert.
\usepackage{placeins} %definiert für float eine Barriere
\usepackage{booktabs} %für Tabelle
\usepackage{array} % für Tabellenkolumne

%\usepackage[longtable]{multirow}                  % Tabelle vertikale Zellen verbinden
%\usepackage{colortbl}                  % Farbe der Zellen einer Tabelle, z. B. \begin{tabular}

\usepackage{bigdelim}
\newcolumntype{_}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
  #1\ignorespaces
}

%\usepackage[nottoc]{tocbibind} % make LoF and LoT show up in ToC
%überflussig?
\usepackage[titles]{tocloft}
\setcounter{tocdepth}{6} 
\setcounter{secnumdepth}{6}

%% Distances between dots
\makeatletter
\renewcommand*{\@dotsep}{0.5}
\makeatother

%% Distances between number and entry
\makeatletter
\renewcommand{\l@part}{\vspace{.05\textwidth} \@nodottedtocline{1}{10pt}{10pt}}
\renewcommand{\l@chapter}{\vspace{.0375\textwidth} \@dottedtocline{2}{15pt}{15pt}}
\renewcommand{\l@section}{\vspace{.025\textwidth} \@dottedtocline{3}{20pt}{20pt}}
\renewcommand{\l@subsection}{\@dottedtocline{4}{40pt}{30pt}}
\renewcommand{\l@subsubsection}{\@dottedtocline{5}{70pt}{40pt}}
\renewcommand{\l@paragraph}{\@dottedtocline{6}{110pt}{40pt}}

%\usepackage{tocstyle}
%\newtocstyle[leaders]{chapterwithdot}{ %Schriftart toc!
 % \settocfeature{pagenumberbox}{\makebox[1em][r]}% Platz f�r Seitenzahl
  %\settocfeature[-1]{leaders}{\hfill}% keine Punkte bei part
  %\settocfeature[-1]{pagenumberbox}{\phantom}% keine Seitenzahl bei part
%\usetocstyle{chapterwithdot} %anscheinend ünnotig


\usepackage{multicol} % Required for splitting text into multiple columns
\usepackage{paracol}





\usepackage{arydshln} %querlinie bei Tabellen

\makeatletter
\def\adl@drawiv#1#2#3{%
        \hskip.5\tabcolsep
        \xleaders#3{#2.5\@tempdimb #1{1}#2.5\@tempdimb}%
                #2\z@ plus1fil minus1fil\relax
        \hskip.5\tabcolsep}
\newcommand{\cdashlinelr}[1]{%
  \noalign{\vskip\aboverulesep
           \global\let\@dashdrawstore\adl@draw
           \global\let\adl@draw\adl@drawiv}
  \cdashline{#1}
  \noalign{\global\let\adl@draw\@dashdrawstore
           \vskip\belowrulesep}}
\makeatother


\usepackage{polyglossia} %Kommentar 


\setmainlanguage[variant=german, spelling=new, latesthyphen=true, babelshorthands=true]{german}




\titleformat{\chapter}{\bfseries\Huge}{\thechapter\quad}{0em}{} % doppelt, aber hier - für keinen zeilenumbr. zw "1" u "Kapitelüberschr"
\AtBeginDocument{\renewcommand{\chaptername}{}}% muss nach babel stehen! Kein "`Kapitel"' in Kapitelüberschrift! 


     
%-zusaetzliche Kommandos*
%\include{command}
\usepackage[autostyle=true,german=quotes]{csquotes}
%\usepackage[german=guillement]{csquotes} 
\usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} 
%uniquename=false lässt S.P. Brock in Fußnote zu Brock!
\addbibresource{biblio.bib}

%\DefineBibliographyStrings{ngerman}{ibidem = {ibid\adddot}} funktioniert nicht => ibid. bleibt
% Statt Hg. soll es Hrsg. heißen:
%\DefineBibliographyStrings{ngerman}{editor = {Hrsg.},editors = {Hgg.},} %funktioniert nicht

%\DeclareLanguageMapping{ngerman}{ngerman-apa}%funktioniert nicht

\setlength{\parindent}{2pt} % um Einzüge zu verhindern, soll nicht auf 0!
%%%%%%%%%%%%%%%%%%%%\setlength{\bibitemsep}{18pt}  % Abstand zwischen den Literaturangaben
%%%%%%%%%%%%%%%%%%%%\setlength{\bibhang}{0.2cm}    % Einzug nach jeweils erster Zeile




%%%%%%%%%%%%%%%%%%%%%%%%%%%% damit erste Fußnote nicht kompl Seitenzahl hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewbibmacro*{postnote}{%
  \iftoggle{blx@unit}
    {}
    {\newunit}%
  \printfield{postnote}}

\renewbibmacro*{pages}{%
  \iffieldundef{pages}
    {\ifbool{bbx@inset}
       {}
       {\printfield{postnote}%
        \global\booltrue{suppresspostnote}}}
    {\printfield{pages}%
     \ifboolexpr{
       test {\iffieldundef{postnote}}
       or
       bool {bbx@inset}
     }
       {}
       {\setunit{\addspace}%
         \printtext[parens]{%
         % \iffieldpages{postnote}
            \bibstring{thiscite}%
             \setunit{\addspace}
          %  {}%
          \printfield{postnote}}}}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% von Purton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\DeclareFieldFormat{pages}{\mknormrange{#1}} 
\DeclareFieldFormat{pagepages}{\mknormrange[\mkpageprefix]{#1}} 
\DeclareFieldFormat{pagesin}{\mknormrange[\mkpageprefix]{#1} 
\usebibmacro{in}} 
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\usepackage{xpatch}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography option modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ExecuteBibliographyOptions[inlexicon]{% 
  skipbib=false, 
} 


%%%%%%%%%%%%%%%%%%%%%%%%
% Driver modifications %
%%%%%%%%%%%%%%%%%%%%%%%%

% New cite: book


\DeclareFieldFormat{pages}{\mknormrange{#1}} 
\DeclareFieldFormat{pagepages}{\mknormrange[\mkpageprefix]{#1}} 
\DeclareFieldFormat{pagesin}{\mknormrange[\mkpageprefix]{#1} 
\usebibmacro{in}} 
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\usepackage{xpatch}

\xpatchbibdriver{abbreviations}
  {\usebibmacro{bibentrycite}}
  {\usebibmacro{bibentrycite}%
   \renewcommand*{\finentrypunct}{\addperiod}}
  {}
  {}

\xpatchbibmacro{issue+date}
  {\addcolon\space}
  {\addcomma\space}
  {}
  {}

\xpatchbibmacro{editor+others}
  {\setunit{\addcomma\space}%
   \usebibmacro{editor+othersstrg}}
  {\setunit{\addspace}
   \printtext[parens]{\usebibmacro{editor+othersstrg}}}
  {}
  {}

\xpatchbibmacro{publisher+location+date}
  {\setunit{\addcomma\space}%
   \usebibmacro{date}}
  {\setunit{\addspace}%
   \usebibmacro{date}}
  {}
  {}

\xpatchbibmacro{institution+location+date}
  {\setunit{\addcomma\space}%
   \usebibmacro{date}}
  {\setunit{\addspace}%
   \usebibmacro{date}}
  {}
  {}
	
%%%%%%%%%%%%%%%%% setzen bei Wdh in Litverz.=> --: (Hrsg.): ..
%\renewcommand*{\bibnamedash}{%
%  \leavevmode\raise 0.6ex\hbox to 3em{\hrulefill}\addcolon\space}



\DeclareDelimFormat[incollection]{multinamedelim}{\slash\space}
\DeclareDelimFormat[incollection]{finalnamedelim}{\slash\space}
\DeclareDelimFormat*{nametitledelim}{\addcolon\space}
%%%%%%%%%% Schal


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Damit in Bibliographie überall Doppelpunkt nach Namen steht %%%%%%%%%%%%%%%%%%

\usepackage{xpatch}


% set up nametitledelim in different contexts
\DeclareDelimFormat[none,bib,biblist]{nametitledelim}{%
  \ifciteseen
    {\addcomma\space}
    {\addcolon\space}}

% also put colon after dash
\renewcommand{\namedashpunct}{\addcolon\space}
\xpatchbibmacro{author}
  {\renewcommand{\namedashpunct}{\adddot\space}}
  {\renewcommand*{\namedashpunct}{\addcolon\space}}
  {\message{Patching author': Success^^J}}
  {\message{Patchingauthor': Failure^J}}

% patch citation drivers

\xpatchbibdriver{cite:article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:article': Success^^J}}
  {\message{Patchingcite:article': Failure^J}}
\xpatchbibdriver{cite:book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:book': Success^^J}}
  {\message{Patchingcite:book': Failure^J}}
\xpatchbibdriver{cite:suppbook}
  {\usebibmacro{author/editor+others/translator+others}%
   \newunit}
  {\usebibmacro{author/editor+others/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:suppbook': Success^^J}}
  {\message{Patchingcite:suppbook': Failure^J}}
\xpatchbibdriver{cite:commentary}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:commentary': Success^^J}}
  {\message{Patchingcite:commentary': Failure^J}}
\xpatchbibdriver{cite:incommentary}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:commentary': Success^^J}}
  {\message{Patchingcite:commentary': Failure^J}}
\xpatchbibdriver{cite:incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:incollection': Success^^J}}
  {\message{Patchingcite:incollection': Failure^J}}

\xpatchbibdriver{cite:inreference}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:inreference': Success^^J}}
  {\message{Patchingcite:inreference': Failure^J}}
\xpatchbibdriver{cite:review}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:review': Success^^J}}
  {\message{Patchingcite:review': Failure^J}}
\xpatchbibdriver{cite:thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:thesis': Success^^J}}
  {\message{Patchingcite:thesis': Failure^J}}
\xpatchbibdriver{cite:misc}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:misc': Success^^J}}
  {\message{Patchingcite:misc': Failure^J}}
\xpatchbibdriver{cite:conferencepaper}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:conferencepaper': Success^^J}}
  {\message{Patchingcite:conferencepaper': Failure^J}}
\xpatchbibdriver{cite:periodical}
  {\usebibmacro{editor+others}%
   \newunit}
  {\usebibmacro{editor+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:periodical': Success^^J}}
  {\message{Patchingcite:periodical': Failure^J}}
\xpatchbibdriver{cite:patent}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:patent': Success^^J}}
  {\message{Patchingcite:patent': Failure^J}}

% patch bibliography drivers
\xpatchbibdriver{ancienttext}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching ancienttext': Success^^J}}
  {\message{Patchingancienttext': Failure^J}}
\xpatchbibdriver{article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching article': Success^^J}}
  {\message{Patchingarticle': Failure^J}}
\xpatchbibdriver{book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching book': Success^^J}}
  {\message{Patchingbook': Failure^J}}
\xpatchbibdriver{suppbook}
  {\usebibmacro{author/editor+others/translator+others}%
   \newunit}
  {\usebibmacro{author/editor+others/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching suppbook': Success^^J}}
  {\message{Patchingsuppbook': Failure^J}}
\xpatchbibdriver{incommentary:short}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incommentary:short': Success^^J}}
  {\message{Patchingincommentary:short': Failure^J}}
\xpatchbibdriver{incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incollection': Success^^J}}
  {\message{Patchingincollection': Failure^J}}
\xpatchbibdriver{inreference:short}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching inreference:short': Success^^J}}
  {\message{Patchinginreference:short': Failure^J}}
\xpatchbibdriver{review}
  {\usebibmacro{author/translator+others}%
   \newunit
   \iffieldundef{title}
     {\newunit}}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}%
   \iffieldundef{title}
     {}}
  {\message{Patching review': Success^^J}}
  {\message{Patchingreview': Failure^J}}
\xpatchbibdriver{thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching thesis': Success^^J}}
  {\message{Patchingthesis': Failure^J}}
\xpatchbibdriver{misc}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching misc': Success^^J}}
  {\message{Patchingmisc': Failure^J}}
\xpatchbibdriver{conferencepaper}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching conferencepaper': Success^^J}}
  {\message{Patchingconferencepaper': Failure^J}}
\xpatchbibdriver{periodical}
  {\usebibmacro{editor+others}%
   \newunit}
  {\usebibmacro{editor+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching periodical': Success^^J}}
  {\message{Patchingperiodical': Failure^J}}
\xpatchbibdriver{patent}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching patent': Success^^J}}
  {\message{Patchingpatent': Failure^J}}
\xpatchbibdriver{cite:incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incollection': Success^^J}}
  {\message{Patchingincollection': Failure^J}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\DefineBibliographyStrings{ngerman}{%
  editors = {Hgg\adddot}
}

\makeatletter
\let\blx@saved@delimcontext\blx@delimcontext
\newcommand{\savedelimcontext}{\let\blx@saved@delimcontext\blx@delimcontext}
\newcommand{\restoredelimcontext}{\let\blx@delimcontext\blx@saved@delimcontext}
\makeatother

\newbibmacro{bookeditor}{%
  \savedelimcontext
  \delimcontext{incollection}%
  \ifnameundef{bookeditor}
    {\ifnameundef{editor}
       {}
       {\printnames[family-given]{editor}%
        \setunit{\addspace}%
        \printtext[parens]{\usebibmacro{editor+othersstrg}}%
        \clearname{editor}}}
    {\printnames[family-given]{bookeditor}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{editor+othersstrg}}%
     \clearname{bookeditor}}%
  \setunit{\addcolon\space}%
  \restoredelimcontext}

\newbibmacro{maineditor}{%
  \savedelimcontext
  \delimcontext{incollection}%
  \ifnameundef{maineditor}
    {\ifnameundef{editor}
       {}
       {\printnames[family-given]{editor}%
        \setunit{\addspace}%
        \printtext[parens]{\usebibmacro{editor+othersstrg}}%
        \clearname{editor}}}
    {\printnames[family-given]{maineditor}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{editor+othersstrg}}%
     \clearname{maineditor}}%
  \setunit{\addcolon\space}%
  \restoredelimcontext}






% New cite:incollection, incollection,and inlexicon drivers

\makeatletter
\DeclareBibliographyDriver{cite:incollection}{%
  \ifentrytype{seminarpaper}
    {}
    {\toggletrue{inentrytype}}%
  \usebibmacro{citeindex}%
  \usebibmacro{begentry}%
  \iftoggle{blx@usefullcite}
    {}
    {\let\ifciteseen\@firstoftwo}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim[citecommand]{nametitledelim}}%
  \usebibmacro{title}%
  \ifciteseen
    {}
    {\usebibmacro{byauthor/byeditor+others/bytranslator+others}%
     \newunit
     \usebibmacro{in:}%
     \iffieldundef{booktitle}
       {}
       {\usebibmacro{bookeditor}%
        \setunit{\printdelim[citecommand]{nametitledelim}}%
        \usebibmacro{booktitle}%
        \newunit
        \usebibmacro{event+venue+date}%
        \newunit
        \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}%
        \newunit}%
     \usebibmacro{volume+partof}%
     \iffieldundef{maintitle}
       {}
       {\usebibmacro{maineditor}%
        \setunit{\printdelim[citecommand]{nametitledelim}}%
        \usebibmacro{maintitle}%
        \newunit
        \usebibmacro{event+venue+date}%
        \newunit
        \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}%
     \newunit
     \printfield{volumes}%
     \newunit
     \usebibmacro{shortseries+number}%
     \newunit
     \printfield{note}%
     \usebibmacro{parens+publisher+location+date}%
     \newunit
     \usebibmacro{ebook}%
     \newunit
     \printfield{addendum}%
     \newunit
     \usebibmacro{volume+part+pages}%
     \newunit
     \usebibmacro{isbn}%
     \newunit
     \usebibmacro{doi+eprint+url}}%
  \usebibmacro{finentry}}
\makeatother

\DeclareBibliographyDriver{incollection}{%
  \toggletrue{inentrytype}%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}%
  \usebibmacro{title}%
  \newunit
  \ifentrytype{classictext}
    {\usebibmacro{byauthor}%
     \newunit
     \usebibmacro{bytranslator+others}}
    {\usebibmacro{byauthor/byeditor+others/bytranslator+others}}%
  \setunit{\addcomma\space}%
  \usebibmacro{in:}%
  \iffieldundef{booktitle}
    {}
    {\usebibmacro{bookeditor}%
     \setunit{\printdelim{nametitledelim}}%
     \usebibmacro{booktitle}%
     \newunit
     \usebibmacro{event+venue+date}%
     \newunit
     \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}%
     \newunit}%
  \usebibmacro{volume+partof}%
  \iffieldundef{maintitle}
    {}
    {\usebibmacro{maineditor}%
     \setunit{\printdelim{nametitledelim}}%
     \usebibmacro{maintitle}%
     \newunit
     \usebibmacro{event+venue+date}%
     \newunit
     \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}%
  \newunit
  \printfield{edition}%
  \newunit
  \printfield{volumes}%
  \newunit
  \usebibmacro{shortseries+number}%
  \newunit
  \printfield{note}%
  \newunit
  \usebibmacro{publisher+location+date}%
  \newunit
  \usebibmacro{ebook}%
  \newunit
  \printfield{addendum}%
  \setunit{\addcomma\space}%
  \usebibmacro{volume+part+pages}%
  \newunit
  \usebibmacro{isbn}%
  \newunit
  \usebibmacro{doi+eprint+url}%
  \ifboolexpr{
    togl {relatedseen}
    or
    not togl {bbx:related}
  }
    {}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}%
  \usebibmacro{finentry}%
}

\DeclareBibliographyDriver{inlexicon}{% 
  \usebibmacro{begentry}% 
  \usebibmacro{author/translator+others}% 
  \newunit 
  \usebibmacro{title}% 
  \newunit 
  \printfield{note}% 
  \newunit 
  \usebibmacro{xrefshortmaintitle+xrefshortbooktitle}% 
  \newunit 
  \usebibmacro{volume+pages}% 
  \newunit 
  \printfield{addendum}% 
  \usebibmacro{finentry}% 
}



% Various driver patches
%   - use nametitledelim in cite:article and cite:book
%   - remove edition

\xpatchbibdriver{cite:article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
\xpatchbibdriver{cite:book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
	\xpatchbibdriver{cite:review}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim[citecommand]{nametitledelim}}}
  {}
  {}
\xpatchbibdriver{cite:thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
\xpatchbibdriver{cite:book}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{cite:commentary}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{cite:suppbook}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{book}
  {\newunit\printfield{edition}}
  {}{}{}
  \xpatchbibdriver{suppbook}
  {\newunit\printfield{edition}}
  {}{}{}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Punctuation and delimiter modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand{\subtitlepunct}{\addperiod\space} % Punkt zw Titel und Subtitel in Bibliogr.
\renewcommand{\sqspace}{} % kein Abstand bei Seitenzahl mit "f." 

\DeclareDelimFormat{multinamedelim}{\addslash\space} 
\DeclareDelimAlias{finalnamedelim}{multinamedelim} 
\DeclareDelimFormat[citecommand]{nametitledelim}{%
  \ifciteseen
    {\addcomma\space}
    {\addcolon\space}}

% Change reprint beginning punctuation to a space
\newcommand*{\begrelateddelimreprint}{\addspace}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Field format modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareFieldFormat{citetitle}{#1}
\DeclareFieldFormat[book]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat[thesis]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat[review]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{maintitle}{#1}
\DeclareFieldFormat{booktitle}{#1}
\DeclareFieldFormat{shorttitle}{#1} 
\DeclareFieldFormat{shortbooktitle}{#1} 
\DeclareFieldFormat{shortmaintitle}{#1} 
\DeclareFieldFormat{edition}{\textsuperscript{#1}}

% put reprint information in parentheses
\DeclareFieldFormat{related:reprint}{\mkbibparens{#1}}

\DeclareNameAlias{sortname}{family-given} % vorher last-first in Klammern
\DeclareNameAlias{author}{sortname}
\DeclareNameAlias{editor}{sortname}
\DeclareNameAlias{translator}{sortname}

\renewcommand{\mkbibnamefamily}{\textsc} 
\renewcommand{\mkbibnameprefix}{\textsc} 
\renewcommand{\mkbibnamegiven}{\textsc} 
\renewcommand{\mkbibnamesuffix}{\textsc} 


%%%%%%%%%%%%%%%%%%%%%%%%
% String modifications %
%%%%%%%%%%%%%%%%%%%%%%%%

\DefineBibliographyStrings{german}{%
  editors = {Hgg\adddot}, 
  reprint = {ND:},
}


%%%%%%%%%%%%%%%%%%%%%%%%%%
% bibmacro modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%


\renewbibmacro*{date}{%
  \printfield{edition}%
  \printdate
  \setunit{\addcomma\addspace}%
  \printfield{pubstate}}

% Set \newunitpunct to comma and remove parentheses around publication info
\renewbibmacro{related:reprint}[1]{%
  \entrydata{#1}{%
    \usedriver
      {\renewbibmacro{related:init}{}%
       \renewcommand{\newunitpunct}{\addcomma\space}%
       \renewbibmacro*{parens+publisher+location+date}{%
         \newunit
         \usebibmacro{publisher+location+date}}}
      {\ifbibliography
         {\thefield{entrytype}}
         {cite:\thefield{entrytype}}}}}

% use family, given and change \newunitpunct to a point just for related
% entries (I have serious misgivings about this as it seems very
% inconsistent.)
\xpretobibmacro{cite}
  {\iffieldequalstr{relatedtype}{reprint}
     {\DeclareNameAlias{default}{family-given}%
      \renewcommand*{\newunitpunct}{\addperiod\space}}
     {}}
  {}
  {}

\renewbibmacro{parens+publisher+location+date}{% 
  \newunit
  \usebibmacro{publisher+location+date}% 
  \iffieldequalstr{relatedtype}{reprint} 
    {\renewcommand{\newunitpunct}{\addsemicolon\space}% 
     \newunit 
     \usebibmacro{related:init}% 
     \usebibmacro{related}% 
     \global\toggletrue{relatedseen}} 
    {}} 

\renewbibmacro{origpublisher+location+date}{% 
  \printlist{origlocation}% 
  \setunit{\addspace}% 
  \usebibmacro{origdate}% 
  \newunit} 

\newbibmacro{real+publisher+location+date}{% 
  \printlist{location}% 
  \iffieldundef{howpublished} 
    {} 
    {\setunit{\addcolon\space}% 
     \printfield{howpublished}}% 
  \setunit*{\addspace}% 
  \usebibmacro{date}% 
  \newunit} 

\renewbibmacro*{publisher+location+date}{% 
  \ifboolexpr{ 
    not test {\iffieldundef{origpublisher}} 
    or 
    not test {\iffieldundef{origlocation}} 
    or 
    not test {\iffieldundef{origyear}} 
  } 
    {\usebibmacro{origpublisher+location+date}% 
     \setunit{\addspace}% 
     \printtext[parens]{% 
       \bibstring{reprint}% 
       \setunit{\addspace}% 
       \usebibmacro{real+publisher+location+date}}} 
    {\usebibmacro{real+publisher+location+date}}} 

	
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\defbibheading{head}[\refname]{\chapter{Literaturverzeichnis}} %Um eine neue Überschrift in Bibliographie zu erstellen

\interfootnotelinepenalty=9999 % damit Fußn auf einer seite


%--------------------------------------------------------------------------- 
% abstract 
%--------------------------------------------------------------------------- 
\addto\captionsgerman{% 
 \renewcommand{\abstractname}{Abstract}} 
\newcommand\abstractname{Abstract} %%% here 
\makeatletter 
\if@titlepage 
  \newenvironment{abstract}{% 
      \titlepage 
      \null\vfil 
      \@beginparpenalty\@lowpenalty 
      \begin{center}% 
        \bfseries \abstractname 
       \@endparpenalty\@M 
      \end{center}}% 
     {\par\vfil\null\endtitlepage} 
\else 
  \newenvironment{abstract}{% 
      \if@twocolumn 
        \section*{\abstractname}% 
    german  \else 
       \small 
       \begin{center}% 
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% 
        \end{center}% 
        \quotation 
      \fi} 
      {\if@twocolumn\else\endquotation\fi} 
\fi 
\makeatother 


\makeatletter 
\let\abx@MakeMarkcase\@gobble 
\makeatother

%\usepackage{ulem}
%\setdefaultenum{1.)}{a)}{aa)}
\usepackage{bigfoot}



\begin{document}
\listoffigures
\part{Erster Teil des Buches}
%%%%%%%%%%%%%%
\label{ErsterTeil}
%%%%%%%%%%%%%%%%

\pagenumbering{roman}
\pagestyle{empty} 


\newpage

\section*{Vorwort}\label{ch:ix}



%RS fehlt beim paragraph abk!


\section*{Karten}\label{ch:K}


\begin{figure}[H]
  \centering
  \caption[Der ]{Der\protect\footnotemark}
	\label{fig:example1}
\end{figure}
\footnotetext{Karte entnommen aus: \cite{King.2018}, xxxiv.}


\begin{figure}[H]
  \centering
  \caption[O]{O\protect\footnotemark}
  \label{fig:example2}
\end{figure}
\footnotetext{Karte entnommen aus: \cite{King.2018}, xlii.}
%vorwort
%\include{preface}

%bibliographie

% Seite I. Teil
\part{\thispagestyle{empty}} %Befel thispagestyle meint: keine Seitenzahl nur auf dieser Seite!
\label{ErsterTeil}
% Seitennummerierung im Hauptteil
\pagenumbering{arabic}
\newpagestyle{main}{%
   \sethead[\thepage][][\chaptername\ \thechapter. \chaptertitle]{\thesection\ \sectiontitle}{}{\thepage}
   \headrule
}
\pagestyle{main} %Für Kopfzeile mit linie

\chapter{Einführung}
\section{Blindtext 1}
\blindtext\label{BT_1} 
\section{Weitere Texte}

HIER BEGINNT DER NEUE TEXT, siehe \ref{ErsterTeil}.\ref{Test}.\\ 
Was bereits in Blindtext 1 in Abschnitt \ref{BT_1} ausgeführt, wollen wir in Blindtext 2 in Abschnitt \ref{BT_2} weiter vertiefen.

Der Querverweis müsste richtig heißen:
Was bereits in Blindtext 1 in Abschnitt \ref{BT_1} ausgeführt, wollen wir in Blindtext 2 in Abschnitt II-1.1 weiter vertiefen.

\section{Texte NEU}

HIER BEGINNT DER NEUE TEXT\label{Test}.

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example1}
\end{figure}

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example2}
\end{figure}



\part{Zweiter Teil des Buches}
\chapter{Ausführungen}
\section{Blindtext 2}
\blindtext\label{BT_2}
\section{Weitere Texte}
In Blindtext 1 (siehe Abschnitt \ref{BT_1}) wurde bereits ausgeführt \dots

Auch hier muss die römische Ziffer des Buchteils mitgeführt werden, wenn auf einen anderen Buchteil verwiesen wird.

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example3}
\end{figure}



\end{document}


Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2500
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Part-übergreifende Querverweise

Beitrag von Stefan Kottwitz »

Da sind noch einige Probleme drin, vermutlich lief es daher nicht komplett durch, so dass die Verzeichnisse leer blieben.

Es sind einige Sachen drin, die mit scrbook nun nicht mehr gebraucht werden und vllt. sogar konflikten.

Der Code war wegen Fehlern nicht übersetzbar, also habe ich mal herausgenommen:

  • titlesec, tocloft, \chaptertitle, \sectiontitle, \headrule
  • \section, \subsection etc. Redefinitonen (die Abstände kann man sauber mit KOMA-Script Settings einstellen)
  • babel mit ngerman, polyglossia und \setmainlanguage erstmal weg (weiß grad nicht, warum zu polyglossia wechseln, mit babel gingen Fehler weg)
  • die \footnotetext mit \cite mal rausgenommen, das gab Fehler
  • \newpagestyle{main} und \pagestyle{main} erstmal rausgenommen weil scrlayer-scrpage sich beschwerte (! Package scrlayer Error: unexpected value to background.)
  • dann kam noch ein unklarer Mathemodus-Fehler bei einem \centering

Das hier wäre erstmal übersetzbar:

\RequirePackage[patch]{kvoptions} 
\documentclass[open=any,12pt,headings=standardclasses]{scrbook} %headsepline
\let\Tiny=\tiny

\usepackage{scrbase}
\providecommand*{\Ifstr}{\ifstr}
\usepackage[automark]{scrlayer-scrpage}


\usepackage{cleveref}
\usepackage{blindtext}

% um Kapitel mit Part zu referenzieren
%\RedeclareSectionCommand[counterwithin=part]{chapter}
\renewcommand{\thechapter}{\arabic{chapter}}
%\renewcommand{\partmark}[1]{\markboth{#1}{}}
%\renewcommand{\part}[1]{\both{#1}{}}
\makeatletter
\def\p@chapter{\IfPartNot{\thepart}}% Präfix für chapter-Labels
\def\p@section{\IfPartNot{\thepart}}% Präfix für section-Labels
\def\p@subsection{\IfPartNot{\thepart}}% Präfix für subsection-Labels
\makeatother
\DeclareRobustCommand{\IfPartNot}[1]{%
  \Ifstr{\thepart}{#1}{}{#1.}%
}

\usepackage{xpatch}
\xapptocmd\addparttocentry{%
  \addxcontentsline{lof}{part}[{#1}]{#2}%
}{}{\PatchFailed}



\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry}
\usepackage{graphicx}
\usepackage{pdfpages}

\usepackage{changepage}

\usepackage{setspace}
\onehalfspacing
%\usepackage[style=authoryear, backend=biber]{biblatex} 
% [style=iest] authoryear=Angenedt 2002
% Festlegung Art der Zitierung - Havardmethode: Abkuerzung Autor + Jahr
%\bibliographystyle{alphadin}

\makeatletter %Abstände Text zu section
\makeatletter% siehe De-TeX-FAQ 
\g@addto@macro\quotation{\setstretch{1}\noindent\ignorespaces} 
\makeatother% siehe \makeatletter 


\renewenvironment{quote}
{\small\list{}{\rightmargin=0.9cm \leftmargin=0.9cm}%
\item\relax}
{\endlist}
\usepackage{rotating}
\usepackage{pdflscape}

\usepackage{xcolor}
\usepackage{smartdiagram}
\usepackage{wrapfig}
\usepackage[margin=10pt,font=small,labelfont=bf,belowskip=4pt]{caption}
%\captionsetup[figure]{labelfont=bf,textfont=it}

\usepackage{verse} %Dell neu
\renewcommand{\poemtitlefont}{\normalfont\bfseries\large\left} % Define the poem title style
\setlength{\stanzaskip}{0.75\baselineskip}



\usepackage{pgfplots}

\usepackage{tikz}

\newcommand{\udensdash}[1]{%
    \tikz[baseline=(todotted.base)]{
        \node[inner sep=1pt,outer sep=0pt] (todotted) {#1};
        \draw[densely dashed] (todotted.south west) -- (todotted.south east);
    }%
}%


\usepackage{tikz-qtree}

%\usepackage{mathrsfs}
\usetikzlibrary{mindmap}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows.meta,arrows,chains,positioning} 
\tikzset{
    %Define standard arrow tip
    >=stealth',
    %Define style for boxes
    punkt/.style={
 %          rectangle,
 %          rounded corners,
  %         draw=black, very thick,
   %        text width=6.5em,
    %       minimum height=2em,
      },
    % Define arrow style
    pil/.style={
           ->,
					align=left,
      execute at begin node=,
           thin,
           shorten <=2pt,
           shorten >=-4pt,}
}



\usetikzlibrary{matrix, positioning, shapes}

\pgfplotsset{compat=newest,width=3cm,height=5cm,plotstyle/.style={line width=1.2pt,smooth,samples=100,domain=-0.05:1.01}} 



\usepackage{etoolbox}
\BeforeBeginEnvironment{wrapfigure}{\setlength{\intextsep}{2pt}} %für Textabstand zwischen Text und wrapfigure

\makeatletter
\patchcmd{\backmatter}
{\@mainmatterfalse}
{\@mainmatterfalse\pagenumbering{roman}}
{}
{}
\makeatother

%\restylefloat{figure}
%\usepackage{scrextend}      % allows some KOMA-Script features

\usepackage{yfonts}
%\usepackage[utf8]{inputenc} bei Verwendung von xelatex unnötig
%\usepackage[T1]{fontenc} bei Verwendung von xelatex unnötig
\usepackage{tgtermes} %Times-Schriftart-Kopie
\usepackage{fontspec}



\usepackage{microtype}% verbesserter Randausgleich
%\usepackage{lmodern}

\SetProtrusion
   { encoding = {TU},
     family   = Times New Roman }
   {}


\usepackage{tabularx}


% Abstand zwischen chapter subsection,...
\makeatletter


%von schlosser video übernommen
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5cm
\hfuzz 0.3pt\widowpenalty=10000
\vfuzz
\hfuzz
% \raggedbottom Wenn das nicht aktiviert ist, bleibt Fußnote am Seitenende; Wenn an, wird Fußnote näher am Text

\renewcommand\footnoterule{\kern-.75\skip\footins 
\hrule width 1.9cm height .4pt\kern -.4pt\kern.75\skip\footins}

\deffootnote[]{1.5em}{1em}{\textsuperscript{\thefootnotemark}\enskip} %für mehr platz bei Fußnote zw Ziffer und Text 
 

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist %Damit Einzug bei Zwischenanmerkungen in Listen verschwindet 

\usepackage{paralist}
\usepackage{alphalph}
\usepackage{enumitem}
%\setdefaultenum{}{}{1.}{} %ändert item in enumitem an dritter Stelle
\makeatletter
\newalphalph{\alphmult}[mult]{\@alph}{26} 
\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname} 
\def\@enumalphalphcnt#1{\alphmult{#1}} 
\makeatother 
\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{mm} 
\setenumerate{label=\arabic} 
\setenumerate[2]{label=\enumalphalphcnt)} 





%\renewcommand{\thesection}{\alphalph{\value{section}}}


\setlist[enumerate]{nosep}
\newlist{citemize}{itemize}{14} 
\setlist[citemize]{label=-,nosep}

\usepackage{imakeidx}
\makeindex[name=Ort,title={Geographische Namen}]
\makeindex[name=sach,title={Sachregister}]
\makeindex[name=Personen,title={Personenregister}]
\makeindex[name=modern,title={Moderne Autoren}]
\makeindex
%HSS
%Sachen
%\indexsetup{level=\section}
%\indexsetup{level=\section,toclevel=section,noclearpage}
%\indexsetup{level=\chapter*}

%\makeatletter
%\renewcommand*{\idx@@heading}{\section}
%\makeatother



\renewcommand{\seename}{siehe}

%\usepackage[initsep = 15pt]{idxlayout}

\usepackage[ngerman]{babel} %damit kein "`3. Kapitel"' steht in Titel - unvereinbar mit Polyglossia
\AtBeginDocument{\renewcommand{\chaptername}{}}% muss nach babel stehen!


%\usepackage[autostyle]{csquotes}

%\usepackage[backend=biber,style=authoryear]{biblatex}
%\addbibresource{bibliography.bib}

%\usepackage{hyperref} % für ref index
\usepackage{xfrac} %für Bruchzahlen
\usepackage{supertabular}
\usepackage{tabu,longtable} %lange Tabellen
\usepackage[longtable]{multirow} 
\usepackage{footnotehyper}
\makesavenoteenv{longtable}
\usepackage{float} %float mit [H]: Gleitumgebung mit dem Bild oder der Tabelle an die richtige Stelle, nämlich (H)ere platziert.
\usepackage{placeins} %definiert für float eine Barriere
\usepackage{booktabs} %für Tabelle
\usepackage{array} % für Tabellenkolumne

%\usepackage[longtable]{multirow}                  % Tabelle vertikale Zellen verbinden
%\usepackage{colortbl}                  % Farbe der Zellen einer Tabelle, z. B. \begin{tabular}

\usepackage{bigdelim}
\newcolumntype{_}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
  #1\ignorespaces
}

%\usepackage[nottoc]{tocbibind} % make LoF and LoT show up in ToC
%überflussig?
\setcounter{tocdepth}{6} 
\setcounter{secnumdepth}{6}

%% Distances between dots
\makeatletter
\renewcommand*{\@dotsep}{0.5}
\makeatother

%% Distances between number and entry
\makeatletter
%\renewcommand{\l@part}{\vspace{.05\textwidth} \@nodottedtocline{1}{10pt}{10pt}}
%\renewcommand{\l@chapter}{\vspace{.0375\textwidth} \@dottedtocline{2}{15pt}{15pt}}
%\renewcommand{\l@section}{\vspace{.025\textwidth} \@dottedtocline{3}{20pt}{20pt}}
%\renewcommand{\l@subsection}{\@dottedtocline{4}{40pt}{30pt}}
%\renewcommand{\l@subsubsection}{\@dottedtocline{5}{70pt}{40pt}}
%\renewcommand{\l@paragraph}{\@dottedtocline{6}{110pt}{40pt}}

%\usepackage{tocstyle}
%\newtocstyle[leaders]{chapterwithdot}{ %Schriftart toc!
 % \settocfeature{pagenumberbox}{\makebox[1em][r]}% Platz f�r Seitenzahl
  %\settocfeature[-1]{leaders}{\hfill}% keine Punkte bei part
  %\settocfeature[-1]{pagenumberbox}{\phantom}% keine Seitenzahl bei part
%\usetocstyle{chapterwithdot} %anscheinend ünnotig


\usepackage{multicol} % Required for splitting text into multiple columns
\usepackage{paracol}





\usepackage{arydshln} %querlinie bei Tabellen

\makeatletter
\def\adl@drawiv#1#2#3{%
        \hskip.5\tabcolsep
        \xleaders#3{#2.5\@tempdimb #1{1}#2.5\@tempdimb}%
                #2\z@ plus1fil minus1fil\relax
        \hskip.5\tabcolsep}
\newcommand{\cdashlinelr}[1]{%
  \noalign{\vskip\aboverulesep
           \global\let\@dashdrawstore\adl@draw
           \global\let\adl@draw\adl@drawiv}
  \cdashline{#1}
  \noalign{\global\let\adl@draw\@dashdrawstore
           \vskip\belowrulesep}}
\makeatother


%\usepackage{polyglossia} %Kommentar 


%\setmainlanguage[variant=german, spelling=new, latesthyphen=true, babelshorthands=true]{german}




%\titleformat{\chapter}{\bfseries\Huge}{\thechapter\quad}{0em}{} % doppelt, aber hier - für keinen zeilenumbr. zw "1" u "Kapitelüberschr"
\AtBeginDocument{\renewcommand{\chaptername}{}}% muss nach babel stehen! Kein "`Kapitel"' in Kapitelüberschrift! 


 
%-zusaetzliche Kommandos*
%\include{command}
\usepackage[autostyle=true,german=quotes]{csquotes}
%\usepackage[german=guillement]{csquotes} 
\usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} 
%uniquename=false lässt S.P. Brock in Fußnote zu Brock!
\addbibresource{biblio.bib}

%\DefineBibliographyStrings{ngerman}{ibidem = {ibid\adddot}} funktioniert nicht => ibid. bleibt
% Statt Hg. soll es Hrsg. heißen:
%\DefineBibliographyStrings{ngerman}{editor = {Hrsg.},editors = {Hgg.},} %funktioniert nicht

%\DeclareLanguageMapping{ngerman}{ngerman-apa}%funktioniert nicht

\setlength{\parindent}{2pt} % um Einzüge zu verhindern, soll nicht auf 0!
%%%%%%%%%%%%%%%%%%%%\setlength{\bibitemsep}{18pt}  % Abstand zwischen den Literaturangaben
%%%%%%%%%%%%%%%%%%%%\setlength{\bibhang}{0.2cm}    % Einzug nach jeweils erster Zeile




%%%%%%%%%%%%%%%%%%%%%%%%%%%% damit erste Fußnote nicht kompl Seitenzahl hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewbibmacro*{postnote}{%
  \iftoggle{blx@unit}
    {}
    {\newunit}%
  \printfield{postnote}}

\renewbibmacro*{pages}{%
  \iffieldundef{pages}
    {\ifbool{bbx@inset}
       {}
       {\printfield{postnote}%
        \global\booltrue{suppresspostnote}}}
    {\printfield{pages}%
     \ifboolexpr{
       test {\iffieldundef{postnote}}
       or
       bool {bbx@inset}
     }
       {}
       {\setunit{\addspace}%
         \printtext[parens]{%
         % \iffieldpages{postnote}
            \bibstring{thiscite}%
             \setunit{\addspace}
          %  {}%
          \printfield{postnote}}}}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% von Purton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\DeclareFieldFormat{pages}{\mknormrange{#1}} 
\DeclareFieldFormat{pagepages}{\mknormrange[\mkpageprefix]{#1}} 
\DeclareFieldFormat{pagesin}{\mknormrange[\mkpageprefix]{#1} 
\usebibmacro{in}} 
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\usepackage{xpatch}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography option modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ExecuteBibliographyOptions[inlexicon]{% 
  skipbib=false, 
} 


%%%%%%%%%%%%%%%%%%%%%%%%
% Driver modifications %
%%%%%%%%%%%%%%%%%%%%%%%%

% New cite: book


\DeclareFieldFormat{pages}{\mknormrange{#1}} 
\DeclareFieldFormat{pagepages}{\mknormrange[\mkpageprefix]{#1}} 
\DeclareFieldFormat{pagesin}{\mknormrange[\mkpageprefix]{#1} 
\usebibmacro{in}} 
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\usepackage{xpatch}

\xpatchbibdriver{abbreviations}
  {\usebibmacro{bibentrycite}}
  {\usebibmacro{bibentrycite}%
   \renewcommand*{\finentrypunct}{\addperiod}}
  {}
  {}

\xpatchbibmacro{issue+date}
  {\addcolon\space}
  {\addcomma\space}
  {}
  {}

\xpatchbibmacro{editor+others}
  {\setunit{\addcomma\space}%
   \usebibmacro{editor+othersstrg}}
  {\setunit{\addspace}
   \printtext[parens]{\usebibmacro{editor+othersstrg}}}
  {}
  {}

\xpatchbibmacro{publisher+location+date}
  {\setunit{\addcomma\space}%
   \usebibmacro{date}}
  {\setunit{\addspace}%
   \usebibmacro{date}}
  {}
  {}

\xpatchbibmacro{institution+location+date}
  {\setunit{\addcomma\space}%
   \usebibmacro{date}}
  {\setunit{\addspace}%
   \usebibmacro{date}}
  {}
  {}
	
%%%%%%%%%%%%%%%%% setzen bei Wdh in Litverz.=> --: (Hrsg.): ..
%\renewcommand*{\bibnamedash}{%
%  \leavevmode\raise 0.6ex\hbox to 3em{\hrulefill}\addcolon\space}



\DeclareDelimFormat[incollection]{multinamedelim}{\slash\space}
\DeclareDelimFormat[incollection]{finalnamedelim}{\slash\space}
\DeclareDelimFormat*{nametitledelim}{\addcolon\space}
%%%%%%%%%% Schal


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Damit in Bibliographie überall Doppelpunkt nach Namen steht %%%%%%%%%%%%%%%%%%

\usepackage{xpatch}


% set up nametitledelim in different contexts
\DeclareDelimFormat[none,bib,biblist]{nametitledelim}{%
  \ifciteseen
    {\addcomma\space}
    {\addcolon\space}}

% also put colon after dash
\renewcommand{\namedashpunct}{\addcolon\space}
\xpatchbibmacro{author}
  {\renewcommand{\namedashpunct}{\adddot\space}}
  {\renewcommand*{\namedashpunct}{\addcolon\space}}
  {\message{Patching author': Success^J}}
  {\message{Patchingauthor': FailureJ}}

% patch citation drivers

\xpatchbibdriver{cite:article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:article': Success^J}}
  {\message{Patchingcite:article': FailureJ}}
\xpatchbibdriver{cite:book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:book': Success^J}}
  {\message{Patchingcite:book': FailureJ}}
\xpatchbibdriver{cite:suppbook}
  {\usebibmacro{author/editor+others/translator+others}%
   \newunit}
  {\usebibmacro{author/editor+others/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:suppbook': Success^J}}
  {\message{Patchingcite:suppbook': FailureJ}}
\xpatchbibdriver{cite:commentary}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:commentary': Success^J}}
  {\message{Patchingcite:commentary': FailureJ}}
\xpatchbibdriver{cite:incommentary}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:commentary': Success^J}}
  {\message{Patchingcite:commentary': FailureJ}}
\xpatchbibdriver{cite:incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:incollection': Success^J}}
  {\message{Patchingcite:incollection': FailureJ}}

\xpatchbibdriver{cite:inreference}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:inreference': Success^J}}
  {\message{Patchingcite:inreference': FailureJ}}
\xpatchbibdriver{cite:review}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:review': Success^J}}
  {\message{Patchingcite:review': FailureJ}}
\xpatchbibdriver{cite:thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:thesis': Success^J}}
  {\message{Patchingcite:thesis': FailureJ}}
\xpatchbibdriver{cite:misc}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:misc': Success^J}}
  {\message{Patchingcite:misc': FailureJ}}
\xpatchbibdriver{cite:conferencepaper}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:conferencepaper': Success^J}}
  {\message{Patchingcite:conferencepaper': FailureJ}}
\xpatchbibdriver{cite:periodical}
  {\usebibmacro{editor+others}%
   \newunit}
  {\usebibmacro{editor+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:periodical': Success^J}}
  {\message{Patchingcite:periodical': FailureJ}}
\xpatchbibdriver{cite:patent}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:patent': Success^J}}
  {\message{Patchingcite:patent': FailureJ}}

% patch bibliography drivers
\xpatchbibdriver{ancienttext}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching ancienttext': Success^J}}
  {\message{Patchingancienttext': FailureJ}}
\xpatchbibdriver{article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching article': Success^J}}
  {\message{Patchingarticle': FailureJ}}
\xpatchbibdriver{book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching book': Success^J}}
  {\message{Patchingbook': FailureJ}}
\xpatchbibdriver{suppbook}
  {\usebibmacro{author/editor+others/translator+others}%
   \newunit}
  {\usebibmacro{author/editor+others/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching suppbook': Success^J}}
  {\message{Patchingsuppbook': FailureJ}}
\xpatchbibdriver{incommentary:short}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incommentary:short': Success^J}}
  {\message{Patchingincommentary:short': FailureJ}}
\xpatchbibdriver{incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incollection': Success^J}}
  {\message{Patchingincollection': FailureJ}}
\xpatchbibdriver{inreference:short}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching inreference:short': Success^J}}
  {\message{Patchinginreference:short': FailureJ}}
\xpatchbibdriver{review}
  {\usebibmacro{author/translator+others}%
   \newunit
   \iffieldundef{title}
     {\newunit}}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}%
   \iffieldundef{title}
     {}}
  {\message{Patching review': Success^J}}
  {\message{Patchingreview': FailureJ}}
\xpatchbibdriver{thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching thesis': Success^J}}
  {\message{Patchingthesis': FailureJ}}
\xpatchbibdriver{misc}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching misc': Success^J}}
  {\message{Patchingmisc': FailureJ}}
\xpatchbibdriver{conferencepaper}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching conferencepaper': Success^J}}
  {\message{Patchingconferencepaper': FailureJ}}
\xpatchbibdriver{periodical}
  {\usebibmacro{editor+others}%
   \newunit}
  {\usebibmacro{editor+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching periodical': Success^J}}
  {\message{Patchingperiodical': FailureJ}}
\xpatchbibdriver{patent}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching patent': Success^J}}
  {\message{Patchingpatent': FailureJ}}
\xpatchbibdriver{cite:incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incollection': Success^J}}
  {\message{Patchingincollection': FailureJ}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\DefineBibliographyStrings{ngerman}{%
  editors = {Hgg\adddot}
}

\makeatletter
\let\blx@saved@delimcontext\blx@delimcontext
\newcommand{\savedelimcontext}{\let\blx@saved@delimcontext\blx@delimcontext}
\newcommand{\restoredelimcontext}{\let\blx@delimcontext\blx@saved@delimcontext}
\makeatother

\newbibmacro{bookeditor}{%
  \savedelimcontext
  \delimcontext{incollection}%
  \ifnameundef{bookeditor}
    {\ifnameundef{editor}
       {}
       {\printnames[family-given]{editor}%
        \setunit{\addspace}%
        \printtext[parens]{\usebibmacro{editor+othersstrg}}%
        \clearname{editor}}}
    {\printnames[family-given]{bookeditor}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{editor+othersstrg}}%
     \clearname{bookeditor}}%
  \setunit{\addcolon\space}%
  \restoredelimcontext}

\newbibmacro{maineditor}{%
  \savedelimcontext
  \delimcontext{incollection}%
  \ifnameundef{maineditor}
    {\ifnameundef{editor}
       {}
       {\printnames[family-given]{editor}%
        \setunit{\addspace}%
        \printtext[parens]{\usebibmacro{editor+othersstrg}}%
        \clearname{editor}}}
    {\printnames[family-given]{maineditor}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{editor+othersstrg}}%
     \clearname{maineditor}}%
  \setunit{\addcolon\space}%
  \restoredelimcontext}






% New cite:incollection, incollection,and inlexicon drivers

\makeatletter
\DeclareBibliographyDriver{cite:incollection}{%
  \ifentrytype{seminarpaper}
    {}
    {\toggletrue{inentrytype}}%
  \usebibmacro{citeindex}%
  \usebibmacro{begentry}%
  \iftoggle{blx@usefullcite}
    {}
    {\let\ifciteseen\@firstoftwo}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim[citecommand]{nametitledelim}}%
  \usebibmacro{title}%
  \ifciteseen
    {}
    {\usebibmacro{byauthor/byeditor+others/bytranslator+others}%
     \newunit
     \usebibmacro{in:}%
     \iffieldundef{booktitle}
       {}
       {\usebibmacro{bookeditor}%
        \setunit{\printdelim[citecommand]{nametitledelim}}%
        \usebibmacro{booktitle}%
        \newunit
        \usebibmacro{event+venue+date}%
        \newunit
        \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}%
        \newunit}%
     \usebibmacro{volume+partof}%
     \iffieldundef{maintitle}
       {}
       {\usebibmacro{maineditor}%
        \setunit{\printdelim[citecommand]{nametitledelim}}%
        \usebibmacro{maintitle}%
        \newunit
        \usebibmacro{event+venue+date}%
        \newunit
        \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}%
     \newunit
     \printfield{volumes}%
     \newunit
     \usebibmacro{shortseries+number}%
     \newunit
     \printfield{note}%
     \usebibmacro{parens+publisher+location+date}%
     \newunit
     \usebibmacro{ebook}%
     \newunit
     \printfield{addendum}%
     \newunit
     \usebibmacro{volume+part+pages}%
     \newunit
     \usebibmacro{isbn}%
     \newunit
     \usebibmacro{doi+eprint+url}}%
  \usebibmacro{finentry}}
\makeatother

\DeclareBibliographyDriver{incollection}{%
  \toggletrue{inentrytype}%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}%
  \usebibmacro{title}%
  \newunit
  \ifentrytype{classictext}
    {\usebibmacro{byauthor}%
     \newunit
     \usebibmacro{bytranslator+others}}
    {\usebibmacro{byauthor/byeditor+others/bytranslator+others}}%
  \setunit{\addcomma\space}%
  \usebibmacro{in:}%
  \iffieldundef{booktitle}
    {}
    {\usebibmacro{bookeditor}%
     \setunit{\printdelim{nametitledelim}}%
     \usebibmacro{booktitle}%
     \newunit
     \usebibmacro{event+venue+date}%
     \newunit
     \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}%
     \newunit}%
  \usebibmacro{volume+partof}%
  \iffieldundef{maintitle}
    {}
    {\usebibmacro{maineditor}%
     \setunit{\printdelim{nametitledelim}}%
     \usebibmacro{maintitle}%
     \newunit
     \usebibmacro{event+venue+date}%
     \newunit
     \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}%
  \newunit
  \printfield{edition}%
  \newunit
  \printfield{volumes}%
  \newunit
  \usebibmacro{shortseries+number}%
  \newunit
  \printfield{note}%
  \newunit
  \usebibmacro{publisher+location+date}%
  \newunit
  \usebibmacro{ebook}%
  \newunit
  \printfield{addendum}%
  \setunit{\addcomma\space}%
  \usebibmacro{volume+part+pages}%
  \newunit
  \usebibmacro{isbn}%
  \newunit
  \usebibmacro{doi+eprint+url}%
  \ifboolexpr{
    togl {relatedseen}
    or
    not togl {bbx:related}
  }
    {}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}%
  \usebibmacro{finentry}%
}

\DeclareBibliographyDriver{inlexicon}{% 
  \usebibmacro{begentry}% 
  \usebibmacro{author/translator+others}% 
  \newunit 
  \usebibmacro{title}% 
  \newunit 
  \printfield{note}% 
  \newunit 
  \usebibmacro{xrefshortmaintitle+xrefshortbooktitle}% 
  \newunit 
  \usebibmacro{volume+pages}% 
  \newunit 
  \printfield{addendum}% 
  \usebibmacro{finentry}% 
}



% Various driver patches
%   - use nametitledelim in cite:article and cite:book
%   - remove edition

\xpatchbibdriver{cite:article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
\xpatchbibdriver{cite:book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
	\xpatchbibdriver{cite:review}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim[citecommand]{nametitledelim}}}
  {}
  {}
\xpatchbibdriver{cite:thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
\xpatchbibdriver{cite:book}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{cite:commentary}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{cite:suppbook}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{book}
  {\newunit\printfield{edition}}
  {}{}{}
  \xpatchbibdriver{suppbook}
  {\newunit\printfield{edition}}
  {}{}{}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Punctuation and delimiter modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand{\subtitlepunct}{\addperiod\space} % Punkt zw Titel und Subtitel in Bibliogr.
\renewcommand{\sqspace}{} % kein Abstand bei Seitenzahl mit "f." 

\DeclareDelimFormat{multinamedelim}{\addslash\space} 
\DeclareDelimAlias{finalnamedelim}{multinamedelim} 
\DeclareDelimFormat[citecommand]{nametitledelim}{%
  \ifciteseen
    {\addcomma\space}
    {\addcolon\space}}

% Change reprint beginning punctuation to a space
\newcommand*{\begrelateddelimreprint}{\addspace}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Field format modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareFieldFormat{citetitle}{#1}
\DeclareFieldFormat[book]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat[thesis]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat[review]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{maintitle}{#1}
\DeclareFieldFormat{booktitle}{#1}
\DeclareFieldFormat{shorttitle}{#1} 
\DeclareFieldFormat{shortbooktitle}{#1} 
\DeclareFieldFormat{shortmaintitle}{#1} 
\DeclareFieldFormat{edition}{\textsuperscript{#1}}

% put reprint information in parentheses
\DeclareFieldFormat{related:reprint}{\mkbibparens{#1}}

\DeclareNameAlias{sortname}{family-given} % vorher last-first in Klammern
\DeclareNameAlias{author}{sortname}
\DeclareNameAlias{editor}{sortname}
\DeclareNameAlias{translator}{sortname}

\renewcommand{\mkbibnamefamily}{\textsc} 
\renewcommand{\mkbibnameprefix}{\textsc} 
\renewcommand{\mkbibnamegiven}{\textsc} 
\renewcommand{\mkbibnamesuffix}{\textsc} 


%%%%%%%%%%%%%%%%%%%%%%%%
% String modifications %
%%%%%%%%%%%%%%%%%%%%%%%%

\DefineBibliographyStrings{german}{%
  editors = {Hgg\adddot}, 
  reprint = {ND:},
}


%%%%%%%%%%%%%%%%%%%%%%%%%%
% bibmacro modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%


\renewbibmacro*{date}{%
  \printfield{edition}%
  \printdate
  \setunit{\addcomma\addspace}%
  \printfield{pubstate}}

% Set \newunitpunct to comma and remove parentheses around publication info
\renewbibmacro{related:reprint}[1]{%
  \entrydata{#1}{%
    \usedriver
      {\renewbibmacro{related:init}{}%
       \renewcommand{\newunitpunct}{\addcomma\space}%
       \renewbibmacro*{parens+publisher+location+date}{%
         \newunit
         \usebibmacro{publisher+location+date}}}
      {\ifbibliography
         {\thefield{entrytype}}
         {cite:\thefield{entrytype}}}}}

% use family, given and change \newunitpunct to a point just for related
% entries (I have serious misgivings about this as it seems very
% inconsistent.)
\xpretobibmacro{cite}
  {\iffieldequalstr{relatedtype}{reprint}
     {\DeclareNameAlias{default}{family-given}%
      \renewcommand*{\newunitpunct}{\addperiod\space}}
     {}}
  {}
  {}

\renewbibmacro{parens+publisher+location+date}{% 
  \newunit
  \usebibmacro{publisher+location+date}% 
  \iffieldequalstr{relatedtype}{reprint} 
    {\renewcommand{\newunitpunct}{\addsemicolon\space}% 
     \newunit 
     \usebibmacro{related:init}% 
     \usebibmacro{related}% 
     \global\toggletrue{relatedseen}} 
    {}} 

\renewbibmacro{origpublisher+location+date}{% 
  \printlist{origlocation}% 
  \setunit{\addspace}% 
  \usebibmacro{origdate}% 
  \newunit} 

\newbibmacro{real+publisher+location+date}{% 
  \printlist{location}% 
  \iffieldundef{howpublished} 
    {} 
    {\setunit{\addcolon\space}% 
     \printfield{howpublished}}% 
  \setunit*{\addspace}% 
  \usebibmacro{date}% 
  \newunit} 

\renewbibmacro*{publisher+location+date}{% 
  \ifboolexpr{ 
    not test {\iffieldundef{origpublisher}} 
    or 
    not test {\iffieldundef{origlocation}} 
    or 
    not test {\iffieldundef{origyear}} 
  } 
    {\usebibmacro{origpublisher+location+date}% 
     \setunit{\addspace}% 
     \printtext[parens]{% 
       \bibstring{reprint}% 
       \setunit{\addspace}% 
       \usebibmacro{real+publisher+location+date}}} 
    {\usebibmacro{real+publisher+location+date}}} 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\defbibheading{head}[\refname]{\chapter{Literaturverzeichnis}} %Um eine neue Überschrift in Bibliographie zu erstellen

\interfootnotelinepenalty=9999 % damit Fußn auf einer seite


%--------------------------------------------------------------------------- 
% abstract 
%--------------------------------------------------------------------------- 
\addto\captionsgerman{% 
 \renewcommand{\abstractname}{Abstract}} 
\newcommand\abstractname{Abstract} %%% here 
\makeatletter 
\if@titlepage 
  \newenvironment{abstract}{% 
      \titlepage 
      \null\vfil 
      \@beginparpenalty\@lowpenalty 
      \begin{center}% 
        \bfseries \abstractname 
       \@endparpenalty\@M 
      \end{center}}% 
     {\par\vfil\null\endtitlepage} 
\else 
  \newenvironment{abstract}{% 
      \if@twocolumn 
        \section*{\abstractname}% 
    german  \else 
       \small 
       \begin{center}% 
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% 
        \end{center}% 
        \quotation 
      \fi} 
      {\if@twocolumn\else\endquotation\fi} 
\fi 
\makeatother 


\makeatletter 
\let\abx@MakeMarkcase\@gobble 
\makeatother

%\usepackage{ulem}
%\setdefaultenum{1.)}{a)}{aa)}
\usepackage{bigfoot}



\begin{document}
\listoffigures
\part{Erster Teil des Buches}
%%%%%%%%%%%%%%
\label{ErsterTeil}
%%%%%%%%%%%%%%%%

\pagenumbering{roman}
\pagestyle{empty} 


\newpage

\section*{Vorwort}\label{ch:ix}



%RS fehlt beim paragraph abk!


\section*{Karten}\label{ch:K}


\begin{figure}[H]
  \centering
  \caption[Der ]{Der\protect\footnotemark}
	\label{fig:example1}
\end{figure}
%\footnotetext{Karte entnommen aus: \cite{King.2018}, xxxiv.}


\begin{figure}[H]
  \centering
  \caption[O]{O\protect\footnotemark}
  \label{fig:example2}
\end{figure}
%\footnotetext{Karte entnommen aus: \cite{King.2018}, xlii.}
%vorwort
%\include{preface}

%bibliographie

% Seite I. Teil
\part{Zweiter Teil} %Befel thispagestyle meint: keine Seitenzahl nur auf dieser Seite!
\label{ErsterTeil}
% Seitennummerierung im Hauptteil
\pagenumbering{arabic}
%\newpagestyle{main}{%
%   \sethead[\thepage][][\chaptername\ \thechapter]{\thesection}{}{\thepage}
   %\headrule
%}
%\pagestyle{main} %Für Kopfzeile mit linie

\chapter{Einführung}
\section{Blindtext 1}
\blindtext\label{BT_1} 
\section{Weitere Texte}

HIER BEGINNT DER NEUE TEXT, siehe \ref{ErsterTeil}.\ref{Test}.\\ 
Was bereits in Blindtext 1 in Abschnitt \ref{BT_1} ausgeführt, wollen wir in Blindtext 2 in Abschnitt \ref{BT_2} weiter vertiefen.

Der Querverweis müsste richtig heißen:
Was bereits in Blindtext 1 in Abschnitt \ref{BT_1} ausgeführt, wollen wir in Blindtext 2 in Abschnitt II-1.1 weiter vertiefen.

\section{Texte NEU}

HIER BEGINNT DER NEUE TEXT\label{Test}.

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example1}
\end{figure}

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example2}
\end{figure}



\part{Zweiter Teil des Buches}
\chapter{Ausführungen}
\section{Blindtext 2}
\blindtext\label{BT_2}
\section{Weitere Texte}
In Blindtext 1 (siehe Abschnitt \ref{BT_1}) wurde bereits ausgeführt \dots

Auch hier muss die römische Ziffer des Buchteils mitgeführt werden, wenn auf einen anderen Buchteil verwiesen wird.

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example3}
\end{figure}

\end{document}

Kannst Du ja hier im Forum mit der Ausgabe testen. Vllt. hast Du einiges zurechtgebastelt und willst es wieder haben, kriegt man alles hin, und einfacher mit scrbook Boardmitteln.

Dann sah ich sehe immer noch einen Fehler im .toc, da erschien:

\contentsline {part}{\numberline {II}\global \let \gdef plain{empty}}{5}{}%

Das lag an

\part{\thispagestyle{empty}}

weil im Part-Titel setzt man keinen Seitenstil (der würde auch im Verzeichnis mit aufgerufen als Teil des Titels).

Auch mal korrigiert, dann ist der Code oben ohne Fehler durchgelaufen. Die Hauptsache, wegen der Part-Titel im Verzeichnis, war also das \thispagestyle{empty} im Titel-Text, das andere ergab sich hier so beim Testen.

Stefan


Gastname ungültig

Re: Part-übergreifende Querverweise

Beitrag von Gastname ungültig »

Wie gesagt: Wenn auch Verweise innerhalb eines Teils die Teilenummer tragen sollen (so habe ich das oben verstanden), dann braucht man die \IfPartNot-Geschichte nicht bzw. stört diese eher. Dann sollte man die \p@…-Befehle lieber fest mit der Partnummer versehen, wie ich das oben gezeigt habe.

Zu den römischen Seitenzahlen in \backmatter sei außerdem auf: Römische Seitenzahlen im Vorderteil (und im Endteil)? hingewiesen.


Gastname ungültig

Re: Part-übergreifende Querverweise

Beitrag von Gastname ungültig »

Achso, das \defbibheading braucht man übrigens eigentlich auch nicht. Literaturverzeichnis als nummeriertes Kapitel geht out of the box mit KOMA-Script-Option bibliography=numbered.

Achja: Ein Absatzeinzug von 2pt ist etwas sehr mager. Das sieht eher nach Satzfehlern als nach Absätzen aus. Wenn man keinen Absatzeinzug will, sollte man besser direkt auf Absatzabstand umstellen: Was ist eigentlich so schlimm daran, \parindent auf Null zu setzen? (passt nicht ganz aber die Thematik ist dort insgesamt doch gut erklärt).

Und die Umdefinierung von \chaptername macht man natürlich besser sprachumschaltungsfest mit Hilfe von \renewcaptionname, wobei das vermutlich gar nicht mehr gebraucht wird. Ursprünglich diente das wohl eher dazu in den Überschriften und Kolumnentiteln das "Kapitel" wegzubekommen. Das gibt es aber mit den Voreinstellungen von KOMA-Script ohnehin schon nicht mehr.

Es gibt im Code also noch so einiges an Optimierungspotential. Was davon man umsetzte, hängt natürlich von der verfügbaren Zeit ab. Ich habe das, was mir aufgefallen ist, hauptsächlich deshalb erwähnt, weil ja auch andere diese Beiträge lesen und dann nicht behaupten sollen, sie hätten das hier als gute Vorlage präsentiert bekommen. Die bisherigen Änderungen sind eher notdürftige Reparaturen.


aasaa00
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 99
Registriert: Do 1. Mär 2018, 11:43

Re: Part-übergreifende Querverweise

Beitrag von aasaa00 »

Danke @Stefan Kottwitz und Gastname ungültig für die Mühe und die Hilfe. Ich gehe die Datei durch und habe ein großes Problem mit der Umstellung von Polyglossia auf babel: Wegen den weiteren Sprachen, die ich in meiner Arbeit benutze, bin ich auf Polyglossia angewiesen und kann es nicht mit Babel ersetzen. Wenn ich aber anstelle von babel das hier angebe:

\usepackage{polyglossia} %Kommentar 


\setmainlanguage[variant=german, spelling=new, latesthyphen=true, babelshorthands=true]{german}


\setotherlanguage{syriac}
\newfontfamily\syriacfont[Script=Syriac, Scale=1.3]{Estrangelo Edessa}
%\newfontfamily\estrfont[Script=Syriac, Scale=1.3]{Estrangelo Talada}
\newcommand{\syr}[1]{\RL{\textsyriac{#1}}}
\newcommand{\estr}[1]{\RL{\estrfont{#1}}}
\setotherlanguage[variant=polytonic]{greek}
\newfontfamily{\greekfont}{Times New Roman}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script = Arabic, Scale=1.3]{Simplified Arabic} % Replace 'Simplified Arabic' with a font from your system
%\newcommand{\arabic}[1]{\RL{\textarabic{#1}}}

\titleformat{\chapter}{\bfseries\Huge}{\thechapter\quad}{0em}{} % doppelt, aber hier - für keinen zeilenumbr. zw "1" u "Kapitelüberschr"
\AtBeginDocument{\renewcommand{\chaptername}{}}% muss nach babel stehen! Kein "`Kapitel"' in Kapitelüberschrift! 

wird mir wiederum der Fehler "Missing number, treated as zero" angezeigt. Ich weiß aber nicht warum und wäre dankbar für jede Hilfe. Hier der angepasste Code nochmal (mit der Fehlermeldung):

\RequirePackage[patch]{kvoptions} 
\documentclass[open=any,12pt,headings=standardclasses]{scrbook} %headsepline
\let\Tiny=\tiny

\usepackage{scrbase}
\providecommand*{\Ifstr}{\ifstr}
\usepackage[automark]{scrlayer-scrpage}


\usepackage{cleveref}
\usepackage{blindtext}

% um Kapitel mit Part zu referenzieren
%\RedeclareSectionCommand[counterwithin=part]{chapter}
\renewcommand{\thechapter}{\arabic{chapter}}
%\renewcommand{\partmark}[1]{\markboth{#1}{}}
%\renewcommand{\part}[1]{\both{#1}{}}
\makeatletter
\def\p@chapter{\IfPartNot{\thepart}}% Präfix für chapter-Labels
\def\p@section{\IfPartNot{\thepart}}% Präfix für section-Labels
\def\p@subsection{\IfPartNot{\thepart}}% Präfix für subsection-Labels
\makeatother
\DeclareRobustCommand{\IfPartNot}[1]{%
  \Ifstr{\thepart}{#1}{}{#1.}%
}

\usepackage{xpatch}
\xapptocmd\addparttocentry{%
  \addxcontentsline{lof}{part}[{#1}]{#2}%
}{}{\PatchFailed}



\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry}
\usepackage{graphicx}
\usepackage{pdfpages}

\usepackage{changepage}

\usepackage{setspace}
\onehalfspacing
%\usepackage[style=authoryear, backend=biber]{biblatex} 
% [style=iest] authoryear=Angenedt 2002
% Festlegung Art der Zitierung - Havardmethode: Abkuerzung Autor + Jahr
%\bibliographystyle{alphadin}

\makeatletter %Abstände Text zu section
\makeatletter% siehe De-TeX-FAQ 
\g@addto@macro\quotation{\setstretch{1}\noindent\ignorespaces} 
\makeatother% siehe \makeatletter 


\renewenvironment{quote}
{\small\list{}{\rightmargin=0.9cm \leftmargin=0.9cm}%
\item\relax}
{\endlist}
\usepackage{rotating}
\usepackage{pdflscape}

\usepackage{xcolor}
\usepackage{smartdiagram}
\usepackage{wrapfig}
\usepackage[margin=10pt,font=small,labelfont=bf,belowskip=4pt]{caption}
%\captionsetup[figure]{labelfont=bf,textfont=it}

\usepackage{verse} %Dell neu
\renewcommand{\poemtitlefont}{\normalfont\bfseries\large\left} % Define the poem title style
\setlength{\stanzaskip}{0.75\baselineskip}



\usepackage{pgfplots}

\usepackage{tikz}

\newcommand{\udensdash}[1]{%
    \tikz[baseline=(todotted.base)]{
        \node[inner sep=1pt,outer sep=0pt] (todotted) {#1};
        \draw[densely dashed] (todotted.south west) -- (todotted.south east);
    }%
}%


\usepackage{tikz-qtree}

%\usepackage{mathrsfs}
\usetikzlibrary{mindmap}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows.meta,arrows,chains,positioning} 
\tikzset{
    %Define standard arrow tip
    >=stealth',
    %Define style for boxes
    punkt/.style={
 %          rectangle,
 %          rounded corners,
  %         draw=black, very thick,
   %        text width=6.5em,
    %       minimum height=2em,
      },
    % Define arrow style
    pil/.style={
           ->,
					align=left,
      execute at begin node=,
           thin,
           shorten <=2pt,
           shorten >=-4pt,}
}



\usetikzlibrary{matrix, positioning, shapes}

\pgfplotsset{compat=newest,width=3cm,height=5cm,plotstyle/.style={line width=1.2pt,smooth,samples=100,domain=-0.05:1.01}} 



\usepackage{etoolbox}
\BeforeBeginEnvironment{wrapfigure}{\setlength{\intextsep}{2pt}} %für Textabstand zwischen Text und wrapfigure

\makeatletter
\patchcmd{\backmatter}
{\@mainmatterfalse}
{\@mainmatterfalse\pagenumbering{roman}}
{}
{}
\makeatother

%\restylefloat{figure}
%\usepackage{scrextend}      % allows some KOMA-Script features

\usepackage{yfonts}
%\usepackage[utf8]{inputenc} bei Verwendung von xelatex unnötig
%\usepackage[T1]{fontenc} bei Verwendung von xelatex unnötig
\usepackage{tgtermes} %Times-Schriftart-Kopie
\usepackage{fontspec}



\usepackage{microtype}% verbesserter Randausgleich
%\usepackage{lmodern}

\SetProtrusion
   { encoding = {TU},
     family   = Times New Roman }
   {}


\usepackage{tabularx}


% Abstand zwischen chapter subsection,...
\makeatletter


%von schlosser video übernommen
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5cm
\hfuzz 0.3pt\widowpenalty=10000
\vfuzz
\hfuzz
% \raggedbottom Wenn das nicht aktiviert ist, bleibt Fußnote am Seitenende; Wenn an, wird Fußnote näher am Text

\renewcommand\footnoterule{\kern-.75\skip\footins 
\hrule width 1.9cm height .4pt\kern -.4pt\kern.75\skip\footins}

\deffootnote[]{1.5em}{1em}{\textsuperscript{\thefootnotemark}\enskip} %für mehr platz bei Fußnote zw Ziffer und Text 
 

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist %Damit Einzug bei Zwischenanmerkungen in Listen verschwindet 

\usepackage{paralist}
\usepackage{alphalph}
\usepackage{enumitem}
%\setdefaultenum{}{}{1.}{} %ändert item in enumitem an dritter Stelle
\makeatletter
\newalphalph{\alphmult}[mult]{\@alph}{26} 
\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname} 
\def\@enumalphalphcnt#1{\alphmult{#1}} 
\makeatother 
\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{mm} 
\setenumerate{label=\arabic} 
\setenumerate[2]{label=\enumalphalphcnt)} 





%\renewcommand{\thesection}{\alphalph{\value{section}}}


\setlist[enumerate]{nosep}
\newlist{citemize}{itemize}{14} 
\setlist[citemize]{label=-,nosep}

\usepackage{imakeidx}
\makeindex[name=Ort,title={Geographische Namen}]
\makeindex[name=sach,title={Sachregister}]
\makeindex[name=Personen,title={Personenregister}]
\makeindex[name=modern,title={Moderne Autoren}]
\makeindex
%HSS
%Sachen
%\indexsetup{level=\section}
%\indexsetup{level=\section,toclevel=section,noclearpage}
%\indexsetup{level=\chapter*}

%\makeatletter
%\renewcommand*{\idx@@heading}{\section}
%\makeatother



\renewcommand{\seename}{siehe}

%\usepackage[initsep = 15pt]{idxlayout}


%\usepackage[autostyle]{csquotes}

%\usepackage[backend=biber,style=authoryear]{biblatex}
%\addbibresource{bibliography.bib}

%\usepackage{hyperref} % für ref index
\usepackage{xfrac} %für Bruchzahlen
\usepackage{supertabular}
\usepackage{tabu,longtable} %lange Tabellen
\usepackage[longtable]{multirow} 
\usepackage{footnotehyper}
\makesavenoteenv{longtable}
\usepackage{float} %float mit [H]: Gleitumgebung mit dem Bild oder der Tabelle an die richtige Stelle, nämlich (H)ere platziert.
\usepackage{placeins} %definiert für float eine Barriere
\usepackage{booktabs} %für Tabelle
\usepackage{array} % für Tabellenkolumne

%\usepackage[longtable]{multirow}                  % Tabelle vertikale Zellen verbinden
%\usepackage{colortbl}                  % Farbe der Zellen einer Tabelle, z. B. \begin{tabular}

\usepackage{bigdelim}
\newcolumntype{_}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
  #1\ignorespaces
}

%\usepackage[nottoc]{tocbibind} % make LoF and LoT show up in ToC
%überflussig?
\setcounter{tocdepth}{6} 
\setcounter{secnumdepth}{6}

%% Distances between dots
\makeatletter
\renewcommand*{\@dotsep}{0.5}
\makeatother

%% Distances between number and entry
\makeatletter
%\renewcommand{\l@part}{\vspace{.05\textwidth} \@nodottedtocline{1}{10pt}{10pt}}
%\renewcommand{\l@chapter}{\vspace{.0375\textwidth} \@dottedtocline{2}{15pt}{15pt}}
%\renewcommand{\l@section}{\vspace{.025\textwidth} \@dottedtocline{3}{20pt}{20pt}}
%\renewcommand{\l@subsection}{\@dottedtocline{4}{40pt}{30pt}}
%\renewcommand{\l@subsubsection}{\@dottedtocline{5}{70pt}{40pt}}
%\renewcommand{\l@paragraph}{\@dottedtocline{6}{110pt}{40pt}}

%\usepackage{tocstyle}
%\newtocstyle[leaders]{chapterwithdot}{ %Schriftart toc!
 % \settocfeature{pagenumberbox}{\makebox[1em][r]}% Platz f�r Seitenzahl
  %\settocfeature[-1]{leaders}{\hfill}% keine Punkte bei part
  %\settocfeature[-1]{pagenumberbox}{\phantom}% keine Seitenzahl bei part
%\usetocstyle{chapterwithdot} %anscheinend ünnotig


\usepackage{multicol} % Required for splitting text into multiple columns
\usepackage{paracol}





\usepackage{arydshln} %querlinie bei Tabellen

\makeatletter
\def\adl@drawiv#1#2#3{%
        \hskip.5\tabcolsep
        \xleaders#3{#2.5\@tempdimb #1{1}#2.5\@tempdimb}%
                #2\z@ plus1fil minus1fil\relax
        \hskip.5\tabcolsep}
\newcommand{\cdashlinelr}[1]{%
  \noalign{\vskip\aboverulesep
           \global\let\@dashdrawstore\adl@draw
           \global\let\adl@draw\adl@drawiv}
  \cdashline{#1}
  \noalign{\global\let\adl@draw\@dashdrawstore
           \vskip\belowrulesep}}
\makeatother


%\usepackage{polyglossia} %Kommentar 


%\setmainlanguage[variant=german, spelling=new, latesthyphen=true, babelshorthands=true]{german}




%\titleformat{\chapter}{\bfseries\Huge}{\thechapter\quad}{0em}{} % doppelt, aber hier - für keinen zeilenumbr. zw "1" u "Kapitelüberschr"
\AtBeginDocument{\renewcommand{\chaptername}{}}% muss nach babel stehen! Kein "`Kapitel"' in Kapitelüberschrift! 

\usepackage{polyglossia} %Kommentar 


\setmainlanguage[variant=german, spelling=new, latesthyphen=true, babelshorthands=true]{german}
\AtBeginDocument{\renewcommand{\chaptername}{}}% muss nach babel stehen!

\setotherlanguage{syriac}
\newfontscript{Syriac}{syrc}
%\newfontfamily\syriacfont[Script=Syriac, Scale=1.3]{Estrangelo Edessa}
%\newfontfamily\estrfont[Script=Syriac, Scale=1.3]{Estrangelo Talada}
\newcommand{\syr}[1]{\RL{\textsyriac{#1}}}
\newcommand{\estr}[1]{\RL{\estrfont{#1}}}
\setotherlanguage[variant=polytonic]{greek}
\newfontfamily{\greekfont}{Times New Roman}
\newfontscript{Syriac}{syrc}

\setotherlanguage{arabic}
\setmainfont{Amiri}
 
%-zusaetzliche Kommandos*
%\include{command}
\usepackage[autostyle=true,german=quotes]{csquotes}
%\usepackage[german=guillement]{csquotes} 
\usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} 
%uniquename=false lässt S.P. Brock in Fußnote zu Brock!
\addbibresource{biblio.bib}

%\DefineBibliographyStrings{ngerman}{ibidem = {ibid\adddot}} funktioniert nicht => ibid. bleibt
% Statt Hg. soll es Hrsg. heißen:
%\DefineBibliographyStrings{ngerman}{editor = {Hrsg.},editors = {Hgg.},} %funktioniert nicht

%\DeclareLanguageMapping{ngerman}{ngerman-apa}%funktioniert nicht

\setlength{\parindent}{2pt} % um Einzüge zu verhindern, soll nicht auf 0!
%%%%%%%%%%%%%%%%%%%%\setlength{\bibitemsep}{18pt}  % Abstand zwischen den Literaturangaben
%%%%%%%%%%%%%%%%%%%%\setlength{\bibhang}{0.2cm}    % Einzug nach jeweils erster Zeile




%%%%%%%%%%%%%%%%%%%%%%%%%%%% damit erste Fußnote nicht kompl Seitenzahl hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewbibmacro*{postnote}{%
  \iftoggle{blx@unit}
    {}
    {\newunit}%
  \printfield{postnote}}

\renewbibmacro*{pages}{%
  \iffieldundef{pages}
    {\ifbool{bbx@inset}
       {}
       {\printfield{postnote}%
        \global\booltrue{suppresspostnote}}}
    {\printfield{pages}%
     \ifboolexpr{
       test {\iffieldundef{postnote}}
       or
       bool {bbx@inset}
     }
       {}
       {\setunit{\addspace}%
         \printtext[parens]{%
         % \iffieldpages{postnote}
            \bibstring{thiscite}%
             \setunit{\addspace}
          %  {}%
          \printfield{postnote}}}}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% von Purton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\DeclareFieldFormat{pages}{\mknormrange{#1}} 
\DeclareFieldFormat{pagepages}{\mknormrange[\mkpageprefix]{#1}} 
\DeclareFieldFormat{pagesin}{\mknormrange[\mkpageprefix]{#1} 
\usebibmacro{in}} 
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\usepackage{xpatch}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography option modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ExecuteBibliographyOptions[inlexicon]{% 
  skipbib=false, 
} 


%%%%%%%%%%%%%%%%%%%%%%%%
% Driver modifications %
%%%%%%%%%%%%%%%%%%%%%%%%

% New cite: book


\DeclareFieldFormat{pages}{\mknormrange{#1}} 
\DeclareFieldFormat{pagepages}{\mknormrange[\mkpageprefix]{#1}} 
\DeclareFieldFormat{pagesin}{\mknormrange[\mkpageprefix]{#1} 
\usebibmacro{in}} 
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\usepackage{xpatch}

\xpatchbibdriver{abbreviations}
  {\usebibmacro{bibentrycite}}
  {\usebibmacro{bibentrycite}%
   \renewcommand*{\finentrypunct}{\addperiod}}
  {}
  {}

\xpatchbibmacro{issue+date}
  {\addcolon\space}
  {\addcomma\space}
  {}
  {}

\xpatchbibmacro{editor+others}
  {\setunit{\addcomma\space}%
   \usebibmacro{editor+othersstrg}}
  {\setunit{\addspace}
   \printtext[parens]{\usebibmacro{editor+othersstrg}}}
  {}
  {}

\xpatchbibmacro{publisher+location+date}
  {\setunit{\addcomma\space}%
   \usebibmacro{date}}
  {\setunit{\addspace}%
   \usebibmacro{date}}
  {}
  {}

\xpatchbibmacro{institution+location+date}
  {\setunit{\addcomma\space}%
   \usebibmacro{date}}
  {\setunit{\addspace}%
   \usebibmacro{date}}
  {}
  {}
	
%%%%%%%%%%%%%%%%% setzen bei Wdh in Litverz.=> --: (Hrsg.): ..
%\renewcommand*{\bibnamedash}{%
%  \leavevmode\raise 0.6ex\hbox to 3em{\hrulefill}\addcolon\space}



\DeclareDelimFormat[incollection]{multinamedelim}{\slash\space}
\DeclareDelimFormat[incollection]{finalnamedelim}{\slash\space}
\DeclareDelimFormat*{nametitledelim}{\addcolon\space}
%%%%%%%%%% Schal


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Damit in Bibliographie überall Doppelpunkt nach Namen steht %%%%%%%%%%%%%%%%%%

\usepackage{xpatch}


% set up nametitledelim in different contexts
\DeclareDelimFormat[none,bib,biblist]{nametitledelim}{%
  \ifciteseen
    {\addcomma\space}
    {\addcolon\space}}

% also put colon after dash
\renewcommand{\namedashpunct}{\addcolon\space}
\xpatchbibmacro{author}
  {\renewcommand{\namedashpunct}{\adddot\space}}
  {\renewcommand*{\namedashpunct}{\addcolon\space}}
  {\message{Patching author': SuccessJ}}
  {\message{Patchingauthor': FailureJ}}

% patch citation drivers

\xpatchbibdriver{cite:article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:article': SuccessJ}}
  {\message{Patchingcite:article': FailureJ}}
\xpatchbibdriver{cite:book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:book': SuccessJ}}
  {\message{Patchingcite:book': FailureJ}}
\xpatchbibdriver{cite:suppbook}
  {\usebibmacro{author/editor+others/translator+others}%
   \newunit}
  {\usebibmacro{author/editor+others/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:suppbook': SuccessJ}}
  {\message{Patchingcite:suppbook': FailureJ}}
\xpatchbibdriver{cite:commentary}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:commentary': SuccessJ}}
  {\message{Patchingcite:commentary': FailureJ}}
\xpatchbibdriver{cite:incommentary}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:commentary': SuccessJ}}
  {\message{Patchingcite:commentary': FailureJ}}
\xpatchbibdriver{cite:incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:incollection': SuccessJ}}
  {\message{Patchingcite:incollection': FailureJ}}

\xpatchbibdriver{cite:inreference}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:inreference': SuccessJ}}
  {\message{Patchingcite:inreference': FailureJ}}
\xpatchbibdriver{cite:review}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:review': SuccessJ}}
  {\message{Patchingcite:review': FailureJ}}
\xpatchbibdriver{cite:thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:thesis': SuccessJ}}
  {\message{Patchingcite:thesis': FailureJ}}
\xpatchbibdriver{cite:misc}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:misc': SuccessJ}}
  {\message{Patchingcite:misc': FailureJ}}
\xpatchbibdriver{cite:conferencepaper}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:conferencepaper': SuccessJ}}
  {\message{Patchingcite:conferencepaper': FailureJ}}
\xpatchbibdriver{cite:periodical}
  {\usebibmacro{editor+others}%
   \newunit}
  {\usebibmacro{editor+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:periodical': SuccessJ}}
  {\message{Patchingcite:periodical': FailureJ}}
\xpatchbibdriver{cite:patent}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:patent': SuccessJ}}
  {\message{Patchingcite:patent': FailureJ}}

% patch bibliography drivers
\xpatchbibdriver{ancienttext}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching ancienttext': SuccessJ}}
  {\message{Patchingancienttext': FailureJ}}
\xpatchbibdriver{article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching article': SuccessJ}}
  {\message{Patchingarticle': FailureJ}}
\xpatchbibdriver{book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching book': SuccessJ}}
  {\message{Patchingbook': FailureJ}}
\xpatchbibdriver{suppbook}
  {\usebibmacro{author/editor+others/translator+others}%
   \newunit}
  {\usebibmacro{author/editor+others/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching suppbook': SuccessJ}}
  {\message{Patchingsuppbook': FailureJ}}
\xpatchbibdriver{incommentary:short}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incommentary:short': SuccessJ}}
  {\message{Patchingincommentary:short': FailureJ}}
\xpatchbibdriver{incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incollection': SuccessJ}}
  {\message{Patchingincollection': FailureJ}}
\xpatchbibdriver{inreference:short}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching inreference:short': SuccessJ}}
  {\message{Patchinginreference:short': FailureJ}}
\xpatchbibdriver{review}
  {\usebibmacro{author/translator+others}%
   \newunit
   \iffieldundef{title}
     {\newunit}}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}%
   \iffieldundef{title}
     {}}
  {\message{Patching review': SuccessJ}}
  {\message{Patchingreview': FailureJ}}
\xpatchbibdriver{thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching thesis': SuccessJ}}
  {\message{Patchingthesis': FailureJ}}
\xpatchbibdriver{misc}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching misc': SuccessJ}}
  {\message{Patchingmisc': FailureJ}}
\xpatchbibdriver{conferencepaper}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching conferencepaper': SuccessJ}}
  {\message{Patchingconferencepaper': FailureJ}}
\xpatchbibdriver{periodical}
  {\usebibmacro{editor+others}%
   \newunit}
  {\usebibmacro{editor+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching periodical': SuccessJ}}
  {\message{Patchingperiodical': FailureJ}}
\xpatchbibdriver{patent}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching patent': SuccessJ}}
  {\message{Patchingpatent': FailureJ}}
\xpatchbibdriver{cite:incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incollection': SuccessJ}}
  {\message{Patchingincollection': FailureJ}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\DefineBibliographyStrings{ngerman}{%
  editors = {Hgg\adddot}
}

\makeatletter
\let\blx@saved@delimcontext\blx@delimcontext
\newcommand{\savedelimcontext}{\let\blx@saved@delimcontext\blx@delimcontext}
\newcommand{\restoredelimcontext}{\let\blx@delimcontext\blx@saved@delimcontext}
\makeatother

\newbibmacro{bookeditor}{%
  \savedelimcontext
  \delimcontext{incollection}%
  \ifnameundef{bookeditor}
    {\ifnameundef{editor}
       {}
       {\printnames[family-given]{editor}%
        \setunit{\addspace}%
        \printtext[parens]{\usebibmacro{editor+othersstrg}}%
        \clearname{editor}}}
    {\printnames[family-given]{bookeditor}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{editor+othersstrg}}%
     \clearname{bookeditor}}%
  \setunit{\addcolon\space}%
  \restoredelimcontext}

\newbibmacro{maineditor}{%
  \savedelimcontext
  \delimcontext{incollection}%
  \ifnameundef{maineditor}
    {\ifnameundef{editor}
       {}
       {\printnames[family-given]{editor}%
        \setunit{\addspace}%
        \printtext[parens]{\usebibmacro{editor+othersstrg}}%
        \clearname{editor}}}
    {\printnames[family-given]{maineditor}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{editor+othersstrg}}%
     \clearname{maineditor}}%
  \setunit{\addcolon\space}%
  \restoredelimcontext}






% New cite:incollection, incollection,and inlexicon drivers

\makeatletter
\DeclareBibliographyDriver{cite:incollection}{%
  \ifentrytype{seminarpaper}
    {}
    {\toggletrue{inentrytype}}%
  \usebibmacro{citeindex}%
  \usebibmacro{begentry}%
  \iftoggle{blx@usefullcite}
    {}
    {\let\ifciteseen\@firstoftwo}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim[citecommand]{nametitledelim}}%
  \usebibmacro{title}%
  \ifciteseen
    {}
    {\usebibmacro{byauthor/byeditor+others/bytranslator+others}%
     \newunit
     \usebibmacro{in:}%
     \iffieldundef{booktitle}
       {}
       {\usebibmacro{bookeditor}%
        \setunit{\printdelim[citecommand]{nametitledelim}}%
        \usebibmacro{booktitle}%
        \newunit
        \usebibmacro{event+venue+date}%
        \newunit
        \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}%
        \newunit}%
     \usebibmacro{volume+partof}%
     \iffieldundef{maintitle}
       {}
       {\usebibmacro{maineditor}%
        \setunit{\printdelim[citecommand]{nametitledelim}}%
        \usebibmacro{maintitle}%
        \newunit
        \usebibmacro{event+venue+date}%
        \newunit
        \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}%
     \newunit
     \printfield{volumes}%
     \newunit
     \usebibmacro{shortseries+number}%
     \newunit
     \printfield{note}%
     \usebibmacro{parens+publisher+location+date}%
     \newunit
     \usebibmacro{ebook}%
     \newunit
     \printfield{addendum}%
     \newunit
     \usebibmacro{volume+part+pages}%
     \newunit
     \usebibmacro{isbn}%
     \newunit
     \usebibmacro{doi+eprint+url}}%
  \usebibmacro{finentry}}
\makeatother

\DeclareBibliographyDriver{incollection}{%
  \toggletrue{inentrytype}%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}%
  \usebibmacro{title}%
  \newunit
  \ifentrytype{classictext}
    {\usebibmacro{byauthor}%
     \newunit
     \usebibmacro{bytranslator+others}}
    {\usebibmacro{byauthor/byeditor+others/bytranslator+others}}%
  \setunit{\addcomma\space}%
  \usebibmacro{in:}%
  \iffieldundef{booktitle}
    {}
    {\usebibmacro{bookeditor}%
     \setunit{\printdelim{nametitledelim}}%
     \usebibmacro{booktitle}%
     \newunit
     \usebibmacro{event+venue+date}%
     \newunit
     \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}%
     \newunit}%
  \usebibmacro{volume+partof}%
  \iffieldundef{maintitle}
    {}
    {\usebibmacro{maineditor}%
     \setunit{\printdelim{nametitledelim}}%
     \usebibmacro{maintitle}%
     \newunit
     \usebibmacro{event+venue+date}%
     \newunit
     \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}%
  \newunit
  \printfield{edition}%
  \newunit
  \printfield{volumes}%
  \newunit
  \usebibmacro{shortseries+number}%
  \newunit
  \printfield{note}%
  \newunit
  \usebibmacro{publisher+location+date}%
  \newunit
  \usebibmacro{ebook}%
  \newunit
  \printfield{addendum}%
  \setunit{\addcomma\space}%
  \usebibmacro{volume+part+pages}%
  \newunit
  \usebibmacro{isbn}%
  \newunit
  \usebibmacro{doi+eprint+url}%
  \ifboolexpr{
    togl {relatedseen}
    or
    not togl {bbx:related}
  }
    {}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}%
  \usebibmacro{finentry}%
}

\DeclareBibliographyDriver{inlexicon}{% 
  \usebibmacro{begentry}% 
  \usebibmacro{author/translator+others}% 
  \newunit 
  \usebibmacro{title}% 
  \newunit 
  \printfield{note}% 
  \newunit 
  \usebibmacro{xrefshortmaintitle+xrefshortbooktitle}% 
  \newunit 
  \usebibmacro{volume+pages}% 
  \newunit 
  \printfield{addendum}% 
  \usebibmacro{finentry}% 
}



% Various driver patches
%   - use nametitledelim in cite:article and cite:book
%   - remove edition

\xpatchbibdriver{cite:article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
\xpatchbibdriver{cite:book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
	\xpatchbibdriver{cite:review}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim[citecommand]{nametitledelim}}}
  {}
  {}
\xpatchbibdriver{cite:thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
\xpatchbibdriver{cite:book}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{cite:commentary}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{cite:suppbook}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{book}
  {\newunit\printfield{edition}}
  {}{}{}
  \xpatchbibdriver{suppbook}
  {\newunit\printfield{edition}}
  {}{}{}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Punctuation and delimiter modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand{\subtitlepunct}{\addperiod\space} % Punkt zw Titel und Subtitel in Bibliogr.
\renewcommand{\sqspace}{} % kein Abstand bei Seitenzahl mit "f." 

\DeclareDelimFormat{multinamedelim}{\addslash\space} 
\DeclareDelimAlias{finalnamedelim}{multinamedelim} 
\DeclareDelimFormat[citecommand]{nametitledelim}{%
  \ifciteseen
    {\addcomma\space}
    {\addcolon\space}}

% Change reprint beginning punctuation to a space
\newcommand*{\begrelateddelimreprint}{\addspace}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Field format modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareFieldFormat{citetitle}{#1}
\DeclareFieldFormat[book]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat[thesis]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat[review]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{maintitle}{#1}
\DeclareFieldFormat{booktitle}{#1}
\DeclareFieldFormat{shorttitle}{#1} 
\DeclareFieldFormat{shortbooktitle}{#1} 
\DeclareFieldFormat{shortmaintitle}{#1} 
\DeclareFieldFormat{edition}{\textsuperscript{#1}}

% put reprint information in parentheses
\DeclareFieldFormat{related:reprint}{\mkbibparens{#1}}

\DeclareNameAlias{sortname}{family-given} % vorher last-first in Klammern
\DeclareNameAlias{author}{sortname}
\DeclareNameAlias{editor}{sortname}
\DeclareNameAlias{translator}{sortname}

\renewcommand{\mkbibnamefamily}{\textsc} 
\renewcommand{\mkbibnameprefix}{\textsc} 
\renewcommand{\mkbibnamegiven}{\textsc} 
\renewcommand{\mkbibnamesuffix}{\textsc} 


%%%%%%%%%%%%%%%%%%%%%%%%
% String modifications %
%%%%%%%%%%%%%%%%%%%%%%%%

\DefineBibliographyStrings{german}{%
  editors = {Hgg\adddot}, 
  reprint = {ND:},
}


%%%%%%%%%%%%%%%%%%%%%%%%%%
% bibmacro modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%


\renewbibmacro*{date}{%
  \printfield{edition}%
  \printdate
  \setunit{\addcomma\addspace}%
  \printfield{pubstate}}

% Set \newunitpunct to comma and remove parentheses around publication info
\renewbibmacro{related:reprint}[1]{%
  \entrydata{#1}{%
    \usedriver
      {\renewbibmacro{related:init}{}%
       \renewcommand{\newunitpunct}{\addcomma\space}%
       \renewbibmacro*{parens+publisher+location+date}{%
         \newunit
         \usebibmacro{publisher+location+date}}}
      {\ifbibliography
         {\thefield{entrytype}}
         {cite:\thefield{entrytype}}}}}

% use family, given and change \newunitpunct to a point just for related
% entries (I have serious misgivings about this as it seems very
% inconsistent.)
\xpretobibmacro{cite}
  {\iffieldequalstr{relatedtype}{reprint}
     {\DeclareNameAlias{default}{family-given}%
      \renewcommand*{\newunitpunct}{\addperiod\space}}
     {}}
  {}
  {}

\renewbibmacro{parens+publisher+location+date}{% 
  \newunit
  \usebibmacro{publisher+location+date}% 
  \iffieldequalstr{relatedtype}{reprint} 
    {\renewcommand{\newunitpunct}{\addsemicolon\space}% 
     \newunit 
     \usebibmacro{related:init}% 
     \usebibmacro{related}% 
     \global\toggletrue{relatedseen}} 
    {}} 

\renewbibmacro{origpublisher+location+date}{% 
  \printlist{origlocation}% 
  \setunit{\addspace}% 
  \usebibmacro{origdate}% 
  \newunit} 

\newbibmacro{real+publisher+location+date}{% 
  \printlist{location}% 
  \iffieldundef{howpublished} 
    {} 
    {\setunit{\addcolon\space}% 
     \printfield{howpublished}}% 
  \setunit*{\addspace}% 
  \usebibmacro{date}% 
  \newunit} 

\renewbibmacro*{publisher+location+date}{% 
  \ifboolexpr{ 
    not test {\iffieldundef{origpublisher}} 
    or 
    not test {\iffieldundef{origlocation}} 
    or 
    not test {\iffieldundef{origyear}} 
  } 
    {\usebibmacro{origpublisher+location+date}% 
     \setunit{\addspace}% 
     \printtext[parens]{% 
       \bibstring{reprint}% 
       \setunit{\addspace}% 
       \usebibmacro{real+publisher+location+date}}} 
    {\usebibmacro{real+publisher+location+date}}} 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\defbibheading{head}[\refname]{\chapter{Literaturverzeichnis}} %Um eine neue Überschrift in Bibliographie zu erstellen

\interfootnotelinepenalty=9999 % damit Fußn auf einer seite


%--------------------------------------------------------------------------- 
% abstract 
%--------------------------------------------------------------------------- 
\addto\captionsgerman{% 
 \renewcommand{\abstractname}{Abstract}} 
\newcommand\abstractname{Abstract} %%% here 
\makeatletter 
\if@titlepage 
  \newenvironment{abstract}{% 
      \titlepage 
      \null\vfil 
      \@beginparpenalty\@lowpenalty 
      \begin{center}% 
        \bfseries \abstractname 
       \@endparpenalty\@M 
      \end{center}}% 
     {\par\vfil\null\endtitlepage} 
\else 
  \newenvironment{abstract}{% 
      \if@twocolumn 
        \section*{\abstractname}% 
    german  \else 
       \small 
       \begin{center}% 
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% 
        \end{center}% 
        \quotation 
      \fi} 
      {\if@twocolumn\else\endquotation\fi} 
\fi 
\makeatother 


\makeatletter 
\let\abx@MakeMarkcase\@gobble 
\makeatother

%\usepackage{ulem}
%\setdefaultenum{1.)}{a)}{aa)}
\usepackage{bigfoot}



\begin{document}
\listoffigures
\part{Erster Teil des Buches}
%%%%%%%%%%%%%%
\label{ErsterTeil}
%%%%%%%%%%%%%%%%

\pagenumbering{roman}
\pagestyle{empty} 


\newpage

\section*{Vorwort}\label{ch:ix}



%RS fehlt beim paragraph abk!


\section*{Karten}\label{ch:K}


\begin{figure}[H]
  \centering
  \caption[Der ]{Der\protect\footnotemark}
	\label{fig:example1}
\end{figure}
%\footnotetext{Karte entnommen aus: \cite{King.2018}, xxxiv.}


\begin{figure}[H]
  \centering
  \caption[O]{O\protect\footnotemark}
  \label{fig:example2}
\end{figure}
%\footnotetext{Karte entnommen aus: \cite{King.2018}, xlii.}
%vorwort
%\include{preface}

%bibliographie

% Seite I. Teil
\part{Zweiter Teil} %Befel thispagestyle meint: keine Seitenzahl nur auf dieser Seite!
\label{ErsterTeil}
% Seitennummerierung im Hauptteil
\pagenumbering{arabic}
%\newpagestyle{main}{%
%   \sethead[\thepage][][\chaptername\ \thechapter]{\thesection}{}{\thepage}
   %\headrule
%}
%\pagestyle{main} %Für Kopfzeile mit linie

\chapter{Einführung}
\section{Blindtext 1}
\blindtext\label{BT_1} 
\section{Weitere Texte}

HIER BEGINNT DER NEUE TEXT, siehe \ref{ErsterTeil}.\ref{Test}.\\ 
Was bereits in Blindtext 1 in Abschnitt \ref{BT_1} ausgeführt, wollen wir in Blindtext 2 in Abschnitt \ref{BT_2} weiter vertiefen.

Der Querverweis müsste richtig heißen:
Was bereits in Blindtext 1 in Abschnitt \ref{BT_1} ausgeführt, wollen wir in Blindtext 2 in Abschnitt II-1.1 weiter vertiefen.

\section{Texte NEU}

HIER BEGINNT DER NEUE TEXT\label{Test}.

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example1}
\end{figure}

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example2}
\end{figure}



\part{Zweiter Teil des Buches}
\chapter{Ausführungen}
\section{Blindtext 2}
\blindtext\label{BT_2}
\section{Weitere Texte}
In Blindtext 1 (siehe Abschnitt \ref{BT_1}) wurde bereits ausgeführt \dots

Auch hier muss die römische Ziffer des Buchteils mitgeführt werden, wenn auf einen anderen Buchteil verwiesen wird.

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example3}
\end{figure}

\end{document}

aasaa00
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 99
Registriert: Do 1. Mär 2018, 11:43

Re: Part-übergreifende Querverweise

Beitrag von aasaa00 »

Ein Nachtrag: Ich wollte noch nachfragen, wie man im Abbildungs- und Tabellenverzeichnis die Seitenzahlen in den Überschriften von "part" unterdrücken kann, also die im angehängten Bild rot durchgestrichenen Seitenzahlen loswird

Dateianhänge
bild.JPG

Gastname ungültig

Re: Part-übergreifende Querverweise

Beitrag von Gastname ungültig »

Das sieht mir verdächtig nach einem Fehler in bidi aus. Sobald eine RL-Sprache aktiviert wird und deshalb bidi Teile von KOMA-Script umdefiniert, entsteht der Fehler. Da kann eigentlich nur der Maintainer des Pakets helfen. Du solltest das Problem weiter eingrenzen, also das Beispiel deutlich reduzieren (→ Minimalbeispiel) und dann im Issue-Tracker des Projekts melden.

Übrigens gibt es inzwischen auch mit babel Möglichkeiten, diese Sprachen zu setzen. Jedenfalls findet sich in der Anleitung, sowohl arabic als auch arabic-syria. Gemacht habe ich das aber noch nicht, so dass ich auch nicht weiß, wie das genau geht und ob dann ebenfalls bibi verwendet wird.

\titleformat ist übrigens von titlesec und sollte daher keinesfalls verwendet werden.


Gastname ungültig

Re: Part-übergreifende Querverweise

Beitrag von Gastname ungültig »

Ah, ich habe das gerade bei mir mit brandaktuellen TeX Lvie 2021 pretest ausprobiert. Da gibt es bei Verwendung von lualatex keine Fehler wegen bidi. Die gibt es nur bei Verwendung von xelatex. Auch die ganzen Warnungen wegen \ifstr erschienen nur, wenn man xelatex verwendet. Mit lualatex gibt es sie nicht. Offenbar funktioniert luabidi besser.


Gastname ungültig

Re: Part-übergreifende Querverweise

Beitrag von Gastname ungültig »

Das hier funktioniert bei mir (mit LuaLaTeX statt XeLaTeX), ist abe rnoch weit davon entfernt wirklich gut zu sein. Mir erscheint die Präambel vor allem überladen und wenig aufgeräumt. Bei derart massiven Umdefinierungen des biblatex-Stils würde ich auch einmal darüber nachdenken, das in einen eigenen Stil auszulagern.

% !TeX engine = LuaLaTeX
\RequirePackage[patch]{kvoptions} 
\documentclass[open=any,12pt,headings=standardclasses]{scrbook} %headsepline
\let\Tiny=\tiny

% \usepackage{scrbase}% wird ohnehin schon von scrbook geladen

\providecommand*{\Ifstr}{\ifstr}% Ist bei halbwegs aktuellen KOMA-Script
                                % natürlich überflüssiger Unsinn!
\usepackage[automark]{scrlayer-scrpage}

\usepackage{cleveref}
\usepackage{blindtext}

% um Kapitel mit Part zu referenzieren
%\RedeclareSectionCommand[counterwithin=part]{chapter}
\renewcommand*{\thechapter}{\arabic{chapter}}
%\renewcommand{\partmark}[1]{\markboth{#1}{}}
%\renewcommand{\part}[1]{\both{#1}{}}
\makeatletter
% Die ganze \IfPartNot-Geschichte ist nur dafür da, innerhalb des aktuellen
% Teils eben keinen Teile-Nummer voranzustellen. Wenn man die Teile-Nummer
% immer voranstellen will, ist das Unfug.
\def\p@chapter{\IfPartNot{\thepart}}% Präfix für chapter-Labels
\def\p@section{\IfPartNot{\thepart}}% Präfix für section-Labels
\def\p@subsection{\IfPartNot{\thepart}}% Präfix für subsection-Labels
\makeatother
\DeclareRobustCommand*{\IfPartNot}[1]{%
  \Ifstr{\thepart}{#1}{}{#1.}%
}

\usepackage{xpatch}
\xapptocmd\addparttocentry{%
  \addxcontentsline{lof}{part}[{#1}]{#2}%
}{}{\PatchFailed}
\makeatletter
\BeforeStartingTOC[lof]{%
  \DeclareTOCStyleEntry[pagenumberbox=\@gobble]{part}{part}% Im
                                % Abbildungsverzeichnis keine Seitenzahl
}
\makeatother

\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry}% a4paper ist hier überlüssig, weil bereits von scrbook voreingestellt.
\usepackage{graphicx}
\usepackage{pdfpages}

\usepackage{changepage}

\usepackage{setspace}
\onehalfspacing
%\usepackage[style=authoryear, backend=biber]{biblatex} 
% [style=iest] authoryear=Angenedt 2002
% Festlegung Art der Zitierung - Havardmethode: Abkuerzung Autor + Jahr
%\bibliographystyle{alphadin}

\makeatletter %Abstände Text zu section
\makeatletter% siehe De-TeX-FAQ 
\g@addto@macro\quotation{\setstretch{1}\noindent\ignorespaces} 
\makeatother% siehe \makeatletter 


\renewenvironment{quote}
{\small\list{}{\rightmargin=0.9cm \leftmargin=0.9cm}%
\item\relax}
{\endlist}
\usepackage{rotating}
\usepackage{pdflscape}

\usepackage{xcolor}
\usepackage{smartdiagram}
\usepackage{wrapfig}
\usepackage[margin=10pt,font=small,labelfont=bf,belowskip=4pt]{caption}
%\captionsetup[figure]{labelfont=bf,textfont=it}

\usepackage{verse} %Dell neu
\renewcommand{\poemtitlefont}{\normalfont\bfseries\large\left} % Define the poem title style
\setlength{\stanzaskip}{0.75\baselineskip}

\usepackage{pgfplots}

\usepackage{tikz}

\newcommand{\udensdash}[1]{%
    \tikz[baseline=(todotted.base)]{
        \node[inner sep=1pt,outer sep=0pt] (todotted) {#1};
        \draw[densely dashed] (todotted.south west) -- (todotted.south east);
    }%
}%


\usepackage{tikz-qtree}

%\usepackage{mathrsfs}
\usetikzlibrary{mindmap}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows.meta,arrows,chains,positioning} 
\tikzset{
    %Define standard arrow tip
    >=stealth',
    %Define style for boxes
    punkt/.style={
 %          rectangle,
 %          rounded corners,
  %         draw=black, very thick,
   %        text width=6.5em,
    %       minimum height=2em,
      },
    % Define arrow style
    pil/.style={
           ->,
					align=left,
      execute at begin node=,
           thin,
           shorten <=2pt,
           shorten >=-4pt,}
}

\usetikzlibrary{matrix, positioning, shapes}

\pgfplotsset{compat=newest,width=3cm,height=5cm,plotstyle/.style={line width=1.2pt,smooth,samples=100,domain=-0.05:1.01}} 


\usepackage{etoolbox}
\BeforeBeginEnvironment{wrapfigure}{\setlength{\intextsep}{2pt}} %für
                                %Textabstand zwischen Text und wrapfigure /
                                % Mit aktuellen LaTeX braucht man dafür kein
                                % \BeforeBeginEnvironment mehr, sondern kann
                                % direkt den in LaTeX eingebauten
                                % Hook-Mechanismus nutzen.

\makeatletter
\patchcmd{\backmatter}
{\@mainmatterfalse}
{\@mainmatterfalse\pagenumbering{roman}}% römische Seitenzahlen im Schlussteil
                                % sind natürlich absoluter Unfug.
{}
{}
\makeatother

%\restylefloat{figure}
%\usepackage{scrextend}      % allows some KOMA-Script features

\usepackage{yfonts}
%\usepackage[utf8]{inputenc} bei Verwendung von xelatex unnötig, Nein,
%grundsätzlich unnötig
%\usepackage[T1]{fontenc} bei Verwendung von xelatex unnötig
\usepackage{tgtermes} %Times-Schriftart-Kopie / Legacy-Paket sollte man weder
                      %für LuaLaTeX noch XeLaTeX laden stattdessen lädt man
                      %TeXGyreTermes per fontspec und die Matheversion
                      %ggf. per unicode-math.
\usepackage{fontspec}

\usepackage{microtype}% verbesserter Randausgleich
%\usepackage{lmodern}

\SetProtrusion
   { encoding = {TU},
     family   = Times New Roman }
   {}

\usepackage{tabularx}

% Abstand zwischen chapter subsection,...
\makeatletter

%von schlosser video übernommen
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5cm
\hfuzz 0.3pt\widowpenalty=10000% Laut Typorafen Forssmann sollte man in
                               % wissenschaftlichen Dokumenten Hurenkinder
                               % nicht überbewerten, weil man sich mit deren
                               % absoluter Verhinderung meist andere,
                               % schwerwiegendere Probleme einfängt. Daher ist
                               % die Einstellung 10000 hier eher nicht zu
                               % empfehlen.
\vfuzz\hfuzz
% \raggedbottom Wenn das nicht aktiviert ist, bleibt Fußnote am Seitenende; Wenn an, wird Fußnote näher am Text

\renewcommand\footnoterule{\kern-.75\skip\footins 
\hrule width 1.9cm height .4pt\kern -.4pt\kern.75\skip\footins}% Das macht man
                                % bei KOMA-Script eigentlich anders (siehe Anleitung).

\deffootnote[]{1.5em}{1em}{\textsuperscript{\thefootnotemark}\enskip} %für mehr platz bei Fußnote zw Ziffer und Text 
 

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}% Dafür
                                % kennt KOMA-Script die addmargin-Umgebung.
\let\endchangemargin=\endlist %Damit Einzug bei Zwischenanmerkungen in Listen verschwindet 

\usepackage{paralist}
\usepackage{alphalph}
\usepackage{enumitem}% Sowohl paralist als auch enumitem zu verwenden ist
                     % eigentlich wenig sinnvoll.
%\setdefaultenum{}{}{1.}{} %ändert item in enumitem an dritter Stelle
\makeatletter
\newalphalph{\alphmult}[mult]{\@alph}{26} 
\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname} 
\def\@enumalphalphcnt#1{\alphmult{#1}} 
\makeatother 
\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{mm} 
\setenumerate{label=\arabic*} 
\setenumerate[2]{label=\enumalphalphcnt*)} 

%\renewcommand{\thesection}{\alphalph{\value{section}}}


\setlist[enumerate]{nosep}
\newlist{citemize}{itemize}{14} 
\setlist[citemize]{label=-,nosep}

\usepackage{imakeidx}
\makeindex[name=Ort,title={Geographische Namen}]
\makeindex[name=sach,title={Sachregister}]
\makeindex[name=Personen,title={Personenregister}]
\makeindex[name=modern,title={Moderne Autoren}]
\makeindex
%HSS
%Sachen
%\indexsetup{level=\section*}
%\indexsetup{level=\section*,toclevel=section,noclearpage}
%\indexsetup{level=\chapter*}

%\makeatletter
%\renewcommand*{\idx@@heading}{\section}
%\makeatother

\renewcommand{\seename}{siehe}% Wird nichts nützen, da das mit der
                              % Spracheeinstellung mit eingestellt wird —
                              % glücklicherweise genauso.

%\usepackage[initsep = 15pt]{idxlayout}


%\usepackage[autostyle]{csquotes}

%\usepackage[backend=biber,style=authoryear]{biblatex}
%\addbibresource{bibliography.bib}

%\usepackage{hyperref} % für ref index
\usepackage{xfrac} %für Bruchzahlen
\usepackage{supertabular}
\usepackage{tabu,longtable} %lange Tabellen / Das sind ein wenig viele Pakete
                            %für (lange) Tabellen. Außerdem ist tabu seit
                            %Jahren nicht mehr gepflegt und wird nur manchmal
                            %notdürftig von David Carlisle & Co. am Laufen
                            %gehalten. Echten Support gibt es abe rnicht.
\usepackage[longtable]{multirow} 
\usepackage{footnotehyper}
\makesavenoteenv{longtable}
\usepackage{float} %float mit [H]: Gleitumgebung mit dem Bild oder der Tabelle
                   %an die richtige Stelle, nämlich (H)ere platziert. / Dafür
                   %gibt es bei KOMA-Script die Möglichkeiten von \captionof etc.
\usepackage{placeins} %definiert für float eine Barriere
\usepackage{booktabs} %für Tabelle
\usepackage{array} % für Tabellenkolumne

%\usepackage[longtable]{multirow}                  % Tabelle vertikale Zellen verbinden
%\usepackage{colortbl}                  % Farbe der Zellen einer Tabelle, z. B. \begin{tabular}

\usepackage{bigdelim}
\newcolumntype{_}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
  #1\ignorespaces
}

%\usepackage[nottoc]{tocbibind} % make LoF and LoT show up in ToC
%überflussig?
\setcounter{tocdepth}{6} 
\setcounter{secnumdepth}{6}

%% Distances between dots
\makeatletter
\renewcommand*{\@dotsep}{0.5}
\makeatother

%% Distances between number and entry
\makeatletter
%\renewcommand{\l@part}{\vspace{.05\textwidth} \@nodottedtocline{1}{10pt}{10pt}}
%\renewcommand{\l@chapter}{\vspace{.0375\textwidth} \@dottedtocline{2}{15pt}{15pt}}
%\renewcommand{\l@section}{\vspace{.025\textwidth} \@dottedtocline{3}{20pt}{20pt}}
%\renewcommand{\l@subsection}{\@dottedtocline{4}{40pt}{30pt}}
%\renewcommand{\l@subsubsection}{\@dottedtocline{5}{70pt}{40pt}}
%\renewcommand{\l@paragraph}{\@dottedtocline{6}{110pt}{40pt}}

%\usepackage{tocstyle}
%\newtocstyle[leaders]{chapterwithdot}{ %Schriftart toc!
 % \settocfeature{pagenumberbox}{\makebox[1em][r]}% Platz f�r Seitenzahl
  %\settocfeature[-1]{leaders}{\hfill}% keine Punkte bei part
  %\settocfeature[-1]{pagenumberbox}{\phantom}% keine Seitenzahl bei part
%\usetocstyle{chapterwithdot} %anscheinend ünnotig


\usepackage{multicol} % Required for splitting text into multiple columns
\usepackage{paracol}

\usepackage{arydshln} %querlinie bei Tabellen

\makeatletter
\def\adl@drawiv#1#2#3{%
        \hskip.5\tabcolsep
        \xleaders#3{#2.5\@tempdimb #1{1}#2.5\@tempdimb}%
                #2\z@ plus1fil minus1fil\relax
        \hskip.5\tabcolsep}
\newcommand{\cdashlinelr}[1]{%
  \noalign{\vskip\aboverulesep
           \global\let\@dashdrawstore\adl@draw
           \global\let\adl@draw\adl@drawiv}
  \cdashline{#1}
  \noalign{\global\let\adl@draw\@dashdrawstore
           \vskip\belowrulesep}}
\makeatother


%\usepackage{polyglossia} %Kommentar 
%\setmainlanguage[variant=german, spelling=new, latesthyphen=true, babelshorthands=true]{german}

%\titleformat{\chapter}{\bfseries\Huge}{\thechapter\quad}{0em}{} % doppelt, aber hier - für keinen zeilenumbr. zw "1" u "Kapitelüberschr"
\AtBeginDocument{\renewcommand{\chaptername}{}}% muss nach babel stehen! Kein "`Kapitel"' in Kapitelüberschrift! 

\usepackage{polyglossia} %Kommentar 

\setmainlanguage[variant=german, spelling=new, latesthyphen=true, babelshorthands=true]{german}
\AtBeginDocument{\renewcommand{\chaptername}{}}% muss nach babel stehen!

\setotherlanguage{syriac}
\newfontscript{Syriac}{syrc}
%\newfontfamily\syriacfont[Script=Syriac, Scale=1.3]{Estrangelo Edessa}
%\newfontfamily\estrfont[Script=Syriac, Scale=1.3]{Estrangelo Talada}
\newcommand{\syr}[1]{\RL{\textsyriac{#1}}}
\newcommand{\estr}[1]{\RL{\estrfont{#1}}}
\setotherlanguage[variant=polytonic]{greek}
\newfontfamily{\greekfont}{Times New Roman}
\newfontscript{Syriac}{syrc}

\setotherlanguage{arabic}
\setmainfont{Amiri}
 
%-zusaetzliche Kommandos*
%\include{command}
\usepackage[autostyle=true,german=quotes]{csquotes}
%\usepackage[german=guillement]{csquotes} 
\usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} 
%uniquename=false lässt S.P. Brock in Fußnote zu Brock!
\addbibresource{biblio.bib}

%\DefineBibliographyStrings{ngerman}{ibidem = {ibid\adddot}} funktioniert nicht => ibid. bleibt
% Statt Hg. soll es Hrsg. heißen:
%\DefineBibliographyStrings{ngerman}{editor = {Hrsg.},editors = {Hgg.},} %funktioniert nicht

%\DeclareLanguageMapping{ngerman}{ngerman-apa}%funktioniert nicht

\setlength{\parindent}{2pt} % um Einzüge zu verhindern, soll nicht auf 0! Ganz
                            % schlechte Einstellung!!! Außerdem sollte man bei
                            % KOMA-Script \setparsizes verwenden!
%%%%%%%%%%%%%%%%%%%%\setlength{\bibitemsep}{18pt}  % Abstand zwischen den Literaturangaben
%%%%%%%%%%%%%%%%%%%%\setlength{\bibhang}{0.2cm}    % Einzug nach jeweils erster Zeile


%%%%%%%%%%%%%%%%%%%%%%%%%%%% damit erste Fußnote nicht kompl Seitenzahl hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewbibmacro*{postnote}{%
  \iftoggle{blx@unit}
    {}
    {\newunit}%
  \printfield{postnote}}

\renewbibmacro*{pages}{%
  \iffieldundef{pages}
    {\ifbool{bbx@inset}
       {}
       {\printfield{postnote}%
        \global\booltrue{suppresspostnote}}}
    {\printfield{pages}%
     \ifboolexpr{
       test {\iffieldundef{postnote}}
       or
       bool {bbx@inset}
     }
       {}
       {\setunit{\addspace}%
         \printtext[parens]{%
         % \iffieldpages{postnote}
            \bibstring{thiscite}%
             \setunit{\addspace}
          %  {}%
          \printfield{postnote}}}}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% von Purton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareFieldFormat{pages}{\mknormrange{#1}} 
\DeclareFieldFormat{pagepages}{\mknormrange[\mkpageprefix]{#1}} 
\DeclareFieldFormat{pagesin}{\mknormrange[\mkpageprefix]{#1} 
\usebibmacro{in}} 
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\usepackage{xpatch}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography option modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ExecuteBibliographyOptions[inlexicon]{% 
  skipbib=false, 
} 


%%%%%%%%%%%%%%%%%%%%%%%%
% Driver modifications %
%%%%%%%%%%%%%%%%%%%%%%%%

% New cite: book


\DeclareFieldFormat{pages}{\mknormrange{#1}} 
\DeclareFieldFormat{pagepages}{\mknormrange[\mkpageprefix]{#1}} 
\DeclareFieldFormat{pagesin}{\mknormrange[\mkpageprefix]{#1} 
\usebibmacro{in}} 
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\usepackage{xpatch}

\xpatchbibdriver{abbreviations}
  {\usebibmacro{bibentrycite}}
  {\usebibmacro{bibentrycite}%
   \renewcommand*{\finentrypunct}{\addperiod}}
  {}
  {}

\xpatchbibmacro{issue+date}
  {\addcolon\space}
  {\addcomma\space}
  {}
  {}

\xpatchbibmacro{editor+others}
  {\setunit{\addcomma\space}%
   \usebibmacro{editor+othersstrg}}
  {\setunit{\addspace}
   \printtext[parens]{\usebibmacro{editor+othersstrg}}}
  {}
  {}

\xpatchbibmacro{publisher+location+date}
  {\setunit*{\addcomma\space}%
   \usebibmacro{date}}
  {\setunit*{\addspace}%
   \usebibmacro{date}}
  {}
  {}

\xpatchbibmacro{institution+location+date}
  {\setunit*{\addcomma\space}%
   \usebibmacro{date}}
  {\setunit*{\addspace}%
   \usebibmacro{date}}
  {}
  {}
	
%%%%%%%%%%%%%%%%% setzen bei Wdh in Litverz.=> --: (Hrsg.): ..
%\renewcommand*{\bibnamedash}{%
%  \leavevmode\raise 0.6ex\hbox to 3em{\hrulefill}\addcolon\space}



\DeclareDelimFormat[incollection]{multinamedelim}{\slash\space}
\DeclareDelimFormat[incollection]{finalnamedelim}{\slash\space}
\DeclareDelimFormat*{nametitledelim}{\addcolon\space}
%%%%%%%%%% Schal


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Damit in Bibliographie überall Doppelpunkt nach Namen steht %%%%%%%%%%%%%%%%%%

\usepackage{xpatch}


% set up nametitledelim in different contexts
\DeclareDelimFormat[none,bib,biblist]{nametitledelim}{%
  \ifciteseen
    {\addcomma\space}
    {\addcolon\space}}

% also put colon after dash
\renewcommand*{\namedashpunct}{\addcolon\space}
\xpatchbibmacro{author}
  {\renewcommand*{\namedashpunct}{\adddot\space}}
  {\renewcommand*{\namedashpunct}{\addcolon\space}}
  {\message{Patching author': SuccessJ}}
  {\message{Patchingauthor': FailureJ}}

% patch citation drivers

\xpatchbibdriver{cite:article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:article': SuccessJ}}
  {\message{Patchingcite:article': FailureJ}}
\xpatchbibdriver{cite:book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:book': SuccessJ}}
  {\message{Patchingcite:book': FailureJ}}
\xpatchbibdriver{cite:suppbook}
  {\usebibmacro{author/editor+others/translator+others}%
   \newunit}
  {\usebibmacro{author/editor+others/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:suppbook': SuccessJ}}
  {\message{Patchingcite:suppbook': FailureJ}}
\xpatchbibdriver{cite:commentary}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:commentary': SuccessJ}}
  {\message{Patchingcite:commentary': FailureJ}}
\xpatchbibdriver{cite:incommentary}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:commentary': SuccessJ}}
  {\message{Patchingcite:commentary': FailureJ}}
\xpatchbibdriver{cite:incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:incollection': SuccessJ}}
  {\message{Patchingcite:incollection': FailureJ}}

\xpatchbibdriver{cite:inreference}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:inreference': SuccessJ}}
  {\message{Patchingcite:inreference': FailureJ}}
\xpatchbibdriver{cite:review}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:review': SuccessJ}}
  {\message{Patchingcite:review': FailureJ}}
\xpatchbibdriver{cite:thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:thesis': SuccessJ}}
  {\message{Patchingcite:thesis': FailureJ}}
\xpatchbibdriver{cite:misc}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:misc': SuccessJ}}
  {\message{Patchingcite:misc': FailureJ}}
\xpatchbibdriver{cite:conferencepaper}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:conferencepaper': SuccessJ}}
  {\message{Patchingcite:conferencepaper': FailureJ}}
\xpatchbibdriver{cite:periodical}
  {\usebibmacro{editor+others}%
   \newunit}
  {\usebibmacro{editor+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching cite:periodical': SuccessJ}}
  {\message{Patchingcite:periodical': FailureJ}}
\xpatchbibdriver{cite:patent}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching cite:patent': SuccessJ}}
  {\message{Patchingcite:patent': FailureJ}}

% patch bibliography drivers
\xpatchbibdriver{ancienttext}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching ancienttext': SuccessJ}}
  {\message{Patchingancienttext': FailureJ}}
\xpatchbibdriver{article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching article': SuccessJ}}
  {\message{Patchingarticle': FailureJ}}
\xpatchbibdriver{book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching book': SuccessJ}}
  {\message{Patchingbook': FailureJ}}
\xpatchbibdriver{suppbook}
  {\usebibmacro{author/editor+others/translator+others}%
   \newunit}
  {\usebibmacro{author/editor+others/translator+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching suppbook': SuccessJ}}
  {\message{Patchingsuppbook': FailureJ}}
\xpatchbibdriver{incommentary:short}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incommentary:short': SuccessJ}}
  {\message{Patchingincommentary:short': FailureJ}}
\xpatchbibdriver{incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incollection': SuccessJ}}
  {\message{Patchingincollection': FailureJ}}
\xpatchbibdriver{inreference:short}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching inreference:short': SuccessJ}}
  {\message{Patchinginreference:short': FailureJ}}
\xpatchbibdriver{review}
  {\usebibmacro{author/translator+others}%
   \newunit
   \iffieldundef{title}
     {\newunit}}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim{nametitledelim}}%
   \iffieldundef{title}
     {}}
  {\message{Patching review': SuccessJ}}
  {\message{Patchingreview': FailureJ}}
\xpatchbibdriver{thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching thesis': SuccessJ}}
  {\message{Patchingthesis': FailureJ}}
\xpatchbibdriver{misc}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching misc': SuccessJ}}
  {\message{Patchingmisc': FailureJ}}
\xpatchbibdriver{conferencepaper}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching conferencepaper': SuccessJ}}
  {\message{Patchingconferencepaper': FailureJ}}
\xpatchbibdriver{periodical}
  {\usebibmacro{editor+others}%
   \newunit}
  {\usebibmacro{editor+others}%
   \setunit{\printdelim{nametitledelim}}}
  {\message{Patching periodical': SuccessJ}}
  {\message{Patchingperiodical': FailureJ}}
\xpatchbibdriver{patent}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching patent': SuccessJ}}
  {\message{Patchingpatent': FailureJ}}
\xpatchbibdriver{cite:incollection}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim{nametitledelim}}%
   \usebibmacro{title}}
  {\message{Patching incollection': SuccessJ}}
  {\message{Patchingincollection': FailureJ}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\DefineBibliographyStrings{ngerman}{%
  editors = {Hgg\adddot}
}

\makeatletter
\let\blx@saved@delimcontext\blx@delimcontext
\newcommand*{\savedelimcontext}{\let\blx@saved@delimcontext\blx@delimcontext}
\newcommand*{\restoredelimcontext}{\let\blx@delimcontext\blx@saved@delimcontext}
\makeatother

\newbibmacro*{bookeditor}{%
  \savedelimcontext
  \delimcontext{incollection}%
  \ifnameundef{bookeditor}
    {\ifnameundef{editor}
       {}
       {\printnames[family-given]{editor}%
        \setunit{\addspace}%
        \printtext[parens]{\usebibmacro{editor+othersstrg}}%
        \clearname{editor}}}
    {\printnames[family-given]{bookeditor}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{editor+othersstrg}}%
     \clearname{bookeditor}}%
  \setunit*{\addcolon\space}%
  \restoredelimcontext}

\newbibmacro*{maineditor}{%
  \savedelimcontext
  \delimcontext{incollection}%
  \ifnameundef{maineditor}
    {\ifnameundef{editor}
       {}
       {\printnames[family-given]{editor}%
        \setunit{\addspace}%
        \printtext[parens]{\usebibmacro{editor+othersstrg}}%
        \clearname{editor}}}
    {\printnames[family-given]{maineditor}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{editor+othersstrg}}%
     \clearname{maineditor}}%
  \setunit*{\addcolon\space}%
  \restoredelimcontext}


% New cite:incollection, incollection,and inlexicon drivers

\makeatletter
\DeclareBibliographyDriver{cite:incollection}{%
  \ifentrytype{seminarpaper}
    {}
    {\toggletrue{inentrytype}}%
  \usebibmacro{citeindex}%
  \usebibmacro{begentry}%
  \iftoggle{blx@usefullcite}
    {}
    {\let\ifciteseen\@firstoftwo}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim[citecommand]{nametitledelim}}%
  \usebibmacro{title}%
  \ifciteseen
    {}
    {\usebibmacro{byauthor/byeditor+others/bytranslator+others}%
     \newunit
     \usebibmacro{in:}%
     \iffieldundef{booktitle}
       {}
       {\usebibmacro{bookeditor}%
        \setunit{\printdelim[citecommand]{nametitledelim}}%
        \usebibmacro{booktitle}%
        \newunit
        \usebibmacro{event+venue+date}%
        \newunit
        \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}%
        \newunit}%
     \usebibmacro{volume+partof}%
     \iffieldundef{maintitle}
       {}
       {\usebibmacro{maineditor}%
        \setunit{\printdelim[citecommand]{nametitledelim}}%
        \usebibmacro{maintitle}%
        \newunit
        \usebibmacro{event+venue+date}%
        \newunit
        \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}%
     \newunit
     \printfield{volumes}%
     \newunit
     \usebibmacro{shortseries+number}%
     \newunit
     \printfield{note}%
     \usebibmacro{parens+publisher+location+date}%
     \newunit
     \usebibmacro{ebook}%
     \newunit
     \printfield{addendum}%
     \newunit
     \usebibmacro{volume+part+pages}%
     \newunit
     \usebibmacro{isbn}%
     \newunit
     \usebibmacro{doi+eprint+url}}%
  \usebibmacro{finentry}}
\makeatother

\DeclareBibliographyDriver{incollection}{%
  \toggletrue{inentrytype}%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}%
  \usebibmacro{title}%
  \newunit
  \ifentrytype{classictext}
    {\usebibmacro{byauthor}%
     \newunit
     \usebibmacro{bytranslator+others}}
    {\usebibmacro{byauthor/byeditor+others/bytranslator+others}}%
  \setunit{\addcomma\space}%
  \usebibmacro{in:}%
  \iffieldundef{booktitle}
    {}
    {\usebibmacro{bookeditor}%
     \setunit{\printdelim{nametitledelim}}%
     \usebibmacro{booktitle}%
     \newunit
     \usebibmacro{event+venue+date}%
     \newunit
     \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}%
     \newunit}%
  \usebibmacro{volume+partof}%
  \iffieldundef{maintitle}
    {}
    {\usebibmacro{maineditor}%
     \setunit{\printdelim{nametitledelim}}%
     \usebibmacro{maintitle}%
     \newunit
     \usebibmacro{event+venue+date}%
     \newunit
     \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}%
  \newunit
  \printfield{edition}%
  \newunit
  \printfield{volumes}%
  \newunit
  \usebibmacro{shortseries+number}%
  \newunit
  \printfield{note}%
  \newunit
  \usebibmacro{publisher+location+date}%
  \newunit
  \usebibmacro{ebook}%
  \newunit
  \printfield{addendum}%
  \setunit{\addcomma\space}%
  \usebibmacro{volume+part+pages}%
  \newunit
  \usebibmacro{isbn}%
  \newunit
  \usebibmacro{doi+eprint+url}%
  \ifboolexpr{
    togl {relatedseen}
    or
    not togl {bbx:related}
  }
    {}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}%
  \usebibmacro{finentry}%
}

\DeclareBibliographyDriver{inlexicon}{% 
  \usebibmacro{begentry}% 
  \usebibmacro{author/translator+others}% 
  \newunit 
  \usebibmacro{title}% 
  \newunit 
  \printfield{note}% 
  \newunit 
  \usebibmacro{xrefshortmaintitle+xrefshortbooktitle}% 
  \newunit 
  \usebibmacro{volume+pages}% 
  \newunit 
  \printfield{addendum}% 
  \usebibmacro{finentry}% 
}

% Various driver patches
%   - use nametitledelim in cite:article and cite:book
%   - remove edition

\xpatchbibdriver{cite:article}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
\xpatchbibdriver{cite:book}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
	\xpatchbibdriver{cite:review}
  {\usebibmacro{author/translator+others}%
   \newunit}
  {\usebibmacro{author/translator+others}%
   \setunit{\printdelim[citecommand]{nametitledelim}}}
  {}
  {}
\xpatchbibdriver{cite:thesis}
  {\newunit
   \usebibmacro{title}}
  {\setunit{\printdelim[citecommand]{nametitledelim}}%
   \usebibmacro{title}}
  {}
  {}
\xpatchbibdriver{cite:book}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{cite:commentary}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{cite:suppbook}
  {\newunit\printfield{edition}}
  {}{}{}
\xpatchbibdriver{book}
  {\newunit\printfield{edition}}
  {}{}{}
  \xpatchbibdriver{suppbook}
  {\newunit\printfield{edition}}
  {}{}{}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Punctuation and delimiter modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand*{\subtitlepunct}{\addperiod\space} % Punkt zw Titel und Subtitel in Bibliogr.
\renewcommand*{\sqspace}{} % kein Abstand bei Seitenzahl mit "f." 

\DeclareDelimFormat{multinamedelim}{\addslash\space} 
\DeclareDelimAlias{finalnamedelim}{multinamedelim} 
\DeclareDelimFormat[citecommand]{nametitledelim}{%
  \ifciteseen
    {\addcomma\space}
    {\addcolon\space}}

% Change reprint beginning punctuation to a space
\newcommand*{\begrelateddelimreprint}{\addspace}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Field format modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareFieldFormat*{citetitle}{#1}
\DeclareFieldFormat[book]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat[thesis]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat[review]{title}{#1} % Buchtitel nur normal - ohne Formatierung
\DeclareFieldFormat*{journaltitle}{#1}
\DeclareFieldFormat*{maintitle}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat{shorttitle}{#1} 
\DeclareFieldFormat{shortbooktitle}{#1} 
\DeclareFieldFormat{shortmaintitle}{#1} 
\DeclareFieldFormat{edition}{\textsuperscript{#1}}

% put reprint information in parentheses
\DeclareFieldFormat{related:reprint}{\mkbibparens{#1}}

\DeclareNameAlias{sortname}{family-given} % vorher last-first in Klammern
\DeclareNameAlias{author}{sortname}
\DeclareNameAlias{editor}{sortname}
\DeclareNameAlias{translator}{sortname}

\renewcommand*{\mkbibnamefamily}{\textsc} 
\renewcommand*{\mkbibnameprefix}{\textsc} 
\renewcommand*{\mkbibnamegiven}{\textsc} 
\renewcommand*{\mkbibnamesuffix}{\textsc} 


%%%%%%%%%%%%%%%%%%%%%%%%
% String modifications %
%%%%%%%%%%%%%%%%%%%%%%%%

\DefineBibliographyStrings{german}{%
  editors = {Hgg\adddot}, 
  reprint = {ND:},
}


%%%%%%%%%%%%%%%%%%%%%%%%%%
% bibmacro modifications %
%%%%%%%%%%%%%%%%%%%%%%%%%%


\renewbibmacro*{date}{%
  \printfield{edition}%
  \printdate
  \setunit{\addcomma\addspace}%
  \printfield{pubstate}}

% Set \newunitpunct to comma and remove parentheses around publication info
\renewbibmacro*{related:reprint}[1]{%
  \entrydata*{#1}{%
    \usedriver
      {\renewbibmacro*{related:init}{}%
       \renewcommand*{\newunitpunct}{\addcomma\space}%
       \renewbibmacro*{parens+publisher+location+date}{%
         \newunit
         \usebibmacro{publisher+location+date}}}
      {\ifbibliography
         {\thefield{entrytype}}
         {cite:\thefield{entrytype}}}}}

% use family, given and change \newunitpunct to a point just for related
% entries (I have serious misgivings about this as it seems very
% inconsistent.)
\xpretobibmacro{cite}
  {\iffieldequalstr{relatedtype}{reprint}
     {\DeclareNameAlias{default}{family-given}%
      \renewcommand*{\newunitpunct}{\addperiod\space}}
     {}}
  {}
  {}

\renewbibmacro*{parens+publisher+location+date}{% 
  \newunit
  \usebibmacro{publisher+location+date}% 
  \iffieldequalstr{relatedtype}{reprint} 
    {\renewcommand*{\newunitpunct}{\addsemicolon\space}% 
     \newunit 
     \usebibmacro{related:init}% 
     \usebibmacro{related}% 
     \global\toggletrue{relatedseen}} 
    {}} 

\renewbibmacro*{origpublisher+location+date}{% 
  \printlist{origlocation}% 
  \setunit*{\addspace}% 
  \usebibmacro{origdate}% 
  \newunit} 

\newbibmacro*{real+publisher+location+date}{% 
  \printlist{location}% 
  \iffieldundef{howpublished} 
    {} 
    {\setunit*{\addcolon\space}% 
     \printfield{howpublished}}% 
  \setunit*{\addspace}% 
  \usebibmacro{date}% 
  \newunit} 

\renewbibmacro*{publisher+location+date}{% 
  \ifboolexpr{ 
    not test {\iffieldundef{origpublisher}} 
    or 
    not test {\iffieldundef{origlocation}} 
    or 
    not test {\iffieldundef{origyear}} 
  } 
    {\usebibmacro{origpublisher+location+date}% 
     \setunit{\addspace}% 
     \printtext[parens]{% 
       \bibstring{reprint}% 
       \setunit{\addspace}% 
       \usebibmacro{real+publisher+location+date}}} 
    {\usebibmacro{real+publisher+location+date}}} 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\defbibheading{head}[\refname]{\chapter{Literaturverzeichnis}} %Um eine neue
% Überschrift in Bibliographie zu erstellen
% Braucht es bei KOMA-Script eigentlich nicht. Einfach Option
% bibliography=numbered verwenden.

\interfootnotelinepenalty=9999 % damit Fußn auf einer seite


%--------------------------------------------------------------------------- 
% abstract 
%--------------------------------------------------------------------------- 
\addto\captionsgerman{% 
 \renewcommand{\abstractname}{Abstract}} 
\newcommand\abstractname{Abstract} %%% here 
\makeatletter 
\if@titlepage 
  \newenvironment{abstract}{% 
      \titlepage 
      \null\vfil 
      \@beginparpenalty\@lowpenalty 
      \begin{center}% 
        \bfseries \abstractname 
       \@endparpenalty\@M 
      \end{center}}% 
     {\par\vfil\null\endtitlepage} 
\else 
  \newenvironment{abstract}{% 
      \if@twocolumn 
        \section*{\abstractname}% 
    german  \else 
       \small 
       \begin{center}% 
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% 
        \end{center}% 
        \quotation 
      \fi} 
      {\if@twocolumn\else\endquotation\fi} 
\fi 
\makeatother 


\makeatletter 
\let\abx@MakeMarkcase\@gobble 
\makeatother

%\usepackage{ulem}
%\setdefaultenum{1.)}{a)}{aa)}
%\usepackage{bigfoot}% Das Laden dieses Paketes provoziert derzeit eine
%Fehlermeldung in nccfoot.sty, weil \Footnote bereits definiert ist. Daher
%auskommentiert.


\begin{document}
\listoffigures
\part{Erster Teil des Buches}
%%%%%%%%%%%%%%
\label{ErsterTeil}
%%%%%%%%%%%%%%%%

\pagenumbering{roman}% Wenn das Vorderteil des Buches römisch nummeriert
                     % werden soll, so ist die Umschaltung zu spät. Sie gehört
                     % dann bereits vor den Titel!
\pagestyle{empty} 


\newpage

\section*{Vorwort}\label{ch:ix}% Da das ein Kapitel ist, sollte hier
                               % natürlich \chapter* statt \section* verwendet
                               % werden.



%RS fehlt beim paragraph abk!


\section*{Karten}\label{ch:K}% Das das ein Kapitel ist, sollte hier
                             % natürlich \chapter* statt \section* verwendet
                             % werden.

\begin{figure}[H]
  \centering
  \caption[Der ]{Der\protect\footnotemark}
	\label{fig:example1}
\end{figure}
%\footnotetext{Karte entnommen aus: \cite{King.2018}, xxxiv.}


\begin{figure}[H]
  \centering
  \caption[O]{O\protect\footnotemark}
  \label{fig:example2}
\end{figure}
%\footnotetext{Karte entnommen aus: \cite{King.2018}, xlii.}
%vorwort
%\include{preface}

%bibliographie

% Seite I. Teil
\part{Zweiter Teil} %Befel thispagestyle meint: keine Seitenzahl nur auf dieser Seite!
\label{ErsterTeil}
% Seitennummerierung im Hauptteil
\pagenumbering{arabic}
%\newpagestyle{main}{%
%   \sethead[\thepage][][\chaptername\ \thechapter]{\thesection}{}{\thepage}
   %\headrule
%}
%\pagestyle{main} %Für Kopfzeile mit linie

\chapter{Einführung}
\section{Blindtext 1}
\blindtext\label{BT_1} 
\section{Weitere Texte}

HIER BEGINNT DER NEUE TEXT, siehe \ref{ErsterTeil}.\ref{Test}.\\ 
Was bereits in Blindtext 1 in Abschnitt \ref{BT_1} ausgeführt, wollen wir in Blindtext 2 in Abschnitt \ref{BT_2} weiter vertiefen.

Der Querverweis müsste richtig heißen:
Was bereits in Blindtext 1 in Abschnitt \ref{BT_1} ausgeführt, wollen wir in Blindtext 2 in Abschnitt II-1.1 weiter vertiefen.

\section{Texte NEU}

HIER BEGINNT DER NEUE TEXT\label{Test}.

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example1}
\end{figure}

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example2}
\end{figure}



\part{Zweiter Teil des Buches}% Das ist jetzt eigentlich schon der dritte Teil
\chapter{Ausführungen}
\section{Blindtext 2}
\blindtext\label{BT_2}
\section{Weitere Texte}
In Blindtext 1 (siehe Abschnitt \ref{BT_1}) wurde bereits ausgeführt \dots

Auch hier muss die römische Ziffer des Buchteils mitgeführt werden, wenn auf einen anderen Buchteil verwiesen wird.

\begin{figure}
  \centering

  \caption[Zeit]{Zeit}
	\label{fig:example3}
\end{figure}

\end{document}

aasaa00
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 99
Registriert: Do 1. Mär 2018, 11:43

Re: Part-übergreifende Querverweise

Beitrag von aasaa00 »

Danke wiederum für die Mühe. In LuaLaTeX werden mir die syrischen (nicht mit Arabisch zu verwechseln!) Buchstaben nicht korrekt angezeigt - in XeLaTeX schon. Babel ist für diese Sprache auch (noch) nicht geeignet. Gibt es keine Möglichkeit auf der Basis von der überarbeiteten Version von @Stefan Kottwitz, also auf Basis von xelatex, zusammen mit polyglossia und den genannten Sprachen die Part-Überschriften in LoT und LoF zu setzen? Ich verstehe als Nicht-Fachmann noch nicht ganz, warum die Sprachoption soviel Einfluss auf LoT und LoF hat und warum man es nicht eingrenzen kann?


Antworten