OpenCores
URL https://opencores.org/ocsvn/phr/phr/trunk

Subversion Repositories phr

[/] [phr/] [trunk/] [doc/] [informe-tesis/] [template/] [Sothampton_University/] [source/] [latex/] [ecsdocs/] [ecsdocs.dtx] - Blame information for rev 110

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 110 guanucolui
% \iffalse
2
% This file builds on the class file `book.cls' to provide a thesis,
3
% minithesis, progress, project and report format, and on the class file `article.cls'
4
% to provide an article format, for use within the Dept. of Electronics
5
% and Computer Science at the University of Southampton.
6
%
7
% The thesis, minithesis, progress, project, report, gdp, gdpsummary and article environments are written to separate
8
% class files ecsthesis.cls, ecsminithesis.cls, ecsprogress.cls, ecsproject.cls, ecsreport.cls, ecsgdp.cls, ecsgdpsummary.cls and ecsarticle.cls.
9
% \fi
10
%
11
% \CheckSum{1773}
12
%
13
% \iffalse
14
% Copyright (C) 2001 by Steve R. Gunn
15
%
16
%    \begin{macrocode}
17
%\NeedsTeXFormat{LaTeX2e}[1996/12/01]
18
%    \end{macrocode}
19
%
20
%    Announce the document class and its version.
21
%
22
%    \begin{macrocode}
23
%\ProvidesClass{ecsthesis}
24
%\ProvidesClass{ecsminithesis}
25
%\ProvidesClass{ecsprogress}
26
%\ProvidesClass{ecsproject}
27
%
\ProvidesClass{ecsarticle}
28
%\ProvidesClass{ecsreport}
29
%\ProvidesClass{ecsgdp}
30
%\ProvidesClass{ecsgdpsummary}
31
%<*driver>
32
\ProvidesFile{ecsdocs.drv}
33
%
34
%<*thesis|minithesis|progress|project|report|article|gdp|gdpsummary|driver>
35
              [2003/25/04 v1.6
36
%
37
%   LaTeX document class]
38
%    \end{macrocode}
39
%
40
%    This bit of code contains the documentation driver file for
41
%    \TeX{}, i.e., the file that will produce the documentation you
42
%    are currently reading. It can be extracted from this file by the
43
%    {\sc docstrip} program.
44
%    \begin{macrocode}
45
%<*driver>
46
]
47
\documentclass[a4paper,10pt]{ltxdoc}
48
\GetFileInfo{ecsdocs.drv} \CodelineIndex \EnableCrossrefs
49
%\RecordChanges
50
\setcounter{IndexColumns}{2}
51
\begin{document}
52
\DocInput{ecsdocs.dtx}
53
\PrintIndex
54
%\PrintChanges
55
\end{document}
56
%
57
%    \end{macrocode}
58
% \fi
59
%
60
% \title{\LaTeXe{} Document Styles for the\\
61
%        Department of Electronics and Computer Science\\
62
%       {File version \fileversion, dated \filedate}}
63
%
64
% \author{Steve R. Gunn}
65
%
66
% \date{Printed \today}
67
%
68
% \maketitle
69
%
70
% \section{Description}
71
%
72
%    These \LaTeXe{} document classes are designed to produce thesis, mini-thesis, progress,
73
%    project, report, GDP report and GDP summary report documents which conform to the
74
%    University of Southampton guidelines of April 2001. They are based on the document
75
%    class \texttt{book}, but modify some of its layout decisions. An article class is also
76
%    provided which is based on the document class \texttt{article}.
77
%
78
% \StopEventually{}
79
%
80
% \section{The {\sc docstrip} modules}
81
%
82
% The following modules are used in the implementation to direct
83
% {\sc docstrip} when generating the external files:
84
% \begin{center}
85
% \begin{tabular}{ll}
86
%   thesis            & produce the \texttt{ecsthesis} document class\\
87
%   minithesis        & produce the \texttt{ecsminithesis} document class\\
88
%   progress          & produce the \texttt{ecsprogress} document class\\
89
%   project           & produce the \texttt{ecsproject} document class\\
90
%   report            & produce the \texttt{ecsreport} document class\\
91
%   article           & produce the \texttt{ecsarticle} document class\\
92
%   gdp               & produce the \texttt{ecsgdp} document class\\
93
%   gdpsummary        & produce the \texttt{ecsgdpsummary} document class\\
94
%   testthesis        & produce an example thesis\\
95
%   testminithesis    & produce an example minithesis\\
96
%   testprogress      & produce an example progress\\
97
%   testproject       & produce an example project\\
98
%   testreport        & produce an example report\\
99
%   testarticle       & produce an example article\\
100
%   testgdp           & produce an example GDP report\\
101
%   testgdpsummary    & produce an example GDP summary report\\
102
%   introduction      & produce an example introduction chapter\\
103
%   conclusions       & produce an example conclusions chapter\\
104
%   appendix          & produce an example appendix chapter\\
105
%   figure            & produce an example figure file\\
106
%   definitions       & produce an example definitions file\\
107
%   references        & produce an example references file\\
108
%   bst               & produce a bibliography style file\\
109
%   driver            & produce a documentation driver file \\
110
% \end{tabular}
111
% \end{center}
112
%
113
% \section{Implementation}
114
%
115
%    All options are passed on to the \texttt{book} or \texttt{article} class.
116
%
117
%    \begin{macrocode}
118
%<*thesis|minithesis|progress|project|report|article|gdp|gdpsummary>
119
%    \end{macrocode}
120
%
121
% \begin{macro}{\baseclass}
122
%    \begin{macrocode}
123
%<*thesis|minithesis|progress|project|report|gdp|gdpsummary>
124
\def\baseclass{book}
125
%
126
%<*article>
127
\def\baseclass{article}
128
%
129
%    \end{macrocode}
130
% \end{macro}
131
%
132
%    \begin{macrocode}
133
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
134
%    \end{macrocode}
135
%
136
% \begin{macro}{\@checkoptions}
137
%
138
%    Before we can process the options we must deal with a small
139
%    problem.  That is, we want to change the default options of
140
%    the \texttt{book} or \texttt{article} class to \texttt{a4paper} and \texttt{11pt} or \texttt{12pt} but the
141
%    macro |\ProcessOptions| used by the \texttt{book} or \texttt{article} class
142
%    processes the options in the order specified in the
143
%    file.  Because \texttt{a4paper} is the first of the paper
144
%    sizing options it will be overridden by any user defined
145
%    option.  But the same is not true of the font size option
146
%    \texttt{11pt} or \texttt{12pt}.  To remedy this we define a macro
147
%    |\@checkoptions{|\meta{default}|}{|\meta{option-list}|}|
148
%    which checks to see if any options in \meta{option-list} have
149
%    been specified and if not adds \meta{default} to the option list.
150
%
151
%    \begin{macrocode}
152
\def\@checkoptions#1#2{
153
  \edef\@curroptions{\@ptionlist{\@currname.\@currext}}
154
  \@tempswafalse
155
  \@tfor\@this:=#2\do{
156
    \@expandtwoargs\in@{,\@this,}{,\@curroptions,}
157
    \ifin@ \@tempswatrue \@break@tfor \fi}
158
  \let\@this\@empty
159
  \if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
160
}
161
%    \end{macrocode}
162
% \end{macro}
163
%
164
%    With this macro at our disposal we can continue to
165
%    process the options
166
%
167
%    \begin{macrocode}
168
%<*thesis|minithesis|progress|report|article|gdp|gdpsummary>
169
\@checkoptions{11pt}{{10pt}{11pt}{12pt}}
170
%
171
%<*project>
172
\@checkoptions{12pt}{{10pt}{11pt}{12pt}}
173
%
174
\PassOptionsToClass{a4paper}{\baseclass}
175
\ProcessOptions\relax
176
%    \end{macrocode}
177
%
178
%    and load the \texttt{book} or \texttt{article} document class
179
%    with A4 as the default paper size.
180
%
181
%    \begin{macrocode}
182
\LoadClass{\baseclass}
183
%    \end{macrocode}
184
%
185
% \subsection{Banner}
186
%
187
% \begin{macro}{\bhrule}
188
% \begin{macro}{\btypeout}
189
%
190
%    Provide a function to produce a banner on the output making the location
191
%    of the current section simpler.
192
%
193
%    \begin{macrocode}
194
\newcommand\bhrule{\typeout{------------------------------------------------------------------------------}}
195
\newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
196
%    \end{macrocode}
197
% \end{macro}
198
% \end{macro}
199
%
200
% \subsection{Date}
201
%
202
% \begin{macro}{\today}
203
%
204
%    This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
205
%    to provide the date of the \LaTeX-run in a suitable format.
206
%
207
%    \begin{macrocode}
208
%<*thesis>
209
\def\today{\ifcase\month\or
210
  January\or February\or March\or April\or May\or June\or
211
  July\or August\or September\or October\or November\or December\fi
212
  \space \number\year}
213
%
214
%    \end{macrocode}
215
%
216
% \end{macro}
217
%
218
% \section{Document Layout}
219
%
220
% \subsection{Spacing}
221
%
222
%    Load the \texttt{setspace} package so that spacing can easily be set. The text in all
223
%    three styles is set to one and a half spacing, paragraphs not indented, and a newline
224
%    between paragraphs.
225
%
226
%    \begin{macrocode}
227
\usepackage{setspace}
228
%\onehalfspacing
229
%
\singlespacing
230
\setlength{\parindent}{0pt}
231
\setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
232
%    \end{macrocode}
233
%
234
%  \subsection{Margins}
235
%
236
%    Load the \texttt{vmargin} package to setup the page dimensions.
237
%
238
%    \begin{macrocode}
239
\usepackage{vmargin}
240
%<*thesis|minithesis|progress|project|report|gdp|gdpsummary>
241
\setmarginsrb           { 1.5in}  % left margin
242
                        { 0.6in}  % top margin
243
                        { 1.0in}  % right margin
244
                        { 0.8in}  % bottom margin
245
                        {  20pt}  % head height
246
                        {0.25in}  % head sep
247
                        {   9pt}  % foot height
248
                        { 0.3in}  % foot sep
249
%
250
%<*article>
251
\setmarginsrb           { 0.8in}  % left margin
252
                        { 0.6in}  % top margin
253
                        { 0.8in}  % right margin
254
                        { 0.8in}  % bottom margin
255
                        {  20pt}  % head height
256
                        {0.25in}  % head sep
257
                        {   9pt}  % foot height
258
                        { 0.3in}  % foot sep
