File: nsdoc.sty

package info (click to toggle)
ns2 2.35%2Bdfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 78,780 kB
  • ctags: 27,490
  • sloc: cpp: 172,923; tcl: 107,130; perl: 6,391; sh: 6,143; ansic: 5,846; makefile: 816; awk: 525; csh: 355
file content (252 lines) | stat: -rw-r--r-- 6,650 bytes parent folder | download | duplicates (8)
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
\RequirePackage{ifthen}
\RequirePackage{html}
\RequirePackage{alltt}

\RequirePackage{tabularx}
\renewcommand{\arraystretch}{1.2}

\ifx\@noresizetrue\undefined
\RequirePackage[dvips]{graphicx}
\DeclareGraphicsExtensions{.eps, .ps, .epsf}
\graphicspath{
  {./}
  {./figures/}
  {./sl-figures/}
  {../sl-figures/}
  }
\evensidemargin       -15pt
\oddsidemargin        -15pt
\topmargin            -20pt
\leftmargin           30pt
\rightmargin          30pt
\textwidth            6.9in
\textheight           9.0in
\parindent            0pt
\parskip              12pt
\marginparwidth       1cm
\message{resize completed}
\fi

\RequirePackage{pstricks,pst-node}
\RequirePackage{longtable}

\renewcommand{\topfraction}{0.9}
\renewcommand{\floatpagefraction}{0.9}
\renewcommand{\textfraction}{0.05}

% Run the toc tighter:
\def\@starttoc#1{\begingroup
  \makeatletter
  \parskip\z@\@plus\p@\relax         % <----
  \@input{\jobname.#1}\if@filesw
  \expandafter\newwrite\csname tf@#1\endcsname
          \immediate\openout
                  \csname tf@#1\endcsname \jobname.#1\relax
  \fi \global\@nobreakfalse\endgroup%
}

\def\nam{\emph{nam}}
\def\namf{\textasciitilde\nam/}
\def\nsTcl{\emph{ns/tclcl}}
\def\ns{\emph{ns}}
\def\rtglib{\textsl{rtglib}}
\def\nsf{\textasciitilde\ns/}
\def\Tclf{\textasciitilde\emph{tclcl}/}

\def\tup#1{\(\langle\)#1\(\rangle\)}
%\newif\if@mmode
\def\code{\bgroup%\ifmmode\@mmodetrue\leavemmode\else\@mmodefalse\fi%
  \catcode`\#=11\catcode`\_=11\catcode`\$=11\catcode`\&=11\relax\@code}
\def\@code#1{\ttfamily #1\egroup}

