diff options
Diffstat (limited to 'tex/thesis/style')
-rw-r--r-- | tex/thesis/style/bib.sty | 8 | ||||
-rw-r--r-- | tex/thesis/style/draftcopy.sty | 504 | ||||
-rw-r--r-- | tex/thesis/style/footmisc.sty | 732 | ||||
-rw-r--r-- | tex/thesis/style/mybibstyle.bst | 1586 | ||||
-rw-r--r-- | tex/thesis/style/prettyref.sty | 58 | ||||
-rw-r--r-- | tex/thesis/style/sha.sty | 74 | ||||
-rw-r--r-- | tex/thesis/style/varioref.sty | 670 |
7 files changed, 3632 insertions, 0 deletions
diff --git a/tex/thesis/style/bib.sty b/tex/thesis/style/bib.sty new file mode 100644 index 0000000..ff87571 --- /dev/null +++ b/tex/thesis/style/bib.sty @@ -0,0 +1,8 @@ +\ProvidesPackage{style/bib} + +\usepackage{natbib} +\renewcommand{\cite}[1]{\citep{#1}} +\newcommand{\newcite}[1]{\citet{#1}} +\newcommand{\shortcite}[1]{\citeyearpar{#1}} +\newcommand{\owncite}[1]{\citeauthor{#1}'s \citeyearpar{#1}} +\newcommand{\seecite}[1]{\citep[see][]{#1}} diff --git a/tex/thesis/style/draftcopy.sty b/tex/thesis/style/draftcopy.sty new file mode 100644 index 0000000..34bf02a --- /dev/null +++ b/tex/thesis/style/draftcopy.sty @@ -0,0 +1,504 @@ +\iffalse +%% Package draftcopy to use with LaTeX2e +%% This package is used to print on some pages the word `DRAFT' +%% (or the language dependend analogon) ``behind'' the intended stuff. +%% +%% Copyright (C) 1995 Dr. Juergen Vollmer +%% Viktoriastrasse 15, D-76133 Karlsruhe, Germany +%% Juergen.Vollmer@acm.org +%% +%% Modified by David Symonds, 2003. +\fi + + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{style/draftcopy}[2003/10/08 v2.2] + +\newif\ifdraftcopy@conditional +\newif\ifdraftcopy@draft +\newif\ifdraftcopy@final +\DeclareOption{conditional}{ + \draftcopy@conditionaltrue +} +\DeclareOption{draft}{ + \draftcopy@drafttrue +} +\DeclareOption{final}{ + \draftcopy@finaltrue +} + +\def\draftcopy@Timestamp{} +\def\draftcopy@version{} +\newcount\draftcopy@hour \newcount\draftcopy@minute +\draftcopy@hour=\time +\divide \draftcopy@hour by 60 +\draftcopy@minute=\time +\count@=\draftcopy@hour +\multiply \count@ by -60 +\advance \draftcopy@minute by \count@ +\newcommand{\draftcopy@daytime}{% + \ifnum\draftcopy@hour=0 00\else\ifnum\draftcopy@hour<10 0\fi% + \number\draftcopy@hour\fi:% + \ifnum\draftcopy@minute<10 0\fi\number\draftcopy@minute% +} + +\DeclareOption{timestamp}{ + \def\draftcopy@Timestamp{% + \draftcopy@Show + \draftcopy@PageX \draftcopy@PageY -40 add moveto + /Times-Roman findfont 50 \draftcopy@ScaleFactor mul scalefont setfont + (\draftcopy@version \Today\space--\space\draftcopy@daytime) + } +} + + % VTEX-support: Thanks to "MicroPress Inc." <support@micropress-inc.com> +\let\immediate@special=\special +\DeclareOption{vtex}{ + \def\immediate@special{\immediate\special} + \immediate@special{!bophook bop-hook} + \def\draftcopy@BOPhook{/bop-hook} + \def\draftcopy@UserDictCmd{pS: userdict } + % MV & AK <mv@micropress-inc.com> +} +\DeclareOption{dvips}{ + \def\draftcopy@BOPhook{/bop-hook} + \def\draftcopy@UserDictCmd{! userdict } +} +\DeclareOption{dvipsone}{ + % thanks to V. P. Stokes <virgil.stokes@neuro.ki.se> + % thanks to Y&Y Help Line <support@YandY.com> + % thanks to "H. Salehfar" <hsalehfa@sage.und.nodak.edu> + \def\draftcopy@BOPhook{/bphook} + \def\draftcopy@UserDictCmd{! dvidict} +} +\DeclareOption{textures}{ + % thanks to Jerome LAURENS \texttt{laurens@u-bourgogne.fr> + \def\draftcopy@BOPhook{/bop-hook} + \def\draftcopy@UserDictCmd{prepostscript userdict} +} + +\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}} + +\DeclareOption{xdvi}{\ExecuteOptions{dvips}} +\DeclareOption{dvi2ps}{\ExecuteOptions{dvips}} +\DeclareOption{dvialw}{\ExecuteOptions{dvips}} +\DeclareOption{dvilaser}{\ExecuteOptions{dvips}} +\DeclareOption{dvitops}{\ExecuteOptions{dvips}} +\DeclareOption{emtex}{\ExecuteOptions{dvips}} +\DeclareOption{dviwin}{\ExecuteOptions{dvips}} +\DeclareOption{oztex}{\ExecuteOptions{dvips}} +\DeclareOption{psprint}{\ExecuteOptions{dvips}} +\DeclareOption{pubps}{\ExecuteOptions{dvips}} +\DeclareOption{pctexps}{\ExecuteOptions{dvips}} +\DeclareOption{pctexwin}{\ExecuteOptions{dvips}} +\DeclareOption{pctexhp}{\ExecuteOptions{dvips}} +\DeclareOption{ln}{\ExecuteOptions{dvips}} + + +\def\draftcopy@Show{show } +\DeclareOption{outline}{ + \def\draftcopy@Show{false charpath 2 setlinewidth stroke } +} + + +\DeclareOption{light}{ + \def\draftcopy@GrayValue{0.90} +} + +\DeclareOption{dark}{ + \def\draftcopy@GrayValue{0.85} +} + +\DeclareOption{none}{ + \def\draftcopy@LastPage{0} +} +\DeclareOption{first}{ + \def\draftcopy@LastPage{1} +} +\DeclareOption{firsttwo}{ + \def\draftcopy@LastPage{2} +} +\DeclareOption{all}{ + \def\draftcopy@LastPage{99999} +} + +\newif\ifdraftcopy@bottom +\DeclareOption{bottom}{ + \draftcopy@bottomtrue +} + +\newif\ifdraftcopy@bottomAfter +\DeclareOption{bottomafter}{ + \draftcopy@bottomAftertrue +} + +\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +\def\draftcopy@Font{/Times-Roman} +\DeclareOption{american}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{austrian}{ + \def\draftcopy@Name{ENTWURF}\def\draftcopy@Scale{155} +} +\DeclareOption{bahasa}{ + % thanks to Glenn G. Chappell <gchappell@semovm.semo.edu> + \def\draftcopy@Name{DRAF}\def\draftcopy@Scale{217} +} +\DeclareOption{brazil}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{brazilian}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{breton}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{british}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{catalan}{ + % thanks to Dav <davpuig@mx3.redestb.es> + % thanks to Xavier <xml@mat.upc.es> + \def\draftcopy@Name{ESBORRANY}\def\draftcopy@Scale{110} +} +\DeclareOption{croatian}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{czech}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{danish}{ + % thanks to Ejnar Zacho Rath <ezr@md-oss.dk>, + % thanks to Bjarne Vestergaard <bvbruder@dfi.aau.dk> + % thanks to Joergen Larsen <JL@mmf.ruc.dk> + \def\draftcopy@Name{UDKAST}\def\draftcopy@Scale{175} +} +\DeclareOption{dutch}{ + % thanks to Kees Leune <C.J.Leune@kub.nl> + % \def\draftcopy@Name{CONCEPT}\def\draftcopy@Scale{150} + % thanks to Anton Stoorvogel <wscoas@as.win.tue.nl> porposed + \def\draftcopy@Name{ONTWERP}\def\draftcopy@Scale{150} +} +\DeclareOption{english}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{esperanto}{ + % thanks to Stephan B. Webanck <webanck@mpiz-koeln.mpg.de> + \def\draftcopy@Name{MALNETO}\def\draftcopy@Scale{160} +} +\DeclareOption{estonian}{ + % thanks to DAVID FEEST <mirka!mausgoe.central.de! + % gOe.maus.de!David_Feest@uranus.central.de> + \def\draftcopy@Name{VISAND}\def\draftcopy@Scale{215} +} +\DeclareOption{finnish}{ + % thanks to Jaakko Ruohio <jjruohio@boojum.hut.fi> + \def\draftcopy@Name{LUONNOS}\def\draftcopy@Scale{200} + % thanks to Mika Grundstroem <mikagr@spittari.cs.tut.fi> + \def\draftcopy@Name{VEDOS}\def\draftcopy@Scale{220} +} +\DeclareOption{francais}{ + % thanks to Christophe Couvreur <couvreur@Thor.fpms.ac.be> + \def\draftcopy@Name{BROUILLON}\def\draftcopy@Scale{120} +} +\DeclareOption{french}{ + % thanks to Christophe Couvreur <couvreur@Thor.fpms.ac.be> + \def\draftcopy@Name{BROUILLON}\def\draftcopy@Scale{120} + % thanks to Marc Torzynski <marc@snoopy.u-strasbg.fr> + %\def\draftcopy@Name{EPREUVE}\def\draftcopy@Scale{120} +} +\DeclareOption{galician}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{german}{ + \def\draftcopy@Name{ENTWURF}\def\draftcopy@Scale{155} +} +\DeclareOption{germanb}{ + \def\draftcopy@Name{ENTWURF}\def\draftcopy@Scale{155} +} +\DeclareOption{greek}{ + % thanks to Apostolos Syropoulos <apostolo@ocean1.ee.duth.gr> + \def\draftcopy@Name{PROSCEDIO}\def\draftcopy@Scale{85} + \def\draftcopy@Font{/Symbol} +} +\DeclareOption{hungarian}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{icelandic}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} + % DR^^d6G + % Erlendur S Thorsteinsson <esth@cmu.edu> + % does anybody knows how to create PostScript for that letter ^^d6? +} +\DeclareOption{irish}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} + % DR^^c9ACHT + % Breannd^^e1n ^^d3 Nuall^^e1in <bon@kotona.demon.nl> + % does anybody knows how to create PostScript for that letter ^^c9? +} +\DeclareOption{italian}{ + % thanks to Fabio Massacci <Fabio.Massacci@cl.cam.ac.uk> + % thanks to Paolo Dell'Aquila <dlle07k1@mo.nettuno.it> + \def\draftcopy@Name{BOZZA}\def\draftcopy@Scale{215} + % thanks to Giuseppe De Arcangelis <gdearc@serifos.caspur.it> + % \def\draftcopy@Name{brutta copia}\def\draftcopy@Scale{80} +} +\DeclareOption{lowersorbian}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{magyar}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{norsk}{ + % thanks to: Dag Langmyhr <dag@ifi.uio.no> + \def\draftcopy@Name{UTKAST}\def\draftcopy@Scale{178} +} +\DeclareOption{nynorsk}{ + % thanks to: Dag Langmyhr <dag@ifi.uio.no> + \def\draftcopy@Name{FRAMLEGG}\def\draftcopy@Scale{129} +} +\DeclareOption{polish}{ + % thanks to Piotr Chrusciel <piotr@gargan.math.univ-tours.fr> + \def\draftcopy@Name{BRUDNOPIS}\def\draftcopy@Scale{120} +} +\DeclareOption{portuges}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{portuguese}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{romanian}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{scottish}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{spanish}{ + % thanks to: Tomas Bautista <bautista@cma.ulpgc.es> + \def\draftcopy@Name{BORRADOR}\def\draftcopy@Scale{120} +} +\DeclareOption{slovak}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{slovene}{ + % thanks to brodnik@pegam.mat.uni-lj.si <Andrej Brodnik> + \def\draftcopy@Name{OSNUTEK}\def\draftcopy@Scale{120} +} +\DeclareOption{swedish}{ + % thanks to <matsd@physchem.kth.se> + \def\draftcopy@Name{UTKAST}\def\draftcopy@Scale{185} +} +\DeclareOption{turkish}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} +\DeclareOption{uppersorbian}{ + \def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215} +} + +\DeclareOption{portrait}{ + % thanks to Ross MOORE \texttt{ross@maths.mq.edu.au>} + \def\draftcopy@PageTranslate{200 70 translate 65 rotate} + \def\draftcopy@BottomTranslate{0 25 translate} + \def\draftcopy@ScaleFactor{1 } +} +\DeclareOption{landscape}{ + % thanks to Ross MOORE \texttt{ross@maths.mq.edu.au>} + \def\draftcopy@PageTranslate{70 450 translate 25 neg rotate} + \def\draftcopy@BottomTranslate{25 650 translate 90 neg rotate} + \def\draftcopy@ScaleFactor{0.6 } +} + +\ExecuteOptions{dark,all,english,portrait} +\input{draftcopy.cfg} +\ProcessOptions +\typeout{Prints \draftcopy@Name\space on pages; +does not show in your DVI viewer} + +\newcommand{\draftcopyVersion}[1]{ + \def\draftcopy@version{#1} +} + +\newcommand{\draftcopySetGrey}[1]{ + \def\draftcopy@GrayValue{#1} +} + +\newcommand{\draftcopySetScale}[1]{ + \def\draftcopy@Scale{#1} +} + +\newcommand{\draftcopySetScaleFactor}[1]{ + \def\draftcopy@ScaleFactor{#1 } +} + +\def\draftcopy@FirstPage{0} +\newcommand{\draftcopyFirstPage}[1]{ + \def\draftcopy@FirstPage{#1} +} + +\newcommand{\draftcopyLastPage}[1]{ + \def\draftcopy@LastPage{#1} +} + +\newcommand{\draftcopyName}[2]{ + \def\draftcopy@Name{#1} + \def\draftcopy@Scale{#2} +} + +\let\@draftcopyTilde~ + +\newcommand{\draftcopyPageTransform}[1]{% + \def\draftcopy@PageTranslate{#1}% +} + +\newcommand{\draftcopyBottomTransform}[1]{% + \def\draftcopy@BottomTranslate{#1}% +} + +\def\draftcopy@PageX{0 } +\newcommand{\draftcopyPageX}[1]{% + \def\draftcopy@PageX{#1 }% +} + +\def\draftcopy@PageY{0 } +\newcommand{\draftcopyPageY}[1]{% + \def\draftcopy@PageY{#1 }% +} + +\def\draftcopy@BottomX{0 } +\newcommand{\draftcopyBottomX}[1]{% + \def\draftcopy@BottomX{#1 }% +} + +\def\draftcopy@BottomY{0 } +\newcommand{\draftcopyBottomY}[1]{% + \def\draftcopy@BottomY{#1 }% +} + +\newif\ifdraftcopy@showit +\ifdraftcopy@conditional + \ifdraftcopy@draft + \draftcopy@showittrue + \else + \draftcopy@showitfalse + \fi + \ifdraftcopy@final + \draftcopy@showitfalse + \fi +\else + \draftcopy@showittrue +\fi + +\ifdraftcopy@showit +{\obeyspaces +\ifdraftcopy@bottomAfter + \AtBeginDocument{ + \let~\space + \immediate@special{\draftcopy@UserDictCmd + begin + /draftcopy-CurrentPage 0 def + /draftcopy-old-BOPhook { } def + currentdict \draftcopy@BOPhook\space known{ + /draftcopy-old-BOPhook \draftcopy@BOPhook\space load def + } if + \draftcopy@BOPhook{ + draftcopy-old-BOPhook + /draftcopy-CurrentPage draftcopy-CurrentPage 1 add def + draftcopy-CurrentPage \draftcopy@FirstPage ge + draftcopy-CurrentPage \draftcopy@LastPage le + and + { gsave \draftcopy@PageTranslate + \draftcopy@Font findfont + \draftcopy@Scale \draftcopy@ScaleFactor mul scalefont setfont + \draftcopy@PageX \draftcopy@PageY moveto + \draftcopy@GrayValue setgray + (\draftcopy@Name) \draftcopy@Timestamp \draftcopy@Show + grestore + } if + draftcopy-CurrentPage \draftcopy@LastPage gt + { gsave \draftcopy@BottomTranslate + \draftcopy@Font findfont + 25 scalefont setfont + \draftcopy@BottomX \draftcopy@BottomY moveto + \draftcopy@GrayValue setgray + (\draftcopy@Name\space\space--\space\space) + 0 1 15 { pop dup show } for + grestore + } if + } def + end + } + \let~\@draftcopyTilde + } +\else\ifdraftcopy@bottom + \AtBeginDocument{ + \let~\space + \immediate@special{\draftcopy@UserDictCmd + begin + /draftcopy-CurrentPage 0 def + /draftcopy-old-BOPhook { } def + currentdict \draftcopy@BOPhook\space known{ + /draftcopy-old-BOPhook \draftcopy@BOPhook\space load def + } if + \draftcopy@BOPhook{ + draftcopy-old-BOPhook + /draftcopy-CurrentPage draftcopy-CurrentPage 1 add def + draftcopy-CurrentPage \draftcopy@FirstPage ge + draftcopy-CurrentPage \draftcopy@LastPage le + and + { gsave \draftcopy@PageTranslate + \draftcopy@Font findfont + \draftcopy@Scale \draftcopy@ScaleFactor mul scalefont setfont + \draftcopy@PageX \draftcopy@PageY moveto + \draftcopy@GrayValue setgray + (\draftcopy@Name) \draftcopy@Timestamp \draftcopy@Show + grestore + }if + gsave \draftcopy@BottomTranslate + \draftcopy@Font findfont + 25 scalefont setfont + \draftcopy@BottomX \draftcopy@BottomY moveto + \draftcopy@GrayValue setgray + (\draftcopy@Name\space\space--\space\space) + 0 1 15 { pop dup show } for + grestore + } def + end + } + \let~\@draftcopyTilde + } +\else + \AtBeginDocument{ + \let~\space + \immediate@special{\draftcopy@UserDictCmd + begin + /draftcopy-CurrentPage 0 def + /draftcopy-old-BOPhook { } def + currentdict \draftcopy@BOPhook\space known{ + /draftcopy-old-BOPhook \draftcopy@BOPhook\space load def + } if + \draftcopy@BOPhook{ + draftcopy-old-BOPhook + /draftcopy-CurrentPage draftcopy-CurrentPage 1 add def + draftcopy-CurrentPage \draftcopy@FirstPage ge + draftcopy-CurrentPage \draftcopy@LastPage le + and + { gsave \draftcopy@PageTranslate + \draftcopy@Font findfont + \draftcopy@Scale \draftcopy@ScaleFactor mul scalefont setfont + \draftcopy@PageX \draftcopy@PageY moveto + \draftcopy@GrayValue setgray + (\draftcopy@Name) \draftcopy@Timestamp \draftcopy@Show + grestore + } if + } def + end + } + \let~\@draftcopyTilde + } +\fi\fi +} +\fi + +\endinput +%% +%% End of file `draftcopy.sty'. diff --git a/tex/thesis/style/footmisc.sty b/tex/thesis/style/footmisc.sty new file mode 100644 index 0000000..f70c79c --- /dev/null +++ b/tex/thesis/style/footmisc.sty @@ -0,0 +1,732 @@ +%% +%% This is file `footmisc.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% footmisc.dtx (with options: `package') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from footmisc.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file footmisc.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% This is footmisc.dtx, and it's -*-LaTeX-*- text +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{style/footmisc}% + [2003/01/27 v5.2 + a miscellany of footnote facilities% + ]% $Id: footmisc.dtx,v 4.10 2003/01/20 12:51:01 rf Exp rf $ +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\newtoks\FN@temptoken +\providecommand\protected@writeaux{% + \protected@write\@auxout +}% \end{macrocode} +\def\l@advance@macro{\@@dvance@macro\edef} +\def\@@dvance@macro#1#2#3{\expandafter\@tempcnta#2\relax + \advance\@tempcnta#3\relax + #1#2{\the\@tempcnta}% +} +\let\@advance@macro\l@advance@macro +\newdimen\footnotemargin +\footnotemargin1.8em\relax +\DeclareOption{symbol}{\renewcommand\thefootnote{\fnsymbol{footnote}}} +\DeclareOption{symbol*}{\renewcommand\thefootnote{% + \ifnum\c@footnote<\FN@maxsymbol\relax + \fnsymbol{footnote}% + \else + \arabic{footnote}% + \PackageInfo{footmisc}{Footnote number \the\c@footnote\space + out of range}% + \protect\@fnsymbol@orange + \fi + } + \global\let\@diagnose@fnsymbol@orange\relax + \AtEndDocument{\@diagnose@fnsymbol@orange} + \def\@fnsymbol@orange{\gdef\@diagnose@fnsymbol@orange{% + \PackageWarningNoLine{footmisc}{Some footnote number(s) + were out of range + \MessageBreak + see log for details}% + }% + } +} +\def\FN@maxsymbol{10}% +\newif\ifFN@para \FN@parafalse +\DeclareOption{para}{\ifFN@sidefn + \PackageError{footmisc}{Option "\CurrentOption" incompatible with + option "side"}% + {I shall ignore "\CurrentOption"}% + \else + \FN@paratrue + \fi +} +\newif\ifFN@sidefn \FN@sidefnfalse +\DeclareOption{side}{\ifFN@para + \PackageError{footmisc}{Option "\CurrentOption" incompatible with + option "para"}% + {I shall ignore "\CurrentOption"}% + \else + \FN@sidefntrue + \fi +} +\let\footnotelayout\relax +\DeclareOption{ragged}{% + \@ifundefined{RaggedRight}% + {\let\footnotelayout\raggedright}% + {\let\footnotelayout\RaggedRight}% +} +\newif\ifFN@perpage +\FN@perpagefalse +\DeclareOption{perpage}{% + \FN@perpagetrue +} +\newif\ifFN@bottom \FN@bottomfalse +\DeclareOption{bottom}{% + \FN@bottomtrue +} +\DeclareOption{marginal}{% + \footnotemargin-0.8em\relax +} +\DeclareOption{flushmargin}{% + \footnotemargin0pt\relax +} +\newif\ifFN@hangfoot \FN@hangfootfalse +\DeclareOption{hang}{% + \FN@hangfoottrue +} +\DeclareOption{norule}{% + \renewcommand\footnoterule{}% + \advance\skip\footins 4\p@\@plus2\p@\relax +} +\DeclareOption{splitrule}{% + \gdef\split@prev{0} + \let\pagefootnoterule\footnoterule + \let\mpfootnoterule\footnoterule + \def\splitfootnoterule{\kern-3\p@ \hrule \kern2.6\p@} + \def\footnoterule{\relax + \ifx \@listdepth\@mplistdepth + \mpfootnoterule + \else + \ifnum\split@prev=\z@ + \pagefootnoterule + \else + \splitfootnoterule + \fi + \xdef\split@prev{\the\insertpenalties}% + \fi + }% +} +\newif\ifFN@stablefootnote \FN@stablefootnotefalse +\DeclareOption{stable}{\FN@stablefootnotetrue} +\newif\ifFN@multiplefootnote \FN@multiplefootnotefalse +\DeclareOption{multiple}{\FN@multiplefootnotetrue} +\ProcessOptions +\let \if@tempswa \ifFN@bottom +\ifFN@para \@tempswatrue \fi +\if@tempswa + \@ifl@t@r\fmtversion{1999/12/01}{% + \CheckCommand*\@makecol{\ifvoid \footins + \setbox\@outputbox \box\@cclv + \else + \setbox\@outputbox \vbox{% + \boxmaxdepth\@maxdepth + \@tempdima\dp\@cclv + \unvbox\@cclv + \vskip \skip\footins + \color@begingroup + \normalcolor\footnoterule + \unvbox\footins + \color@endgroup + }% + \fi + \xdef\@freelist{\@freelist\@midlist}% + \global\let\@midlist\@empty + \@combinefloats + \ifvbox\@kludgeins + \@makespecialcolbox + \else + \setbox\@outputbox \vbox to\@colht{% + \@texttop \dimen@\dp\@outputbox + \unvbox\@outputbox + \vskip -\dimen@\@textbottom + }% + \fi + \global\maxdepth\@maxdepth + } + }{% + \CheckCommand*\@makecol{\ifvoid \footins + \setbox\@outputbox \box\@cclv + \else + \setbox\@outputbox \vbox{% + \boxmaxdepth\@maxdepth + \unvbox\@cclv + \vskip \skip\footins + \color@begingroup + \normalcolor\footnoterule + \unvbox\footins + \color@endgroup + }% + \fi + \xdef\@freelist{\@freelist\@midlist}% + \global\let\@midlist\@empty + \@combinefloats + \ifvbox\@kludgeins + \@makespecialcolbox + \else + \setbox\@outputbox \vbox to\@colht{% + \@texttop \dimen@\dp\@outputbox + \unvbox\@outputbox + \vskip -\dimen@\@textbottom + }% + \fi + \global\maxdepth\@maxdepth + } + } + \ifFN@para + \FN@temptoken{% + \toks@\expandafter{\the\toks@ + \vskip\skip\footins + \color@begingroup + \normalcolor\footnoterule + \global\setbox\FN@tempboxc\vbox{\makefootnoteparagraph}% + \unvbox\FN@tempboxc + \color@endgroup + }% + }% + \else + \FN@temptoken{% + \toks@\expandafter{\the\toks@ + \vskip\skip\footins + \color@begingroup + \normalcolor\footnoterule + \unvbox\footins + \color@endgroup + }% + }% + \fi + \ifFN@bottom + \toks@{\setbox\@outputbox \box\@cclv + \xdef\@freelist{\@freelist\@midlist}% + \global\let\@midlist\@empty + \@combinefloats + \ifvoid\footins + \else + \setbox\@outputbox \vbox\bgroup + \boxmaxdepth\@maxdepth + \unvbox\@outputbox + \vfill\relax + } + \the\FN@temptoken + \toks@\expandafter{\the\toks@\egroup\fi} + \else + \toks@{\ifvoid\footins + \setbox\@outputbox\box\@cclv + \else + \setbox\@outputbox \vbox\bgroup + \boxmaxdepth\@maxdepth + \unvbox\@cclv + } + \the\FN@temptoken + \toks@\expandafter{\the\toks@ + \egroup + \fi + \xdef\@freelist{\@freelist\@midlist}% + \global\let\@midlist\@empty + \@combinefloats + }% + \fi + \toks@\expandafter{\the\toks@ + \ifvbox\@kludgeins + \@makespecialcolbox + \else + \setbox\@outputbox \vbox to\@colht{% + \@texttop \dimen@\dp\@outputbox + \unvbox\@outputbox + \vskip -\dimen@\@textbottom + }% + \fi + \global\maxdepth\@maxdepth + } + \edef\@makecol{\the\toks@} +\fi +\newif\ifFN@setspace +\@ifpackageloaded{setspace}{% + \FN@setspacetrue +% \CheckCommand\@footnotetext[1]{% +% \insert\footins{% +% \def\baselinestretch {\setspace@singlespace}% +% \reset@font\footnotesize +% \interlinepenalty\interfootnotelinepenalty +% \splittopskip\footnotesep +% \splitmaxdepth \dp\strutbox \floatingpenalty \@MM +% \hsize\columnwidth +% \@parboxrestore +% \protected@edef\@currentlabel{% +% \csname p@footnote\endcsname\@thefnmark +% }% +% \color@begingroup +% \@makefntext{% +% \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% +% \color@endgroup +% }% +% }% +}{% + \FN@setspacefalse + {% +% \CheckCommand\@footnotetext[1]{% +% \insert\footins{% +% \normalfont\footnotesize +% \interlinepenalty\interfootnotelinepenalty +% \splittopskip\footnotesep \splitmaxdepth \dp\strutbox +% \floatingpenalty\@MM \hsize\columnwidth +% \@parboxrestore \parindent\normalparindent \sloppy +% \protected@edef\@currentlabel{% +% \csname p@footnote\endcsname\@thefnmark}% +% \@makefntext{% +% \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par} +% }% +% }% + }% +} +\ifFN@para + \renewcommand\@footnotetext[1]{% + \insert\footins{% + \ifFN@setspace + \def\baselinestretch {\setspace@singlespace}% + \fi + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox + \floatingpenalty\@MM + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}% + \color@begingroup + \setbox\FN@tempboxa=\hbox{% + \@makefntext{\ignorespaces#1\strut + \penalty-10\relax + \hskip\footglue + }% end of \@makefntext parameter + }% end of \hbox + \dp\FN@tempboxa=0pt\ht\FN@tempboxa=\fudgefactor\wd\FN@tempboxa + \box\FN@tempboxa + \color@endgroup + }% + \FN@mf@prepare + } +\else + \ifFN@sidefn + \renewcommand\@footnotetext[1]{% + \marginpar{% + \ifFN@setspace + \def\baselinestretch {\setspace@singlespace}% + \fi + \reset@font\footnotesize + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \ignorespaces + \footnotelayout#1% + }% + \color@endgroup + }% + \FN@mf@prepare + }% + \else + \renewcommand\@footnotetext[1]{% + \insert\footins{% + \ifFN@setspace + \def\baselinestretch {\setspace@singlespace}% + \fi + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox + \floatingpenalty\@MM + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep + \ignorespaces#1\@finalstrut\strutbox + }% + \color@endgroup + }% + \FN@mf@prepare + }% + \fi +\fi +\ifFN@para + \let\FN@tempboxa\@tempboxa + \newbox\FN@tempboxb + \newbox\FN@tempboxc + \newskip\footglue \footglue=1em plus.3em minus.3em + \long\def\@makefntext#1{\leavevmode + \@makefnmark\nobreak + \hskip.5em\relax#1% + } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \newdimen\footnotebaselineskip + {% + \footnotesize + \global + \footnotebaselineskip=\normalbaselineskip + } + \@tempdima=\footnotebaselineskip \multiply\@tempdima by 1024 + \divide \@tempdima by \columnwidth \multiply\@tempdima by 64 + \xdef\fudgefactor{\strip@pt\@tempdima }% + \long\def\makefootnoteparagraph{\unvbox\footins \makehboxofhboxes + \setbox\FN@tempboxa=\hbox{\unhbox\FN@tempboxa \removehboxes} + \hsize\columnwidth + \@parboxrestore + \baselineskip=\footnotebaselineskip + \noindent + \rule{\z@}{\footnotesep}% + \unhbox\FN@tempboxa\par + } + \def\makehboxofhboxes{\setbox\FN@tempboxa=\hbox{}% + \loop + \setbox\FN@tempboxb=\lastbox + \ifhbox\FN@tempboxb + \setbox\FN@tempboxa=\hbox{\box\FN@tempboxb\unhbox\FN@tempboxa}% + \repeat + } + \def\removehboxes{\setbox\FN@tempboxa=\lastbox + \ifhbox + \FN@tempboxa{\removehboxes}% + \unhbox\FN@tempboxa + \fi + } +\fi +\newif\ifFN@pp@footnotehint +\newif\ifFN@pp@towrite +\FN@pp@towritefalse +\ifFN@perpage + \CheckCommand*\footnote{\@ifnextchar [%] + \@xfootnote + {% + \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}% + \@footnotemark \@footnotetext + }% + } + \renewcommand*\footnote{\@ifnextchar [%] + \@xfootnote + {% + \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}% + \FN@pp@footnote\@footnotemark + \ifFN@pp@towrite + \FN@pp@writetemp + \FN@pp@towritefalse + \fi + \@footnotetext + }% + } + \CheckCommand*\footnotemark{% + \@ifnextchar [%] + \@xfootnotemark + {% + \stepcounter{footnote}% + \protected@xdef\@thefnmark{\thefootnote}% + \@footnotemark + }% + } + \renewcommand*\footnotemark{% + \@ifnextchar [%] + \@xfootnotemark + {% + \stepcounter{footnote}% + \protected@xdef\@thefnmark{\thefootnote}% + \FN@pp@footnote\@footnotemark + \ifFN@pp@towrite + \FN@pp@writetemp + \FN@pp@towritefalse + \fi + }% + } + \gdef\FN@pp@initial@stab{\@addtoreset{footnote}{page}} + \AtBeginDocument{\FN@pp@initial@stab} + \newcounter{@fnserial} + \def\FN@pp@cpage{0} + \FN@pp@footnotehinttrue + \newcommand{\footnotehint}{% + \setcounter{footnote}{0}% + \protected@writeaux\relax{\protect\FN@pp@footnotehinttrue}% + \@tempcnta\c@@fnserial + \advance\@tempcnta\@ne + \xdef\FN@pp@next@reset{\the\@tempcnta}% + } + \AtBeginDocument{\protected@writeaux\relax{% + \protect\providecommand{\protect\FN@pp@footnotehinttrue}{}% + }% + } +\def\FN@pp@lastfoot{-1} + \newcommand{\FN@pp@footnote@aux}[2]{% + \ifnum\FN@pp@lastfoot<#1 + \ifFN@pp@footnotehint + \FN@pp@resetfn{#1}{#2}% + \FN@pp@footnotehintfalse + \else + \gdef\@tempa{#2}% + \ifx\@tempa\FN@pp@cpage + \else + \FN@pp@resetfn{#1}{#2}% + \fi + \fi + \def\FN@pp@lastfoot{#1}% + \fi + \global\let\FN@pp@initial@stab\relax + } + \newcommand{\FN@pp@resetfn}[2]{% + \gdef\FN@pp@cpage{#2}% + \expandafter\gdef + \csname FN@pp@next-\FN@pp@prev@foot\endcsname{#1}% + \def\FN@pp@prev@foot{#1}% + \expandafter\xdef + \csname FN@pp@next-\FN@pp@prev@foot\endcsname{\the\@MM}% + } + \newcommand{\FN@pp@prev@foot}{root} + \AtBeginDocument{\protected@writeaux\relax{% + \protect\providecommand{\protect\FN@pp@footnote@aux}[2]{}}% + \newcommand{\FN@pp@next@reset}{1}% + } + \AtEndDocument{\let\FN@pp@footnote@aux\FN@pp@footnote@endaux + \def\FN@pp@lastfoot{-1}% + \FN@pp@footnotehintfalse + \renewcommand{\FN@pp@prev@foot}{root} + } + \newcommand{\FN@pp@footnote@endaux}[2]{% + \ifnum\FN@pp@lastfoot<#1 + \ifFN@pp@footnotehint + \FN@pp@resetfn@end{#1}{#2}% + \FN@pp@footnotehintfalse + \else + \gdef\@tempa{#2}% + \ifx\@tempa\FN@pp@cpage + \else + \FN@pp@resetfn@end{#1}{#2}% + \fi + \fi + \def\FN@pp@lastfoot{#1}% + \fi + } + \newcommand{\FN@pp@resetfn@end}[2]{% + \def\@tempa{#1}% + \expandafter\ifx\csname FN@pp@next-\FN@pp@prev@foot\endcsname\@tempa% + \else + \@tempswatrue + \fi + \gdef\FN@pp@prev@foot{#1}% + \gdef\FN@pp@cpage{#2}% + } +\let\FN@pp@@clearpage\clearpage +\renewcommand{\clearpage}{\footnotehint\FN@pp@@clearpage} +\def\FN@pp@footnote{% + \if@minipage\else + \global\advance\c@@fnserial\@ne + \if@filesw + \xdef\FN@pp@writetemp{% + \noexpand\protected@writeaux\relax{% + \string\FN@pp@footnote@aux + {\the\c@@fnserial}{\noexpand\thepage}% + }% + }% + \FN@pp@towritetrue + \fi + \expandafter\ifnum\FN@pp@next@reset>\c@@fnserial + \else + \global\expandafter\csname c@\@mpfn\endcsname\@ne + \protected@xdef\@thefnmark{\thempfn}% + \expandafter\let\expandafter\@tempa + \csname FN@pp@next-\FN@pp@next@reset\endcsname + \ifx\@tempa\relax + \xdef\FN@pp@next@reset{\the\@MM}% + \else + \xdef\FN@pp@next@reset{\@tempa}% + \fi + \fi + \fi +} +\fi +\ifFN@para +\else + \long\def\@makefntext#1{% + \ifFN@hangfoot + \@hangfrom{% + \ifdim\footnotemargin>0pt + \hb@xt@\footnotemargin{\@makefnmark\hss}% + \else + \@makefnmark + \fi + }% + \else + \parindent1em + \noindent + \ifdim\footnotemargin>0pt + \hb@xt@ \footnotemargin{\hss\@makefnmark}% + \else + \ifdim\footnotemargin=0pt + \llap{\textsuperscript{\@thefnmark}}% + \else + \llap{\hb@xt@ -\footnotemargin{\textsuperscript{\@thefnmark}\hss}}% + \fi + \fi + \fi + \footnotelayout#1% + } +\fi +\ifFN@multiplefootnote + \providecommand*{\multiplefootnotemarker}{3sp} + \providecommand*{\multfootsep}{,} + \CheckCommand*\@footnotemark{% + \leavevmode + \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi + \@makefnmark + \ifhmode\spacefactor\@x@sf\fi + \relax + } + \renewcommand*\@footnotemark{% + \leavevmode + \ifhmode + \edef\@x@sf{\the\spacefactor}% + \FN@mf@check + \nobreak + \fi + \@makefnmark + \ifFN@pp@towrite + \FN@pp@writetemp + \FN@pp@towritefalse + \fi + \FN@mf@prepare + \ifhmode\spacefactor\@x@sf\fi + \relax + } + \def\FN@mf@prepare{% + \kern-\multiplefootnotemarker + \kern\multiplefootnotemarker\relax + } + \def\FN@mf@check{% + \ifdim\lastkern=\multiplefootnotemarker\relax + \edef\@x@sf{\the\spacefactor}% + \unkern + \textsuperscript{\multfootsep}% + \spacefactor\@x@sf\relax + \fi + } +\else + \let\FN@mf@prepare\relax +\fi +\ifFN@stablefootnote +\let\FN@sf@@footnote\footnote +\def\footnote{\ifx\protect\@typeset@protect + \expandafter\FN@sf@@footnote + \else + \expandafter\FN@sf@gobble@opt + \fi +} +\edef\FN@sf@gobble@opt{\noexpand\protect + \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname} +\expandafter\def\csname FN@sf@gobble@opt \endcsname{% + \@ifnextchar[%] + \FN@sf@gobble@twobracket + \@gobble +} +\def\FN@sf@gobble@twobracket[#1]#2{} +\let\FN@sf@@footnotemark\footnotemark +\def\footnotemark{\ifx\protect\@typeset@protect + \expandafter\FN@sf@@footnotemark + \else + \expandafter\FN@sf@gobble@optonly + \fi +} +\edef\FN@sf@gobble@optonly{\noexpand\protect + \expandafter\noexpand\csname FN@sf@gobble@optonly \endcsname} +\expandafter\def\csname FN@sf@gobble@optonly \endcsname{% + \@ifnextchar[%] + \FN@sf@gobble@bracket + {}% +} +\def\FN@sf@gobble@bracket[#1]{} +\fi +\newcommand\setfnsymbol[1]{\@ifundefined{FN@fnsymbol@#1}% + {% + \PackageWarning{footmisc}{Symbol style "#1" not known}% + }{% + \expandafter\let\expandafter\@fnsymbol\csname + FN@fnsymbol@#1\endcsname + \edef\FN@maxsymbol{\csname FN@maxsymbol@#1\endcsname}% + }% +} +\let\FN@fnsymbol@lamport\fnsymbol +\def\FN@maxsymbol@lamport{10} +\newcommand{\DefineFNsymbols}[2]{% + \expandafter\ifx\csname FN@fnsymbol@#1\endcsname\relax + \toks@{}% + \@tempcnta\z@ + \def\@tempb{\end}% + \FN@build@symboldef#2\end + \expandafter\edef\csname FN@fnsymbol@#1\endcsname##1{% + \noexpand\ensuremath{% + \noexpand\ifcase##1% + \the\toks@ + \noexpand\else\noexpand\@arabic##1\noexpand\fi + }% + }% + \expandafter\edef\csname FN@maxsymbol@#1\expandafter\endcsname + {\the\@tempcnta}% + \else + \PackageWarning{footmisc}{symbol style #1 already defined}% + \fi +} +\def\FN@build@symboldef#1{% + \def\@tempa{#1}% + \ifx\@tempa\@tempb + \else + \toks@\expandafter{\the\toks@\or#1}% + \advance\@tempcnta\@ne + \expandafter\FN@build@symboldef + \fi +} +\DefineFNsymbols{bringhurst}{*\dagger\ddagger\S\|\P}% +\DefineFNsymbols{chicago}{*\dagger\ddagger\S\|\#}% +\DefineFNsymbols{wiley}{*{**}\dagger\ddagger\S\P\|}% +\providecommand*{\footref}[1]{% + \begingroup + \unrestored@protected@xdef\@thefnmark{\ref{#1}}% + \endgroup + \@footnotemark +} +\newcommand\mpfootnotemark{% + \@ifnextchar[% + \@xmpfootnotemark + {% + \stepcounter\@mpfn + \protected@xdef\@thefnmark{\thempfn}% + \@footnotemark + }% +} +\def\@xmpfootnotemark[#1]{% + \begingroup + \csname c@\@mpfn\endcsname #1\relax + \unrestored@protected@xdef\@thefnmark{\thempfn}% + \endgroup + \@footnotemark +} +\endinput +%% +%% End of file `footmisc.sty'. diff --git a/tex/thesis/style/mybibstyle.bst b/tex/thesis/style/mybibstyle.bst new file mode 100644 index 0000000..a705f76 --- /dev/null +++ b/tex/thesis/style/mybibstyle.bst @@ -0,0 +1,1586 @@ +%% +%% This is file `aclnat.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% merlin.mbs (with options: `ay,nat,ed-au,dt-beg,yr-per,note-yr,num-xser,url,url-nt,nfss') +%% Customized for use in typestting manuscripts and publications by the +%% Association for Computational Linguistics (mj) +%% Copyright 1994-2004 Patrick W Daly +%% Modified by Joel Nothman for URL/DOI use + % =============================================================== + % IMPORTANT NOTICE: + % This bibliographic style (bst) file has been generated from one or + % more master bibliographic style (mbs) files, listed above. + % + % This generated file can be redistributed and/or modified under the terms + % of the LaTeX Project Public License Distributed from CTAN + % archives in directory macros/latex/base/lppl.txt; either + % version 1 of the License, or any later version. + % =============================================================== + % Name and version information of the main mbs file: + % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)] + % For use with BibTeX version 0.99a or later + %------------------------------------------------------------------- + % This bibliography style file is intended for texts in ENGLISH + % This is an author-year citation style bibliography. As such, it is + % non-standard LaTeX, and requires a special package file to function properly. + % Such a package is natbib.sty by Patrick W. Daly + % The form of the \bibitem entries is + % \bibitem[Jones et al.(1990)]{key}... + % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... + % The essential feature is that the label (the part in brackets) consists + % of the author names, as they should appear in the citation, with the year + % in parentheses following. There must be no space before the opening + % parenthesis! + % With natbib v5.3, a full list of authors may also follow the year. + % In natbib.sty, it is possible to define the type of enclosures that is + % really wanted (brackets or parentheses), but in either case, there must + % be parentheses in the label. + % The \cite command functions as follows: + % \citet{key} ==>> Jones et al. (1990) + % \citet*{key} ==>> Jones, Baker, and Smith (1990) + % \citep{key} ==>> (Jones et al., 1990) + % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) + % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) + % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990) + % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32) + % \citeauthor{key} ==>> Jones et al. + % \citeauthor*{key} ==>> Jones, Baker, and Smith + % \citeyear{key} ==>> 1990 + %--------------------------------------------------------------------- + +ENTRY + { address + author + booktitle + chapter + doi + edition + editor + eid + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + url + volume + year + } + {} + { label extra.label sort.label short.list } +INTEGERS { output.state before.all mid.sentence after.sentence after.block } +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} +STRINGS { s t} +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {date.block} +{ + new.block +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\emph{" swap$ * "}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "editors" } + +FUNCTION {bbl.editor} +{ "editor" } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "edition" } + +FUNCTION {bbl.volume} +{ "volume" } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "number" } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "pages" } + +FUNCTION {bbl.page} +{ "page" } + +FUNCTION {bbl.chapter} +{ "chapter" } + +FUNCTION {bbl.techrep} +{ "Technical Report" } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +FUNCTION {bbl.first} +{ "First" } + +FUNCTION {bbl.second} +{ "Second" } + +FUNCTION {bbl.third} +{ "Third" } + +FUNCTION {bbl.fourth} +{ "Fourth" } + +FUNCTION {bbl.fifth} +{ "Fifth" } + +FUNCTION {bbl.st} +{ "st" } + +FUNCTION {bbl.nd} +{ "nd" } + +FUNCTION {bbl.rd} +{ "rd" } + +FUNCTION {bbl.th} +{ "th" } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +FUNCTION {eng.ord} +{ duplicate$ "1" swap$ * + #-2 #1 substring$ "1" = + { bbl.th * } + { duplicate$ #-1 #1 substring$ + duplicate$ "1" = + { pop$ bbl.st * } + { duplicate$ "2" = + { pop$ bbl.nd * } + { "3" = + { bbl.rd * } + { bbl.th * } + if$ + } + if$ + } + if$ + } + if$ +} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + pop$ + } + if$ + } + if$ +} +FUNCTION {bibinfo.warn} +{ swap$ + duplicate$ missing$ + { + swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ "empty " swap$ * " in " * cite$ * warning$ + } + { swap$ + pop$ + } + if$ + } + if$ +} +STRINGS { bibinfo} +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff~}{vv~}{ll}{, jj}" + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + numnames #2 > + { "," * } + 'skip$ + if$ + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} +FUNCTION {format.names.ed} +{ + format.names +} +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author "author" format.names +} +FUNCTION {get.bbl.editor} +{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } + +FUNCTION {format.editors} +{ editor "editor" format.names duplicate$ empty$ 'skip$ + { + "," * + " " * + get.bbl.editor + * + } + if$ +} +FUNCTION {format.note} +{ + url empty$ + 'skip$ +% { "\urlprefix\url{" url * "}" * output } --- Removed by Joel Nothman + {} + if$ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.doi} +{ + doi + + % Strip off leading: + % urn:doi: + duplicate$ #1 #4 substring$ "urn:" = + {#5 #512 substring$} + 'skip$ + if$ + + % doi: + duplicate$ #1 #4 substring$ "doi:" = + {#5 #512 substring$} + 'skip$ + if$ + + % http://..../ + duplicate$ #1 #7 substring$ "http://" = + { + #8 #512 substring$ + {duplicate$ #1 #1 substring$ "/" = not} + {#2 #512 substring$} + while$ + #2 #512 substring$ + } + 'skip$ + if$ +} + +FUNCTION {format.title} +{ + url empty$ %% If the entry has a URL or DOI, link the title with hyperref + {doi empty$ + 'skip$ + {"\href{http://dx.doi.org/" format.doi * "}{" *} + if$} + {"\href{" url * "}{" *} + if$ + + title + duplicate$ empty$ 'skip$ + { "t" change.case$ } + if$ + + url empty$ doi empty$ and + 'skip$ + {* "}" *} + if$ + + "title" bibinfo.check +} +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + numnames #2 > + { "," * } + 'skip$ + if$ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.in capitalize + " " * } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + "empty year in " cite$ * "; set to ????" * warning$ + pop$ "????" + } + 'skip$ + if$ + extra.label * + before.all 'output.state := + after.sentence 'output.state := +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + emphasize + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ bbl.of space.word * swap$ + emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { number "number" bibinfo.check } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + +FUNCTION {convert.edition} +{ extract.num "l" change.case$ 's := + s "first" = s "1" = or + { bbl.first 't := } + { s "second" = s "2" = or + { bbl.second 't := } + { s "third" = s "3" = or + { bbl.third 't := } + { s "fourth" = s "4" = or + { bbl.fourth 't := } + { s "fifth" = s "5" = or + { bbl.fifth 't := } + { s #1 #1 substring$ is.num + { s eng.ord 't := } + { edition 't := } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + t +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + convert.edition + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + } + if$ +} +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + ":" * + swap$ + n.dashify + "pages" bibinfo.check + * + } + if$ + } + if$ +} +FUNCTION {format.journal.eid} +{ eid "eid" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ 'skip$ + { + ":" * + } + if$ + swap$ * + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ + number "number" bibinfo.check duplicate$ empty$ 'skip$ + { + swap$ duplicate$ empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + swap$ + "(" swap$ * ")" * + } + if$ * + eid empty$ + { format.journal.pages } + { format.journal.eid } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pages + { type empty$ + { bbl.chapter } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check + emphasize +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + "," * + " " * + get.bbl.editor + ", " * + * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + capitalize + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + address empty$ t empty$ and + 'skip$ + { + t empty$ + { address "address" bibinfo.check * + } + { t * + address empty$ + 'skip$ + { ", " * address "address" bibinfo.check * } + if$ + } + if$ + } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.warn format.org.or.pub +} + +FUNCTION {format.organization.address} +{ organization "organization" bibinfo.check format.org.or.pub +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.block + crossref missing$ + { + journal + "journal" bibinfo.check + emphasize + "journal" output.check + format.vol.num.pages output + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + new.block + format.note output + fin.entry +} +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + format.date "year" output.check + date.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + format.publisher.address output + } + { + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + new.block + format.note output + fin.entry +} +FUNCTION {booklet} +{ output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.block + howpublished "howpublished" bibinfo.check output + address "address" bibinfo.check output + new.block + format.note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + format.date "year" output.check + date.block + format.btitle "title" output.check + crossref missing$ + { + format.bvolume output + format.chapter.pages "chapter and pages" output.check + new.block + format.number.series output + new.sentence + format.publisher.address output + } + { + format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + new.block + format.note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.chapter.pages output + new.sentence + format.publisher.address output + format.edition output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + new.block + format.note output + fin.entry +} +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.pages output + new.sentence + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + new.block + format.note output + fin.entry +} +FUNCTION {conference} { inproceedings } +FUNCTION {manual} +{ output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.btitle "title" output.check + organization address new.block.checkb + organization "organization" bibinfo.check output + address "address" bibinfo.check output + format.edition output + new.block + format.note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.btitle + "title" output.check + new.block + bbl.mthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + new.block + format.note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.title output + new.block + howpublished "howpublished" bibinfo.check output + new.block + format.note output + fin.entry +} +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.btitle + "title" output.check + new.block + bbl.phdthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + new.block + format.note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + format.editors output + editor format.key output + format.date "year" output.check + date.block + format.btitle "title" output.check + format.bvolume output + format.number.series output + new.sentence + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + new.block + format.note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title + "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" bibinfo.warn output + address "address" bibinfo.check output + new.block + format.note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.block + format.note "note" output.check + fin.entry +} + +FUNCTION {default.type} { misc } +READ +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + { pop$ "????" } + 'skip$ + if$ + * + 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { t sortify * } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\providecommand{\natexlab}[1]{#1}" + write$ newline$ + "\providecommand{\url}[1]{\texttt{#1}}" + write$ newline$ + "\providecommand{\urlprefix}{URL }" + write$ newline$ + "\providecommand{\href}[2]{#2}" + write$ newline$ +} +EXECUTE {begin.bib} +EXECUTE {init.state.consts} +ITERATE {call.type$} +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} +EXECUTE {end.bib} +%% End of customized bst file +%% +%% End of file `aclnat.bst'. diff --git a/tex/thesis/style/prettyref.sty b/tex/thesis/style/prettyref.sty new file mode 100644 index 0000000..d1700a8 --- /dev/null +++ b/tex/thesis/style/prettyref.sty @@ -0,0 +1,58 @@ +%% prettyref v3.0 +%% +%% Copyright 1995,1998. by Kevin Ruland kevin@rodin.wustl.edu +%% +%% Modified 2003, by David Symonds: +%% - added non-breaking space (~) in reference formats +%% - used {varioref} to get nicer page references +%% - added \shortref to get almost the same, except for page references +%% +\ProvidesPackage{style/prettyref}[1998/07/09 v3.0] +\usepackage{varioref} +\def\newrefformat#1#2{% + \@namedef{pr@#1}##1{#2}} +\def\prettypageref#1{\vpageref{#1}} +\newrefformat{eq}{\textup{(\ref{#1})}} +\newrefformat{lem}{Lemma~\ref{#1} \prettypageref{#1}} +\newrefformat{thm}{Theorem~\ref{#1}} +\newrefformat{cha}{Chapter~\ref{#1} \prettypageref{#1}} +\newrefformat{sec}{Section~\ref{#1} \prettypageref{#1}} +\newrefformat{app}{Appendix~\ref{#1} \prettypageref{#1}} +\newrefformat{tab}{Table~\ref{#1} \prettypageref{#1}} +\newrefformat{fig}{Figure~\ref{#1} \prettypageref{#1}} +\newrefformat{alg}{Algorithm~\ref{#1} \prettypageref{#1}} +\def\prettyref#1{\@prettyref#1:} +\def\@prettyref#1:#2:{% + \expandafter\ifx\csname pr@#1\endcsname\relax% + \PackageWarning{prettyref}{Reference format #1\space undefined}% + \ref{#1:#2}% + \else% + \csname pr@#1\endcsname{#1:#2}% + \fi% +} + + + +\def\newshortrefformat#1{% + \@namedef{prS@#1}##1} +\newshortrefformat{lem}{Lemma~\ref{#1}} +\newshortrefformat{cha}{Chapter~\ref{#1}} +\newshortrefformat{sec}{Section~\ref{#1}} +\newshortrefformat{app}{Appendix~\ref{#1}} +\newshortrefformat{tab}{Table~\ref{#1}} +\newshortrefformat{fig}{Figure~\ref{#1}} +\newshortrefformat{alg}{Algorithm~\ref{#1}} +\def\shortref#1{\@shortref#1:} +\def\@shortref#1:#2:{% + \expandafter\ifx\csname prS@#1\endcsname\relax% + \PackageWarning{prettyref}{Reference format #1\space undefined}% + \ref{#1:#2}% + \else% + \csname prS@#1\endcsname{#1:#2}% + \fi% +} + + +\endinput +%% +%% End of file `prettyref.sty'. diff --git a/tex/thesis/style/sha.sty b/tex/thesis/style/sha.sty new file mode 100644 index 0000000..537d581 --- /dev/null +++ b/tex/thesis/style/sha.sty @@ -0,0 +1,74 @@ +% sha.sty -- Donald Arseneau +% \pixel is the output pixel size. Default is 300 dpi. +% +% Shading *should* be part of a dvi-driver standard. But only postscript +% handles it properly. +% +% You can shade from within TeX, but it is **VERY** inefficient... +% +\newdimen\pixel +\pixel=1in \divide\pixel300 +% +% The contents of \shadebox define the shading pattern. +% +\newbox\shadebox +\setbox\shadebox\hbox{\kern \pixel + \vrule\@height2\pixel\@depth-1\pixel \@width\pixel + \kern \pixel + \vrule\@height4\pixel\@depth-3\pixel \@width\pixel +} +% +% \shade works like \mbox, except the contents are shaded. The height +% and depth of the shaded area is at least the height and depth of ")". +% There is one extra space entered at the beginning and end of the +% parameter text. +% +\def\shade#1{\leavevmode\begingroup + \setbox\@tempboxa\hbox{ {#1} \mathstrut}% + \rlap{\lower\dp\@tempboxa\hbox to\wd\@tempboxa{\shadefill\@tempboxa}}% + \box\@tempboxa \endgroup} +% +% \shadefill{boxnumber} draws a block of shading with height equal to +% the height PLUS depth of the box number. The width of the shading is +% flexible: 0pt plus 1 fill (like \hfill). +% +\def\shadefill#1{\setbox\@tempboxa\vbox to\z@{\vss + \@tempdima\ht#1\advance\@tempdima\dp#1% + \cleaders \copy\shadebox \vskip\@tempdima}% + \cleaders\box\@tempboxa \hfill} +% +% \shadecells is for shading {tabular} entries. It has the same +% usage as \cline, except that instead of drawing a line under +% a range of entries, it shades over them. +% +\def\shadecells#1{\@shadecells[#1]} +\def\@shadecells[#1-#2]{\noalign{\global\@cla#1\relax +\global\advance\@cla\m@ne +\ifnum\@cla>\z@\global\let\@gtempa\@shcellA\else + \global\let\@gtempa\@shcellB\fi +\global\@clb#2\relax +\global\advance\@clb-\@cla}\@gtempa} +% +\def\@shcellA{\multispan\@cla&\@shcellB} +% +\def\@shcellB{\multispan\@clb \unskip + \shadefill\@arstrutbox +\cr} +% +\endinput +% % sample: +% \documentstyle[sha]{article} +% +% \begin{document} +% +% \noindent +% \begin{tabular}{c@{\extracolsep{12pt}}cccccc} +% 1&2&3&4&5&6&7\\ +% one&two&three&four&five&six&seven\\\shadecells{3-4} +% Doc&Happy&Sleepy&Sneezy&Bashful&Grumpy&Dopey\\\shadecells{1-1}\shadecells{6-6} +% Sunday&Monday&Tuesday&Wednesday&Thursday&Friday&Saturday\\\shadecells{4-6} +% \end{tabular} +% +% Test \shade{this} and even something \fbox{\shade{more}} special! +% \end{document} + diff --git a/tex/thesis/style/varioref.sty b/tex/thesis/style/varioref.sty new file mode 100644 index 0000000..67a6134 --- /dev/null +++ b/tex/thesis/style/varioref.sty @@ -0,0 +1,670 @@ +%% +%% This is file `varioref.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% varioref.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. +%% -------------------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.2 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' +%% without such generated files. +%% +%% The list of all files belonging to the LaTeX `Tools Bundle' is +%% given in the file `manifest.txt'. +%% +%% Package varioref to use with LaTeX2e +%% Copyright (C) 1992-2001 Frank Mittelbach, all rights reserved. +%% +%% For additions or updates to the language options please contact +%% the author at +%% +%% frank.mittelbach@latex-project.org +%% +\NeedsTeXFormat{LaTeX2e}[1995/05/16] +\ProvidesPackage{style/varioref} + [2001/09/04 v1.3c package for extended references (FMi)] +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% + +\def\vref@addto#1#2{% + #2% + \@temptokena{#2}% + \ifx#1\undefined + \edef#1{\the\@temptokena}% + \else + \toks@\expandafter{#1}% + \edef#1{\the\toks@\the\@temptokena}% + \fi + \@temptokena{}\toks@\@temptokena +} +\@onlypreamble\vref@addto +\def\vref@excuse#1{% + \PackageWarningNoLine{varioref}{Sorry, language `#1' + not supported% + \MessageBreak + in this version. + English strings used by default. + \MessageBreak + Please modify \protect\reftext... commands manually.% + \MessageBreak\MessageBreak + If you can suggest translations for + this language,% + \MessageBreak + please mail them + to the author of this package}} +\@onlypreamble\vref@excuse +\def\vref@stringwarning#1{% + \PackageWarningNoLine{varioref}{Sorry, there is no proper + translation for the string\MessageBreak + produced by \protect#1\on@line.\MessageBreak + English string used instead.\MessageBreak + \MessageBreak + If you can suggest translations for + the current\MessageBreak + language, please mail them + to the author of this\MessageBreak package}} +\DeclareOption{american} + {\vref@addto\extrasamerican{% + \def\reftextfaceafter {on the \reftextvario{facing}{next} page}% + \def\reftextfacebefore{on the \reftextvario{facing}{preceding} + page}% + \def\reftextafter {on the \reftextvario{following}{next} page}% + \def\reftextbefore {on the \reftextvario{preceding page}{page + before}}% + \def\reftextcurrent {on \reftextvario{this}{the current} page}% + \def\reftextfaraway#1{on page~\pageref{#1}}% + \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + }} +\DeclareOption{austrian} + {\vref@addto\extrasaustrian{% + \def\reftextfaceafter {auf der n\"achsten Seite}% + \def\reftextfacebefore{auf der vorherigen Seite}% + \let\reftextafter \reftextfaceafter + \let\reftextbefore \reftextfacebefore + \def\reftextcurrent {auf dieser Seite}% + \def\reftextfaraway#1{auf Seite~\pageref{#1}}% + \def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}% + }} +\DeclareOption{naustrian} + {\vref@addto\extrasnaustrian{% + \def\reftextfaceafter {auf der n\"achsten Seite}% + \def\reftextfacebefore{auf der vorherigen Seite}% + \let\reftextafter \reftextfaceafter + \let\reftextbefore \reftextfacebefore + \def\reftextcurrent {auf dieser Seite}% + \def\reftextfaraway#1{auf Seite~\pageref{#1}}% + \def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}% + }} +\DeclareOption{brazil} + {\vref@addto\extrabrazil{% + \def\reftextfaceafter {na \reftextvario{p\'agina oposta}{pr\'oxima + p\'agina}}% + \def\reftextfacebefore{na p\'agina \reftextvario{oposta}{anterior}}% + \def\reftextafter {na \reftextvario{p\'agina seguinte}{pr\'oxima + p\'agina}}% + \def\reftextbefore{na p\'agina \reftextvario{anterior}{precedente}}% + \def\reftextcurrent {\reftextvario{nesta p\'agina}{na p\'agina + corrente}}% + \def\reftextfaraway#1{na p\'agina~\pageref{#1}}% + \def\reftextpagerange#1#2{\vref@stringwarning\reftextpagerange + on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange + \ref{#1} to~\ref{#2}}% + }} +\DeclareOption{breton} + {\vref@excuse{breton}% + \vref@addto\extrasbreton{% + \def\reftextfaceafter {war ar bajenn \reftextvario{a-dal}{da heul}}% + \def\reftextfacebefore{war ar bajenn \reftextvario{a-dal}{a-raok}}% + \def\reftextafter {war ar bajenn da heul}% + \def\reftextbefore {war ar bajenn a-raok}% + \def\reftextcurrent {war ar \reftextvario{bajenn-ma\~n}% + {bajenn war-wel}}% + \def\reftextfaraway#1{war ar bajenn~\pageref{#1}}% + \def\reftextpagerange#1#2{\vref@stringwarning\reftextpagerange + on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange + \ref{#1} to~\ref{#2}}% + }} +\DeclareOption{catalan} + {\vref@addto\extrascatalan{% + \def\reftextfaceafter {a la p\`agina seg\"uent}% + \def\reftextfacebefore{a la p\`agina anterior}% + \let\reftextafter \reftextfaceafter + \let\reftextbefore \reftextfacebefore + \def\reftextcurrent {en aquesta p\`agina}% + \def\reftextfaraway#1{a la p\`agina~\pageref{#1}}% + \def\reftextpagerange#1#2{a les + p\`agines~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}% + }} +\DeclareOption{croatian} + {\vref@excuse{croatian}% + \vref@addto\extrascroatian{% + \def\reftextfaceafter {on the \reftextvario{facing}{next} page}% + \def\reftextfacebefore{on the \reftextvario{facing}{preceding} + page}% + \def\reftextafter {on the \reftextvario{following}{next} page}% + \def\reftextbefore {on the \reftextvario{preceding page}{page + before}}% + \def\reftextcurrent {on \reftextvario{this}{the current} page}% + \def\reftextfaraway#1{on page~\pageref{#1}}% + \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + }} +\DeclareOption{czech} + {%\vref@excuse{czech}% + \vref@addto\extrasczech{% + \def\reftextfaceafter {na n\'a\-sle\-du\-j\'\i c\'\i\ stran\v{e}}% + \def\reftextfacebefore{na p\v{r}ed\-choz\'\i\ stran\v{e}}% + \def\reftextafter {na n\'a\-sle\-du\-j\'\i c\'\i\ stran\v{e}}% + \def\reftextbefore {na p\v{r}ed\-choz\'\i\ stran\v{e}}% + \def\reftextcurrent {na t\'eto stran\v{e}}% + \def\reftextfaraway#1{na stran\v{e}~\pageref{#1}}% + \def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}\--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} a\v{z}~\ref{#2}}% + }} +\DeclareOption{danish} + {\vref@addto\extrasdanish{% + \def\reftextfaceafter {p\aa{} \reftextvario{modst\aa ende}% + {n\ae ste} side}% + \def\reftextfacebefore{p\aa{} \reftextvario{modst\aa ende}% + {forrige} side}% + \def\reftextafter {p\aa{} \reftextvario{den f\o lgende}% + {n\ae ste} side}% + \def\reftextbefore {p\aa{} \reftextvario{forrige side} + {foreg\aa ende side}}% + \def\reftextcurrent {p\aa{} denne side}% + \def\reftextfaraway#1{p\aa{} side~\pageref{#1}}% + \def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}% + }} +\DeclareOption{dutch} + {\vref@addto\extrasdutch{% + \def\refpagename{pagina}% + \def\reftextfaceafter {op de \reftextvario{rechter \refpagename}% + {\refpagename\ hiernaast}}% + \def\reftextfacebefore{op de \reftextvario{linker \refpagename}% + {\refpagename\ hiernaast}}% + \def\reftextafter {op de \reftextvario{volgende \refpagename}% + {\refpagename\ hierna}}% + \def\reftextbefore {op de \reftextvario{vorige \refpagename}% + {\refpagename\ hiervoor}}% + \def\reftextcurrent {op deze \refpagename}% + \def\reftextfaraway#1{op \refpagename~\pageref{#1}}% + \def\reftextpagerange#1#2{op pagina's~\pageref{#1} t/m~\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref#1 t/m~\ref{#2}}% + }} +\DeclareOption{english} + {\vref@addto\extrasenglish{% + \def\reftextfaceafter {on the \reftextvario{facing}{next} page}% + \def\reftextfacebefore{on the \reftextvario{facing}{preceding} + page}% + \def\reftextafter {on the \reftextvario{following}{next} page}% + \def\reftextbefore {on the \reftextvario{preceding page}{page + before}}% + \def\reftextcurrent {on \reftextvario{this}{the current} page}% + \def\reftextfaraway#1{on page~\pageref{#1}}% + \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + }} +\DeclareOption{esperanto} + {\vref@excuse{esperanto}% + \vref@addto\extrasesperanto{% + \def\reftextfaceafter {on the \reftextvario{facing}{next} page}% + \def\reftextfacebefore{on the \reftextvario{facing}{preceding} + page}% + \def\reftextafter {on the \reftextvario{following}{next} page}% + \def\reftextbefore {on the \reftextvario{preceding page}{page + before}}% + \def\reftextcurrent {on \reftextvario{this}{the current} page}% + \def\reftextfaraway#1{on page~\pageref{#1}}% + \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + }} +\DeclareOption{finnish} + {\vref@addto\extrasfinnish{% + \def\reftextfaceafter {\reftextvario{viereisell\"a}% + {seuraavalla} sivulla}% + \def\reftextfacebefore{\reftextvario{viereisell\"a}% + {edellisell\"a} sivulla}% + \def\reftextafter {seuraavalla sivulla}% + \def\reftextbefore {edellisell\"a sivulla}% + \def\reftextcurrent {t\"all\"a sivulla}% + \def\reftextfaraway#1{sivulla~\pageref{#1}}% + \def\reftextpagerange#1#2{\vref@stringwarning\reftextpagerange + on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange + \ref{#1} to~\ref{#2}}% + }} +\DeclareOption{french} + {\vref@addto\extrasfrench{% + \def\reftextfaceafter {page \reftextvario{ci-contre}{suivante}}% + \def\reftextfacebefore{page \reftextvario{ci-contre}% + {pr\'ec\'edente}}% + \def\reftextafter {page suivante}% + \def\reftextbefore {page pr\'ec\'edente}% + \def\reftextcurrent {de la pr\'esente page}% + \def\reftextfaraway#1{page~\pageref{#1}}% + \def\reftextpagerange#1#2{pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} \`a~\ref{#2}}% + }} +\DeclareOption{galician} + {\vref@excuse{galician}% + \vref@addto\extrasgalician{% + \def\reftextfaceafter {na seguinte p\'axina}% + \def\reftextfacebefore{na p\'agina anterior}% + \let\reftextafter \reftextfaceafter + \let\reftextbefore \reftextfacebefore + \def\reftextcurrent {nesta p\'axina}% + \def\reftextfaraway#1{na p\'axina~\pageref{#1}}% + \def\reftextpagerange#1#2{\vref@stringwarning\reftextpagerange + on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange + \ref{#1} to~\ref{#2}}% + }} +\DeclareOption{german} + {\vref@addto\extrasgerman{% + \def\reftextfaceafter {auf der n\"achsten Seite}% + \def\reftextfacebefore{auf der vorherigen Seite}% + \let\reftextafter \reftextfaceafter + \let\reftextbefore \reftextfacebefore + \def\reftextcurrent {auf dieser Seite}% + \def\reftextfaraway#1{auf Seite~\pageref{#1}}% + \def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}% + }} +\DeclareOption{ngerman} + {\vref@addto\extrasngerman{% + \def\reftextfaceafter {auf der n\"achsten Seite}% + \def\reftextfacebefore{auf der vorherigen Seite}% + \let\reftextafter \reftextfaceafter + \let\reftextbefore \reftextfacebefore + \def\reftextcurrent {auf dieser Seite}% + \def\reftextfaraway#1{auf Seite~\pageref{#1}}% + \def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}% + }} +\DeclareOption{greek} + {\vref@addto\extrasgreek{% + \def\reftextfaceafter {sthn \reftextvario{paro'usa}% + {ep'omenh} sel'ida}% + \def\reftextfacebefore{sthn \reftextvario{paro'usa}{prohgo'umenh} + sel'ida}% + \def\reftextafter {sthn ep'omenh sel'ida}% + \def\reftextbefore {sthn prohgo'umenh sel'ida}% + \def\reftextcurrent {s'' aut'h th sel'ida}% + \def\reftextfaraway#1{sth sel'ida\nobreakspace\pageref{#1}}% + \def\reftextpagerange#1#2{stis sel'ides\nobreakspace + \pageref{#1}---\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} ws\nobreakspace\ref{#2}}% + }} +\DeclareOption{italian} + {\vref@addto\extrasitalian{% + \def\reftextfaceafter {\reftextvario{a fronte}% + {nella pagina successiva}}% + \def\reftextfacebefore{\reftextvario{a fronte}% + {nella pagina precedente}}% + \def\reftextafter {nella pagina \reftextvario{seguente}% + {successiva}}% + \def\reftextbefore {nella pagina precedente}% + \def\reftextcurrent {in questa pagina}% + \def\reftextfaraway#1{a pagina~\pageref{#1}}% + \def\reftextpagerange#1#2{\vref@stringwarning\reftextpagerange + on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange + \ref{#1} to~\ref{#2}}% + }} +\DeclareOption{magyar} + {\vref@addto\extrasmagyar{% + \def\reftextfaceafter {a k\"o\-vet\-kez\H{o} ol\-da\-lon}% + \def\reftextfacebefore{az el\H{o}\-z\H{o} ol\-da\-lon}% + \def\reftextafter {a k\"o\-vet\-kez\H{o} ol\-da\-lon}% + \def\reftextbefore {az el\H{o}\-z\H{o} ol\-da\-lon}% + \def\reftextcurrent {ezen az ol\-da\-lon}% + \def\reftextfaraway#1{\aza{\pageref{#1}} \pageref{#1}.~ol\-da\-lon}% + \def\reftextpagerange#1#2{\vref@stringwarning\reftextpagerange + on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange + \ref{#1} to~\ref{#2}}% + \AtBeginDocument{\providecommand\aza[1]{a/az% + \PackageError{varioref}{% + Proper definition for command \noexpand\aza missing}% + {You need to (re)define the command \noexpand\aza that + takes one argument (a number or a \noexpand\pageref command) + and produces the string `a' or `az' depending on the argument + value. It should also accept an optional argument (default `l') + to denote whether or not the string should be lowercase or + uppercase.}}}% + }} +\DeclareOption{norsk} + {\vref@addto\extrasnorsk{% + \def\reftextfaceafter {p\aa{} neste side}% + \def\reftextfacebefore{p\aa{} forrige side}% + \def\reftextafter {p\aa{} neste side}% + \def\reftextbefore {p\aa{} forrige side}% + \def\reftextcurrent {p\aa{} denne siden}% + \def\reftextfaraway#1{p\aa{} side~\pageref{#1}}% + \def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}% + }} +\DeclareOption{nynorsk} + {\vref@addto\extrasnynorsk{% + \def\reftextfaceafter {p\aa{} neste side}% + \def\reftextfacebefore{p\aa{} f\o{}rre side}% + \def\reftextafter {p\aa{} neste side}% + \def\reftextbefore {p\aa{} f\o{}rre side}% + \def\reftextcurrent {p\aa{} denne sida}% + \def\reftextfaraway#1{p\aa{} side~\pageref{#1}}% + \def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}% + }} +\DeclareOption{polish} + {\vref@addto\extraspolish{% + \def\reftextfaceafter {na \reftextvario{s\aob{}siedniej}% + {nast\eob{}pnej} stronie}% + \def\reftextfacebefore{na \reftextvario{s\aob{}siedniej}% + {poprzedniej} stronie}% + \def\reftextafter {na nast\eob{}pnej stronie}% + \def\reftextbefore {na poprzedniej stronie}% + \def\reftextcurrent {na \reftextvario{tej + samej}{bie\zkb{}\aob{}cej} stronie}% + \def\reftextfaraway#1{na \pageref{#1}~stronie}% + \def\reftextpagerange#1#2{na stronach~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}% + }} +\DeclareOption{portuges} + {\vref@addto\extraportuges{% + \def\reftextfaceafter {na \reftextvario{p\'agina ao lado}{pr\'oxima + p\'agina}}% + \def\reftextfacebefore{na p\'agina \reftextvario{ao lado}{anterior}}% + \def\reftextafter {na \reftextvario{p\'agina seguinte}{pr\'oxima + p\'agina}}% + \def\reftextbefore{na p\'agina \reftextvario{anterior}{precedente}}% + \def\reftextcurrent {nesta p\'agina}% + \def\reftextfaraway#1{na p\'agina~\pageref{#1}}% + \def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}% + }} +\DeclareOption{romanian} + {\vref@excuse{romanian}% + \vref@addto\extrasromanian{% + \def\reftextfaceafter {on the \reftextvario{facing}{next} page}% + \def\reftextfacebefore{on the \reftextvario{facing}{preceding} + page}% + \def\reftextafter {on the \reftextvario{following}{next} page}% + \def\reftextbefore {on the \reftextvario{preceding page}{page + before}}% + \def\reftextcurrent {on \reftextvario{this}{the current} page}% + \def\reftextfaraway#1{on page~\pageref{#1}}% + \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + }} +\DeclareOption{russian} + {\vref@addto\extrasrussian{% + \def\reftextfaceafter{\cyrn\cyra\ \reftextvario{\cyrp\cyrr\cyro + \cyrt\cyri\cyrv\cyro\cyrp\cyro\cyrl\cyro\cyrzh\cyrn\cyro\cyrishrt}% + {\cyrs\cyrl\cyre\cyrd\cyru\cyryu\cyrshch\cyre\cyrishrt}\ \cyrs\cyrt + \cyrr\cyra\cyrn\cyri\cyrc\cyre}% + \def\reftextfacebefore{\cyrn\cyra\ \reftextvario{\cyrp\cyrr\cyro + \cyrt\cyri\cyrv\cyro\cyrp\cyro\cyrl\cyro\cyrzh\cyrn\cyro\cyrishrt}% + {\cyrp\cyrr\cyre\cyrd\cyrery\cyrd\cyru\cyrshch\cyre\cyrishrt}\ + \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}% + \def\reftextafter{\cyrn\cyra\ \cyrs\cyrl\cyre\cyrd\cyru\cyryu\cyrshch + \cyre\cyrishrt\ \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}% + \def\reftextbefore{\cyrn\cyra\ \reftextvario{\cyrp\cyrr\cyre\cyrd + \cyrsh\cyre\cyrs\cyrt\cyrv\cyru\cyryu\cyrshch\cyre\cyrishrt}% + {\cyrp\cyrr\cyre\cyrd\cyrery\cyrd\cyru\cyrshch\cyre\cyrishrt}% + \ \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}% + \def\reftextcurrent{\cyrn\cyra\ \reftextvario{\cyrerev\cyrt\cyro + \cyrishrt}{\cyrd\cyra\cyrn\cyrn\cyro\cyrishrt}\ \cyrs\cyrt\cyrr + \cyra\cyrn\cyri\cyrc\cyre}% + \def\reftextfaraway#1{\cyrn\cyra\ \cyrs.~\pageref{#1}}% + \def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyrr\cyra\cyrn + \cyri\cyrc\cyra\cyrh~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\cyrs~\ref{#1}\ \cyrp\cyro~\ref{#2}}% + }} +\DeclareOption{slovak} + {\vref@excuse{slovak}% + \vref@addto\extrasslovak{% + \def\reftextfaceafter {on the \reftextvario{facing}{next} page}% + \def\reftextfacebefore{on the \reftextvario{facing}{preceding} + page}% + \def\reftextafter {on the \reftextvario{following}{next} page}% + \def\reftextbefore {on the \reftextvario{preceding page}{page + before}}% + \def\reftextcurrent {on \reftextvario{this}{the current} page}% + \def\reftextfaraway#1{on page~\pageref{#1}}% + \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + }} +\DeclareOption{slovene} + {\vref@excuse{slovene}% + \vref@addto\extrasslovene{% + \def\reftextfaceafter {on the \reftextvario{facing}{next} page}% + \def\reftextfacebefore{on the \reftextvario{facing}{preceding} + page}% + \def\reftextafter {on the \reftextvario{following}{next} page}% + \def\reftextbefore {on the \reftextvario{preceding page}{page + before}}% + \def\reftextcurrent {on \reftextvario{this}{the current} page}% + \def\reftextfaraway#1{on page~\pageref{#1}}% + \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + }} +\DeclareOption{spanish} + {\vref@addto\extrasspanish{% + \def\reftextfaceafter {en la p\'agina siguiente}% + \def\reftextfacebefore{en la p\'agina anterior}% + \let\reftextafter \reftextfaceafter + \let\reftextbefore \reftextfacebefore + \def\reftextcurrent {en esta p\'agina}% + \def\reftextfaraway#1{en la p\'agina~\pageref{#1}}% + \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + }} +\DeclareOption{swedish} + {\vref@addto\extrasswedish{% + \def\reftextfaceafter {p\aa\ \reftextvario{motst\aa ende}% + {n\"{a}sta} sida}% + \def\reftextfacebefore{p\aa\ \reftextvario{motst\aa ende}% + {f\"{o}reg\aa ende} sida}% + \def\reftextafter {p\aa\ \reftextvario{f\"{o}ljande}% + {n\"{a}sta} sida}% + \def\reftextbefore {p\aa\ f\"{o}reg\aa ende sida}% + \def\reftextcurrent {p\aa\ denna sida}% + \def\reftextfaraway#1{p\aa\ sidan~\pageref{#1}}% + \def\reftextpagerange#1#2{p\aa\ + sidorna~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} till~\ref{#2}}% + }} +\DeclareOption{turkish} + {\vref@excuse{turkish}% + \vref@addto\extrasturkish{% + \def\reftextfaceafter {on the \reftextvario{facing}{next} page}% + \def\reftextfacebefore{on the \reftextvario{facing}{preceding} + page}% + \def\reftextafter {on the \reftextvario{following}{next} page}% + \def\reftextbefore {on the \reftextvario{preceding page}{page + before}}% + \def\reftextcurrent {on \reftextvario{this}{the current} page}% + \def\reftextfaraway#1{on page~\pageref{#1}}% + \def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}% + }} +\DeclareOption{francais}{% + \typeout{Please use `french' instead of `francais'}% + \ExecuteOptions{french}} +\DeclareOption{germanb}{% + \typeout{Please use `german' instead of `germanb'}% + \ExecuteOptions{german}} +\DeclareOption{draft}{\AtEndOfPackage\vrefwarning} +\DeclareOption{final}{\AtEndOfPackage\vrefshowerrors} % the default +\ExecuteOptions{english,final} +\ProcessOptions* +\newcounter{vrcnt} +\DeclareRobustCommand\vpageref{\@ifstar + {\let\vref@space\relax\vp@geref}% + {\let\vref@space\space\vp@geref}} +\def\vp@geref{\@ifnextchar[% + \@vpageref{\@vpageref[\reftextcurrent]}% +} +\def\@vpageref[#1]{\@ifnextchar[% + {\@@vpageref{#1}}{\@@vpageref{#1}[\unskip\vref@space]}} +\def\@@vpageref#1[#2]#3{% + \leavevmode\unskip + \global\advance\c@vrcnt\@ne + \vref@pagenum\@tempa{\the\c@vrcnt @vr}% + \vref@pagenum\@tempb{\the\c@vrcnt @xvr}% + {\let\@currentlabel\@empty + \expandafter\label\expandafter{\the\c@vrcnt @xvr}}% + \ifx\label\label@in@display\else + \ifx\@tempa\@tempb\else + \vref@err{\noexpand\vref at page boundary + \@tempb-\@tempa\space (may loop)% + }% + \fi + \fi + \vrefpagenum\@tempb{#3}% + \vref@space + \ifx\@tempa\@tempb + \def\@tempc{#1}% + \ifx\@tempc\@empty + \unskip + \else + #1% + \fi + \else + #2% + \is@pos@number\@tempb + {% + \is@pos@number\@tempa + {\@tempcnta\@tempa + \advance\@tempcnta\@ne + }% + {\@tempcnta\maxdimen}% + \ifnum \@tempb =\@tempcnta + \ifodd\@tempcnta + \if@twoside + \reftextfaceafter + \else + \reftextafter + \fi + \else + \reftextafter + \fi + \else + \advance\@tempcnta-2 + \ifnum \@tempb =\@tempcnta + \ifodd\@tempcnta + \reftextbefore + \else + \if@twoside + \reftextfacebefore + \else + \reftextbefore + \fi + \fi + \else + \reftextfaraway{#3}% + \fi + \fi + }% + {\reftextfaraway{#3}}% + \fi + {\let\@currentlabel\@empty + \let\df@label\@empty + \expandafter\label\expandafter{\the\c@vrcnt @vr}}% +} +\def\vrefwarning{\def\vref@err{\PackageWarning{varioref}}} +\def\vrefshowerrors{\def\vref@err##1{\PackageError{varioref}{##1}% + {Please check the pages in question. You might need to replace + the \string\vref\MessageBreak + or \noexpand\vpageref by a normal \noexpand\(page)ref to + stop LaTeX running forever.}}} +\DeclareRobustCommand\vref{\@ifstar + {\let\vref@space\relax\vr@f}% + {\let\vref@space\nobreakspace\vr@f}} +\def\vr@f#1{% + \leavevmode\unskip\vref@space + \ref{#1}% + \@vpageref[\unskip]{#1}} +\def\is@pos@number#1{\is@pos@num0#1\space\@nil} +\def\is@pos@num{\afterassignment\is@pos@num@ \count@} +\def\is@pos@num@#1\@nil{% + \if0#10% + \expandafter\@firstoftwo \else + \expandafter\@secondoftwo \fi} +\def\reftextvario#1#2{\ifodd\c@vrcnt #1\else#2\fi} +\def\fullref#1{\ref{#1} \reftextfaraway{#1}} +\def\vref@pagenum#1#2{% + \@ifundefined{r@#2}{\@namedef{r@#2}{{??}{??}}}{}% + \edef#1{\expandafter\expandafter\expandafter + \@cdr\csname r@#2\endcsname + \@nil}% +} +\def\vrefpagenum#1#2{% + \@ifundefined{r@#2}% + {\G@refundefinedtrue + \@latex@warning{Reference `#2' on page \thepage \space + undefined}}{}% + \vref@pagenum{#1}{#2}} +\newcommand\@svpagerefrange[3][\reftextcurrent]{% + \vrefpagenum\@tempa{#2}% + \vrefpagenum\@tempb{#3}% + \ifx\@tempa\@tempb + \vpageref*[#1]{#2}% + \else + \reftextpagerange{#2}{#3}% + \fi +} +\newcommand\@vpagerefrange[3][\reftextcurrent]{% + \vrefpagenum\@tempa{#2}% + \vrefpagenum\@tempb{#3}% + \ifx\@tempa\@tempb + \vpageref[#1]{#2}% + \else + \reftextpagerange{#2}{#3}% + \fi +} +\newcommand\vpagerefrange{\@ifstar\@svpagerefrange\@vpagerefrange} +\newcommand\vrefrange[3][\reftextcurrent] + {\reftextlabelrange{#2}{#3} \vpagerefrange[#1]{#2}{#3}} +\endinput +%% +%% End of file `varioref.sty'. |