📄 diss.sty
字号:
}% This is an alternate definition for plain TeX's \@ins,% omitting the \par. It is for use during \figure etc. Reason:% If you use \figure right after \section, it would otherwise% become a legal place for a page break.\def\@ins@uci{\begingroup\setbox\z@\vbox\bgroup}% This is \endinsert from plain.tex, but \midinsert's are not converted% to \topinsert's, since that can lead to figures getting out of order.% This can lead to excessive blank space at the bottom of the page, but% that's life. Makes use of \keep...\endkeep type stuff.\def\endinsert{\egroup % finish the \vbox \if@mid \dimen@\ht\z@ \advance\dimen@\dp\z@ \advance\dimen@12\p@ \vskip\z@ plus\dimen@ \penalty\z@ \vskip\z@ plus-\dimen@ \bigskip\box\z@\bigbreak \else\insert\topins{\penalty100 % floating insertion \splittopskip\z@skip \splitmaxdepth\maxdimen \floatingpenalty\z@ \ifp@ge \dimen@\dp\z@ \vbox to\vsize{\unvbox\z@\kern-\dimen@}% depth is zero \else \box\z@\nobreak\bigskip\fi}\fi\endgroup}% This macro provides rudamentary support for figures. The% argument to \figure is the name of the file containing the tpic (or whatever)% output. The second argument is the caption for the picture.% As usual, TeX's delayed paging and midinserting causes expansion-timing% problems which have to be kludged around.\newif\iftopfigs \topfigstrue\def\domidfigs{% \topfigsfalse \oktell{Midfigs mode}%}% Counters for figures/diagrams/examples and tables\newcount\fignumber \fignumber=\@ne\newcount\tablenumber \tablenumber=\@ne% Helper for \figure, \example, and \diagram. Define \lastfigure and% \this@insert, increment the figure number for next time, and make sure% the figures list file is open for writing.% #1=the caption, to be written to the figures list file\def\advance@figno#1{% \xdef\lastfigure{\the\fignumber}% Remember the current figure number \begingroup\no@cites \let\\=\space \xdef\this@insert{\write\noexpand\fig@file{\noexpand\noexpand \noexpand\listfig{\lastfigure}{#1}% {\noexpand\number\noexpand\pageno}% }% }% \endgroup \global\advance\fignumber by\@ne \iffig@closed % Open figures file if not already \immediate\openout\fig@file=\figtitle \global\fig@closedfalse \fi}% Bump the table number after defining \lasttable. Prepare \this@insert.% Define \table@caption.\def\advance@tablenumber#1{% \xdef\lasttable{\the\tablenumber}% Remember the current figure number \begingroup \no@cites \let\\=\space \xdef\this@insert{\write\noexpand\tab@file{\noexpand\noexpand \noexpand\listfig{\lasttable}{#1}% {\noexpand\number\noexpand\pageno}% }% }% \endgroup \global\advance\tablenumber by\@ne \gdef\table@caption{#1}%}\newif\ifpage@figs \page@figsfalse% Special mode to put figures/diagrams/examples on separate pages\def\pagefigs{% \oktell{Page Figures mode}% \page@figstrue}% Usage: \figure{filename}{caption with \\'s}\def\figure#1#2{% \begingroup % Hide anything that crazy user does! \advance@figno{#2}% % Now do mid or top insert as appropriate \let\@ins=\@ins@uci \ifpage@figs \shipout\vbox to\vsize\bgroup {\smallertype\rm\input #1\relax\centerline{\box\graph}}% \vfill \centerline{Figure \lastfigure}\this@insert \egroup \else \iftopfigs \topinsert \else \midinsert \fi \hrule \vskip .5\baselineskip {\smallertype\rm\input #1\relax\centerline{\box\graph}}% \vskip .5\baselineskip plus .5\baselineskip \centerline{\twelvebf Figure \lastfigure}% \this@insert \let\\=\cr \tabskip=\z@ \halign to\hsize{\centerline{\ignorespaces##\unskip}\cr#2\cr}% \vskip2\p@ \hrule \endinsert \fi \endgroup}% Allow user to specify arbitrary diagrams. The arguments are:% #1=name of the file containing the commands to form the diagram,% #2=caption for the figure, possibly containing \\'s.\def\diagram#1#2{% \begingroup \advance@figno{#2}% % Do mid or top insert as appropriate \let\@ins=\@ins@uci \ifpage@figs \shipout\vbox to\vsize\bgroup {\smallertype\rm\input #1\relax}% \vfill \centerline{\twelverm Figure \lastfigure}\this@insert \egroup \else \iftopfigs \topinsert \else \midinsert \fi \hrule \vskip .5\baselineskip {\smallertype\rm\input #1\relax}% \vskip .5\baselineskip plus .5\baselineskip \centerline{\twelvebf Figure \lastfigure}% \this@insert \let\\=\cr \tabskip=\z@ \halign to \hsize{\centerline{\ignorespaces##\unskip}\cr#2\cr}% \vskip2\p@ \hrule \endinsert \fi \endgroup}% Allow user to include verbatim examples from files. The arguments are:% #1=name of the file containing the text of the example,% #2=caption for the figure, possibly containing \\'s.\def\example#1#2{% \begingroup \advance@figno{#2}% % Do mid or top insert as appropriate \let\@ins=\@ins@uci \ifpage@figs \shipout\vbox to\vsize\bgroup \vbox{\smallertype\singlespace\verbfile{#1}}% \vfill \centerline{\twelverm Figure \lastfigure}\this@insert \egroup \else \iftopfigs \topinsert \else \midinsert \fi \hrule \vskip .5\baselineskip \vbox{\smallertype\singlespace\verbfile{#1}}% \vskip .5\baselineskip plus .5\baselineskip \centerline{\twelvebf Figure \lastfigure}% \this@insert \let\\=\cr \tabskip=\z@ \halign to \hsize{\centerline{\ignorespaces##\unskip}\cr#2\cr}% \vskip2\p@ \hrule \endinsert \fi \endgroup}% Similar thing for tables% usage: \table{caption} ...text... \endtable\def\table#1{% \begingroup % Hide user zingers \advance@tablenumber{#1}% \setbox\z@=\vbox\bgroup}% End of the table body specification.\def\endtable{% \egroup % End the definition of \box0. % Now do top or mid insert \let\@ins=\@ins@uci \iftab@closed % Open output file if necessary \immediate\openout\tab@file=\tabtitle \global\tab@closedfalse \fi \ifpage@figs \shipout\vbox to\vsize\bgroup \box\z@ \vfill \centerline{\twelverm Table \lasttable}\this@insert \egroup \else \iftopfigs \topinsert \else \midinsert \fi \hrule \vskip .5\baselineskip \box\z@ % Insert the material here. \vskip .5\baselineskip plus .5\baselineskip \centerline{\twelvebf Table \lasttable}% \this@insert \let\\=\cr \tabskip=\z@ \halign to\hsize{\centerline{\ignorespaces##\unskip}\cr\table@caption \cr}% \vskip2\p@ \hrule \endinsert \fi \endgroup}% End of the table body specification for a full-page table.\def\endtablepage{% \egroup % End the definition of \box0. % Now do top or mid insert \let\@ins=\@ins@uci \iftab@closed % Open output file if necessary \immediate\openout\tab@file=\tabtitle \global\tab@closedfalse \fi \ifpage@figs \shipout\vbox to\vsize\bgroup \box\z@ \vfill \centerline{\twelverm Table \lasttable}\this@insert \egroup \else \pageinsert \hrule \vskip .5\baselineskip \box\z@ % Insert the material here. \vskip .5\baselineskip plus .5\baselineskip \centerline{\twelvebf Table \lasttable}% \this@insert \let\\=\cr \tabskip=\z@ \halign to\hsize{\centerline{\ignorespaces##\unskip}\cr\table@caption \cr}% \vskip2\p@ \hrule \endinsert \fi \endgroup}% Environment for report generation -- use only at the beginning!% Since sections are the biggest division, the table of contents% stuff is redefined, and chapter numbering is turned off so that% \chapter can be used for the first-page title. The title page% gets no page number (page # 0). The user can get to the% normal chapter font as \titlefont, and the section font as% \authorfont.\def\articlestyle{% \nochapternumbers \let\subsubsubcontent=\subsubcontent \let\subsubcontent=\subcontent \let\subcontent=\content \let\chapter=\chapter@base \pageno=\z@ \let\titlefont=\chap@font \let\authorfont=\sec@font \oktell{Articlestyle mode}%}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PAGE NUMBERING and OUTPUT ROUTINES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This macro produces a blank, numbered page of output\def\blankpage{\pageinsert \null\vfill \endinsert}% This defintion of \folio differs from Plain's in that (a) page% numbers are printed in 12pt, and (b) roman numeral ones are% printed in italics. It makes use of a trick, that% \romannumeral0 produces no output, which we need for title% pages and things, so we make their page numbers be 0.\def\folio{\ifnum\pageno>\z@ {\twelverm\number\pageno}\else {\twelveit\romannumeral-\pageno}\fi}% Permanent definitions of macros which get switched in and out% with \let's. Do not change any of these !!!\def\uci@headpage{\hfill\folio}\def\uci@footpage{\hfill\folio\hfill}\headline={\uci@headline}\footline={\uci@footline}% If this is used as the footline, it causes a page number to be% printed, but with the side-effect of making the headline blank% and the footline a page number again. This is used on pages% like the first of a chapter.\def\no@foot{% \uci@footpage \global\let\uci@footline=\hfil \global\let\uci@headline=\uci@headpage}% This macro causes the page number to be at the bottom of the current% page, and after it has been used there once, it moves to the% top right of each page. It also sets \dimen\topins=0pt so that% any material \topinsert'd on these pages will get carried over% to subsequent pages.\def\pageno@foot{% \dimen\topins=\z@ \let\uci@headline=\hfil \let\uci@footline=\no@foot}% Executing this causes page numbers to be at the bottom only, as% with the plain TeX format.\def\plain@page@numbers{% \let\uci@headline=\hfil % Initial values similar to plain's \let\uci@footline=\uci@footpage}% Change plain's \makeheadline and \makefootline to position page% numbers as required.\def\makeheadline{% \vbox to\z@{\vskip-22.65\p@ \line{\vbox to8.5\p@{}\the\headline}\vss}\nointerlineskip}\def\makefootline{\baselineskip=1.6cm\line{\the\footline}}% Define an output routine which will restore \dimen\topins% after \chapter, \references, etc, title pages, which have% \dimen\topins=0pt\def\dissoutput{\shipout\vbox{\makeheadline\pagebody\makefootline}% \advancepageno \global\dimen\topins=\vsize \ifnum\outputpenalty>-\@MM \else\dosupereject\fi}\let\output@AmS=\dissoutput\dimen\topins=\vsize % Don't insert more than will fit on one page% Output Routines: We adjust the \raggedbottom command of plain% TeX so that the extra space is no more than 1in, and so that% the space is put above footnotes instead of below. NOTE: Since% we put a \vfil below the page contents, the topskip glue will% never actually be stretched. Its stretchability is just to% let TeX know about the raggedness in computing when to make a% page break. Since it's 1in, the \vfil will never be stretched to% more than that amount.\def\raggedbottom{\topskip=\normal@topskip plus1in \r@ggedbottomtrue \oktell{Ragged bottom mode}}\def\normalbottom{\topskip=\normal@topskip\r@ggedbottomfalse \oktell{Normal bottom mode}}\def\pagecontents{% \ifvoid\topins\else\unvbox\topins\fi \dimen@=\dp\@cclv \unvbox\@cclv % open up \box255 \ifr@ggedbottom \kern-\dimen@ \vfil\fi \ifvoid\footins \else % footnote info is present \vskip\skip\footins \footnoterule \unvbox\footins \fi}%%%%%%%%%%%%%%%%%%%%% INITIALIZATION %%%%%%%%%%%%%%%%%%%%%\font@no=0 % Default font=\rm,\twelvepoint % point size,\doublespace % and spacing\plain@page@numbers % Page nos like plain's% Note that normally in AmSTeX, the @ character may not be used.% But in the dissertation style, @ may be used as a normal character,% As it can in plain TeX.\catcode`\@=12% Eat any further \documentstyle commands\def\documentstyle#1{}% This prints out our welcome message, and it computes the time% and date string once per run, which saves time if they're used% more than once. Since \catcode`@=12 at the time this is% executed, it can't contain any @-type macros.\everyjob={% \begingroup \xdef\today{% \ifcase\month \the\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\else \the\month \fi\space\the\day, \the\year }% \count0=\time \count1=\count0 \divide\count0by60 \count2=\count0 \multiply\count0by60 \advance\count1by-\count0 \ifnum\count2>11 \ifnum\count2>12 \advance\count2by-12\fi \def\ampm{PM}% \else \ifnum\count2=0 \advance\count2by12\fi \def\ampm{AM}% \fi \xdef\daytime{% \ifnum\count2<10 0\fi \the\count2:% \ifnum\count1<10 0\fi \the\count1 \ampm }% \endgroup \tell{AmSTeX Dissertation Style, version \version}%}\edef\temp@uci{\the\everyjob}\temp@uci
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -