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

📄 cwebmac.tex

📁 模拟器提供了一个简单易用的平台
💻 TEX
📖 第 1 页 / 共 2 页
字号:
  \ifx\secno\secstar \onmaybe \else\ontrue \fi  \mark{{{\tensy x}\secno}{\the\gdepth}{\the\gtitle}}}% each \mark is {section reference or null}{depth plus 1}{group title}% \O is Scandinavian letter O-with-slash% \P is paragraph sign\def\Q{\note{This code is cited in section}} % xref for mention of a section\def\Qs{\note{This code is cited in sections}} % xref for mentions of a section\let\R=\lnot % logical not% \S is section sign\def\T#1{\leavevmode % octal, hex or decimal constant  \hbox{$\def\?{\kern.2em}%    \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant    \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick)    \let\~=\oct \let\^=\hex {#1}$}}\def\U{\note{This code is used in section}} % xref for use of a section\def\Us{\note{This code is used in sections}} % xref for uses of a section\let\V=\lor % logical or\let\W=\land % logical and\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name  \XX$\langle\,${\let\I=\ne#2\eightrm\kern.5em    \ifacro{\pdfnote#1.}\else#1\fi}$\,\rangle$\XX}\def\Y{\par\yskip}\let\Z=\le\let\ZZ=\let % now you can \write the control sequence \ZZ\let\*=*\let\Xand=\W\def\Xandxeq{\MRL{{\W}{\K}}}\let\Xbitand=\AND\let\Xbitor=\OR\let\Xcompl=\CM\let\Xnot=\R\let\Xnotxeq=\I\let\Xor=\V\def\Xorxeq{\MRL{{\OR}{\K}}}\let\Xxor=\XOR\def\Xxorxeq{\MRL{{\XOR}{\K}}}%\def\oct{\hbox{\rm\char'23\kern-.2em\it\aftergroup\?\aftergroup}} % WEB style%\def\hex{\hbox{\rm\char"7D\tt\aftergroup}} % WEB style\def\oct{\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}}% CWEB style\def\hex{\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}} % CWEB style\def\vb#1{\leavevmode\hbox{\kern2pt\vrule\vtop{\vbox{\hrule        \hbox{\strut\kern2pt\.{#1}\kern2pt}}      \hrule}\vrule\kern2pt}} % verbatim string\def\onmaybe{\let\ifon=\maybe} \let\maybe=\iftrue\newif\ifon \newif\iftitle \newif\ifpagesaved\def\lheader{\mainfont\the\pageno\eightrm\qquad\grouptitle\hfill\title\qquad  \mainfont\topsecno} % top line on left-hand pages\def\rheader{\mainfont\topsecno\eightrm\qquad\title\hfill\grouptitle  \qquad\mainfont\the\pageno} % top line on right-hand pages\def\grouptitle{\let\i=I\let\j=J\uppercase\expandafter{\expandafter                        \takethree\topmark}}\def\topsecno{\expandafter\takeone\topmark}\def\takeone#1#2#3{#1}\def\taketwo#1#2#3{#2}\def\takethree#1#2#3{#3}\def\nullsec{\eightrm\kern-2em} % the \kern-2em cancels \qquad in headers\let\page=\pagebody \raggedbottom% \def\page{\box255 }\normalbottom % faster, but loses plain TeX footnotes\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi \shipout\vbox{  \vbox to\fullpageheight{  \iftitle\global\titlefalse  \else\hbox to\pagewidth{\vbox to10pt{}\ifodd\pageno #3\else#2\fi}\fi  \vfill#1}} % parameter #1 is the page itself  \global\advance\pageno by1}\gtitle={\.{CWEB} output} % this running head is reset by starred sections\mark{\noexpand\nullsec0{\the\gtitle}}\def\title{\expandafter\uppercase\expandafter{\jobname}}\def\topofcontents{\centerline{\titlefont\title}\vskip.7in  \vfill} % this material will start the table of contents page\def\startpdf{\ifpdftex\pdfcatalog{/PageMode /UseOutlines}\else    \ifpdf{\special{pdf: docview << /PageMode /UseOutlines >>}}\fi\fi}\def\botofcontents{\vfill  \centerline{\covernote}} % this material will end the table of contents page\def\covernote{}\def\contentspagenumber{0} % default page number for table of contents\newdimen\pagewidth \pagewidth=6.5in % the width of each page\newdimen\pageheight \pageheight=8.7in % the height of each page\newdimen\fullpageheight \fullpageheight=9in % page height including headlines\newdimen\pageshift \pageshift=0in % shift righthand pages wrt lefthand ones\def\magnify#1{\mag=#1\pagewidth=6.5truein\pageheight=8.7truein  \fullpageheight=9truein\setpage}\def\setpage{\hsize\pagewidth\vsize\pageheight} % use after changing page size\def\contentsfile{\jobname.toc} % file that gets table of contents info\def\readcontents{\input \contentsfile}\def\readindex{\input \jobname.idx}\def\readsections{\input \jobname.scn}\newwrite\cont\output{\setbox0=\page % the first page is garbage  \openout\cont=\contentsfile       \write\cont{\catcode `\noexpand\@=11\relax}   % \makeatletter  \global\output{\normaloutput\page\lheader\rheader}}\setpage\vbox to \vsize{} % the first \topmark won't be null\def\ch{\note{The following sections were changed by the change file:}  \let\*=\relax}\newbox\sbox % saved box preceding the index\newbox\lbox % lefthand column in the index\def\inx{\par\vskip6pt plus 1fil % we are beginning the index  \def\page{\box255 } \normalbottom  \write\cont{} % ensure that the contents file isn't empty       \write\cont{\catcode `\noexpand\@=12\relax}   % \makeatother  \closeout\cont % the contents information has been fully gathered  \output{\ifpagesaved\normaloutput{\box\sbox}\lheader\rheader\fi    \global\setbox\sbox=\page \global\pagesavedtrue}  \pagesavedfalse \eject % eject the page-so-far and predecessors  \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box  \vsize=\pageheight \advance\vsize by -\ht\sbox % the remaining height  \hsize=.5\pagewidth \advance\hsize by -10pt    % column width for the index (20pt between cols)  \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines  \def\lr{L} % this tells whether the left or right column is next  \output{\if L\lr\global\setbox\lbox=\page \gdef\lr{R}    \else\normaloutput{\vbox to\pageheight{\box\sbox\vss        \hbox to\pagewidth{\box\lbox\hfil\page}}}\lheader\rheader    \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi}  \message{Index:}  \parskip 0pt plus .5pt  \outer\def\I##1, ##2.{\par\hangindent2em\noindent##1:\kern1em    \ifacro\pdfnote##2.\else##2\fi.} % index entry  \def\[##1]{$\underline{##1}$} % underlined index item  \rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar  \hyphenpenalty 10000 \parindent0pt  \readindex}\def\fin{\par\vfill\eject % this is done when we are ending the index  \ifpagesaved\null\vfill\eject\fi % output a null index column  \if L\lr\else\null\vfill\eject\fi % finish the current page  \parfillskip 0pt plus 1fil  \def\grouptitle{NAMES OF THE SECTIONS}  \ifacro \def\outsecname{Names of the sections} \let\Xpdf\X \fi  \ifpdftex \makebookmarks \pdfdest name {NOS} fitb    \pdfoutline goto name {NOS} count -\secno {\outsecname}    \def\X##1:##2\X{\Xpdf##1:##2\X      \firstsecno##1.\toks0{##2}\pdfoutline goto num \the\toksA {\the\toks0}}  \else\ifpdf    \special{pdf: outline -1 << /Title (\outsecname)      /Dest [ @thispage /FitH @ypos ] >>}    \def\X##1:##2\X{\Xpdf##1:##2\X      \firstsecno##1.\toks0{##2} \special{pdf: outline 0 << /Title        (\the\toks0) /A << /S /GoTo /D (\romannumeral\the\toksA) >> >>}}  \fi\fi  \let\topsecno=\nullsec  \message{Section names:}  \output={\normaloutput\page\lheader\rheader}  \setpage  \def\note##1##2.{\quad{\eightrm##1~\ifacro{\pdfnote##2.}\else{##2}\fi.}}  \def\Q{\note{Cited in section}} % crossref for mention of a section  \def\Qs{\note{Cited in sections}} % crossref for mentions of a section  \def\U{\note{Used in section}} % crossref for use of a section  \def\Us{\note{Used in sections}} % crossref for uses of a section  \def\I{\par\hangindent 2em}\let\*=*  \readsections}\def\makebookmarks{% read contents info for PDF outlines (twice)  \let\ZZ=\scanbookmarkline \readcontents\relax  \let\ZZ=\writebookmarkline \readcontents\relax}\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%  \else \csname#1\endcsname \fi} % Petr Olsak's macros from texinfo.tex\def\advancenumber#1{\countA=\expnumber{#1}\relax \advance\countA by1  \expandafter\xdef\csname#1\endcsname{\the\countA}}\def\scanbookmarkline#1#2#3#4{% remember last level item and add to parent  \expandafter\xdef\csname curr#2\endcsname{#3}  \ifnum#2>0\countB=#2 \advance\countB by-1    \advancenumber{chunk\the\countB.\expnumber{curr\the\countB}}\fi}\def\writebookmarkline#1#2#3#4{\pdfoutline goto num #3  count -\expnumber{chunk#2.#3}{#1}}\def\con{\par\vfill\eject % finish the section names% \ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers  \rightskip 0pt \hyphenpenalty 50 \tolerance 200  \setpage \output={\normaloutput\page\lheader\rheader}  \titletrue % prepare to output the table of contents  \pageno=\contentspagenumber  \def\grouptitle{TABLE OF CONTENTS}  \message{Table of contents:}  \topofcontents \startpdf  \line{\hfil Section\hbox to3em{\hss Page}}  \let\ZZ=\contentsline  \readcontents\relax % read the contents info  \botofcontents \end} % print the contents page(s) and terminate\def\contentsline#1#2#3#4{\ifnum#2=0 \smallbreak\fi    \line{\consetup{#2}#1      \rm\leaders\hbox to .5em{.\hfil}\hfil      \ \ifacro\pdflink{#3}{\romannumeral#3}\else#3\fi\hbox to3em{\hss#4}}}\def\consetup#1{\ifcase#1 \bf % depth -1 (@**)  \or % depth 0 (@*)  \or \hskip2em % depth 1 (@*1)  \or \hskip4em \or \hskip6em \or \hskip8em \or \hskip10em % depth 2,3,4,5  \else \hskip12em \fi} % depth 6 or more\def\noinx{\let\inx=\end} % no indexes or table of contents\def\nosecs{\let\FIN=\fin \def\fin{\let\parfillskip=\end \FIN}}    % no index of section names or table of contents\def\nocon{\let\con=\end} % no table of contents\def\today{\ifcase\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\fi  \space\number\day, \number\year}\newcount\twodigits\def\hours{\twodigits=\time \divide\twodigits by 60 \printtwodigits  \multiply\twodigits by-60 \advance\twodigits by\time :\printtwodigits}\def\gobbleone1{}\def\printtwodigits{\advance\twodigits100  \expandafter\gobbleone\number\twodigits  \advance\twodigits-100 }\def\TeX{{\ifmmode\it\fi   \leavevmode\hbox{T\kern-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}}\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}\def\datethis{\def\startsection{\leftline{\sc\today\ at \hours}\bigskip  \let\startsection=\stsec\stsec}}  % say `\datethis' in limbo, to get your listing timestamped before section 1\def\datecontentspage{%  \def\topofcontents{\leftline{\sc\today\ at \hours}\bigskip   \centerline{\titlefont\title}\vfill}} % timestamps the contents page

⌨️ 快捷键说明

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