2 % cxref.sty - Copyright 1996 Andrew M. Bishop
4 % New commands that are defined to use in typesetting cxref.
7 \typeout{Cxref Style-sheet -- By A. M. Bishop. (Custom commands)}
9 % Stop LaTeX from printing all of the annoying error messages about under/over-full boxes.
13 \emergencystretch=100pt
15 % Set the section number depth to 3.
17 \setcounter{secnumdepth}{3}
19 % Set the table of contents number depth to 3.
21 \setcounter{tocdepth}{3}
23 % Set the parindent and table column separator to zero.
25 \setlength{\parindent}{0in}
26 \setlength{\tabcolsep}{0in}
28 % Define a command to display the 'computer format' text, a small teletype font.
30 \newcommand{\stt}{\small\tt}
32 % The command argument list and items to use in it.
34 \newenvironment{cxrefarglist}{\begin{list}{}{\leftmargin=2.25in \labelsep=0in \labelwidth=2.25in \itemsep=0pt \parsep=3pt \topsep=3pt}}{\end{list}}
35 \newcommand{\cxrefargitem}[1]{\item[\parbox{2.25in}{$\cdot$\hspace*{0.1in}{\stt #1}}]}
37 % A table with one wide column and a cross reference (Include files).
39 \newenvironment{cxreftabi}{\begin{tabular}{{p{5.0in}l}}}{\end{tabular}}
41 % A table with a narrow column, a wide column and a cross reference (Included in).
43 \newenvironment{cxreftabii}{\begin{tabular}{{p{0.75in}p{4.25in}l}}}{\end{tabular}}
45 % A table with two approximately equal columns (2nd is wider) and a cross reference (Struct / Union).
47 \newenvironment{cxreftabiia}{\begin{tabular}{{p{2.5in}p{3.5in}}}}{\end{tabular}}
49 % A table with two exactly equal columns and a cross reference (Appendix).
51 \newenvironment{cxreftabiib}{\begin{tabular}{{p{2.5in}p{2.5in}l}}}{\end{tabular}}
53 % A table with a narrow column, two approximately equal columns and a cross reference (Used in, Calls, Called etc.).
55 \newenvironment{cxreftabiii}{\begin{tabular}{{p{0.75in}p{2.25in}p{2.0in}l}}}{\end{tabular}}
56 \newcommand{\cxreftabiiispan}[1]{\multicolumn{2}{p{4.25in}}{#1}}
58 % Break the above tables by stopping the current table and starting a new one.
60 \newcommand{\cxreftabbreak}[1]{\end{#1}\vskip 0pt\begin{#1}}
62 % Cross references for Files, Functions, Variables and Typedefs.
64 \newcommand{\cxreffile}[1]{{\small\it (Section \ref{file_#1})\/}}
65 \newcommand{\cxreffunc}[2]{{\small\it (Section \ref{func_#1_#2})\/}}
66 \newcommand{\cxrefvar}[2]{{\small\it (Section \ref{var_#1_#2})\/}}
67 \newcommand{\cxreftype}[2]{{\small\it (Section \ref{type_#1_#2})\/}}