Debian Codegraph @

texmf-dist/source/latex/caption/captiondoc.cls

raw
1 %%
2 %% This is file `captiondoc.cls',
3 %% a common document class for all caption package bundle documentations.
4 %%
5 %% There is no need to distribute this file in tex/latex/caption since
6 %% it's of no use for the end-user, it's only needed to compile the package
7 %% documentations.
8 %%
9 %% Copyright (C) 2023 Axel Sommerfeldt ([email protected])
10 %%
11 %% https://gitlab.com/axelsommerfeldt/caption
12 %%
13 %% --------------------------------------------------------------------------
14 %%
15 %% This work may be distributed and/or modified under the
16 %% conditions of the LaTeX Project Public License, either version 1.3
17 %% of this license or (at your option) any later version.
18 %% The latest version of this license is in
19 %% http://www.latex-project.org/lppl.txt
20 %% and version 1.3 or later is part of all distributions of LaTeX
21 %% version 2003/12/01 or later.
22 %%
23 %% This work has the LPPL maintenance status "maintained".
24 %%
25 %% This Current Maintainer of this work is Axel Sommerfeldt.
26 %%
27 %% This work consists of the files
28 %% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
29 %% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
30 %% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
31 %% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
32 %% the derived files
33 %% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
34 %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
35 %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
36 %% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
37
38 \NeedsTeXFormat{LaTeX2e}
39 \ProvidesClass{captiondoc}[2022/12/27 Document class used by caption documentation]
40
41 \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
42
43 \PassOptionsToPackage{breaklinks=true}{hyperref}
44
45 \LoadClassWithOptions{ltxdoc}
46 \setlength\parindent{0pt}
47 \setlength\parskip{\smallskipamount}
48 \addtolength\marginparwidth{15pt}
49 \setlength\leftmargini{2em}% default = 2.5em
50
51 \renewcommand\partname{Part}
52
53 \RequirePackage{ifpdf}
54 \ifpdf
55 \RequirePackage{mathptmx,courier}
56 \RequirePackage[scaled=0.90]{helvet}
57 \fi
58
59 \RequirePackage{hypdoc}
60 \ifpdf\RequirePackage{hypdestopt}\fi
61 \hypersetup{pdfstartpage={},pdfstartview={}}
62 \hypersetup{breaklinks=true}
63 \let\subsectionautorefname\sectionautorefname
64 \let\subsubsectionautorefname\sectionautorefname
65
66 \DeclareRobustCommand*\eTeX{\leavevmode\hbox{$\varepsilon$}-\TeX}
67
68 \DeclareRobustCommand*\AmS{\texorpdfstring
69 {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}%
70 {AMS}}
71 \DeclareRobustCommand*\KOMAScript{\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}
72 \DeclareRobustCommand*\NTG{NTG}
73 \DeclareRobustCommand*\SmF{SMF}
74
75 \newcommand*\NEWfeature{\NEW{New feature}}
76 \newcommand*\NEWdescription{\NEW{New description}}
77 \newcommand*\NEW[1]{\@ifstar{\@NEW{#1}{\vskip2pt}}{\@NEW{#1}{}}}
78 \newcommand*\@NEW[3]{\MARGINSYM{#2\footnotesize#1\\#3}}
79 \newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}}
80
81 \newcommand*\LineBreak{\linebreak[3]}
82 \newcommand*\PageBreak{\pagebreak[3]}
83
84 \newcommand*\longref{\@ifstar{\@longref\ref}{\@longref\autoref}}
85 \newcommand*\Longref{\@ifstar{\@longref\Ref}{\@longref\Autoref}}
86 \def\@longref#1#2{#1{#2}: \textit{\nameref{#2}}}
87
88 \newcommand*\See[1]{\nopagebreak{\small (See #1)}}
89
90 \newenvironment{Options}[1]%
91 {\list{}{\renewcommand\makelabel[1]{\texttt{##1}\hfil}%
92 \settowidth\labelwidth{\texttt{#1\space}}%
93 \setlength\leftmargin{10pt}%
94 \addtolength\leftmargin{\labelwidth}%
95 \addtolength\leftmargin{\labelsep}}}%
96 {\endlist}
97
98 \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
99 \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
100 \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
101 \let\cls\puresf \let\pkg\puresf
102 \let\env\purett \let\opt\purett
103
104 \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
105 \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
106 \newcommand*\issue[2][GitLab]{#1 issue~\##2}
107 \newcommand*\version[2][]{v$#2$}
108 \newcommand*\changenote[1]{}
109
110 \RequirePackage{marvosym}
111 \newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}}
112 \newcommand*\@INFO[1]{\MARGINSYM{#1{\LARGE\Info}}}
113
114 \RequirePackage[alpine]{ifsym}
115 \newenvironment{background}{\par\bigskip\csname background*\endcsname}{\csname endbackground*\endcsname}
116 \newenvironment{background*}{\small\MARGINSYM{\Mountain}\ignorespaces}{\par}
117
118 \RequirePackage[bottom]{footmisc}
119
120 \endinput
121