⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 diss.sty

📁 早期freebsd实现
💻 STY
📖 第 1 页 / 共 5 页
字号:
% adds whatever has been collected so far (in \@total) to% \ref@set and to the output list.  It is assumed that \@total% has been set to \empty before this routine is called (this is done% by \@@cite, below).\def\@icite#1{%    \if#1\end	\expandafter\gaddtolist\@total\to\ref@set	\use@key\@total        \let\@next=\relax	% Exit loop after this time    \else        \if#1,%			% We have a complete key now.	    \expandafter\gaddtolist\@total\to\ref@set	    \use@key\@total,\space	    \global\let\@total=\empty	\else	    \xdef\@total{\@total#1}%	Add new char to total	\fi	\let\@next=\@icite	% Continue looping until done    \fi    \@next}% Initialize and call \@icite.  Used in \cite, \citep, \citepp\def\@@cite#1{\global\let\@total=\empty\@icite#1\end}% usage: \cite{key [, key...]}\def\cite#1{%    {\cite@font[\@@cite{#1}]}%}% usage: \citep{key}{page}\def\citep#1#2{%    {\cite@font[\@@cite{#1}, \hbox{\rm p \ignorespaces#2\unskip}]}%}% usage: \citepp{key}{pages}\def\citepp#1#2{%    {\cite@font[\@@cite{#1}, \hbox{\rm pp \ignorespaces#2\unskip}]}%}% These three definitions are used in \no@cites, below.  They% don't handle extraneous spaces as well as the normal% definition, but they should be sufficient for most people.\def\i@cite#1{{\cite@font[\noexpand\noexpand\noexpand\@@cite{#1}]}}\def\i@citep#1#2{{\cite@font[\noexpand\noexpand\noexpand\@@cite{#1},\space	\hbox{\noexpand\noexpand\noexpand\rm p \ignorespaces#2\unskip}]}%}\def\i@citepp#1#2{{\cite@font[\noexpand\noexpand\noexpand\@@cite{#1},\space	\hbox{\noexpand\noexpand\noexpand\rm pp \ignorespaces#2\unskip}]}%}% Turn off adding citations to \ref@set.  This is needed when% using \cite etc inside a caption for tables, figures, etc.% \no@cites is undone by exiting an enclosing group.\def\no@cites{%    \let\citepp=\i@citepp    \let\citep=\i@citep    \let\cite=\i@cite}%%%%%%%%%%%%%%%%%%%%%%% References Section %%%%%%%%%%%%%%%%%%%%%%%% The basic strategy is as follows.  We read the bib. file, which is% assumed to be in sorted order of keys/author names.  Each% entry is of the form \ref{key}.  We see if that key is in the table% \ref@set, which is a table of all the keys we've \cite'd.  If the key% isn't in the list, we print it in parens and go on to the next entry.% Otherwise, we print the key in square brackets, and format the% bibliography entry according to the format (JACM or IEEE).  We print a% warning if the key is in the \ref@seen list.  We add the key to% the \ref@seen list.  The key is removed from the \ref@set list if it% was there.  At the end of the references (\endreferences), we check% if there are any keys left in \ref@set.  If so, the bib. file was% deficient, and we print a warning message (it should probably be a% fatal error message).% Annotation control\newif\ifinclude@annos			% Should annotations be printed?\include@annosfalse			% By default, no\def\annotate{%				% ``official'' command    \include@annostrue    \oktell{Annotating bibliography}%}\newif\ifin@anno			% True while doing an annotation\in@annofalse\def\refi@AmS{F}			% This starts as False% Begin an annotation -- must be in vertical mode.  Just gather% text into box0 for use by \endanno.  We do a couple of consistency% checks at the beginning.\def\anno{%    \ifhmode	\message{You forgot the \noexpand\endref command!}	\message{I've inserted one for you.}	\endanno    \fi    \if F\refi@AmS	\errmessage{No \noexpand\ref command before first \noexpand\anno}    \fi    \let\\=\newline    \in@annotrue    \setbox\z@=\vbox\bgroup}% End of an annotation.  Decide if it should be typeset or skipped.\def\endanno{%    \egroup				% End the group for box0    \in@annofalse			% No longer doing an annotation    \if T\refed@uci			% If previous reference was used,	\ifinclude@annos {%	And if we're producing an annotated bib.,	    \vskip\parskip	    \interlinepenalty=\defaultinterlinepenalty	    \unvbox\z@	% Then include annotation as normal paragraph(s)	    \par	}\fi    \fi}\global\newlist\ref@set	    		% list of all references cited\global\newlist\ref@seen	    	% list of all references defined\def\reftitle{References}		% Default title for bibliography% usage: \references (begin the References section)\def\references{%    \vfill\supereject			% Begin new page, clear out everything    \ifoddpages				% Make sure start on even page.	\ifodd\pageno \relax \else \null\vfill\eject \fi    \fi    \begingroup				% Following changes are local to bib.    \twelvepoint			% Get good appearance    \singlespace    \no@cites	                        % \cite's just produce [key]    \parskip=0.6\baselineskip plus5\p@ minus4\p@    \tolerance=5000			% Must be extremely tolerant!    \pretolerance=300    \interlinepenalty=400		% To discourage breaking a reference					% across page boundaries    \uchyph=\@ne			% Needed to try hyphenating title words    \sfcode`.=\@m			% Like \frenchspacing, but only for					% periods    % Now we output the title and so forth.    \centerline{\csc \reftitle}%    \nobreak    \medskip    \content\reftitle			% Tell user and TOC.    \oktell\reftitle    \pageno@foot			% Put page # in special place    % Special definitions within reference mode    \let\year=\yr    \let\month=\mon}% usage: \endreferences (end the References section)\def\endreferences{%    \par	% Make sure last printed reference is finished up.    \cardinality\ref@set\to\count@    \ifnum\count@>\z@	\def\\##1{[##1] }	\ifnum\count@>1	  \message{Warning: \number\count@\space undefined citations: \ref@set}	\else	  \message{Warning: One undefined citation: \ref@set}	\fi    \fi  \endgroup	% End of \references group}% References Database\newbox\bybox@AmS	\newbox\bysamebox@AmS\newbox\paperbox@AmS	\newbox\paperinfobox@AmS\newbox\jourbox@AmS	\newbox\jourinfobox@AmS\newbox\volbox@AmS	\newbox\issuebox@AmS\newbox\monbox@AmS	\newbox\yrbox@AmS\newbox\pagesbox@AmS	\newbox\editorbox@AmS\newbox\bookbox@AmS	\newbox\bookinfobox@AmS\newbox\publbox@AmS	\newbox\publaddrbox@AmS\newbox\finalinfobox@AmS\newbox\wastebox@uci\newbox\talkbox@AmS	\newbox\keybox@AmS\newbox\editorsbox@AmS\def\using@IEEE{F}	% By default, not using IEEE format% reset a \keyword to the ``not used'' condition\def\refset@AmS#1{%    \expandafter\gdef\csname is\expandafter\eat@AmS    \string#1@AmS\endcsname{F}\expandafter    \setbox\csname\expandafter\eat@AmS\string#1box@AmS\endcsname=\null}% reset \keyword's\def\ref@AmS{%    \refset@AmS\key	\refset@AmS\finalinfo    \refset@AmS\by	\gdef\isbysame@AmS{F}%    \refset@AmS\paper	\refset@AmS\paperinfo    \refset@AmS\jour	\refset@AmS\jourinfo    \refset@AmS\vol	\refset@AmS\issue    \refset@AmS\mon	\refset@AmS\yr    \refset@AmS\pages	\gdef\ispage@AmS{F}%    \refset@AmS\book	\refset@AmS\bookinfo    \refset@AmS\publ	\refset@AmS\publaddr    \refset@AmS\editor	\refset@AmS\talk    \refset@AmS\editors    \gdef\istoappear@AmS{F}%    \gdef\isinbook@AmS{F}%    \bgroup    \ignorespaces}% usage: \ref{citation} \keywords arguments ... \endref.  We make sure% we aren't still doing an \anno first.\def\ref#1{%    \ifin@anno	\message{You forgot an \noexpand\endanno command,}	\message{but I forgive you this time.}	\endanno    \fi    \def\refi@AmS{T}%    \ifwasmember#1\of\ref@set	\def\refed@uci{T}%	\okmessage{[#1]}%    \else	\def\refed@uci{F}%	\okmessage{(#1)}%    \fi    \ifismember#1\of\ref@seen	\sanetell{multiply defined: [#1]}%    \else	\append#1\to\ref@seen    \fi    \def\refl@AmS{F}%    \def\\{\egroup\endref@AmS\gdef\refi@AmS{F}\ref@AmS}%    \ref@AmS    \gdef\@total{#1}%    \key \if T\refed@uci	\use@key\@total    \fi\egroup\setbox\wastebox@uci=\hbox\bgroup\ignorespaces}% End of a reference.%% Note that \endref@AmS is \let to be whichever \endref@xxx command% is being used; default is \endref@JACM for JACM format.%% If we printed the reference, \endref@AmS will% have set \bysamebox@AmS to be a box containing a box% containing a rule and a period.  This is unboxed if a subsequent% reference which gets printed uses \bysame.  Otherwise, we here% save the \by field (if given) so that if a subsequent reference% using \bysame gets used, we'll know who the author was, even though% the reference which gave the author(s) wasn't printed.  Tricky, huh?\def\endref{%    \egroup\gdef\refl@AmS{T}%    \if T\refed@uci	\endref@AmS    \else	\if T\isby@AmS	    \setbox\bysamebox@AmS=\box\bybox@AmS	\fi    \fi    \par}% define a \keyword.  #1=keyword, #2=font to use, or {}\def\refdef@AmS#1#2{%    \def#1{%	\egroup	\expandafter\gdef		\csname is\expandafter\eat@AmS\string#1@AmS\endcsname{T}%	\expandafter\setbox		\csname\expandafter\eat@AmS\string#1box@AmS\endcsname			=\hbox\bgroup#2\ignorespaces    }%}% define the keywords\refdef@AmS\by\by@font		\refdef@AmS\paper{}\refdef@AmS\paperinfo{}		\refdef@AmS\jour\book@font\refdef@AmS\vol\book@font	\refdef@AmS\issue{}\refdef@AmS\mon{}		\refdef@AmS\yr{}\refdef@AmS\pages{}		\refdef@AmS\talk{}\refdef@AmS\book\book@font	\refdef@AmS\bookinfo{}\refdef@AmS\publ{}		\refdef@AmS\publaddr{}\refdef@AmS\finalinfo{} 	\refdef@AmS\editor{}\refdef@AmS\jourinfo{}		\refdef@AmS\key\cite@font\refdef@AmS\editors{}% These don't fit the normal pattern.\def\bysame{\egroup\gdef\isbysame@AmS{T}\bgroup}\def\page{\egroup\gdef\ispage@AmS{T}\setbox\pagesbox@AmS=\hbox\bgroup	\ignorespaces}\def\toappear{\egroup\gdef\istoappear@AmS{T}\bgroup}\def\inbook{\egroup\gdef\isinbook@AmS{T}\setbox\bookbox@AmS=\hbox\bgroup	\book@font\ignorespaces}% This is the font we normally print book and journal titles in, but we% use \twelveit for IEEE format.\let\book@font=\twelvesl% Similarly, this is the font to use for the author's name(s).% Optionally, the user can ask for the cite font instead (this is% not necessarily related to use of the IEEE format).\let\by@font=\twelverm% As an option, the user can have the author's name(s) in caps-small-caps.\def\AuthorsInCSC{%    \let\by@font=\elevencsc    \oktell{Authors in CSC mode}%}% Define some aliases for some of the above, for user convenience.\let\pp=\pages\let\pgs=\pages\let\pg=\page\let\p=\page\let\journal=\jour\let\volume=\vol\let\author=\by\let\authors=\by\let\ieee@editors=\editors	% Save it in case we use IEEE format\let\editors=\editor		% If using default JACM format\let\other=\talk\let\no=\issue% Helpers to \endref@AmS, which speed things up a lot, and/or% make the code more compact.\def\a@comma{, }	% Used in next routine.  Predefined for speed of \let.\def\setpunct@AmS{\let\prepunct@AmS=\a@comma}\def\ppunbox@AmS#1{\prepunct@AmS\unhbox#1\unskip}% Actually do some typesetting (finally).  As mentioned above,% \endref@AmS is called to print a reference if we want it.  It% is \let to be either \endref@JACM or \endref@IEEE (or possibly% some other format in the future) depending on the desired% format.%% For some reason, the ~'s don't see to tie things, so some% \hbox's were introduced.%% There is unfortunately a lot of common code between the% different formats.  Here are some sections which were easy to% pull out:\def\endref@startup{%    % Test to see if there is anything in the wastebox    \setbox\wastebox@uci=\hbox{\unhbox\wastebox@uci\unskip}%    \ifdim\wd\wastebox@uci>\z@	\errmessage{Keyword omitted after \noexpand\ref}%    \fi    \let\prepunct@AmS=\empty    \vskip\parskip    \noindent \hangafter=\@ne}% This is the text printed for the JACM format for papers% appearing in a book.\def\appearing@in{Appearing in }% Common code at the end of \endref@JACM and \endref@IEEE.% The argument is the date routine to use.\def\endref@finishup#1{%    \if T\istalk@AmS	\dimen@=\wd\talkbox@AmS	\ifdim\dimen@>\z@	    \ppunbox@AmS\talkbox@AmS\setpunct@AmS	\fi    \fi    \if T\isbook@AmS	\ppunbox@AmS\bookbox@AmS \setpunct@AmS	\editor@ref    \fi    \if T\isinbook@AmS	\prepunct@AmS\appearing@in\unhbox\bookbox@AmS\unskip \setpunct@AmS	\editor@ref \gdef\isbook@AmS{T}%    \fi    \if T\isbookinfo@AmS	\ppunbox@AmS\bookinfobox@AmS\setpunct@AmS    \fi    \if T\using@IEEE	\if T\ispubladdr@AmS	    \ppunbox@AmS\publaddrbox@AmS	    \if T\ispubl@AmS \def\prepunct@AmS{: }\else\setpunct@AmS\fi	\fi	\if T\ispubl@AmS	    \ppunbox@AmS\publbox@AmS\setpunct@AmS	\fi    \else	\if T\ispubl@AmS	    \ppunbox@AmS\publbox@AmS\setpunct@AmS	\fi	\if T\ispubladdr@AmS	    \ppunbox@AmS\publaddrbox@AmS\setpunct@AmS	\fi    \fi    \if T\isbook@AmS	\if T\isvol@AmS	    \prepunct@AmS Vol.~\unhbox\volbox@AmS\unskip\setpunct@AmS	\fi	\if T\isyr@AmS	    \ppunbox@AmS\yrbox@AmS\setpunct@AmS	\fi	\if T\istoappear@AmS	    \ (to appear)\setpunct@AmS	\fi	\if T\ispages@AmS      	    \prepunct@AmS pp.~\unhbox\pagesbox@AmS\unskip\setpunct@AmS	\fi	\if T\ispage@AmS	    \prepunct@AmS p.~\unhbox\pagesbox@AmS\unskip\setpunct@AmS	\fi    \fi    \if T\istalk@AmS	#1%	This is the date routine to use.    \fi    \if T\isfinalinfo@AmS	\period\unhbox\finalinfobox@AmS    \else	\if T\refl@AmS .	\else ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -