Debian Codegraph @

texmf-dist/doc/latex/xskak/UF-xskak-documentation.sty

raw
1 \ProvidesFile{UF-xskak-documentation.sty}[2008/01/09 local style for documentations]
2 \DeclareOption{codemargin}{\AtEndOfPackage{%
3 \advance\oddsidemargin by 0.5in\relax
4 \advance\marginparwidth by 1in\relax}}
5 \ProcessOptions
6 \newcommand\filetype[1] {\upshape\texttt{#1}} %e.g. \filetype{.pdf}
7 \newcommand\programm[1] {\upshape\textsf{#1}} %e.g. \programm{afm2tfm}
8 \newcommand\chessfontname[1]{\upshape\textsf{#1}} %e.g. chessfontname{maya}
9 \newcommand\konzept[1] {\upshape\textsf{#1}} %e.g. \konzept{nfss}
10 \newcommand\packagename[1] {\upshape\textsf{#1}}
11
12 \newcommand\skaksty{the package \packagename{skak}\xspace}
13 \newcommand\Skaksty{The package \packagename{skak}\xspace}
14
15 \newcommand\xskak{the package \packagename{xskak}\xspace}
16 \newcommand\Xskak{The package \packagename{xskak}\xspace}
17
18 \newcommand\chessfss{the package \packagename{chessfss}\xspace}
19 \newcommand\Chessfss{The package \packagename{chessfss}\xspace}
20
21 \newcommand\pchessboard{the package \packagename{chessboard}\xspace}
22 \newcommand\Pchessboard{The package \packagename{chessboard}\xspace}
23
24
25 \newcommand\mynobreakpar{\par\nobreak\@afterheading}
26 \newcommand\key[1]{\texttt{#1}}
27 \newcommand\obsoletekey[1]{\key{#1}\index{#1 (obsolete)}}
28 \providecommand\gobble[1]{}
29 \newcommand\keyoarg{\oarg{key=value list}}
30 \newcommand\keymarg{\marg{key=value list}}
31 \newcommand\keylist{\textit{key=value list}\xspace}
32 \newcommand\keylists{\textit{key=value lists}\xspace}
33 \newcommand\keyvalue{\textit{key=value}\xspace}
34
35 \AtBeginDocument{%
36 \renewcommand*\lstlistlistingname{Examples}
37 \renewcommand*\lstlistingname{Example}
38 }
39
40 %
41 \setcounter{secnumdepth}{4}
42 \renewcommand{\theparagraph}{\alph{paragraph})}
43
44
45 %% standard needed packages
46 \RequirePackage[english]{babel}
47 \RequirePackage{microtype}
48
49 \RequirePackage{array}
50 \RequirePackage{booktabs}
51 \RequirePackage{xspace}
52 \RequirePackage{ifluatex}
53
54 %% fonts
55 \ifluatex
56 \else
57 \RequirePackage[scaled=0.85]{luximono}
58 \RequirePackage{fourier}
59 \RequirePackage[scaled=0.86]{helvet}
60 \fi
61 %\addtokomafont{sectioning}{\rmfamily}
62 \renewcommand*\descfont{\rmfamily\bfseries}
63
64 %% colors
65 \RequirePackage{xcolor}
66 \colorlet{hellgelb}{yellow!15}
67
68
69 % Quotes
70 \RequirePackage[babel]{csquotes}
71 \MakeAutoQuote {«}{»}
72
73
74 %% index
75 \RequirePackage{makeidx}
76 \makeindex % number of columns set after doc
77
78 \begin{filecontents}{\jobname.mst}
79 actual '='
80 quote '!'
81 level '>'
82 preamble
83 "\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n"
84 postamble
85 "\n\n \\end{theindex}\n"
86 item_x1 "\\efill \n \\subitem "
87 item_x2 "\\efill \n \\subsubitem "
88 delim_0 "\\pfill "
89 delim_1 "\\pfill "
90 delim_2 "\\pfill "
91 % The next lines will produce some warnings when
92 % running Makeindex as they try to cover two different
93 % versions of the program:
94 lethead_prefix "{\\bfseries\\hfil "
95 lethead_suffix "\\hfil}\\nopagebreak\n"
96 lethead_flag 1
97 heading_prefix "{\\bfseries\\hfil "
98 heading_suffix "\\hfil}\\nopagebreak\n"
99 headings_flag 1
100 %%
101 %%
102 \end{filecontents}
103
104
105 %% codes and examples
106 \begin{filecontents}{UFlstlocal.cfg}
107 \ProvidesFile{UFlstlocal.cfg}[2005/07/01 lokale Listingsdefinitionen (UF)]
108
109 \RequirePackage{xcolor}
110
111
112 \colorlet{UFkeyscolor}{black}
113 \colorlet{UFidentifiercolor}{black}
114 \colorlet{UFcommentscolor}{red}
115 \colorlet{UFstringcolor}{green!50}
116 \colorlet{UFbackgroundcolor}{yellow!10}
117
118 \lstdefinestyle{inline}{%
119 basicstyle=\ttfamily,
120 keywordstyle={}}
121
122
123 \lstdefinestyle{UFdocu}{% mehr oder weniger kopiert aus showexpl.cfg
124 language=[LaTeX]TeX,%
125 float=hbp,%
126 basicstyle=\ttfamily,%
127 identifierstyle=\color{UFidentifiercolor},%
128 keywordstyle=\color{UFkeyscolor},%
129 stringstyle=\color{UFstringcolor},%
130 commentstyle=\itshape,%
131 columns=flexible,%
132 tabsize=4,%
133 frame=single,%
134 extendedchars=true,%
135 showspaces=false,%
136 showstringspaces=false,%
137 numbers=none,%
138 %numberstyle=\tiny\ttfamily,%
139 breaklines=true,%
140 breakindent=10pt,%
141 backgroundcolor=\color{UFbackgroundcolor},%
142 breakautoindent=true,%
143 captionpos=t,%
144 xleftmargin=1em,%
145 xrightmargin=\fboxsep,%
146 %numbersep=1em,%
147 breakatwhitespace=true,
148 preset=\raggedright\setlength{\parskip}{1ex},%
149 explpreset={numbers=none, basicstyle=\footnotesize\ttfamily},% ueberschreibt default
150 rframe={},% code ist im Rahmen
151 varwidth=true,% Breite des Beispiels
152 pos=o,
153 overhang=4em,%
154 literate={ü}{{\"u}}1{ö}{{\"o}}1{ä}{{\"a}}1
155 }
156
157 \lstdefinestyle{inline}{%
158 basicstyle=\ttfamily,
159 keywordstyle={}}
160
161 \newcommand\mylstinline{\lstinline[style=inline]}
162
163 \endinput
164 %%
165 %% End of file `UFlstlocal.cfg'.
166 \end{filecontents}
167
168 \RequirePackage[final]{showexpl}
169 \input{UFlstlocal.cfg}
170 \lstset{style=UFdocu}
171
172 \newcommand\UFleftexamples{%
173 \let\OriisSX@odd\isSX@odd
174 \renewcommand*{\isSX@odd}[2]{##2}}
175
176 \UFleftexamples
177
178 \RequirePackage{doc}
179 \def\meta@font@select{\rmfamily\itshape}
180 \c@IndexColumns = 2
181 \renewcommand\MacroFont{\scriptsize\ttfamily}
182 \renewcommand\encapchar{ -- }
183 % from ltxdoc.sty
184 \DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
185 \providecommand\marg[1]{%
186 {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
187 \providecommand\oarg[1]{%
188 {\ttfamily[}\meta{#1}{\ttfamily]}}
189 \providecommand\parg[1]{%
190 {\ttfamily(}\meta{#1}{\ttfamily)}}
191
192
193 %% pagestyle and layout
194 \providecommand\UFcurrentpackage{unknown}
195 \providecommand\UFcurrentversion{version unknown}
196
197 \reversemarginpar
198
199 \RequirePackage{fancyhdr}
200 \pagestyle{fancy}
201
202 \renewcommand\headrulewidth{0pt}
203 \fancyhf{}
204 \cfoot{\thepage}
205 \lfoot{\today}
206 \rfoot{\packagename{\UFcurrentpackage} \UFcurrentversion}
207
208
209 %% captions
210 \RequirePackage[tableposition=top]{caption}
211 \captionsetup{singlelinecheck=false,format=hang,belowskip=1em}
212
213
214
215 %% pdf-goodies:
216 \RequirePackage{animate}
217 \RequirePackage[colorlinks=true, %options are passed to hyperref
218 linkcolor=black,
219 hyperindex=true% true clashes with doc.sty
220 ]{attachfile}