\def\pr@c[#1]#2{\code{#2}\{#1\}}
\def\proc{\@ifnextchar[{\pr@c}{\pr@c[]}}

\def\f@cn[#1]#2{\code{#2}(#1)}
\def\fcn{\@ifnextchar[{\f@cn}{\f@cn[void]}}

\def\fcnref#1#2#3{\htmladdnormallink{#1}{#2.html##3}}
\def\clsref#1#2{\htmladdnormallink{\code{class #1}}{#2.html##class#1}}
\def\structref#1#2{\htmladdnormallink{\code{struct #1}}{#2.html##struct#1}}
\def\shdr#1#2#3{\htmladdnormallink{#1}{#2}\label{#3}}

%%%
%%% Mixed hyperref: use as \href{string}{Section}{label}
%%% Typesets as ``string (Section~\ref{label})'' in plain \LaTeX, and
%%% as  ``string'', and links to label in latex2html.
%%%
\newcommand{\href}[3]{\hyperref{#1}{#1 (#2~}{)}{#3}}
\newcommand{\xref}{\htmladdnormallink}

% Define some convenient environments
\def\cf{\rmfamily\itshape}
\def\program{\bgroup%
  \def\;##1;{\hfill;\#{\cf ##1}}%
  \def\*##1*/{\hfill/*{\cf ##1}*/}%
  \alltt%
  \def\bs{\ifmmode\backslash\else\(\backslash\)\fi}%
}
\def\endprogram{\endalltt\egroup}

\def\alist{\par\tabularx{\textwidth}{rX}}
\def\endalist{\endtabularx\par}

\def\zerolistvertdimens{\parskip0pt\topsep0pt\partopsep0pt\parsep0pt\itemsep0pt}

\def\ie{\textit{i.e.}}
\def\eg{\textit{e.g.}}
\def\etc{\textit{etc}}
\def\etal{\textit{et\,al}}
\def\via{\textit{via}}
\def\viz{\textit{viz.}}

\def\timestring{\begingroup     % stolen from eplain.tex
   \count0 = \time
   \divide\count0 by 60
   \count2 = \count0   % The hour, from zero to 23.
   \count4 = \time
   \multiply\count0 by 60
   \advance\count4 by -\count0   % The minute, from zero to 59.
   \ifnum\count4<10
      \toks1 = {0}%
   \else
      \toks1 = {}%
   \fi
   \ifnum\count2<12
      \toks0 = {a.m.}%
   \else
      \toks0 = {p.m.}%
      \advance\count2 by -12
   \fi
   \ifnum\count2=0
      \count2 = 12
   \fi
   \number\count2:\the\toks1 \number\count4 \thinspace \the\toks0
\endgroup}%
\ifx\today\undefined
        \def\today{\ifcase\month
          \or January\or February\or March\or April\or May\or June
          \or July\or August\or September\or October\or November\or December
          \fi \space\number\day, \number\year}
\fi
\def\timestamp{Version: \timestring\quad\today}

\newif\if@draft\@draftfalse
\AtEndOfPackage{
  \if@draft
    %\def\today{Version: \timestamp}
    \gdef\@oddhead{\footnotesize\rm\hfil\textbf{DRAFT}\enspace\timestamp}
    \gdef\@evenhead{\footnotesize\rm\hfil\textbf{DRAFT}\enspace\timestamp}
    \RequirePackage[notref]{showkeys}
%    \RequirePackage[english,firsttwo,light]{draftcopy}
  \else
    \gdef\timestamp{\today}
  \fi
}
\DeclareOption{draft}{\@drafttrue}
\ExecuteOptions{}
\ProcessOptions
\endinput

### Local Variables:
### mode: latex
### comment-column: 60
### backup-by-copying-when-linked: t
### file-precious-flag: nil
### End:

#LaTeX2HTML Version 96.1 : dot.latex2html-init
#

$MAX_SPLIT_DEPTH = 2;                           #$
$MAX_LINK_DEPTH = 2;                            #$
$BOTTOM_NAVIGATION = 1;                         #$

#
# The \LaTeXe\ commands
#

sub do_cmd_textasciitilde {
    join('', '\~', $_[0]);                      #$
}

#
# Some from the ifthen package
#
sub do_cmd_equal {
    local($_) = @_;                             #$

    s/$next_pair_pr_rx//o;                      #$
    local($a) = $&;
    $a =~ s/$1//g;

    s/$next_pair_pr_rx//o;                      #$
    local($b) = $&;
    $b =~ s/$1//g;

    join('', ($a eq $b ? 1 : 0), $_);
}

sub do_cmd_ifthenelse {
    local($_) = @_;                             #$

    s/$next_pair_pr_rx//o;                      #$
    local($a) = $&;
    $a =~ s/<#$1#>//g;

    s/$next_pair_pr_rx//o;                      #$
    local($then) = $&;

    s/$next_pair_pr_rx//o;                      #$
    local($else) = $&;

    join('', ($a eq 1 ? $then : $else), $_);
}

sub do_cmd_tup {
    local($_) = @_;                             #$
    local($rest) = $_;
    $rest =~ s/$next_pair_pr_rx//o;
    join('', '&lt;', $&, '&gt;', $rest);
}

sub do_cmd_danger {
    join('', '<IMG ALIGN=LEFT ALT="DANGER" SRC="../images/dbend.gif">', $_[0]);
}                                               #$

&ignore_commands (<<_IGNORED_CMDS_);
closedanger
font
manual
endgroup
endgraf
_IGNORED_CMDS_

sub top_navigation_panel {
    "$CONTENTS $PREVIOUS_GROUP $PREVIOUS $UP $NEXT $NEXT_GROUP $INDEX"; #$
}

sub bot_navigation_panel {
'<hr>List of Indices
<ul>
<li> <a href=../ns/CClassIndex.html>C++ classes in <em>ns</em></a>
<li> <a href=../ns/CFuncIndex.html>C++ functions in <em>ns</em></a>
<li> <a href=../ns/TclClassIndex.html>Tcl classes in <em>ns</em></a>
<li> <a href=../ns/TclProcIndex.html>Tcl procedures in <em>ns</em></a>
<li> <a href=../Tcl/CClassIndex.html>C++ classes in <em>ns/Tcl</em></a>
<li> <a href=../Tcl/CFuncIndex.html>C++ functions in <em>ns/Tcl</em></a>
<li> <a href=../Tcl/TclClassIndex.html>Tcl classes in <em>ns/Tcl</em></a>
<li> <a href=../Tcl/TclProcIndex.html>Tcl procedures in <em>ns/Tcl</em></a>
</ul><P>
<a href=../ns.html>The main <em>ns</em> page</a>
';
}

### Local Variables:
### mode: perl
### comment-column: 60
### backup-by-copying-when-linked: t
### file-precious-flag: nil
### End:

1;      # This must be the last line