summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/cweb/src/cweb-doc.sty
blob: 2859584f6cbec85a2336d00d46afa76ec2576838 (plain)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
% $Id: cweb-doc.sty,v 1.3 1995/08/25 19:07:54 schrod Exp $
%----------------------------------------------------------------------

%
% tags for the documentation of cweb class
%


\ProvidesPackage{cweb-doc}


%
% Used packages
%

\begingroup
    \let\begingroup=\endinput
    \input{cweb.cls}			% get style revision
    \global\let\cweb@loaded=\cweb@loaded
\endgroup
\providecommand*\cweb@loaded{$StyleRevision$} % bootstrap



%
% Configuration of RCS fields
%

% keywords in style are prefixed by `Style', in documentation by `Doc'.
\let\RcsHandleStyleDate=\RcsHandleDate	% transform StyleDate value
\let\RcsHandleDocDate=\RcsHandleDate	% transform DocDate field

% the revision of cweb.cls is needed by the documentation
\def\RcsEmptyValue{$\langle$unknown$\rangle$}
\expandafter\RCS \cweb@loaded		% creates \RCSStyleRevision
\def\RcsEmptyValue{}

% author name
\rcsAuthor{schrod}{Joachim Schrod}



%
% new environments
%

\font\manfnt=manfnt	% with the dangerous bend sign
\chardef\bend="7F	% I like the non-S curve ;-)
\newenvironment{fixme}{%
	\trivlist
	    \hangindent 2em
	    \hangafter -2
	    \item[\hbox to 0pt{\hss \manfnt \bend}]%
	    \ignorespaces
    }{%
	\endtrivlist
    }


\newenvironment{cseqtab}{%
	\quote
	\obeycr
	\tabular{lrl}%
	\@gobblecr	% eat following newline
    }{%
	\endtabular
	\endquote
    }


\newenvironment{options}{%
	\list{}{%
	    \labelwidth\z@
	    \itemindent -.5\leftmargin
	    \labelsep 1em
	    \def\makelabel##1{%
		\hspace\labelsep
		\normalfont\ttfamily ##1%
		}%
	    }%
    }{%
        \endlist
    }



%
% new tags
%

% logos
\def\cweb{\texttt{CWEB}}
\def\ctangle{\texttt{CTANGLE}}
\def\cweave{\texttt{CWEAVE}}

% other
\renewcommand*\arg[1]{\textsl{Arg.~#1}:} % I don't use the arg operator

\def\<#1>{\textit{#1}}			% syntactic category

\newcommand\cls[1]{\textsf{#1}}		% LaTeX classes
\newcommand\pkg[1]{\textsf{#1}}		% LaTeX packages


%
% change of LaTeX parameters, for layout etc.
%

% underfull hboxes are not such a problem in program documentation

\hbadness=4000


% figure

\def\textfraction{0.1}	% must be at least 10% text on page
\def\topfraction{0.9}	% rest may be top insertion
\def\floatpagefraction{0.8} % float pages only if the float is larger than 80%




\endinput



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Local Variables:
mode: LaTeX
TeX-brace-indent-level: 4
indent-tabs-mode: t
TeX-auto-untabify: nil
End: