| 1 |
% customizations used in the User's Guide |
| 2 |
|
| 3 |
|
| 4 |
% Description-like environment for documenting functions/APIs. |
| 5 |
% puts the description label in a minipage with a large hanging |
| 6 |
% indent. |
| 7 |
% Good christ this took a long time to develop. |
| 8 |
% hanging indent trick stolen from Peter Wilson's hanging.sty @CTAN |
| 9 |
% minipage allows multi-line label, and puts item on next line. |
| 10 |
% customized list inspired by Kopka/Daly _Guide to LaTeX_ p.213 |
| 11 |
% SRE, Wed Dec 27 11:37:18 2000 |
| 12 |
% |
| 13 |
\newenvironment{sreapi}{% |
| 14 |
\begin{list}{}{% |
| 15 |
\renewcommand{\makelabel}[1]{% |
| 16 |
\begin{minipage}{\textwidth}% |
| 17 |
\hangindent10em\hangafter1\noindent% |
| 18 |
{\bfseries\texttt{##1}\vspace{0.8em}}% |
| 19 |
\end{minipage}% |
| 20 |
}}}% |
| 21 |
{\end{list}} |
| 22 |
|
| 23 |
|
| 24 |
% Description-like environment for producing lists like: |
| 25 |
% |
| 26 |
% label stuff, stuff, stuff |
| 27 |
% |
| 28 |
% label2 more stuff, more stuff, |
| 29 |
% more stuff. |
| 30 |
% \begin{sreitems}{Longest label} \item[label] stuff, ... \end{sreitems} |
| 31 |
% SRE, Wed Dec 27 11:59:43 2000 |
| 32 |
% |
| 33 |
\newenvironment{sreitems}[1]{% |
| 34 |
\begin{list}{}{% |
| 35 |
\settowidth{\labelwidth}{#1}% |
| 36 |
\setlength{\leftmargin}{\labelwidth}% |
| 37 |
\addtolength{\leftmargin}{\labelsep}% |
| 38 |
}} |
| 39 |
{\end{list}} |
| 40 |
|
| 41 |
\DefineVerbatimEnvironment{sreoutput}{Verbatim}{fontsize=\scriptsize,xleftmargin=2.0\parindent}% |
| 42 |
\DefineVerbatimEnvironment{tinysreoutput}{Verbatim}{fontsize=\tiny,xleftmargin=2.0\parindent}% |
| 43 |
|
| 44 |
\makeatletter |
| 45 |
\newcommand{\listoffaqs}{\@starttoc{faq}} |
| 46 |
\newenvironment{srefaq}[1] |
| 47 |
{\addcontentsline{faq}{faq}{#1}\begin{sloppypar}\noindent\slshape\small\begin{quote}\textbf{$\triangleright$ #1}} |
| 48 |
{\end{quote}\end{sloppypar}} |
| 49 |
\newcommand{\l@faq}[2]{\@dottedtocline{0}{0pt}{0pt}{#1}{#2}} |
| 50 |
\makeatother |
| 51 |
|
| 52 |
% Consistent font styles |
| 53 |
% \software{} for the name of a software package |
| 54 |
% \database{} for the name of a database |
| 55 |
% \prog{} for a program or file name |
| 56 |
% \emprog{} for an emphasized program or file name |
| 57 |
% \user{} for a typed user command |
| 58 |
% \response{} for an output line following a \user command |
| 59 |
% \ccode{} for an inlined C code phrase |
| 60 |
\newcommand{\software}[1]{\textsc{#1}} |
| 61 |
\newcommand{\database}[1]{\textsc{#1}} |
| 62 |
\newcommand{\prog}[1]{{\small\texttt{#1}}} |
| 63 |
\newcommand{\emprog}[1]{{\small\bfseries\texttt{#1}}} |
| 64 |
\newcommand{\user}[1]{\indent\indent{\small\bfseries\texttt{\% #1}}} |
| 65 |
\newcommand{\response}[1]{\indent\indent{\small\bfseries\texttt{#1}}} |
| 66 |
\newcommand{\ccode}[1]{{\small\texttt{#1}}} |
| 67 |
|
| 68 |
\DefineVerbatimEnvironment{cchunk}{Verbatim}{fontsize=\scriptsize,xleftmargin=2.0\parindent}% |
| 69 |
|
| 70 |
% The ``wideitem'' environment is mostly obsolete, but |
| 71 |
% it gets used in converted manpages. |
| 72 |
% |
| 73 |
\newenvironment{wideitem}{\begin{list} |
| 74 |
{} |
| 75 |
{ \setlength{\labelwidth}{2in}\setlength{\leftmargin}{1.5in}}} |
| 76 |
{\end{list}} |
| 77 |
|
| 78 |
% The following are used as temp vars in how man pages are |
| 79 |
% converted into LaTeX w/ rman; see ``make manpages'' in Makefile. |
| 80 |
% |
| 81 |
\newlength{\sresavei} |
| 82 |
\newlength{\sresaves} |
| 83 |
|
| 84 |
\def\argmax{\mathop{\mathrm{argmax}}\limits} |
| 85 |
\def\argmin{\mathop{\mathrm{argmin}}\limits} |
| 86 |
|
| 87 |
% The sidebar environment, for inserting ``asides''. |
| 88 |
% Requires the ``fancybox'' package. |
| 89 |
% Example: |
| 90 |
% \usepackage{fancybox} |
| 91 |
% ... |
| 92 |
% \begin{sidebar} |
| 93 |
% \sidebarhead{An aside on string theory.} |
| 94 |
% String theory is not mentioned in this document. |
| 95 |
% \end{sidebar} |
| 96 |
% |
| 97 |
% SRE, Sun Nov 6 14:45:32 2005 |
| 98 |
% |
| 99 |
\newenvironment{sidebar}% |
| 100 |
{\begin{Sbox}\begin{minipage}{\textwidth}\setlength{\parskip}{0.5em}}% |
| 101 |
{\end{minipage}\end{Sbox}% |
| 102 |
\begin{figure}[htp]\shadowbox{\TheSbox}\end{figure}% |
| 103 |
\setlength{\parskip}{0em}} |
| 104 |
\newcommand{\sidebarhead}[1]{{\bfseries{#1}}\vspace{0.3em}} |