summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/incgraph/incgraph-doc.sty
blob: 761af119d36c306032e878d1127870eab3761d4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
% \LaTeX-Main\
% !TeX encoding=UTF-8
%% The LaTeX package incgraph - version 1.3.0 (2024/03/14)
%% incgraph.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2012-2024 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.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `author-maintained'.
%%
%% This work consists of all files listed in README
%%
\def\version{1.3.0}%
\def\datum{2024/03/14}%

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

\RequirePackage[T1]{fontenc}
\RequirePackage[english]{babel}
\RequirePackage{lmodern,parskip,array,makeidx}
\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[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.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