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
|
% Listing configuration file
% !TeX encoding = utf8
\makeatletter
\let\scr@float@addtolists@warning\relax
\definecolor{lightergray}{gray}{0.99}
\lstset{%
language=[LaTeX]TeX,
basicstyle=\ttfamily,
keywordstyle=\color{RoyalBlue},
commentstyle=\color{darkgray},
backgroundcolor=\color{lightergray},
stringstyle=\rmfamily,
numbers=none,
showstringspaces=false,
breaklines=true,
%frameround=ftff,
frame=lines,
escapeinside={£*}{*£},
tabsize=2,
morekeywords={unless}}
\lstnewenvironment{code}
{\lstset{columns=fullflexible,keepspaces=true,%
basicstyle=\ttfamily\small}}{}
\lstnewenvironment{sidebyside}
{\global\let\lst@intname\@empty
\setbox\z@=\hbox\bgroup
\lstset{columns=fullflexible,%
linewidth=0.45\linewidth,keepspaces=true,%
breaklines=true,%
breakindent=0pt,%
boxpos=t,%
basicstyle=\ttfamily\small}%
\lst@BeginAlsoWriteFile{\jobname.tmp}}
{\lst@EndWriteFile\egroup
\begin{center}%
\begin{minipage}{0.45\linewidth}%
\hbox to\linewidth{\box\z@\hss}
\end{minipage}%
\qquad
\begin{minipage}{0.45\linewidth}%
\lstset{frame=none}%
\leavevmode \catcode`\^^M=5\relax
\small\input{\jobname.tmp}%
\end{minipage}%
\end{center}}
\DeclareRobustCommand*{\clsname}{%
\texorpdfstring{\@ifstar\@clsname\@@clsname}{}}
\def\@clsname#1{{\normalfont\textsf{#1}}}
\def\@@clsname#1{{\normalfont\textsf{#1}\clsindex{#1}}}
\DeclareRobustCommand*{\pkgname}{%
\texorpdfstring{\@ifstar\@pkgname\@@pkgname}{}}
\def\@pkgname#1{{\normalfont\textsf{#1}}}
\def\@@pkgname#1{{\normalfont\textsf{#1}\pkgindex{#1}}}
\DeclareRobustCommand*{\optname}{%
\texorpdfstring{\@ifstar\@optname\@@optname}{}}
\def\@optname#1{{\normalfont\texttt{#1}}}
\def\@@optname#1{{\normalfont\texttt{#1}\optindex{#1}}}
\DeclareRobustCommand*{\othname}{%
\texorpdfstring{\@ifstar\@othname\@@othname}{}}
\def\@othname#1{{\normalfont\texttt{#1}}}
\def\@@othname#1{{\normalfont\texttt{#1}\othindex{#1}}}
\DeclareRobustCommand*{\envname}{%
\texorpdfstring{\@ifstar\@envname\@@envname}{}}
\def\@envname#1{{\normalfont\texttt{#1}}}
\def\@@envname#1{{\normalfont\texttt{#1}\envindex{#1}}}
\DeclareRobustCommand*{\cmdname}{%
\texorpdfstring{\@ifstar\@cmdname\@@cmdname}{\textbackslash}}
\def\@cmdname#1{{\ttfamily\textbackslash\textcolor{RoyalBlue}{#1}}}
\def\@@cmdname#1{{\ttfamily\textbackslash\textcolor{RoyalBlue}{#1}}\cmdindex{#1}}
\def\clsindex#1{\index{#1@\textsf{#1}}%
\index{#1@\textsf{#1} \textit{\textit{(class)}}}}
\def\pkgindex#1{\index{Package!#1@\textsf{#1}}%
\index{#1@\textsf{#1} \textit{(pack.)}}}
\def\optindex#1{\index{Option!#1@\texttt{#1}}%
\index{#1@\texttt{#1} \textit{(opt.)}}}
\def\othindex#1{\index{#1@\texttt{#1}}}
\def\envindex#1{\index{Environment!#1@\texttt{#1}}%
\index{#1@\texttt{#1} \textit{(env.)}}}
\def\cmdindex#1{\index{#1@\texttt{\hspace*{-1.2ex}%
\textbackslash#1}}}
\DeclareRobustCommand\meta[1]{%
$\langle${\normalfont\itshape#1}$\rangle$}
\DeclareRobustCommand\mail[1]{\href{mailto:#1}{\texttt{#1}}}
%\def\dotfill{\leaders\hbox to.6em{\hss .\hss}\hskip\z@ plus 1fill}%
%\def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil}%
%\def\pfill{\unskip~\dotfill\penalty500\strut\nobreak
% \dotfil~\ignorespaces}
\makeatother
|