259
%
260
%    \end{macrocode}
261
%
262
% \subsection{Breaks}
263
%
264
%    Control how pages and lines are broken.
265
%
266
%    \begin{macrocode}
267
\raggedbottom
268
\setlength{\topskip}{1\topskip \@plus 5\p@}
269
\doublehyphendemerits=10000       % No consecutive line hyphens.
270
\brokenpenalty=10000              % No broken words across columns/pages.
271
\widowpenalty=9999                % Almost no widows at bottom of page.
272
\clubpenalty=9999                 % Almost no orphans at top of page.
273
\interfootnotelinepenalty=9999    % Almost never break footnotes.
274
%    \end{macrocode}
275
%
276
%  \subsection{Fancy Page Headers}
277
%
278
%    Setup the the default fancy page headers with an underlined header containing
279
%    chapter, name and page number.
280
%
281
%    \begin{macrocode}
282
\usepackage{fancyhdr}
283
\lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
284
\rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
285
\chead{}\lfoot{}\rfoot{}\cfoot{}
286
\pagestyle{fancy}
287
%    \end{macrocode}
288
%
289
% \begin{macro}{\chaptermark}
290
% \begin{macro}{\sectionmark}
291
% \begin{macro}{\subsectionmark}
292
%
293
%    Redefine \texttt{chaptermark} and \texttt{sectionmark} to set up the correct header name and produce a
294
%    banner on the output making the location of messages simpler.
295
%
296
%    \begin{macrocode}
297
%<*thesis|minithesis|progress|project|report|gdp>
298
\renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}
299
\renewcommand{\sectionmark}[1]{}
300
\renewcommand{\subsectionmark}[1]{}
301
%
302
%<*article>
303
\renewcommand{\sectionmark}[1]{\btypeout{\thesection\space #1}}
304
\renewcommand{\subsectionmark}[1]{}
305
\renewcommand{\subsubsectionmark}[1]{}
306
%
307
%\markboth{GDP Summary Report}{GDP Summary Report}
308
%    \end{macrocode}
309
% \end{macro}
310
% \end{macro}
311
% \end{macro}
312
%
313
% \begin{macro}{\cleardoublepage}
314
%
315
%    Redefine \texttt{cleardoublepage} to remove headers from blank pages
316
%    in twosided documents.
317
%
318
%    \begin{macrocode}
319
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
320
\hbox{}
321
\thispagestyle{empty}
322
\newpage
323
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
324
%    \end{macrocode}
325
% \end{macro}
326
%
327
% \subsection{Mathematics}
328
%
329
%    Load the \texttt{amsmath} packages, so we can do some serious math, and
330
%    setup the theorem environments.
331
%
332
%    \begin{macrocode}
333
\usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}
334
\theoremstyle{plain}
335
%<*thesis|minithesis|progress|project|report|gdp>
336
\newtheorem{example}{Example}[chapter]
337
\newtheorem{theorem}{Theorem}[chapter]
338
%
339
%<*article|gdpsummary>
340
\newtheorem{example}{Example}[section]
341
\newtheorem{theorem}{Theorem}[section]
342
%
343
\newtheorem{corollary}[theorem]{Corollary}
344
\newtheorem{lemma}[theorem]{Lemma}
345
\newtheorem{proposition}[theorem]{Proposition}
346
\newtheorem{axiom}[theorem]{Axiom}
347
\theoremstyle{definition}
348
\newtheorem{definition}[theorem]{Definition}
349
\theoremstyle{remark}
350
\newtheorem{remark}[theorem]{Remark}
351
%    \end{macrocode}
352
%
353
% \subsection{Captions}
354
%
355
% \begin{macro}{\fref}
356
% \begin{macro}{\tref}
357
% \begin{macro}{\eref}
358
% \begin{macro}{\cref}
359
% \begin{macro}{\sref}
360
% \begin{macro}{\aref}
361
%
362
%   Load the \texttt{caption2} package to improve formatting of captions,
363
%   and provide short referencing commands.
364
%
365
%    \begin{macrocode}
366
\usepackage[centerlast,small,sc]{caption2}
367
\setlength{\captionmargin}{20pt}
368
\newcommand{\fref}[1]{Figure~\ref{#1}}
369
\newcommand{\tref}[1]{Table~\ref{#1}}
370
\newcommand{\eref}[1]{Equation~\ref{#1}}
371
\newcommand{\cref}[1]{Chapter~\ref{#1}}
372
\newcommand{\sref}[1]{Section~\ref{#1}}
373
\newcommand{\aref}[1]{Appendix~\ref{#1}}
374
%    \end{macrocode}
375
%
376
% \end{macro}
377
% \end{macro}
378
% \end{macro}
379
% \end{macro}
380
% \end{macro}
381
% \end{macro}
382
%
383
% \subsection{Float Placement}
384
%
385
% \begin{macro}{\topfraction}
386
% \begin{macro}{\textfraction}
387
%    Preventing figures from appearing on a page by themselves. \LaTeX's figure
388
%    placement algorithm is quite biased in favour of putting figures on a page
389
%    by themselves, instead of on the top of a page with some text below it.
390
%    Fortunately, the parameters of the algorithm can be changed. The main problem
391
%    is that \LaTeX\ per default only allows a part of the top of a text-page (70\%)
392
%    to contain figures, and requires at least 20\% of a page to be text when text and
393
%    figures share a page. These parameters should be set to more reasonable values,
394
%    for example 85\% and 10\%.
395
%    \begin{macrocode}
396
\renewcommand{\topfraction}{0.85}
397
\renewcommand{\bottomfraction}{.85}
398
\renewcommand{\textfraction}{0.1}
399
\renewcommand{\dbltopfraction}{.85}
400
%    \end{macrocode}
401
% \end{macro}
402
% \end{macro}
403
% \begin{macro}{\floatpagefraction}
404
%    This helps, but sometimes \LaTeX\ puts a figure on a page by itself, although it
405
%    would fit perfectly well on the top of a page. This happens when the figure will
406
%    not fit on the page where it was defined. \LaTeX\ then attempts to put it on a
407
%    figures-only page before it attempts to put it at the top of the next page. A page
408
%    may contain figures alone if the figure(s) use at least half the page. To prevent
409
%    half-empty pages this limit should probably be increased to around 75\%.
410
%    \begin{macrocode}
411
\renewcommand{\floatpagefraction}{0.75}
412
\renewcommand{\dblfloatpagefraction}{.75}
413
%    \end{macrocode}
414
%    Be careful not to make \texttt{floatpagefraction} larger than \texttt{topfraction},
415
%    then you risk to produce a figure that can neither go on the top of a text page,
416
%    nor on a page by itself. If that happens, the figure and all later figures will be
417
%    postponed until next time a \texttt{clearpage} is executed (typically at the end of
418
%    a chapter or the end of the document). This will also happen if a figure is too
419
%    large to fit on a page.
420
%    \begin{macrocode}
421
\setcounter{topnumber}{9}
422
\setcounter{bottomnumber}{9}
423
\setcounter{totalnumber}{20}
424
\setcounter{dbltopnumber}{9}
425
%    \end{macrocode}
426
% \end{macro}
427
%
428
%
429
% \subsection{Graphics}
430
%
431
%    Load the \texttt{graphicx} package, so we can include pictures easily. Load the \texttt{epstopdf},
432
%    so that eps files are automatically converted to pdf when pdf\LaTeX\ is used. This requires a
433
%   version of {\em epstopdf} to be installed on you system. You can find a windows version at\newline
434
%   \texttt{http://www.ctan.org/tex-archive/support/epstopdf/epstopdf.exe}.
435
%
436
%    \begin{macrocode}
437
\usepackage{graphicx}
438
\usepackage{epstopdf}
439
%    \end{macrocode}
440
%
441
% \subsection{Subfigures and subtables}
442
%
443
%    Load the \texttt{subfigure} package, so we can include subfigures easily.
444
%
445
%    \begin{macrocode}
446
\usepackage[scriptsize]{subfigure}
447
\usepackage{booktabs}
448
\usepackage{rotating}
449
%    \end{macrocode}
450
%
451
% \subsection{Listings}
452
%
453
%    Load the \texttt{listings} package, so we can include listings easily.
454
%
455
%    \begin{macrocode}
456
\usepackage{listings}
457
\usepackage{lstpatch}
458
\lstset{captionpos=b,
459
        frame=tb,
460
        basicstyle=\scriptsize\ttfamily,
461
        showstringspaces=false,
462
        keepspaces=true}
463
\lstdefinestyle{matlab} {
464
        language=Matlab,
465
        keywordstyle=\color{blue},
466
        commentstyle=\color[rgb]{0.13,0.55,0.13}\em,
467
        stringstyle=\color[rgb]{0.7,0,0} }
468
%    \end{macrocode}
469
%
470
% \subsection{Hyperlinks}
471
%
472
%    Load the \texttt{hyperref} package to provide hyperlinks in pdf and dvi documents.
473
%
474
%    \begin{macrocode}
475
\usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,
476
   bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,
477
   colorlinks,linkcolor={blue},citecolor={blue},urlcolor={red},
478
   pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
479
\pdfstringdefDisableCommands{
480
   \let\\\space
481
}
482
%    \end{macrocode}
483
%
484
% \section{Internal Names}
485
%
486
% \begin{macro}{\supervisor}
487
% \begin{macro}{\examiner}
488
% \begin{macro}{\degree}
489
% \begin{macro}{\authors}
490
% \begin{macro}{\addresses}
491
% \begin{macro}{\university}
492
% \begin{macro}{\UNIVERSITY}
493
% \begin{macro}{\department}
494
% \begin{macro}{\DEPARTMENT}
495
% \begin{macro}{\group}
496
% \begin{macro}{\GROUP}
497
% \begin{macro}{\faculty}
498
% \begin{macro}{\FACULTY}
499
% \begin{macro}{\subject}
500
% \begin{macro}{\keywords}
501
%
502
%    The various elements of the documents are defined
503
%    as control sequences to make it easy to customize this
504
%    style for other parts of the University.
505
%
506
%    \begin{macrocode}
507
\newcommand*{\supervisor}[1]{\def\supname{#1}}
508
\newcommand*{\examiner}[1]{\def\examname{#1}}
509
\newcommand*{\degree}[1]{\def\degreename{#1}}
510
\newcommand*{\authors}[1]{\def\authornames{#1}}
511
\newcommand*{\addresses}[1]{\def\addressnames{#1}}
512
\newcommand*{\university}[1]{\def\univname{#1}}
513
\newcommand*{\UNIVERSITY}[1]{\def\UNIVNAME{#1}}
514
\newcommand*{\department}[1]{\def\deptname{#1}}
515
\newcommand*{\DEPARTMENT}[1]{\def\DEPTNAME{#1}}
516
\newcommand*{\group}[1]{\def\groupname{#1}}
517
\newcommand*{\GROUP}[1]{\def\GROUPNAME{#1}}
518
\newcommand*{\faculty}[1]{\def\facname{#1}}
519
\newcommand*{\FACULTY}[1]{\def\FACNAME{#1}}
520
\newcommand*{\subject}[1]{\def\subjectname{#1}}
521
\newcommand*{\keywords}[1]{\def\keywordnames{#1}}
522
%    \end{macrocode}
523
%
524
% \end{macro}
525
% \end{macro}
526
% \end{macro}
527
% \end{macro}
528
% \end{macro}
529
% \end{macro}
530
% \end{macro}
531
% \end{macro}
532
% \end{macro}
533
% \end{macro}
534
% \end{macro}
535
% \end{macro}
536
% \end{macro}
537
% \end{macro}
538
% \end{macro}
539
%
540
%
541
% \begin{macro}{\supname}
542
% \begin{macro}{\examname}
543
% \begin{macro}{\degreename}
544
% \begin{macro}{\authornames}
545
% \begin{macro}{\univname}
546
% \begin{macro}{\UNIVNAME}
547
% \begin{macro}{\deptname}
548
% \begin{macro}{\DEPTNAME}
549
% \begin{macro}{\groupname}
550
% \begin{macro}{\GROUPNAME}
551
% \begin{macro}{\facname}
552
% \begin{macro}{\FACNAME}
553
% \begin{macro}{\subjectname}
554
% \begin{macro}{\keywordnames}
555
%
556
%    The internal names of the elements are set
557
%    to defaults appropriate to the Department of Electronics and Computer Science.
558
%
559
%    \begin{macrocode}
560
\supervisor  {}
561
\examiner    {}
562
\degree      {}
563
\authors     {}
564
\university  {\texorpdfstring{\href{http://www.soton.ac.uk}
565
                {University of Southampton}}
566
                {University of Southampton}}
567
\UNIVERSITY  {\texorpdfstring{\href{http://www.soton.ac.uk}
568
                {UNIVERSITY OF SOUTHAMPTON}}
569
                {UNIVERSITY OF SOUTHAMPTON}}
570
\department  {\texorpdfstring{\href{http://www.ecs.soton.ac.uk}
571
                {School of Electronics and Computer Science}}
572
                {School of Electronics and Computer Science}}
573
\DEPARTMENT  {\texorpdfstring{\href{http://www.ecs.soton.ac.uk}
574
                {SCHOOL OF ELECTRONICS AND COMPUTER SCIENCE}}
575
                {SCHOOL OF ELECTRONICS AND COMPUTER SCIENCE}}
576
\group       {\texorpdfstring{\href{http://www.isis.ecs.soton.ac.uk}
577
                {Image, Speech and Intelligent Systems Group}}
578
                {Image, Speech and Intelligent Systems Group}}
579
\GROUP       {\texorpdfstring{\href{http://www.isis.ecs.soton.ac.uk}
580
                {IMAGE, SPEECH AND INTELLIGENT SYSTEMS GROUP}}
581
                {IMAGE, SPEECH AND INTELLIGENT SYSTEMS GROUP}}
582
\faculty     {\texorpdfstring{\href{http://www.engineering.soton.ac.uk}
583
                {Faculty of Engineering, Science and Mathematics}}
584
                {Faculty of Engineering, Science and Mathematics}}
585
\FACULTY     {\texorpdfstring{\href{http://www.engineering.soton.ac.uk}
586
                {FACULTY OF ENGINEERING, SCIENCE AND MATHEMATICS}}
587
                {FACULTY OF ENGINEERING, SCIENCE AND MATHEMATICS}}
588
\addresses   {}
589
\subject     {}
590
\keywords    {}
591
%    \end{macrocode}
592
%
593
% \end{macro}
594
% \end{macro}
595
% \end{macro}
596
% \end{macro}
597
% \end{macro}
598
% \end{macro}
599
% \end{macro}
600
% \end{macro}
601
% \end{macro}
602
% \end{macro}
603
% \end{macro}
604
% \end{macro}
605
% \end{macro}
606
% \end{macro}
607
%
608
% \section{Special Pages}
609
%
610
% \subsection{Title Page}
611
%
612
% \begin{macro}{\maketitle}
613
%
614
%    Setup an appropriate title page and pdf strings if we are using
615
%    pdf\LaTeX.
616
%
617
%   \begin{macrocode}
618
%<*thesis|minithesis|progress|project|report|gdp|gdpsummary>}
619
\renewcommand\maketitle{
620
  \btypeout{Title Page}
621
  \hypersetup{pdftitle={\@title}}
622
  \hypersetup{pdfsubject=\subjectname}
623
  \hypersetup{pdfauthor=\authornames}
624
  \hypersetup{pdfkeywords=\keywordnames}
625
  \thispagestyle{empty}
626
  \begin{titlepage}
627
    \let\footnotesize\small
628
    \let\footnoterule\relax
629
    \let \footnote \thanks
630
    \setcounter{footnote}{0}
631
    \null\vfil
632
    \vskip 60\p@
633
    \begin{center}
634
      \setlength{\parskip}{0pt}
635
      {\large\textbf{\UNIVNAME}\par}
636
%<*minithesis|progress|project|gdp|gdpsummary>
637
      {\large \facname \par}
638
%
639
%<*minithesis|progress|project>
640
      {\large \deptname \par}
641
%
642
      \vfill
643
%<*minithesis>
644
      {\large A mini-thesis submitted for transfer from}
645
      {\large MPhil to PhD \par}
646
%
647
%<*progress>
648
      {\large A progress report submitted for continuation}
649
      {\large towards a PhD \par}
650
%
651
%<*project>
652
      {\large A project report submitted for the}
653
      {\large award of \par \degreename \par}
654
%
655
%<*gdp>
656
      {\large A group design project report submitted for}
657
      {\large the award of \par \degreename \par}
658
%
659
%<*gdpsummary>
660
      {\large A group design project summary report submitted}
661
      {\large for the award of \par \degreename \par}
662
%
663
%<*minithesis|progress|project|gdp|gdpsummary>
664
      \vfill
665
      {\normalsize Supervisor: \supname \par}
666
      {\normalsize Examiner: \examname \par}
667
      \vfill
668
      \hspace{6mm}\parbox[t][51mm][s]{89mm}{
669
        \center
670
        \vfill
671
        {\large \bf \@title \par}
672
        \vfill
673
        {\normalsize by \authornames \par}
674
        \vfill
675
        {\normalsize \@date \par}
676
        \vfill
677
      }
678
      \parbox[t][95mm][s]{89mm}{}
679
%
680
%<*thesis|report>
681
      {\huge \bf \@title \par}
682
      \vfill
683
      {\LARGE by \par}
684
      \smallskip
685
      {\LARGE \authornames \par}
686
      \vfill
687
%<*thesis>
688
      {\large A thesis submitted in partial fulfillment for the \par}
689
      {\large degree of Doctor of Philosophy \par}
690
%
691
%      {\large Technical Report \par}
692
      \bigskip
693
      \bigskip
694
%      {\large in the \par}
695
      {\large \facname \par}
696
      {\large \deptname \par}
697
      \bigskip
698
      \bigskip
699
      \bigskip
700
      {\Large \@date \par}
701
      \bigskip
702
%
703
    \end{center}
704
    \par
705
    \@thanks
706
    \vfil\null
707
  \end{titlepage}
708
  \setcounter{footnote}{0}%
709
  \global\let\thanks\relax
710
  \global\let\maketitle\relax
711
  \global\let\@thanks\@empty
712
  \global\let\@author\@empty
713
  \global\let\@date\@empty
714
  \global\let\@title\@empty
715
  \global\let\title\relax
716
  \global\let\author\relax
717
  \global\let\date\relax
718
  \global\let\and\relax
719
  \cleardoublepage
720
}
721
%
722
%<*article>
723
\if@titlepage
724
  \renewcommand\maketitle{
725
    \btypeout{Title Page}
726
    \hypersetup{pdftitle={\@title}}
727
    \hypersetup{pdfsubject={\subjectname}}
728
    \hypersetup{pdfauthor={\authornames}}
729
    \hypersetup{pdfkeywords={\keywordnames}}
730
    \markboth{\authornames}{\@title}
731
    \begin{titlepage}
732
    \thispagestyle{empty}
733
    \let\footnotesize\small
734
    \let\footnoterule\relax
735
    \let \footnote \thanks
736
    \null\vfil
737
    \vskip 60\p@
738
    \begin{center}
739
      {\LARGE \@title \par}
740
      \vskip 3em
741
      {\large \lineskip .75em
742
        \begin{tabular}[t]{c} \authornames \end{tabular}
743
      \par}
744
      \vskip 1em
745
      {\large \lineskip .5em
746
        \begin{tabular}[t]{c} \addressnames \end{tabular}
747
      \par}
748
      \vskip 1.5em
749
      {\large \@date \par}
750
      \if\keywordnames
751
      \else
752
        \quotation
753
        \vskip 1.5em
754
        {\noindent \normalsize
755
            \textbf{Keywords:}
756
            \textit{\keywordnames}
757
        \par}
758
        \endquotation
759
      \fi
760
    \end{center}
761
    \par
762
    \@thanks
763
    \vfil\null
764
    \end{titlepage}
765
    \setcounter{footnote}{0}
766
    \global\let\thanks\relax
767
    \global\let\maketitle\relax
768
    \global\let\@maketitle\relax
769
    \global\let\@thanks\@empty
770
    \global\let\@author\@empty
771
    \global\let\@date\@empty
772
    \global\let\@title\@empty
773
    \global\let\title\relax
774
    \global\let\author\relax
775
    \global\let\date\relax
776
    \global\let\and\relax
777
  }
778
\else
779
  \renewcommand\maketitle{
780
    \btypeout{Title Page}
781
    \hypersetup{pdftitle={\@title}}
782
    \hypersetup{pdfsubject=\subjectname}
783
    \hypersetup{pdfauthor=\authornames}
784
    \hypersetup{pdfkeywords=\keywordnames}
785
    \markboth{\authornames}{\@title}
786
    \thispagestyle{empty}
787
    \par
788
    \begingroup
789
      \renewcommand\thefootnote{\@fnsymbol\c@footnote}
790
      \def\@makefnmark{
791
        \rlap{\@textsuperscript{\normalfont\@thefnmark}}
792
      }
793
      \long\def\@makefntext##1{
794
        \parindent 1em\noindent \hb@xt@1.8em
795
        {\hss\@textsuperscript{\normalfont\@thefnmark}}##1
796
      }
797
      \if@twocolumn
798
        \ifnum \col@number=\@ne
799
          \@maketitle
800
        \else
801
          \twocolumn[\@maketitle]%
802
        \fi
803
      \else
804
        \newpage
805
        % Prevent figures from going at top of page.
806
        \global\@topnum\z@
807
        \@maketitle
808
      \fi
809
      \thispagestyle{plain}\@thanks
810
    \endgroup
811
    \setcounter{footnote}{0}%
812
    \global\let\thanks\relax
813
    \global\let\maketitle\relax
814
    \global\let\@maketitle\relax
815
    \global\let\@thanks\@empty
816
    \global\let\@author\@empty
817
    \global\let\@date\@empty
818
    \global\let\@title\@empty
819
    \global\let\title\relax
820
    \global\let\author\relax
821
    \global\let\date\relax
822
    \global\let\and\relax
823
  }
824
  \def\@maketitle{
825
    \newpage
826
    \null
827
    \vskip 2em
828
    \begin{center}
829
      \let \footnote \thanks
830
      {\LARGE \@title \par}
831
      \vskip 1.5em
832
      {\large \lineskip .5em
833
        \begin{tabular}[t]{c} \authornames \end{tabular}
834
      \par}
835
      \vskip 0.7em
836
      {\large \lineskip .5em
837
        \begin{tabular}[t]{c} \addressnames \end{tabular}
838
      \par}
839
      \vskip 1em
840
      {\large \@date}
841
    \end{center}
842
    \par
843
    \vskip 1.5em
844
  }
845
\fi
846
%
847
%    \end{macrocode}
848
%
849
% \end{macro}
850
%
851
% \subsection{Abstract Page}
852
%
853
% \begin{macro}{\abstract}
854
%
855
%    Setup an appropriate abstract page.
856
%
857
%    \begin{macrocode}
858
%<*thesis|minithesis|progress|project|report|gdp>
859
\newenvironment{abstract}
860
{
861
  \btypeout{Abstract Page}
862
  \thispagestyle{empty}
863
  \null\vfil
864
  \begin{center}
865
    \setlength{\parskip}{0pt}
866
    {\normalsize \UNIVNAME \par}
867
    \bigskip
868
    {\underline{ABSTRACT} \par}
869
    \bigskip
870
    {\normalsize \FACNAME \par}
871
%<*thesis|minithesis|progress|project|report>
872
    {\normalsize \DEPTNAME \par}
873
%
874
    \bigskip
875
%<*thesis>
876
    {\normalsize \underline{Doctor of Philosophy}\par}
877
%
878
%<*minithesis>
879
    {\normalsize \underline{A mini-thesis submitted for transfer from MPhil to PhD}\par}
880
%
881
%<*progress>
882
    {\normalsize \underline{A progress report submitted for continuation towards a PhD}\par}
883
%
884
%<*project>
885
    {\normalsize \underline{A project report submitted for the award of \degreename}\par}
886
%
887
%<*gdp>
888
    {\normalsize \underline{A group design project report submitted for the award of \degreename}\par}
889
%
890
    \bigskip
891
    {\normalsize\bf \@title \par}
892
    \medskip
893
    {\normalsize by \authornames \par}
894
    \bigskip
895
  \end{center}
896
}
897
{
898
  \vfil\vfil\vfil\null
899
  \cleardoublepage
900
}
901
%
902
%<*article>
903
\if@titlepage
904
  \renewenvironment{abstract}{
905
      \titlepage
906
      \null\vfil
907
      \@beginparpenalty\@lowpenalty
908
      \begin{center}
909
        \bfseries \abstractname
910
        \@endparpenalty\@M
911
      \end{center}
912
      \begin{itshape}
913
      \noindent
914
  }
915
  {
916
      \par
917
      \end{itshape}
918
      \if\keywordnames
919
      \else
920
        \quote
921
        \vskip 1.5em
922
        {\noindent \normalsize
923
            \textbf{Keywords:}
924
            \textit{\keywordnames}
925
        \par}
926
        \endquote
927
      \fi
928
      \vfil\null\endtitlepage
929
  }
930
\else
931
  \renewenvironment{abstract}{
932
      \if@twocolumn
933
        \section*{\abstractname}
934
      \else
935
        \small
936
        \begin{center}
937
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}
938
        \end{center}
939
        \quote
940
      \fi
941
      \begin{itshape}
942
  }
943
  {
944
      \end{itshape}
945
      \if\keywordnames
946
      \else
947
        \vskip 1.5em
948
        {\noindent \normalsize
949
            \textbf{Keywords:}
950
            \textit{\keywordnames}
951
        \par}
952
      \fi
953
      \if@twocolumn\else\endquote\fi
954
  }
955
\fi
956
%
957
%    \end{macrocode}
958
%
959
% \end{macro}
960
%
961
% \subsection{Contents Pages}
962
%
963
% \subsubsection{Add to Table of Contents}
964
%
965
%    Ensures numbering for sub-subsections in the table of contents, and provide
966
%    for 6 levels to appear in toc. Define \texttt{addtotoc} to enable adding
967
%    elements to the toc at chapter level, using a dummy counter to fix bookmarks
968
%    in pdf\LaTeX.
969
%
970
%    \begin{macrocode}
971
%<*thesis|minithesis|progress|project|report|gdp|article>
972
\addtocounter{secnumdepth}{1}
973
\setcounter{tocdepth}{6}
974
\newcounter{dummy}
975
\newcommand\addtotoc[1]{
976
\refstepcounter{dummy}
977
%<*thesis|minithesis|progress|project|report|gdp>
978
\addcontentsline{toc}{chapter}{#1}}
979
%
980
%<*article>
981
\addcontentsline{toc}{section}{#1}}
982
%
983
%    \end{macrocode}
984
%
985
% \subsubsection{Table of Contents}
986
%
987
% \begin{macro}{\tableofcontents}
988
%
989
%    Adjust line and paragraph spacing.
990
%
991
%    \begin{macrocode}
992
\renewcommand\tableofcontents{
993
\btypeout{Table of Contents}
994
\begin{spacing}{1}{
995
    \setlength{\parskip}{1pt}
996
    \if@twocolumn
997
      \@restonecoltrue\onecolumn
998
    \else
999
      \@restonecolfalse
1000
    \fi
1001
%<*thesis|minithesis|progress|project|report|gdp>
1002
    \chapter*{\contentsname
1003
%
1004
%<*article>
1005
    \section*{\contentsname
1006
%
1007
        \@mkboth{
1008
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
1009
    \@starttoc{toc}
1010
    \if@restonecol\twocolumn\fi
1011
%   \cleardoublepage
1012
}\end{spacing}
1013
}
1014
%    \end{macrocode}
1015
% \end{macro}
1016
%
1017
% \subsubsection{List of Figures}
1018
%
1019
% \begin{macro}{\listoffigures}
1020
%
1021
%    Adjust line and paragraph spacing.
1022
%
1023
%    \begin{macrocode}
1024
\renewcommand\listoffigures{
1025
\btypeout{List of Figures}
1026
\begin{spacing}{1}{
1027
    \setlength{\parskip}{1pt}
1028
    \if@twocolumn
1029
      \@restonecoltrue\onecolumn
1030
    \else
1031
      \@restonecolfalse
1032
    \fi
1033
%<*thesis|minithesis|progress|project|report|gdp>
1034
    \chapter*{\listfigurename
1035
%
1036
%<*article>
1037
    \section*{\listfigurename
1038
%
1039
      \@mkboth{\MakeUppercase\listfigurename}
1040
              {\MakeUppercase\listfigurename}}
1041
    \@starttoc{lof}
1042
    \if@restonecol\twocolumn\fi
1043
%<*thesis|minithesis|progress|project|report|gdp>
1044
    \cleardoublepage
1045
%
1046
}\end{spacing}
1047
}
1048
%    \end{macrocode}
1049
% \end{macro}
1050
%
1051
% \subsubsection{List of Tables}
1052
%
1053
% \begin{macro}{\listoftables}
1054
%
1055
%    Adjust line and paragraph spacing.
1056
%
1057
%    \begin{macrocode}
1058
\renewcommand\listoftables{
1059
\btypeout{List of Tables}
1060
\begin{spacing}{1}{
1061
    \setlength{\parskip}{1pt}
1062
    \if@twocolumn
1063
      \@restonecoltrue\onecolumn
1064
    \else
1065
      \@restonecolfalse
1066
    \fi
1067
%<*thesis|minithesis|progress|project|report|gdp>
1068
    \chapter*{\listtablename
1069
%
1070
%<*article>
1071
    \section*{\listtablename
1072
%
1073
      \@mkboth{
1074
          \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
1075
    \@starttoc{lot}
1076
    \if@restonecol\twocolumn\fi
1077
%<*thesis|minithesis|progress|project|report|gdp>
1078
    \cleardoublepage
1079
%
1080
}\end{spacing}
1081
}
1082
%    \end{macrocode}
1083
% \end{macro}
1084
%
1085
% \subsection{List of Symbols}
1086
%
1087
% \begin{macro}{\listofsymbols}
1088
%
1089
%    Provide a \texttt{listofsymbols} command to produce a list of symbols,
1090
%
1091
%    \begin{macrocode}
1092
%<*thesis|minithesis|progress|report|article>
1093
\newcommand\listsymbolname{Nomenclature}
1094
%
1095
%<*project|gdp>
1096
\newcommand\listsymbolname{List of Symbols}
1097
%
1098
\usepackage{longtable}
1099
\newcommand\listofsymbols[2]{
1100
\btypeout{\listsymbolname}
1101
\addtotoc{\listsymbolname}
1102
%<*thesis|minithesis|progress|project|report|gdp>
1103
    \chapter*{\listsymbolname
1104
%
1105
%<*article>
1106
    \section*{\listsymbolname
1107
%
1108
      \@mkboth{
1109
          \MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}
1110
\begin{longtable}[c]{#1}#2\end{longtable}\par
1111
%<*thesis|minithesis|progress|project|report|gdp>
1112
    \cleardoublepage
1113
%
1114
}
1115
%
1116
%    \end{macrocode}
1117
%
1118
% \end{macro}
1119
%
1120
% \subsection{Acknowledgements}
1121
%
1122
% \begin{macro}{\acknowledgements}
1123
%
1124
%    Thank someone!
1125
%
1126
%    \begin{macrocode}
1127
\newcommand\acknowledgements[1]{
1128
\btypeout{Acknowledgements}
1129
\addtotoc{Acknowledgements}
1130
%<*thesis|minithesis|progress|project|report|gdp>
1131
\thispagestyle{plain}
1132
\null\vfil
1133
\vskip 60\p@
1134
\begin{center}{\Large\bf Acknowledgements \par}\end{center}
1135
{\normalsize #1}
1136
\vfil\vfil\null
1137
\cleardoublepage
1138
%
1139
%<*article>
1140
\section*{Acknowledgements}
1141
{\normalsize #1}
1142
%
1143
}
1144
%    \end{macrocode}
1145
%
1146
% \end{macro}
1147
%
1148
% \subsection{Dedicatory}
1149
%
1150
% \begin{macro}{\dedicatory}
1151
%
1152
%    Dedicate the document to someone!
1153
%
1154
%    \begin{macrocode}
1155
\newcommand\dedicatory[1]{
1156
\btypeout{Dedicatory}
1157
%<*thesis|minithesis|progress|project|report|gdp>
1158
\thispagestyle{plain}
1159
\null\vfil
1160
\vskip 60\p@
1161
\begin{center}{\Large \sl #1}\end{center}
1162
\vfil\null
1163
\cleardoublepage
1164
%
1165
}
1166
%    \end{macrocode}
1167
%
1168
% \end{macro}
1169
%
1170
% \section{Parts}
1171
%
1172
% \begin{macro}{\frontmatter}
1173
%
1174
%    Modify \texttt{frontmatter}.
1175
%
1176
%    \begin{macrocode}
1177
%<*article>
1178
\newcommand\frontmatter{ }
1179
%
1180
%    \end{macrocode}
1181
% \end{macro}
1182
%
1183
% \begin{macro}{\mainmatter}
1184
%
1185
%    Modify \texttt{mainmatter}.
1186
%
1187
%    \begin{macrocode}
1188
%<*article>
1189
\newcommand\mainmatter{ }
1190
%
1191
%    \end{macrocode}
1192
% \end{macro}
1193
%
1194
% \begin{macro}{\backmatter}
1195
%
1196
%    Modify \texttt{backmatter} to add the bibliography to the table of contents.
1197
%
1198
%    \begin{macrocode}
1199
%<*thesis|minithesis|progress|project|report|gdp>
1200
\renewcommand\backmatter{
1201
  \if@openright
1202
    \cleardoublepage
1203
  \else
1204
    \clearpage
1205
  \fi
1206
  \addtotoc{\bibname}
1207
  \btypeout{\bibname}
1208
  \@mainmatterfalse}
1209
%
1210
%<*article>
1211
\newcommand\bibname{References}
1212
\newcommand\backmatter{
1213
  \addtotoc{\bibname}
1214
  \btypeout{\bibname}
1215
}
1216
%
1217
%    \end{macrocode}
1218
% \end{macro}
1219
%
1220
%    \begin{macrocode}
1221
%
1222
%    \end{macrocode}
1223
%
1224
%
1225
% \section{Example Documents}
1226
%
1227
%    \begin{macrocode}
1228
%<*testthesis>
1229
\documentclass{ecsthesis}      % Use the Thesis Style
1230
%
1231
%<*testminithesis>
1232
\documentclass{ecsminithesis}  % Use the minithesis Style
1233
%
1234
%<*testprogress>
1235
\documentclass{ecsprogress}    % Use the progress Style
1236
%
1237
%<*testproject>
1238
\documentclass{ecsproject}     % Use the Project Style
1239
%
1240
%<*testreport>
1241
\documentclass{ecsreport}      % Use the Report Style
1242
%
1243
%<*testarticle>
1244
\documentclass{ecsarticle}     % Use the Article Style
1245
%
1246
%<*testgdp>
1247
\documentclass{ecsgdp}         % Use the GDP Report Style
1248
%
1249
%<*testgdpsummary>
1250
\documentclass{ecsgdpsummary}  % Use the GDP Summary Report Style
1251
%
1252
%<*testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
1253
\graphicspath{{../Figures/}}   % Location of your graphics files
1254
\usepackage{natbib}            % Use Natbib style for the refs.
1255
\hypersetup{colorlinks=true}   % Set to false for black/white printing
1256
\input{Definitions}            % Include your abbreviations
1257
%% ----------------------------------------------------------------
1258
\begin{document}
1259
\frontmatter
1260
\title      {An Investigation into \dots}
1261
\authors    {\texorpdfstring
1262
             {\href{mailto:S.R.Gunn@ecs.soton.ac.uk}{Steve R. Gunn}}
1263
             {Steve R. Gunn}
1264
            }
1265
\addresses  {\groupname\\\deptname\\\univname}
1266
\date       {\today}
1267
\subject    {}
1268
\keywords   {}
1269
%<*testminithesis|testprogress|testproject|testgdp|testgdpsummary>
1270
\supervisor {Mr Beavis}
1271
\examiner   {Dr Butthead}
1272
%
1273
%<*testproject>
1274
\degree     {BEng Electronic Engineering}
1275
%
1276
%<*testgdp|testgdpsummary>
1277
\degree     {Master of Engineering}
1278
%
1279
\maketitle
1280
%
1281
%<*testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp>
1282
\begin{abstract}
1283
This work is all about \dots
1284
\end{abstract}
1285
\tableofcontents
1286
\listoffigures
1287
\listoftables
1288
\lstlistoflistings
1289
\listofsymbols{ll}{$w$ & The weight vector}
1290
%
1291
%<*testthesis|testminithesis|testprogress|testproject|testreport|testgdp>
1292
\acknowledgements{Thanks to no one.}
1293
\dedicatory{To \dots}
1294
%
1295
%<*testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
1296
\mainmatter
1297
%% ----------------------------------------------------------------
1298
%
1299
%<*testthesis|testminithesis|testprogress|testproject|testreport|testgdp>
1300
\include{Introduction}
1301
\include{Conclusions}
1302
\appendix
1303
\include{AppendixA}
1304
\backmatter
1305
\bibliographystyle{ecs}
1306
\bibliography{ECS}
1307
%
1308
%<*testgdpsummary>
1309
\section*{Introduction}
1310
\section*{Objectives}
1311
\section*{Resources}
1312
\section*{Constraints}
1313
\section*{Approaching the task}
1314
\section*{Team Organisation}
1315
\section*{Important Results}
1316
\section*{Conclusions}
1317
\section*{Recommendations}
1318
%
1319
%<*introduction>
1320
\chapter{Introduction} \label{Chapter:Introduction}
1321
%
1322
%<*testarticle>
1323
\section{Introduction} \label{Section:Introduction}
1324
%
1325
%<*introduction|testarticle>
1326
You probably found all the files from \cite{Gunn:2001:pdflatex}.
1327
\tref{Table:tabex} illustrates the results of my work.
1328
\begin{table}[!htb]
1329
  \centering
1330
  \begin{tabular}{cc}
1331
  \toprule
1332
  \textbf{Training Error} & \textbf{Testing Error}\\
1333
  \midrule
1334
 
1335
  \bottomrule
1336
  \end{tabular}
1337
  \caption{The Results}
1338
  \label{Table:tabex}
1339
\end{table}
1340
 
1341
\fref{Figure:figex} shows why this is the case.
1342
\begin{figure}[!htb]
1343
  \centering
1344
  \includegraphics[width=8cm]{figure}
1345
  \caption{A colourful picture.}
1346
  \label{Figure:figex}
1347
\end{figure}
1348
 
1349
This page shows you a subfigure example in \fref{Figure:figsubex}.
1350
\begin{figure}[!htb]
1351
  \centering
1352
  \subfigure[The left caption]{
1353
    \includegraphics[width=4.2cm]{figure}
1354
    \label{Figure:figsubex:left}
1355
  }
1356
  \subfigure[The right caption]{
1357
    \includegraphics[width=4.2cm]{figure}
1358
    \label{Figure:figsubex:right}
1359
  }
1360
  \caption{A doubly colourful picture.}
1361
  \label{Figure:figsubex}
1362
\end{figure}
1363
%
1364
%<*conclusions>
1365
\chapter{Conclusions} \label{Chapter: Conclusions}
1366
%
1367
%<*testarticle>
1368
%% ----------------------------------------------------------------
1369
\section{Conclusions} \label{Section: Conclusions}
1370
%
1371
%<*conclusions|testarticle>
1372
It works.
1373
%
1374
%<*testarticle>
1375
\acknowledgements{Thanks to no one.}
1376
\backmatter
1377
\bibliographystyle{ecs}
1378
\bibliography{ECS}
1379
\appendix
1380
%
1381
%<*appendix|testarticle>
1382
%<*appendix>
1383
\chapter{Stuff} \label{Chapter:Stuff}
1384
%
1385
%<*testarticle>
1386
%% ----------------------------------------------------------------
1387
\section{Stuff} \label{Section:Stuff}
1388
%
1389
The following gets in the way of the text....
1390
%
1391
%<*testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
1392
\end{document}
1393
%% ----------------------------------------------------------------
1394
%
1395
%    \end{macrocode}
1396
%
1397
% \subsection{Example Figure}
1398
%
1399
%    \begin{macrocode}
1400
%<*figure>
1401
%%BoundingBox: 0 150 600 650
1402
%%EndComments
1403
0.0 setlinewidth
1404
/length 0.1 def
1405
/width 0.02 def
1406
/hsvcircle {
1407
gsave
1408
    /h 0.0 def
1409
 
1410
    pop
1411
    gsave
1412
    0.5 0.0 translate
1413
    newpath
1414
    0.0 0.0 moveto
1415
    length 0.0 lineto
1416
    length width lineto
1417
    0.0 width lineto
1418
    closepath
1419
    h 1.0 1.0 sethsbcolor
1420
    fill
1421
    grestore
1422
    /h h 4 360 div add def
1423
    4 rotate
1424
    } for
1425
grestore
1426
} def
1427
0.0 setlinewidth
1428
0.0 setgray
1429
300 400 translate
1430
500 500 scale
1431
30 rotate
1432
1.0 0.7 scale
1433
-30 rotate
1434
hsvcircle
1435
0.8 0.8 scale
1436
hsvcircle
1437
0.8 0.8 scale
1438
hsvcircle
1439
0.8 0.8 scale
1440
hsvcircle
1441
0.8 0.8 scale
1442
hsvcircle
1443
0.8 0.8 scale
1444
hsvcircle
1445
0.8 0.8 scale
1446
hsvcircle
1447
showpage
1448
%
1449
%    \end{macrocode}
1450
%
1451
% \subsection{Definitions File}
1452
%
1453
%    \begin{macrocode}
1454
%<*definitions>
1455
\newcommand{\BibTeX}{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
1456
 
1457
%% People
1458
\newcounter{address}
1459
\setcounter{address}{1}
1460
\renewcommand{\theaddress}{\textsuperscript{\fnsymbol{address}}}
1461
\newcommand{\address}[1]{\refstepcounter{address}\theaddress#1\\}
1462
\newcommand{\Name}[3]{\texorpdfstring{\href{mailto:#3}{#2}#1}{#2}\xspace}
1463
\newcommand{\SteveRGunn}[1]{\Name{#1}{Steve R. Gunn}{S.R.Gunn@ecs.soton.ac.uk}}
1464
 
1465
%% Dingbats
1466
\newcommand{\tick}{\ding{51}}
1467
\newcommand{\cross}{\ding{55}}
1468
 
1469
%% Calculus
1470
\newcommand{\pd}[2]{\ensuremath{\frac{\partial #1}{\partial #2}}\xspace}
1471
\newcommand{\fd}[2]{\ensuremath{\frac{d #1}{d #2}}\xspace}
1472
\newcommand{\dint}{\ensuremath{\int\!\!\!\int}\xspace}
1473
\newcommand{\tint}{\ensuremath{\int\!\!\!\int\!\!\!\int}\xspace}
1474
 
1475
%% Math Sets
1476
\newcommand{\Q}[1]{\ensuremath{\mathbb{#1}}\xspace}
1477
\newcommand{\R}{\Q{R}}
1478
 
1479
%% Matrix, Vector
1480
\newcommand{\V}[1]{\ensuremath{\boldsymbol{#1}}\xspace}
1481
\newcommand{\M}[1]{\ensuremath{\boldsymbol{#1}}\xspace}
1482
\newcommand{\0}{\V{0}}
1483
\newcommand{\1}{\V{1}}
1484
\newcommand{\I}{\M{I}}
1485
 
1486
%% Math Functions
1487
\newcommand{\F}[1]{\ensuremath{\mathrm{#1}}\xspace}
1488
\newcommand{\sgn}{\F{sgn}}
1489
\newcommand{\tr}{\F{trace}}
1490
\newcommand{\diag}{\F{diag}}
1491
 
1492
%% Math Names
1493
\newcommand{\N}[1]{\ensuremath{\mathit{#1}}\xspace}
1494
 
1495
%% Data
1496
\newcommand{\mc}[1]{\ensuremath{\mathcal{#1}}\xspace}
1497
\newcommand{\Hyp}{\mc{H}}
1498
\newcommand{\D}{\mc{D}}
1499
 
1500
%% Kernel
1501
\newcommand{\K}{\M{K}}
1502
\newcommand{\eins}{\texorpdfstring{\ensuremath{\epsilon}}{\textepsilon}-insensitive\xspace}
1503
\newcommand{\e}{\ensuremath{\epsilon}\xspace}
1504
\newcommand{\Bxi}{\ensuremath{\boldsymbol{\xi}}\xspace}
1505
\newcommand{\Kanova}{\ensuremath{\mathit{K_{ANOVA}}}\xspace}
1506
\newcommand{\Kspline}{\ensuremath{\mathit{K_{spline}}}\xspace}
1507
 
1508
%% Bayesian
1509
\newcommand{\MP}{\ensuremath{\mathit{{\scriptscriptstyle \hspace{-1.5pt}M\hspace{-1.5pt}P}}}\xspace}
1510
\newcommand{\ML}{\ensuremath{\mathit{{\scriptscriptstyle \hspace{-1.5pt}M\hspace{-1.5pt}L}}}\xspace}
1511
\newcommand{\Qw}{\ensuremath{Q_{\w}(\w)}\xspace}
1512
\newcommand{\Qa}{\ensuremath{Q_{\Ba}(\Ba)}\xspace}
1513
\newcommand{\Qb}{\ensuremath{Q_{\beta}(\beta)}\xspace}
1514
\newcommand{\wMPab}{\ensuremath{\w_{\MP|\bar {\Ba},\bar \beta}}\xspace}
1515
\newcommand{\wMP}{\ensuremath{\w_{\MP}}\xspace}
1516
\newcommand{\yMP}{\ensuremath{y_{\MP}}\xspace}
1517
\newcommand{\BaMP}{\ensuremath{\Ba_{\hspace{1pt}\MP}}\xspace}
1518
\newcommand{\aMP}{\ensuremath{\alpha_{\hspace{1pt}\MP}}\xspace}
1519
\newcommand{\bMP}{\ensuremath{\beta_{\hspace{1pt}\MP}}\xspace}
1520
\newcommand{\Sab}{\ensuremath{\M{\Sigma}_{\bar \Ba,\bar \beta}}\xspace}
1521
\newcommand{\Ba}{\ensuremath{\boldsymbol{\alpha}}\xspace}
1522
\newcommand{\Bb}{\ensuremath{\boldsymbol{\beta}}\xspace}
1523
\newcommand{\Bm}{\ensuremath{\boldsymbol{\mu}}\xspace}
1524
\newcommand{\BL}{\ensuremath{\boldsymbol{\Lambda}}\xspace}
1525
\newcommand{\BPhi}{\ensuremath{\boldsymbol{\Phi}}\xspace}
1526
\newcommand{\SMP}{\ensuremath{\M{\Sigma}_{\MP}}\xspace}
1527
 
1528
\newcommand{\Pa}{\ensuremath{P(\alpha|\mathcal{H})}\xspace}
1529
\newcommand{\Pb}{\ensuremath{P(\beta|\mathcal{H})}\xspace}
1530
\newcommand{\Pab}{\ensuremath{P(\alpha,\beta|\mathcal{H})}\xspace}
1531
\newcommand{\Pw}{\ensuremath{P(\w|\mathcal{H})}\xspace}
1532
\newcommand{\PD}{\ensuremath{P(\D|\mathcal{H})}\xspace}
1533
\newcommand{\PwIa}{\ensuremath{P(\w|\alpha,\mathcal{H})}\xspace}
1534
\newcommand{\PDIwb}{\ensuremath{P(\D|\w,\beta,\mathcal{H})}\xspace}
1535
\newcommand{\PDwab}{\ensuremath{P(\D,\w,\alpha,\beta|\mathcal{H})}\xspace}
1536
\newcommand{\PDIw}{\ensuremath{P(\D|\w,\mathcal{H})}\xspace}
1537
\newcommand{\PwID}{\ensuremath{P(\w|\D,\mathcal{H})}\xspace}
1538
\newcommand{\PwabID}{\ensuremath{P(\w,\alpha,\beta|\D,\mathcal{H})}\xspace}
1539
 
1540
\newcommand{\PanH}{\ensuremath{P(\alpha)}\xspace}
1541
\newcommand{\PbnH}{\ensuremath{P(\beta)}\xspace}
1542
\newcommand{\PabnH}{\ensuremath{P(\alpha,\beta)}\xspace}
1543
\newcommand{\PwnH}{\ensuremath{P(\w)}\xspace}
1544
\newcommand{\PDnH}{\ensuremath{P(\D)}\xspace}
1545
\newcommand{\PwIanH}{\ensuremath{P(\w|\alpha)}\xspace}
1546
\newcommand{\PDIwbnH}{\ensuremath{P(\D|\w,\beta)}\xspace}
1547
\newcommand{\PDwabnH}{\ensuremath{P(\D,\w,\Ba,\beta)}\xspace}
1548
\newcommand{\PDIwnH}{\ensuremath{P(\D|\w)}\xspace}
1549
\newcommand{\PwIDnH}{\ensuremath{P(\w|\D)}\xspace}
1550
\newcommand{\PwabIDnH}{\ensuremath{P(\w,\alpha,\beta|\D)}\xspace}
1551
 
1552
\newcommand{\PDwBab}{\ensuremath{P(\D,\w,\Ba,\beta|\mathcal{H})}\xspace}
1553
\newcommand{\PwIBa}{\ensuremath{P(\w|\Ba,\mathcal{H})}\xspace}
1554
\newcommand{\PBab}{\ensuremath{P(\Ba,\beta|\mathcal{H})}\xspace}
1555
\newcommand{\PwBabID}{\ensuremath{P(\w,\Ba,\beta|\D,\mathcal{H})}\xspace}
1556
 
1557
\newcommand{\PBanH}{\ensuremath{P(\Ba)}\xspace}
1558
\newcommand{\PwIBanH}{\ensuremath{P(\w|\Ba)}\xspace}
1559
 
1560
%% Snakes
1561
\newcommand{\Esnake}{\ensuremath{\mathit{E_{snake}}}\xspace}
1562
\newcommand{\Eimage}{\ensuremath{\mathit{E_{image}}}\xspace}
1563
\newcommand{\Econt}{\ensuremath{\mathit{E_{cont}}}\xspace}
1564
\newcommand{\Ecurv}{\ensuremath{\mathit{E_{curv}}}\xspace}
1565
\newcommand{\Eint}{\ensuremath{\mathit{E_{int}}}\xspace}
1566
\newcommand{\Eext}{\ensuremath{\mathit{E_{ext}}}\xspace}
1567
\newcommand{\Eterm}{\ensuremath{\mathit{E_{term}}}\xspace}
1568
\newcommand{\Eline}{\ensuremath{\mathit{E_{line}}}\xspace}
1569
\newcommand{\Eedge}{\ensuremath{\mathit{E_{edge}}}\xspace}
1570
\newcommand{\Econ}{\ensuremath{\mathit{E_{con}}}\xspace}
1571
\newcommand{\Eangle}{\ensuremath{\mathit{E_{angle}}}\xspace}
1572
\newcommand{\Elshape}{\ensuremath{\mathit{E_{lshape}}}\xspace}
1573
\newcommand{\Eedgedir}{\ensuremath{\mathit{E_{edgedir}}}\xspace}
1574
\newcommand{\Emodel}{\ensuremath{\mathit{E_{model}}}\xspace}
1575
\newcommand{\wte}{\ensuremath{\mathit{w_{term}}}\xspace}
1576
\newcommand{\wli}{\ensuremath{\mathit{w_{line}}}\xspace}
1577
\newcommand{\wed}{\ensuremath{\mathit{w_{edge}}}\xspace}
1578
\newcommand{\wco}{\ensuremath{\mathit{w_{con}}}\xspace}
1579
 
1580
 
1581
%% Environments
1582
\newcounter{alg}
1583
\newenvironment{algorithm}[1]
1584
{
1585
    \stepcounter{alg}
1586
    \begin{table}[htb]
1587
    \centering
1588
    \begin{tabular}[t]{ll}
1589
    \hline&\\
1590
    \multicolumn{2}{l}{\bf Algorithm \arabic{alg}: #1}\\&\\
1591
} {
1592
    &\\
1593
    \hline
1594
    \end{tabular}
1595
    \end{table}
1596
}
1597
%
1598
%    \end{macrocode}
1599
%
1600
% \subsection{References File}
1601
%
1602
%    \begin{macrocode}
1603
%<*references>
1604
@MISC{Gunn:2001:pdflatex,
1605
  author =       {S.R. Gunn},
1606
  title =        {PDFLaTeX Instructions},
1607
  year =         {2001},
1608
  url =          {http://www.ecs.soton.ac.uk/~srg/softwaretools/document/}
1609
}
1610
%
1611
%    \end{macrocode}
1612
%
1613
% \subsection{Bibliography Style File}
1614
%
1615
%    \begin{macrocode}
1616
%<*bst>
1617
%% File: `ecs.bst'
1618
%% A modification of `plainnat.bst' for use with natbib package
1619
%%
1620
%% Copyright 1993-1999 Patrick W Daly
1621
%% Max-Planck-Institut f\"ur Aeronomie
1622
%% Max-Planck-Str. 2
1623
%% D-37191 Katlenburg-Lindau
1624
%% Germany
1625
%% E-mail: daly@linmpi.mpg.de
1626
%%
1627
%% This program can be redistributed and/or modified under the terms
1628
%% of the LaTeX Project Public License Distributed from CTAN
1629
%% archives in directory macros/latex/base/lppl.txt; either
1630
%% version 1 of the License, or any later version.
1631
%%
1632
%% Includes field URL for Internet addresses
1633
%%
1634
ENTRY
1635
  { address
1636
    author
1637
    booktitle
1638
    chapter
1639
    edition
1640
    editor
1641
    howpublished
1642
    institution
1643
    isbn
1644
    issn
1645
    journal
1646
    key
1647
    month
1648
    note
1649
    number
1650
    organization
1651
    pages
1652
    publisher
1653
    school
1654
    series
1655
    title
1656
    type
1657
    url
1658
    volume
1659
    year
1660
  }
1661
  {}
1662
  { label extra.label sort.label short.list }
1663
 
1664
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
1665
 
1666
FUNCTION {init.state.consts}
1667
{ #0 'before.all :=
1668
  #1 'mid.sentence :=
1669
  #2 'after.sentence :=
1670
  #3 'after.block :=
1671
}
1672
 
1673
STRINGS { s t }
1674
 
1675
FUNCTION {output.nonnull}
1676
{ 's :=
1677
  output.state mid.sentence =
1678
    { ", " * write$ }
1679
    { output.state after.block =
1680
        { add.period$ write$
1681
          newline$
1682
          "\newblock " write$
1683
        }
1684
        { output.state before.all =
1685
            'write$
1686
            { add.period$ " " * write$ }
1687
          if$
1688
        }
1689
      if$
1690
      mid.sentence 'output.state :=
1691
    }
1692
  if$
1693
  s
1694
}
1695
 
1696
FUNCTION {output}
1697
{ duplicate$ empty$
1698
    'pop$
1699
    'output.nonnull
1700
  if$
1701
}
1702
 
1703
FUNCTION {output.check}
1704
{ 't :=
1705
  duplicate$ empty$
1706
    { pop$ "empty " t * " in " * cite$ * warning$ }
1707
    'output.nonnull
1708
  if$
1709
}
1710
 
1711
FUNCTION {fin.entry}
1712
{ add.period$
1713
  write$
1714
  newline$
1715
}
1716
 
1717
FUNCTION {new.block}
1718
{ output.state before.all =
1719
    'skip$
1720
    { after.block 'output.state := }
1721
  if$
1722
}
1723
 
1724
FUNCTION {new.sentence}
1725
{ output.state after.block =
1726
    'skip$
1727
    { output.state before.all =
1728
        'skip$
1729
        { after.sentence 'output.state := }
1730
      if$
1731
    }
1732
  if$
1733
}
1734
 
1735
FUNCTION {not}
1736
{   { #0 }
1737
    { #1 }
1738
  if$
1739
}
1740
 
1741
FUNCTION {and}
1742
{   'skip$
1743
    { pop$ #0 }
1744
  if$
1745
}
1746
 
1747
FUNCTION {or}
1748
{   { pop$ #1 }
1749
    'skip$
1750
  if$
1751
}
1752
 
1753
FUNCTION {new.block.checka}
1754
{ empty$
1755
    'skip$
1756
    'new.block
1757
  if$
1758
}
1759
 
1760
FUNCTION {new.block.checkb}
1761
{ empty$
1762
  swap$ empty$
1763
  and
1764
    'skip$
1765
    'new.block
1766
  if$
1767
}
1768
 
1769
FUNCTION {new.sentence.checka}
1770
{ empty$
1771
    'skip$
1772
    'new.sentence
1773
  if$
1774
}
1775
 
1776
FUNCTION {new.sentence.checkb}
1777
{ empty$
1778
  swap$ empty$
1779
  and
1780
    'skip$
1781
    'new.sentence
1782
  if$
1783
}
1784
 
1785
FUNCTION {field.or.null}
1786
{ duplicate$ empty$
1787
    { pop$ "" }
1788
    'skip$
1789
  if$
1790
}
1791
 
1792
FUNCTION {emphasize}
1793
{ duplicate$ empty$
1794
    { pop$ "" }
1795
    { "{\em " swap$ * "}" * }
1796
  if$
1797
}
1798
 
1799
INTEGERS { nameptr namesleft numnames }
1800
 
1801
FUNCTION {format.names}
1802
{ 's :=
1803
  #1 'nameptr :=
1804
  s num.names$ 'numnames :=
1805
  numnames 'namesleft :=
1806
    { namesleft #0 > }
1807
    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
1808
      nameptr #1 >
1809
        { namesleft #1 >
1810
            { ", " * t * }
1811
            { numnames #2 >
1812
                { "," * }
1813
                'skip$
1814
              if$
1815
              t "others" =
1816
                { " et~al." * }
1817
                { " and " * t * }
1818
              if$
1819
            }
1820
          if$
1821
        }
1822
        't
1823
      if$
1824
      nameptr #1 + 'nameptr :=
1825
      namesleft #1 - 'namesleft :=
1826
    }
1827
  while$
1828
}
1829
 
1830
FUNCTION {format.key}
1831
{ empty$
1832
    { key field.or.null }
1833
    { "" }
1834
  if$
1835
}
1836
 
1837
FUNCTION {format.authors}
1838
{ author empty$
1839
    { "" }
1840
    { author format.names }
1841
  if$
1842
}
1843
 
1844
FUNCTION {format.editors}
1845
{ editor empty$
1846
    { "" }
1847
    { editor format.names
1848
      editor num.names$ #1 >
1849
        { ", editors" * }
1850
        { ", editor" * }
1851
      if$
1852
    }
1853
  if$
1854
}
1855
 
1856
FUNCTION {format.isbn}
1857
{ isbn empty$
1858
    { "" }
1859
    { new.block "ISBN " isbn * }
1860
  if$
1861
}
1862
 
1863
FUNCTION {format.issn}
1864
{ issn empty$
1865
    { "" }
1866
    { new.block "ISSN " issn * }
1867
  if$
1868
}
1869
 
1870
%FUNCTION {format.url}
1871
%{ url empty$
1872
%    { "" }
1873
%    { new.block "URL \url{" url * "}" * }
1874
%  if$
1875
%}
1876
%
1877
%FUNCTION {format.title}
1878
%{ title empty$
1879
%    { "" }
1880
%    { title "t" change.case$ }
1881
%  if$
1882
%}
1883
FUNCTION {format.url}
1884
{ ""
1885
}
1886
 
1887
FUNCTION {format.title}
1888
{ title empty$
1889
    { "" }
1890
    { url empty$
1891
        { title "t" change.case$ }
1892
        { "\href{" url * "}{" * title "t" change.case$ * "}" * }
1893
      if$
1894
    }
1895
    if$
1896
}
1897
 
1898
 
1899
FUNCTION {format.full.names}
1900
{'s :=
1901
  #1 'nameptr :=
1902
  s num.names$ 'numnames :=
1903
  numnames 'namesleft :=
1904
    { namesleft #0 > }
1905
    { s nameptr
1906
      "{vv~}{ll}" format.name$ 't :=
1907
      nameptr #1 >
1908
        {
1909
          namesleft #1 >
1910
            { ", " * t * }
1911
            {
1912
              numnames #2 >
1913
                { "," * }
1914
                'skip$
1915
              if$
1916
              t "others" =
1917
                { " et~al." * }
1918
                { " and " * t * }
1919
              if$
1920
            }
1921
          if$
1922
        }
1923
        't
1924
      if$
1925
      nameptr #1 + 'nameptr :=
1926
      namesleft #1 - 'namesleft :=
1927
    }
1928
  while$
1929
}
1930
 
1931
FUNCTION {author.editor.full}
1932
{ author empty$
1933
    { editor empty$
1934
        { "" }
1935
        { editor format.full.names }
1936
      if$
1937
    }
1938
    { author format.full.names }
1939
  if$
1940
}
1941
 
1942
FUNCTION {author.full}
1943
{ author empty$
1944
    { "" }
1945
    { author format.full.names }
1946
  if$
1947
}
1948
 
1949
FUNCTION {editor.full}
1950
{ editor empty$
1951
    { "" }
1952
    { editor format.full.names }
1953
  if$
1954
}
1955
 
1956
FUNCTION {make.full.names}
1957
{ type$ "book" =
1958
  type$ "inbook" =
1959
  or
1960
    'author.editor.full
1961
    { type$ "proceedings" =
1962
        'editor.full
1963
        'author.full
1964
      if$
1965
    }
1966
  if$
1967
}
1968
 
1969
FUNCTION {output.bibitem}
1970
{ newline$
1971
  "\bibitem[" write$
1972
  label write$
1973
  ")" make.full.names duplicate$ short.list =
1974
     { pop$ }
1975
     { * }
1976
   if$
1977
  "]{" * write$
1978
  cite$ write$
1979
  "}" write$
1980
  newline$
1981
  ""
1982
  before.all 'output.state :=
1983
}
1984
 
1985
FUNCTION {n.dashify}
1986
{ 't :=
1987
  ""
1988
    { t empty$ not }
1989
    { t #1 #1 substring$ "-" =
1990
        { t #1 #2 substring$ "--" = not
1991
            { "--" *
1992
              t #2 global.max$ substring$ 't :=
1993
            }
1994
            {   { t #1 #1 substring$ "-" = }
1995
                { "-" *
1996
                  t #2 global.max$ substring$ 't :=
1997
                }
1998
              while$
1999
            }
2000
          if$
2001
        }
2002
        { t #1 #1 substring$ *
2003
          t #2 global.max$ substring$ 't :=
2004
        }
2005
      if$
2006
    }
2007
  while$
2008
}
2009
 
2010
FUNCTION {format.date}
2011
{ year duplicate$ empty$
2012
    { "empty year in " cite$ * warning$
2013
       pop$ "" }
2014
    'skip$
2015
  if$
2016
  month empty$
2017
    'skip$
2018
    { month
2019
      " " * swap$ *
2020
    }
2021
  if$
2022
  extra.label *
2023
}
2024
 
2025
FUNCTION {format.btitle}
2026
{ title emphasize
2027
}
2028
 
2029
FUNCTION {tie.or.space.connect}
2030
{ duplicate$ text.length$ #3 <
2031
    { "~" }
2032
    { " " }
2033
  if$
2034
  swap$ * *
2035
}
2036
 
2037
FUNCTION {either.or.check}
2038
{ empty$
2039
    'pop$
2040
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
2041
  if$
2042
}
2043
 
2044
FUNCTION {format.bvolume}
2045
{ volume empty$
2046
    { "" }
2047
    { "volume" volume tie.or.space.connect
2048
      series empty$
2049
        'skip$
2050
        { " of " * series emphasize * }
2051
      if$
2052
      "volume and number" number either.or.check
2053
    }
2054
  if$
2055
}
2056
 
2057
FUNCTION {format.number.series}
2058
{ volume empty$
2059
    { number empty$
2060
        { series field.or.null }
2061
        { output.state mid.sentence =
2062
            { "number" }
2063
            { "Number" }
2064
          if$
2065
          number tie.or.space.connect
2066
          series empty$
2067
            { "there's a number but no series in " cite$ * warning$ }
2068
            { " in " * series * }
2069
          if$
2070
        }
2071
      if$
2072
    }
2073
    { "" }
2074
  if$
2075
}
2076
 
2077
FUNCTION {format.edition}
2078
{ edition empty$
2079
    { "" }
2080
    { output.state mid.sentence =
2081
        { edition "l" change.case$ " edition" * }
2082
        { edition "t" change.case$ " edition" * }
2083
      if$
2084
    }
2085
  if$
2086
}
2087
 
2088
INTEGERS { multiresult }
2089
 
2090
FUNCTION {multi.page.check}
2091
{ 't :=
2092
  #0 'multiresult :=
2093
    { multiresult not
2094
      t empty$ not
2095
      and
2096
    }
2097
    { t #1 #1 substring$
2098
      duplicate$ "-" =
2099
      swap$ duplicate$ "," =
2100
      swap$ "+" =
2101
      or or
2102
        { #1 'multiresult := }
2103
        { t #2 global.max$ substring$ 't := }
2104
      if$
2105
    }
2106
  while$
2107
  multiresult
2108
}
2109
 
2110
FUNCTION {format.pages}
2111
{ pages empty$
2112
    { "" }
2113
    { pages multi.page.check
2114
        { "pages" pages n.dashify tie.or.space.connect }
2115
        { "page" pages tie.or.space.connect }
2116
      if$
2117
    }
2118
  if$
2119
}
2120
 
2121
FUNCTION {format.vol.num.pages}
2122
{ volume field.or.null
2123
  number empty$
2124
    'skip$
2125
    { "\penalty0 (" number * ")" * *
2126
      volume empty$
2127
        { "there's a number but no volume in " cite$ * warning$ }
2128
        'skip$
2129
      if$
2130
    }
2131
  if$
2132
  pages empty$
2133
    'skip$
2134
    { duplicate$ empty$
2135
        { pop$ format.pages }
2136
        { ":\penalty0 " * pages n.dashify * }
2137
      if$
2138
    }
2139
  if$
2140
}
2141
 
2142
FUNCTION {format.chapter.pages}
2143
{ chapter empty$
2144
    'format.pages
2145
    { type empty$
2146
        { "chapter" }
2147
        { type "l" change.case$ }
2148
      if$
2149
      chapter tie.or.space.connect
2150
      pages empty$
2151
        'skip$
2152
        { ", " * format.pages * }
2153
      if$
2154
    }
2155
  if$
2156
}
2157
 
2158
FUNCTION {format.in.ed.booktitle}
2159
{ booktitle empty$
2160
    { "" }
2161
    { editor empty$
2162
        { "In " booktitle emphasize * }
2163
        { "In " format.editors * ", " * booktitle emphasize * }
2164
      if$
2165
    }
2166
  if$
2167
}
2168
 
2169
FUNCTION {empty.misc.check}
2170
{ author empty$ title empty$ howpublished empty$
2171
  month empty$ year empty$ note empty$
2172
  and and and and and
2173
  key empty$ not and
2174
    { "all relevant fields are empty in " cite$ * warning$ }
2175
    'skip$
2176
  if$
2177
}
2178
 
2179
FUNCTION {format.thesis.type}
2180
{ type empty$
2181
    'skip$
2182
    { pop$
2183
      type "t" change.case$
2184
    }
2185
  if$
2186
}
2187
 
2188
FUNCTION {format.tr.number}
2189
{ type empty$
2190
    { "Technical Report" }
2191
    'type
2192
  if$
2193
  number empty$
2194
    { "t" change.case$ }
2195
    { number tie.or.space.connect }
2196
  if$
2197
}
2198
 
2199
FUNCTION {format.article.crossref}
2200
{ key empty$
2201
    { journal empty$
2202
        { "need key or journal for " cite$ * " to crossref " * crossref *
2203
          warning$
2204
          ""
2205
        }
2206
        { "In {\em " journal * "\/}" * }
2207
      if$
2208
    }
2209
    { "In " key * }
2210
  if$
2211
  " \citep{" * crossref * "}" *
2212
}
2213
 
2214
FUNCTION {format.book.crossref}
2215
{ volume empty$
2216
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
2217
      "In "
2218
    }
2219
    { "Volume" volume tie.or.space.connect
2220
      " of " *
2221
    }
2222
  if$
2223
  editor empty$
2224
  editor field.or.null author field.or.null =
2225
  or
2226
    { key empty$
2227
        { series empty$
2228
            { "need editor, key, or series for " cite$ * " to crossref " *
2229
              crossref * warning$
2230
              "" *
2231
            }
2232
            { "{\em " * series * "\/}" * }
2233
          if$
2234
        }
2235
        { key * }
2236
      if$
2237
    }
2238
    'skip$
2239
  if$
2240
  ", \citet{" * crossref * "}" *
2241
}
2242
 
2243
FUNCTION {format.incoll.inproc.crossref}
2244
{ editor empty$
2245
  editor field.or.null author field.or.null =
2246
  or
2247
    { key empty$
2248
        { booktitle empty$
2249
            { "need editor, key, or booktitle for " cite$ * " to crossref " *
2250
              crossref * warning$
2251
              ""
2252
            }
2253
            { "In {\em " booktitle * "\/}" * }
2254
          if$
2255
        }
2256
        { "In " key * }
2257
      if$
2258
    }
2259
    { "In " }
2260
  if$
2261
  " \citet{" * crossref * "}" *
2262
}
2263
 
2264
FUNCTION {article}
2265
{ output.bibitem
2266
  format.authors "author" output.check
2267
  author format.key output
2268
  new.block
2269
  format.title "title" output.check
2270
  new.block
2271
  crossref missing$
2272
    { journal emphasize "journal" output.check
2273
      format.vol.num.pages output
2274
      format.date "year" output.check
2275
    }
2276
    { format.article.crossref output.nonnull
2277
      format.pages output
2278
    }
2279
  if$
2280
  format.issn output
2281
  format.url output
2282
  new.block
2283
  note output
2284
  fin.entry
2285
}
2286
 
2287
FUNCTION {book}
2288
{ output.bibitem
2289
  author empty$
2290
    { format.editors "author and editor" output.check
2291
      editor format.key output
2292
    }
2293
    { format.authors output.nonnull
2294
      crossref missing$
2295
        { "author and editor" editor either.or.check }
2296
        'skip$
2297
      if$
2298
    }
2299
  if$
2300
  new.block
2301
  format.btitle "title" output.check
2302
  crossref missing$
2303
    { format.bvolume output
2304
      new.block
2305
      format.number.series output
2306
      new.sentence
2307
      publisher "publisher" output.check
2308
      address output
2309
    }
2310
    { new.block
2311
      format.book.crossref output.nonnull
2312
    }
2313
  if$
2314
  format.edition output
2315
  format.date "year" output.check
2316
  format.isbn output
2317
  format.url output
2318
  new.block
2319
  note output
2320
  fin.entry
2321
}
2322
 
2323
FUNCTION {booklet}
2324
{ output.bibitem
2325
  format.authors output
2326
  author format.key output
2327
  new.block
2328
  format.title "title" output.check
2329
  howpublished address new.block.checkb
2330
  howpublished output
2331
  address output
2332
  format.date output
2333
  format.isbn output
2334
  format.url output
2335
  new.block
2336
  note output
2337
  fin.entry
2338
}
2339
 
2340
FUNCTION {inbook}
2341
{ output.bibitem
2342
  author empty$
2343
    { format.editors "author and editor" output.check
2344
      editor format.key output
2345
    }
2346
    { format.authors output.nonnull
2347
      crossref missing$
2348
        { "author and editor" editor either.or.check }
2349
        'skip$
2350
      if$
2351
    }
2352
  if$
2353
  new.block
2354
  format.btitle "title" output.check
2355
  crossref missing$
2356
    { format.bvolume output
2357
      format.chapter.pages "chapter and pages" output.check
2358
      new.block
2359
      format.number.series output
2360
      new.sentence
2361
      publisher "publisher" output.check
2362
      address output
2363
    }
2364
    { format.chapter.pages "chapter and pages" output.check
2365
      new.block
2366
      format.book.crossref output.nonnull
2367
    }
2368
  if$
2369
  format.edition output
2370
  format.date "year" output.check
2371
  format.isbn output
2372
  format.url output
2373
  new.block
2374
  note output
2375
  fin.entry
2376
}
2377
 
2378
FUNCTION {incollection}
2379
{ output.bibitem
2380
  format.authors "author" output.check
2381
  author format.key output
2382
  new.block
2383
  format.title "title" output.check
2384
  new.block
2385
  crossref missing$
2386
    { format.in.ed.booktitle "booktitle" output.check
2387
      format.bvolume output
2388
      format.number.series output
2389
      format.chapter.pages output
2390
      new.sentence
2391
      publisher "publisher" output.check
2392
      address output
2393
      format.edition output
2394
      format.date "year" output.check
2395
    }
2396
    { format.incoll.inproc.crossref output.nonnull
2397
      format.chapter.pages output
2398
    }
2399
  if$
2400
  format.isbn output
2401
  format.url output
2402
  new.block
2403
  note output
2404
  fin.entry
2405
}
2406
 
2407
FUNCTION {inproceedings}
2408
{ output.bibitem
2409
  format.authors "author" output.check
2410
  author format.key output
2411
  new.block
2412
  format.title "title" output.check
2413
  new.block
2414
  crossref missing$
2415
    { format.in.ed.booktitle "booktitle" output.check
2416
      format.bvolume output
2417
      format.number.series output
2418
      format.pages output
2419
      address empty$
2420
        { organization publisher new.sentence.checkb
2421
          organization output
2422
          publisher output
2423
          format.date "year" output.check
2424
        }
2425
        { address output.nonnull
2426
          format.date "year" output.check
2427
          new.sentence
2428
          organization output
2429
          publisher output
2430
        }
2431
      if$
2432
    }
2433
    { format.incoll.inproc.crossref output.nonnull
2434
      format.pages output
2435
    }
2436
  if$
2437
  format.isbn output
2438
  format.url output
2439
  new.block
2440
  note output
2441
  fin.entry
2442
}
2443
 
2444
FUNCTION {conference} { inproceedings }
2445
 
2446
FUNCTION {manual}
2447
{ output.bibitem
2448
  format.authors output
2449
  author format.key output
2450
  new.block
2451
  format.btitle "title" output.check
2452
  organization address new.block.checkb
2453
  organization output
2454
  address output
2455
  format.edition output
2456
  format.date output
2457
  format.url output
2458
  new.block
2459
  note output
2460
  fin.entry
2461
}
2462
 
2463
FUNCTION {mastersthesis}
2464
{ output.bibitem
2465
  format.authors "author" output.check
2466
  author format.key output
2467
  new.block
2468
  format.title "title" output.check
2469
  new.block
2470
  "Master's thesis" format.thesis.type output.nonnull
2471
  school "school" output.check
2472
  address output
2473
  format.date "year" output.check
2474
  format.url output
2475
  new.block
2476
  note output
2477
  fin.entry
2478
}
2479
 
2480
FUNCTION {misc}
2481
{ output.bibitem
2482
  format.authors output
2483
  author format.key output
2484
  title howpublished new.block.checkb
2485
  format.title output
2486
  howpublished new.block.checka
2487
  howpublished output
2488
  format.date output
2489
  format.issn output
2490
  format.url output
2491
  new.block
2492
  note output
2493
  fin.entry
2494
  empty.misc.check
2495
}
2496
 
2497
FUNCTION {phdthesis}
2498
{ output.bibitem
2499
  format.authors "author" output.check
2500
  author format.key output
2501
  new.block
2502
  format.btitle "title" output.check
2503
  new.block
2504
  "PhD thesis" format.thesis.type output.nonnull
2505
  school "school" output.check
2506
  address output
2507
  format.date "year" output.check
2508
  format.url output
2509
  new.block
2510
  note output
2511
  fin.entry
2512
}
2513
 
2514
FUNCTION {proceedings}
2515
{ output.bibitem
2516
  format.editors output
2517
  editor format.key output
2518
  new.block
2519
  format.btitle "title" output.check
2520
  format.bvolume output
2521
  format.number.series output
2522
  address output
2523
  format.date "year" output.check
2524
  new.sentence
2525
  organization output
2526
  publisher output
2527
  format.isbn output
2528
  format.url output
2529
  new.block
2530
  note output
2531
  fin.entry
2532
}
2533
 
2534
FUNCTION {techreport}
2535
{ output.bibitem
2536
  format.authors "author" output.check
2537
  author format.key output
2538
  new.block
2539
  format.title "title" output.check
2540
  new.block
2541
  format.tr.number output.nonnull
2542
  institution "institution" output.check
2543
  address output
2544
  format.date "year" output.check
2545
  format.url output
2546
  new.block
2547
  note output
2548
  fin.entry
2549
}
2550
 
2551
FUNCTION {unpublished}
2552
{ output.bibitem
2553
  format.authors "author" output.check
2554
  author format.key output
2555
  new.block
2556
  format.title "title" output.check
2557
  format.url output
2558
  new.block
2559
  note "note" output.check
2560
  format.date output
2561
  fin.entry
2562
}
2563
 
2564
FUNCTION {default.type} { misc }
2565
 
2566
 
2567
MACRO {jan} {"January"}
2568
 
2569
MACRO {feb} {"February"}
2570
 
2571
MACRO {mar} {"March"}
2572
 
2573
MACRO {apr} {"April"}
2574
 
2575
MACRO {may} {"May"}
2576
 
2577
MACRO {jun} {"June"}
2578
 
2579
MACRO {jul} {"July"}
2580
 
2581
MACRO {aug} {"August"}
2582
 
2583
MACRO {sep} {"September"}
2584
 
2585
MACRO {oct} {"October"}
2586
 
2587
MACRO {nov} {"November"}
2588
 
2589
MACRO {dec} {"December"}
2590
 
2591
 
2592
 
2593
MACRO {acmcs} {"ACM Computing Surveys"}
2594
 
2595
MACRO {acta} {"Acta Informatica"}
2596
 
2597
MACRO {cacm} {"Communications of the ACM"}
2598
 
2599
MACRO {ibmjrd} {"IBM Journal of Research and Development"}
2600
 
2601
MACRO {ibmsj} {"IBM Systems Journal"}
2602
 
2603
MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
2604
 
2605
MACRO {ieeetc} {"IEEE Transactions on Computers"}
2606
 
2607
MACRO {ieeetcad}
2608
 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
2609
 
2610
MACRO {ipl} {"Information Processing Letters"}
2611
 
2612
MACRO {jacm} {"Journal of the ACM"}
2613
 
2614
MACRO {jcss} {"Journal of Computer and System Sciences"}
2615
 
2616
MACRO {scp} {"Science of Computer Programming"}
2617
 
2618
MACRO {sicomp} {"SIAM Journal on Computing"}
2619
 
2620
MACRO {tocs} {"ACM Transactions on Computer Systems"}
2621
 
2622
MACRO {tods} {"ACM Transactions on Database Systems"}
2623
 
2624
MACRO {tog} {"ACM Transactions on Graphics"}
2625
 
2626
MACRO {toms} {"ACM Transactions on Mathematical Software"}
2627
 
2628
MACRO {toois} {"ACM Transactions on Office Information Systems"}
2629
 
2630
MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
2631
 
2632
MACRO {tcs} {"Theoretical Computer Science"}
2633
 
2634
 
2635
READ
2636
 
2637
FUNCTION {sortify}
2638
{ purify$
2639
  "l" change.case$
2640
}
2641
 
2642
INTEGERS { len }
2643
 
2644
FUNCTION {chop.word}
2645
{ 's :=
2646
  'len :=
2647
  s #1 len substring$ =
2648
    { s len #1 + global.max$ substring$ }
2649
    's
2650
  if$
2651
}
2652
 
2653
FUNCTION {format.lab.names}
2654
{ 's :=
2655
  s #1 "{vv~}{ll}" format.name$
2656
  s num.names$ duplicate$
2657
  #2 >
2658
    { pop$ " et~al." * }
2659
    { #2 <
2660
        'skip$
2661
        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
2662
            { " et~al." * }
2663
            { " and " * s #2 "{vv~}{ll}" format.name$ * }
2664
          if$
2665
        }
2666
      if$
2667
    }
2668
  if$
2669
}
2670
 
2671
FUNCTION {author.key.label}
2672
{ author empty$
2673
    { key empty$
2674
        { cite$ #1 #3 substring$ }
2675
        'key
2676
      if$
2677
    }
2678
    { author format.lab.names }
2679
  if$
2680
}
2681
 
2682
FUNCTION {author.editor.key.label}
2683
{ author empty$
2684
    { editor empty$
2685
        { key empty$
2686
            { cite$ #1 #3 substring$ }
2687
            'key
2688
          if$
2689
        }
2690
        { editor format.lab.names }
2691
      if$
2692
    }
2693
    { author format.lab.names }
2694
  if$
2695
}
2696
 
2697
FUNCTION {author.key.organization.label}
2698
{ author empty$
2699
    { key empty$
2700
        { organization empty$
2701
            { cite$ #1 #3 substring$ }
2702
            { "The " #4 organization chop.word #3 text.prefix$ }
2703
          if$
2704
        }
2705
        'key
2706
      if$
2707
    }
2708
    { author format.lab.names }
2709
  if$
2710
}
2711
 
2712
FUNCTION {editor.key.organization.label}
2713
{ editor empty$
2714
    { key empty$
2715
        { organization empty$
2716
            { cite$ #1 #3 substring$ }
2717
            { "The " #4 organization chop.word #3 text.prefix$ }
2718
          if$
2719
        }
2720
        'key
2721
      if$
2722
    }
2723
    { editor format.lab.names }
2724
  if$
2725
}
2726
 
2727
FUNCTION {calc.short.authors}
2728
{ type$ "book" =
2729
  type$ "inbook" =
2730
  or
2731
    'author.editor.key.label
2732
    { type$ "proceedings" =
2733
        'editor.key.organization.label
2734
        { type$ "manual" =
2735
            'author.key.organization.label
2736
            'author.key.label
2737
          if$
2738
        }
2739
      if$
2740
    }
2741
  if$
2742
  'short.list :=
2743
}
2744
 
2745
FUNCTION {calc.label}
2746
{ calc.short.authors
2747
  short.list
2748
  "("
2749
  *
2750
  year duplicate$ empty$
2751
  short.list key field.or.null = or
2752
     { pop$ "" }
2753
     'skip$
2754
  if$
2755
  *
2756
  'label :=
2757
}
2758
 
2759
FUNCTION {sort.format.names}
2760
{ 's :=
2761
  #1 'nameptr :=
2762
  ""
2763
  s num.names$ 'numnames :=
2764
  numnames 'namesleft :=
2765
    { namesleft #0 > }
2766
    { nameptr #1 >
2767
        { "   " * }
2768
        'skip$
2769
      if$
2770
      s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
2771
      nameptr numnames = t "others" = and
2772
        { "et al" * }
2773
        { t sortify * }
2774
      if$
2775
      nameptr #1 + 'nameptr :=
2776
      namesleft #1 - 'namesleft :=
2777
    }
2778
  while$
2779
}
2780
 
2781
FUNCTION {sort.format.title}
2782
{ 't :=
2783
  "A " #2
2784
    "An " #3
2785
      "The " #4 t chop.word
2786
    chop.word
2787
  chop.word
2788
  sortify
2789
  #1 global.max$ substring$
2790
}
2791
 
2792
FUNCTION {author.sort}
2793
{ author empty$
2794
    { key empty$
2795
        { "to sort, need author or key in " cite$ * warning$
2796
          ""
2797
        }
2798
        { key sortify }
2799
      if$
2800
    }
2801
    { author sort.format.names }
2802
  if$
2803
}
2804
 
2805
FUNCTION {author.editor.sort}
2806
{ author empty$
2807
    { editor empty$
2808
        { key empty$
2809
            { "to sort, need author, editor, or key in " cite$ * warning$
2810
              ""
2811
            }
2812
            { key sortify }
2813
          if$
2814
        }
2815
        { editor sort.format.names }
2816
      if$
2817
    }
2818
    { author sort.format.names }
2819
  if$
2820
}
2821
 
2822
FUNCTION {author.organization.sort}
2823
{ author empty$
2824
    { organization empty$
2825
        { key empty$
2826
            { "to sort, need author, organization, or key in " cite$ * warning$
2827
              ""
2828
            }
2829
            { key sortify }
2830
          if$
2831
        }
2832
        { "The " #4 organization chop.word sortify }
2833
      if$
2834
    }
2835
    { author sort.format.names }
2836
  if$
2837
}
2838
 
2839
FUNCTION {editor.organization.sort}
2840
{ editor empty$
2841
    { organization empty$
2842
        { key empty$
2843
            { "to sort, need editor, organization, or key in " cite$ * warning$
2844
              ""
2845
            }
2846
            { key sortify }
2847
          if$
2848
        }
2849
        { "The " #4 organization chop.word sortify }
2850
      if$
2851
    }
2852
    { editor sort.format.names }
2853
  if$
2854
}
2855
 
2856
FUNCTION {presort}
2857
{ calc.label
2858
  label sortify
2859
  "    "
2860
  *
2861
  type$ "book" =
2862
  type$ "inbook" =
2863
  or
2864
    'author.editor.sort
2865
    { type$ "proceedings" =
2866
        'editor.organization.sort
2867
        { type$ "manual" =
2868
            'author.organization.sort
2869
            'author.sort
2870
          if$
2871
        }
2872
      if$
2873
    }
2874
  if$
2875
  "    "
2876
  *
2877
  year field.or.null sortify
2878
  *
2879
  "    "
2880
  *
2881
  title field.or.null
2882
  sort.format.title
2883
  *
2884
  #1 entry.max$ substring$
2885
  'sort.label :=
2886
  sort.label *
2887
  #1 entry.max$ substring$
2888
  'sort.key$ :=
2889
}
2890
 
2891
ITERATE {presort}
2892
 
2893
SORT
2894
 
2895
STRINGS { longest.label last.label next.extra }
2896
 
2897
INTEGERS { longest.label.width last.extra.num number.label }
2898
 
2899
FUNCTION {initialize.longest.label}
2900
{ "" 'longest.label :=
2901
  #0 int.to.chr$ 'last.label :=
2902
  "" 'next.extra :=
2903
  #0 'longest.label.width :=
2904
  #0 'last.extra.num :=
2905
  #0 'number.label :=
2906
}
2907
 
2908
FUNCTION {forward.pass}
2909
{ last.label label =
2910
    { last.extra.num #1 + 'last.extra.num :=
2911
      last.extra.num int.to.chr$ 'extra.label :=
2912
    }
2913
    { "a" chr.to.int$ 'last.extra.num :=
2914
      "" 'extra.label :=
2915
      label 'last.label :=
2916
    }
2917
  if$
2918
  number.label #1 + 'number.label :=
2919
}
2920
 
2921
FUNCTION {reverse.pass}
2922
{ next.extra "b" =
2923
    { "a" 'extra.label := }
2924
    'skip$
2925
  if$
2926
  extra.label 'next.extra :=
2927
  extra.label
2928
  duplicate$ empty$
2929
    'skip$
2930
    { "{\natexlab{" swap$ * "}}" * }
2931
  if$
2932
  'extra.label :=
2933
  label extra.label * 'label :=
2934
}
2935
 
2936
EXECUTE {initialize.longest.label}
2937
 
2938
ITERATE {forward.pass}
2939
 
2940
REVERSE {reverse.pass}
2941
 
2942
FUNCTION {bib.sort.order}
2943
{ sort.label  'sort.key$ :=
2944
}
2945
 
2946
ITERATE {bib.sort.order}
2947
 
2948
SORT
2949
 
2950
FUNCTION {begin.bib}
2951
{   preamble$ empty$
2952
    'skip$
2953
    { preamble$ write$ newline$ }
2954
  if$
2955
  "\begin{thebibliography}{" number.label int.to.str$ * "}" *
2956
  write$ newline$
2957
  "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
2958
  write$ newline$
2959
  "\expandafter\ifx\csname url\endcsname\relax" write$ newline$
2960
  "  \def\url#1{{\tt #1}}\fi" write$ newline$
2961
}
2962
 
2963
EXECUTE {begin.bib}
2964
 
2965
EXECUTE {init.state.consts}
2966
 
2967
ITERATE {call.type$}
2968
 
2969
FUNCTION {end.bib}
2970
{ newline$
2971
  "\end{thebibliography}" write$ newline$
2972
}
2973
 
2974
EXECUTE {end.bib}
2975
%
2976
%    \end{macrocode}
2977
%
2978
% \Finale
2979
%
2980
\endinput

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.