% !TeX root=incgraph.tex
% !TeX encoding=UTF-8
%% The LaTeX package incgraph - version 1.4.0 (2026/03/04)
%% incgraph.doc.sty: style file for the documentation
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2012-2026 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008 or later.
%%
%% This work has the LPPL maintenance status `author-maintained'.
%%
%% This work consists of all files listed in README.md
%%
\def\version{1.4.0}%
\def\datum{2026/03/04}%

\IfFileExists{incgraph.doc.cfg}{\input{incgraph.doc.cfg}}{}\providecommand\igrpkgprefix{}

\RequirePackage[T1]{fontenc}
\RequirePackage[english]{babel}
\RequirePackage{lmodern,parskip,array,makeidx}
\RequirePackage{microtype}
\microtypesetup{nopatch=footnote}
\RequirePackage{amsmath,amssymb}
\RequirePackage[svgnames,table]{xcolor}
\RequirePackage{tikz}

\RequirePackage[bookmarks,raiselinks,pageanchor,hyperindex,colorlinks]{hyperref}
\urlstyle{sf}
\RequirePackage{cleveref}

\RequirePackage[a4paper,left=2.5cm,right=2.5cm,top=1.5cm,bottom=1.5cm,
    marginparsep=3mm,marginparwidth=18mm,
    headheight=0mm,headsep=0cm,
    footskip=1.5cm,includeheadfoot]{geometry}
\RequirePackage{fancyhdr}
\fancyhf{}
\fancyfoot[C]{\thepage}%
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy}
\tolerance=2000%
\setlength{\emergencystretch}{20pt}%

\RequirePackage{minted2}% minted currently broken with Python 3.14
\RequirePackage[many,minted,documentation]{tcolorbox}
\RequirePackage{csquotes}
\RequirePackage[style=numeric-comp,sorting=nyt,
  maxnames=8,minnames=8,abbreviate=false,backend=biber]{biblatex}
\DeclareFieldFormat{url}{\newline\url{#1}}%
\DeclareListFormat{language}{}%
\setlength{\bibitemsep}{\smallskipamount}
\addbibresource{\jobname.doc.bib}

\tcbset{skin=enhanced,
  doc head={colback=yellow!10!white,interior style=fill},
  doc head key={colback=magenta!5!white,interior style=fill},
  color key=DarkViolet,
  color value=Teal,
  color color=Teal,
  color counter=Orange!85!black,
  color length=Orange!85!black,
  index colorize,
  index annotate,
  beforeafter example/.style={
    before skip=4pt plus 2pt minus 1pt,
    after skip=8pt plus 4pt minus 2pt
  },
}
\renewcommand*{\tcbdocnew}[1]{\textcolor{green!50!black}{\sffamily\bfseries N} #1}
\renewcommand*{\tcbdocupdated}[1]{\textcolor{blue!75!black}{\sffamily\bfseries U} #1}

\RequirePackage{\igrpkgprefix incgraph}

\hypersetup{
  pdftitle={Manual for the incgraph package},
  pdfauthor={Thomas F. Sturm},
  pdfsubject={graphics inclusion},
  pdfkeywords={graphics inclusion page}
}

\RequirePackage{tikz,multicol}

\tcbset{
  docexample/.style={bicolor,
    beforeafter example,
    fonttitle=\bfseries,
    fontlower=\footnotesize,
    colframe=Navy!50!ExampleFrame,
    colback=Navy!5!ExampleBack!50!white,
    colbacklower=ExampleBack!5!white,
    drop fuzzy shadow,
    listing engine=minted,
    documentation minted style=colorful,
    documentation minted options={fontsize=\footnotesize},
    },
  example/.style={
    docexample,
    listing only,
    before title={\hypersetup{linkcolor=white}},
  },
}

\newcommand{\formatPackageOption}[1]{package option}
\newcommand{\formatPackageOptions}[1]{Package options}

\tcbmakedocSubKey{docIgrKey}{igr}
\tcbmakedocSubKeys{docIgrKeys}{igr}
\tcbmakedocSubKeys[doc key prefix=,
    index key formatter=\formatPackageOption,
    index keys formatter=\formatPackageOptions
]{docPackageOptions}{}

\newcounter{texexp}

\newtcblisting[use counter=texexp]{texexptitled}[3][]{%
  example,
  title={Example~\thetcbcounter: #2},
  listing file={\jobname.\thetcbcounter.listing},
  label={#3},#1
}

\newtcbinputlisting[use counter from=texexptitled]{\inputexamplelisting}[3][]{
  example,
  title={Example~\thetcbcounter: \texttt{#2}},
  listing file={#2},
  label={#3},#1
}

\newcommand{\inputlisting}[1]{\input{\jobname.#1.listing}}
\newcommand{\inputlastlisting}{\inputlisting{\thetexexp}}

\def\tikzname{Ti\emph{k}Z}

\makeindex

\ExplSyntaxOn
\sys_if_engine_pdftex:T
  {
    \pdfsuppresswarningpagegroup=1
  }
\ExplSyntaxOff
