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

📄 diss.sty

📁 早期freebsd实现
💻 STY
📖 第 1 页 / 共 5 页
字号:
    \opencontfile    \let\\=\space    \write\cont@file{\string\Z{\string\hskip 3\parindent{}#1}{\the\pageno}}%}% Simple table-of-contents printer for \articlestyle.% For dissertations, use the one in print-prelim.tex.% Use this macro as the last thing in your report, since it makes% the page numbers be in romannumerals at the bottom of the page.\def\printcontents{%    \closeout \cont@file    \null\vfill\supereject	% Close output, end last page    \twelvepoint\rm	% Make sure we're in normal mode    \pageno=\m@ne	% Contents get roman numerals.    \plain@page@numbers	% Put page #s at bottom only    \oktell{Table of Contents}    \null \vskip .8in minus\baselineskip    \centerline{\chap@font Contents}    \vskip \tw@\baselineskip    \rightline{Page}    \begingroup  % Temporarily change \baselineskip to avoid		 % underfull \vbox's during output errors.	\baselineskip=\@ne\baselineskip plus .05\baselineskip	\def\Z##1##2{\line{\ignorespaces##1\leaders	    \hbox to.7em{.\hfil}\hfil\hbox to2em{\hss##2}}}	\catcode`@=11	\let\\=\space	\input\contitle	\relax    \endgroup	% Also undoes the \catcode change}%%%%%%%%%%%%%%%%%%%%%%%%%  NUMBERED FOOTNOTES  %%%%%%%%%%%%%%%%%%%%%%%%%% First, modify \vfootnote from Plain to use smallertype and singlespace\def\vfootnote#1{%    \insert\footins\bgroup\tenpoint\singlespace    \interlinepenalty\interfootnotelinepenalty    \splittopskip\ht\strutbox % top baseline for broken footnotes    \splitmaxdepth\dp\strutbox \floatingpenalty\@MM    \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip    \parindent=.13in    \textindent{#1}\footstrut\futurelet\next\fo@t}% Allocate a counter for the numbered footnotes\newcount\note@count \note@count=\@ne\def\nfootnote#1{%    \unskip\footnote{$^{\number\note@count}$}{#1}%    \global\advance\note@count by\@ne}% Same except that trailing period or comma is ``tucked'' under% the note mark.  \ntucknote provides auto numbering.\def\ntucknote#1#2{\nfootnote{#1}\llap{#2}}\def\tucknote#1#2#3{\footnote{#1}{#2}\llap{#3}}%%%%%%%%%%%%%%%%%%%%%  UTILITY MACROS  %%%%%%%%%%%%%%%%%%%%%% Insert a discretionary hyphen.  For use in restricted% horizontal mode, as in the bibliography.\def\hyphenbreak{\discretionary{-}{}{-}}% Check if a macro name is currently undefined (from The TeXbook)\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}% Terminal input and output routines and auxilary stuff\newwrite\undef@out@chan	% Allocate a channel for the tty\def\tell#1{{\let\\=\space\immediate\write\undef@out@chan{#1}}}\def\ask#1{\read-16 to #1}	% Read from tty w/o prompt% Sanitize a string before \write'ing it.% Call with \unexpanded{op}{msg}% Modified from version in The TeXbook, originally by Todd Allen\long\def\unexpanded#1#2{%    \def\finwrite{#1}%    {\aftergroup\finwrite\aftergroup{\sanitize@uci#2\endsanity@uci}}%}\def\sanitize@uci{\futurelet\next@uci\sanswitch@uci}\def\sanswitch@uci{\ifx\next@uci\endsanity@uci     \else\ifx\next@uci\\\aftergroup\space\let\next@uci=\eat@uci     \else\ifcat\noexpand\next@uci\space\aftergroup\space\let\next@uci=\eat@uci     \else\ifcat\noexpand\next@uci\bgroup\aftergroup{\let\next@uci=\eat@uci     \else\ifcat\noexpand\next@uci\egroup\aftergroup}\let\next@uci=\eat@uci     \else\let\next@uci=\copytoken@uci\fi\fi\fi\fi\fi \next@uci}\def\eat@uci{\afterassignment\sanitize@uci \let\next@uci= }\long\def\copytoken@uci#1{%    \ifcat\noexpand#1\relax\aftergroup\noexpand	\else\ifcat\noexpand#1\noexpand~\aftergroup\noexpand	\fi    \fi    \aftergroup#1\sanitize@uci}\def\endsanity@uci\endsanity@uci{}% Now use the sanity stuff to make a sane tell command.  This macro% actually takes one argument, but since it's the last for \unexpanded,% we avoid scanning it twice by not picking it up here.\def\sanetell{\unexpanded{\immediate\write\undef@out@chan}}% Produce verbatim listings of various sorts\def\uncatcodespecials{\def\do##1{\catcode`##1=12 } \dospecials}\def\setupverbatim{%    \par \tt \spaceskip=\z@	% Want fixed tt spacing now    \obeylines \uncatcodespecials \obeyspaces \verbatimdefs}% This macro turns on verbatim mode until ?endverbatim is seen.\def\verbatim{%    \begingroup \setupverbatim    \parskip=\z@ plus .05\baselineskip \parindent=\z@    \catcode`\ =13 \catcode`\^^M=13 \catcode`\?=\z@    \verbatimgobble}{\catcode`\^^M=13{\catcode`\ =13\gdef\verbatimdefs{\def^^M{\ \par}\let =\ }}  \gdef\verbatimgobble#1^^M{}%}% This defines ?endverbatim to end the group which begins with \verbatim\let\endverbatim=\endgroup% Input a file in verbatim mode.  Sometimes useful for including% real-life examples into a paper.\def\verbfile#1{%    \begingroup\setupverbatim    \parskip=\z@ plus .05\baselineskip \parindent=\z@    \input#1 \endgroup}% This is the same as the above, but it adds line numbers to each% line of the file printed.  \lineno@uci has the obvious use.\newcount\lineno@uci\def\listing#1{%  \lineno@uci=\z@  \begingroup\setupverbatim    \parskip=\z@ plus .05\baselineskip \parindent=20\p@    \everypar{\advance\lineno@uci by\@ne \llap{\the\lineno@uci\ \ }}%    \input#1  \endgroup}% Draw a little qed symbol (black box)\def\qed{\hbox{\hskip\p@ \vrule width4\p@ height6\p@ depth1.5\p@ \hskip\p@}}% Conditions -- from AmSppt\newif\ifrunin@AmS\runin@AmSfalse\let\runin=\runin@AmStrue\newdimen\cond@dimen\newdimen\condindent	% Amount each nested condition is indented\condindent=.5in	% Default indentation amount% This is used in \conditions\def\firstcon@AmS#1:{%    \ifrunin@AmS	{\rm\ignorespaces#1\unskip}\ignorespaces	\runin@AmSfalse    \else	\par	\ifdim\lastskip<\smallskipamount	    \removelastskip \penalty55 \smallskip	\fi	\\#1:%    \fi}% Do one item of the conditions.  This is really \\ in disguise.\def\cond@item#1:{%    \par\noindent    \hbox to \cond@dimen{\hfil\rm\ignorespaces#1\unskip\quad}%    \hangafter1    \hangindent\cond@dimen\ignorespaces}\cond@dimen=\z@		% Value for outermost block% Do the main stuff for \conditions.\def\conditions{%    \par    \let\\=\cond@item    \begingroup    \advance\cond@dimen by\condindent    \firstcon@AmS}% Exit special stuff for \conditions.\def\endconditions{%    \par\smallbreak\endgroup    \ifdim\cond@dimen>\z@ \cond@item \fi	% If ending an inner condition}% Automatically numbered items\newcount\item@count\newdimen\item@dimen  \item@dimen=\z@\def\item@prefix{}\def\beginitems{%    \begingroup	\advance \parindent by\item@dimen	\ifnum\item@dimen>\z@	    \edef\item@prefix{\item@prefix\number\item@count.}	\else	    \item@dimen=1cm	\fi        \item@count=\z@ \singlespace \interlinepenalty=200}\def\enditems{\par\endgroup}\def\nitem{\advance\item@count by\@ne \item{\item@prefix\number\item@count.}}% Turn back on the \+ construct of plain TeX.\def\tabalign{\us@true\m@ketabbox}\outer\def\+{\tabalign}% Fix AmSTeX's definition used in its definition of ~ (tie).\def\s@AmS{\penalty\@M\ifx\tok@AmS\Space@AmS\else\ \fi}% And make \/ work the way it does in plain.tex\let\/=\ic@AmS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  PAGE CONTROL and OBJECT MANIPULATION  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This definition doesn't blow up if you're in vertical mode already\def\pagebreak{\ifhmode\vadjust{\break}\else\break\relax}% This definition clears out all previous inserts etc to% guarantee that the following stuff is at the top of a page.\def\clearpage{\vfill\supereject}% This macro keeps the stuff in the argument on the same page, leaving% blank space on this page if necessary\def\keep{\par\setbox\z@=\vbox\bgroup}\def\endkeep{%    \egroup    \dimen@=\ht\z@    \advance\dimen@ by\dp\z@    \vskip\z@ plus\dimen@    \penalty\z@    \vskip\z@ plus-\dimen@    \vskip\parskip    \box\z@    \goodbreak}\def\filkeep{%    \egroup    \filbreak    \vskip\parskip    \box\z@    \goodbreak}% List macros from the TeXbook\toksdef\ta=\z@ \toksdef\tb=\tw@\newif\ifresult@uci% usage: \newlist\list\def\newlist#1{\let#1=\empty}% usage: \append{item}\to\list\def\append#1\to#2{\ta={\\{#1}}\tb=\expandafter{#2}\edef#2{\the\tb\the\ta}}\def\gappend#1\to#2{\ta={\\{#1}}\tb=\expandafter{#2}\xdef#2{\the\tb\the\ta}}% usage: \cardinality\list\to\counter\def\cardinality#1\to#2{#2=\z@ \long\def\\##1{\advance#2 by\@ne }#1}% usage: \ifismember{item}\of\list ... \else ... \fi\def\ifismember#1\of#2{%    \def\given@uci{#1}%    \result@ucifalse    \def\\##1{%	\def\next@uci{##1}%	\ifx\next@uci\given@uci \result@ucitrue\fi    }%    #2%    \ifresult@uci}% usage: \ifwasmember{item}\of\list ... \else ... \fi%    side effect: removes {item} from \list if present\def\ifwasmember#1\of#2{%    \newlist\ref@mtr    \def\given@uci{#1}%    \result@ucifalse    \def\\##1{%	\def\next@uci{##1}%	\ifx\next@uci\given@uci	    \result@ucitrue	\else	    \append ##1\to\ref@mtr	\fi    }%    #2%    \let#2=\ref@mtr    \ifresult@uci}% Append #1 to list #2 if #1 is not already in #2\def\addtolist#1\to#2{%    \ifismember#1\of#2%    \else	\append #1\to #2%    \fi}% Same thing, but do it \global'ly\def\gaddtolist#1\to#2{%    \ifismember#1\of#2%    \else	\gappend#1\to#2%    \fi}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  STUFF for BIBLIOGRAPHY and APPENDICES  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bibliography Package:%	       Original version by Michal Spivak%	       Updated for JACM format and automated by Tim Morgan%	       Final cleanup, and much-improved automation, by Marshall Rose%	       Additional work and IEEE support by TM.% Simple appendix entry builder\def\appendix#1#2{%    \par    \clearpage    \ifoddpages	\ifodd\pageno \else \null\vfill\eject\fi    \fi    \pageno@foot    \begingroup	\setbox\z@=\hbox{#1}%	\ifdim\wd\z@>\z@	    \content{Appendix #1: #2}%	    \oktell{Appendix #1: #2}%	    \def\title{Appendix #1\\#2}%	\else	    \content{Appendix: #2}%	    \oktell{Appendix: #2}%	    \def\title{Appendix\\#2}%	\fi	\let\\=\cr \tabskip=\z@ \chap@font	\halign to\hsize{\centerline{\ignorespaces##\unskip}\cr\title\cr}%    \endgroup    \nobreak    \vskip 1.0in minus 0.15in}% Citations:% We keep a running list, \ref@set, which is% all the things which were \cite'd throughout the paper, with% only one entry for each different key.%% There are three versions of each of the citation% commands:% 1. The \def'd version is the normal one used throughout the paper.% 2. Within a figure, table, etc,'s caption, because of the use of%    \def and \edef, a special version which just produces the%    citation without the \gaddtolist command is used.  These%    definitions are predefined, and are \let to be \cite etc with%    \no@cites, for speed.%% When the user requests a citation with key, we first look it up% in a translation table called \key@table, organized as a list of% <key, printed-key> pairs, to see if it really should be% printed differently.  The user can specify this translation table using% the \printkey command.  If a key is not in the table, it is printed% as-is.% We keep the dimension \key@size as the largest printed key so far.% This value can then be used to print the keys in the bibliography% optimally, rather than just trying to guess.  Each time we print a% (in \use@key), we see if it's longer than \key@size, and if so then% we set \key@size = its width.\newdimen\key@size\key@size=\z@	% Init. value so \key@size is made as small as possible% Invisible citation.  usage: \icite{key}\def\icite#1{%    \gaddtolist#1\to\ref@set}% Management of \key@table stuff.  This table is formatted as% \\{real-key}{printed-key}...\newlist\key@table% Add a pair of items to the list.  This should be done before any% citations are made, for obvious reasons.% #1=real key (the one you use in the paper and bibliography)% #2=the key that gets printed in the output\def\printkey#1#2{%	\ta={\\{#1}{#2}}%	\tb=\expandafter{\key@table}%	\xdef\key@table{\the\tb\the\ta}%}% Print a key, looking it up in the table.  #1 is \whatever which% expands to the key used by the user.  The definition of \\ here% makes use of the format of the \key@table, so that the table is% actually EXECUTED, hence making lookup relatively fast.\newif\if@not@printed@\def\use@key#1{%    \@not@printed@true    \def\\##1##2{%	\if@not@printed@	    \def\temp@uci{##1}%	    \ifx\temp@uci#1%		\@not@printed@false		\setbox\z@=\hbox{[##2]\enspace}%		\ifdim\wd\z@>\key@size \global\key@size=\wd\z@ \fi		##2%	    \fi	\fi    }%    \key@table    \if@not@printed@	\setbox\z@=\hbox{\cite@font[\ignorespaces#1\unskip]\enspace}%	\ifdim\wd\z@>\key@size \global\key@size=\wd\z@ \fi	#1%    \fi}% This macro moves forward until it hits \end, skipping spaces.% Each time it hits a comma, or when it hits and \end, it

⌨️ 快捷键说明

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