Debian Codegraph @

texmf-dist/doc/latex/incgraph/incgraph.doc.sty

raw
1 % !TeX root=incgraph.tex
2 % !TeX encoding=UTF-8
3 %% The LaTeX package incgraph - version 1.4.0 (2026/03/04)
4 %% incgraph.doc.sty: style file for the documentation
5 %%
6 %% -------------------------------------------------------------------------------------------
7 %% Copyright (c) 2012-2026 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
8 %% -------------------------------------------------------------------------------------------
9 %%
10 %% This work may be distributed and/or modified under the
11 %% conditions of the LaTeX Project Public License, either version 1.3
12 %% of this license or (at your option) any later version.
13 %% The latest version of this license is in
14 %% http://www.latex-project.org/lppl.txt
15 %% and version 1.3c or later is part of all distributions of LaTeX
16 %% version 2008 or later.
17 %%
18 %% This work has the LPPL maintenance status `author-maintained'.
19 %%
20 %% This work consists of all files listed in README.md
21 %%
22 \def\version{1.4.0}%
23 \def\datum{2026/03/04}%
24
25 \IfFileExists{incgraph.doc.cfg}{\input{incgraph.doc.cfg}}{}\providecommand\igrpkgprefix{}
26
27 \RequirePackage[T1]{fontenc}
28 \RequirePackage[english]{babel}
29 \RequirePackage{lmodern,parskip,array,makeidx}
30 \RequirePackage{microtype}
31 \microtypesetup{nopatch=footnote}
32 \RequirePackage{amsmath,amssymb}
33 \RequirePackage[svgnames,table]{xcolor}
34 \RequirePackage{tikz}
35
36 \RequirePackage[bookmarks,raiselinks,pageanchor,hyperindex,colorlinks]{hyperref}
37 \urlstyle{sf}
38 \RequirePackage{cleveref}
39
40 \RequirePackage[a4paper,left=2.5cm,right=2.5cm,top=1.5cm,bottom=1.5cm,
41 marginparsep=3mm,marginparwidth=18mm,
42 headheight=0mm,headsep=0cm,
43 footskip=1.5cm,includeheadfoot]{geometry}
44 \RequirePackage{fancyhdr}
45 \fancyhf{}
46 \fancyfoot[C]{\thepage}%
47 \renewcommand{\headrulewidth}{0pt}
48 \renewcommand{\footrulewidth}{0pt}
49 \pagestyle{fancy}
50 \tolerance=2000%
51 \setlength{\emergencystretch}{20pt}%
52
53 \RequirePackage{minted2}% minted currently broken with Python 3.14
54 \RequirePackage[many,minted,documentation]{tcolorbox}
55 \RequirePackage{csquotes}
56 \RequirePackage[style=numeric-comp,sorting=nyt,
57 maxnames=8,minnames=8,abbreviate=false,backend=biber]{biblatex}
58 \DeclareFieldFormat{url}{\newline\url{#1}}%
59 \DeclareListFormat{language}{}%
60 \setlength{\bibitemsep}{\smallskipamount}
61 \addbibresource{\jobname.doc.bib}
62
63 \tcbset{skin=enhanced,
64 doc head={colback=yellow!10!white,interior style=fill},
65 doc head key={colback=magenta!5!white,interior style=fill},
66 color key=DarkViolet,
67 color value=Teal,
68 color color=Teal,
69 color counter=Orange!85!black,
70 color length=Orange!85!black,
71 index colorize,
72 index annotate,
73 beforeafter example/.style={
74 before skip=4pt plus 2pt minus 1pt,
75 after skip=8pt plus 4pt minus 2pt
76 },
77 }
78 \renewcommand*{\tcbdocnew}[1]{\textcolor{green!50!black}{\sffamily\bfseries N} #1}
79 \renewcommand*{\tcbdocupdated}[1]{\textcolor{blue!75!black}{\sffamily\bfseries U} #1}
80
81 \RequirePackage{\igrpkgprefix incgraph}
82
83 \hypersetup{
84 pdftitle={Manual for the incgraph package},
85 pdfauthor={Thomas F. Sturm},
86 pdfsubject={graphics inclusion},
87 pdfkeywords={graphics inclusion page}
88 }
89
90 \RequirePackage{tikz,multicol}
91
92 \tcbset{
93 docexample/.style={bicolor,
94 beforeafter example,
95 fonttitle=\bfseries,
96 fontlower=\footnotesize,
97 colframe=Navy!50!ExampleFrame,
98 colback=Navy!5!ExampleBack!50!white,
99 colbacklower=ExampleBack!5!white,
100 drop fuzzy shadow,
101 listing engine=minted,
102 documentation minted style=colorful,
103 documentation minted options={fontsize=\footnotesize},
104 },
105 example/.style={
106 docexample,
107 listing only,
108 before title={\hypersetup{linkcolor=white}},
109 },
110 }
111
112 \newcommand{\formatPackageOption}[1]{package option}
113 \newcommand{\formatPackageOptions}[1]{Package options}
114
115 \tcbmakedocSubKey{docIgrKey}{igr}
116 \tcbmakedocSubKeys{docIgrKeys}{igr}
117 \tcbmakedocSubKeys[doc key prefix=,
118 index key formatter=\formatPackageOption,
119 index keys formatter=\formatPackageOptions
120 ]{docPackageOptions}{}
121
122 \newcounter{texexp}
123
124 \newtcblisting[use counter=texexp]{texexptitled}[3][]{%
125 example,
126 title={Example~\thetcbcounter: #2},
127 listing file={\jobname.\thetcbcounter.listing},
128 label={#3},#1
129 }
130
131 \newtcbinputlisting[use counter from=texexptitled]{\inputexamplelisting}[3][]{
132 example,
133 title={Example~\thetcbcounter: \texttt{#2}},
134 listing file={#2},
135 label={#3},#1
136 }
137
138 \newcommand{\inputlisting}[1]{\input{\jobname.#1.listing}}
139 \newcommand{\inputlastlisting}{\inputlisting{\thetexexp}}
140
141 \def\tikzname{Ti\emph{k}Z}
142
143 \makeindex
144
145 \ExplSyntaxOn
146 \sys_if_engine_pdftex:T
147 {
148 \pdfsuppresswarningpagegroup=1
149 }
150 \ExplSyntaxOff