% ******************************************************************** % LOGIC.sty 14 August 1991 % Royal Octavo format: 100% % ******************************************************************** \typeout{ } \typeout{* Document Style `LOGIC'*} \typeout{ * * Version 1.4 * * } \typeout{ } % ************* % Error message % ************* \def\@logicerr#1% {\errhelp{This standard LaTeX command is not used in LOGIC.STY. ªªJTry pressing return, and it'll probably be ignored.}% \typeout{Style error. \space See `Typesetting your chapter....}% \errmessage{#1}} % ************************************** % Page dimensions, lineskips, type sizes % ************************************** \lineskip 1pt \normallineskip 1pt \def\baselinestretch{1} \@twosidetrue % Left and right pages \@mparswitchtrue % Marginal notes in the outside margin \def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt \abovedisplayskip 12pt minus3pt \belowdisplayskip\abovedisplayskip \abovedisplayshortskip \z@ plus3pt \belowdisplayshortskip 6.5pt plus3.5pt minus3pt \let\@listi\@listI} \def\small{\@setsize\small{10pt}\ixpt\@ixpt \abovedisplayskip 11pt minus3pt \belowdisplayskip\abovedisplayskip \abovedisplayshortskip \z@ plus2pt \belowdisplayshortskip 4pt plus2pt minus2pt \def\@listi{\parsep 4.5pt plus 2pt minus 1pt \itemsep \parsep \topsep 9pt plus 3pt minus 5pt}} \def\footnotesize{\@setsize\footnotesize{9pt}\viiipt\@viiipt \abovedisplayskip 6pt minus3pt \belowdisplayskip \abovedisplayskip \abovedisplayshortskip \z@ plus1pt \belowdisplayshortskip 3pt plus1pt minus2pt \def\@listi{\leftmargin\leftmargini \topsep 4pt plus 2pt minus 2pt \parsep 2pt plus 1pt minus 1pt \itemsep \parsep}} \def\scriptsize{\@setsize\scriptsize{9pt}\viiipt\@viiipt} \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt} \def\large{\@setsize\large{14pt}\xiipt\@xiipt} % B \def\Large{\@setsize\Large{16pt}\xivpt\@xivpt} % A \def\LARGE{\@setsize\LARGE{22pt}\xxpt\@xxpt} % Chap \def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt} \let\Huge=\huge \def\em{\it} \def\sl{\it} \normalsize % ********************** \oddsidemargin 6.25pc \evensidemargin 6.25pc \marginparwidth 85pt \marginparsep 10pt \topmargin 27pt \headheight 8pt \headsep 18pt \footskip 30pt \topskip 10pt \textheight = 37\baselineskip % 37 lines on a page \advance\textheight by \topskip % \textwidth 27pc % 4.5 in \columnsep 2pc \columnseprule 0pt \footnotesep 8.4pt \skip\footins 10.8pt plus 4pt minus 2pt \marginparpush 7pt \parskip 0pt \parindent .3in \partopsep 3pt plus 2pt minus 2pt \def\chapstrut{\hrule width0pt height24pt depth0pt} \def\afterchapstrut{\hrule width0pt height12pt depth0pt} %\thispagestyle{plain} % Penalties \binoppenalty=2000 \relpenalty=1500 \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 \@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty -\@lowpenalty \clubpenalty 2500 \widowpenalty 2500 \displaywidowpenalty 1500 \predisplaypenalty 500 \postdisplaypenalty 500 \interlinepenalty 0 \brokenpenalty 2000 \@beginparpenalty=\predisplaypenalty \@endparpenalty=\postdisplaypenalty \@itempenalty=500 \def\@ptsize{0} \@namedef{ds@11pt}{\@logicerr{Only 10 point is available}} \@namedef{ds@12pt}{\@logicerr{Only 10 point is available}} \def\ds@twoside{} \def\ds@draft{\overfullrule 5pt} \@options \relax % ******************* % Sectioning commands % ******************* % Counters \newcounter {chapter} \newcounter {section}[chapter] \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] % Form of the numbers \def\thechapter{\arabic{chapter}} \def\thesection{\thechapter.\arabic{section}} \def\thesubsection{\thesection.\arabic{subsection}} %\def\thesubsubsection{\thesubsection .\arabic{subsubsection}} %\def\theparagraph{\thesubsubsection.\arabic{paragraph}} %\def\thesubparagraph{\theparagraph.\arabic{subparagraph}} % Section macros \def\chapter{\par \thispagestyle{plain} \@afterindentfalse \secdef\@chapter\@schapter} \def\@chapter[#1]#2#3{ \markboth{#3}{#1} \refstepcounter{chapter} \null\chapstrut {\raggedright \LARGE\bf #2\par \vskip 6pt \LARGE\bf #3\par} \chapstrut \hrule depth 0.5pt \afterchapstrut %\tableofcontents \chapstrut \@afterheading} \def\@schapter#1{ \markboth{#1}{#1} \null\chapstrut {\raggedright \LARGE\bf #1\par} \chapstrut\@afterheading } \def\section {\@ifstar{\@sectionstar}{\@sectionnostar}} \def\@sectionstar {\@startsection {section}{1}{\z@}{-12pt plus -1ex minus -3pt}{4pt minus 2pt}{\Large\bf}*} \def\@sectionnostar {\@ifnextchar[{\@sectionopt}{\@sectionnoopt}} \def\@sectionopt[#1]#2% {\sectionmark{#1} \@startsection {section}{1}{\z@}{-12pt plus -1ex minus -3pt} {4pt minus 2pt}{\Large\bf}[#1]{\Large\bf #2} \addcontentsline{toc}{section} {\protect\numberline{\thesection}#2}} \def\@sectionnoopt#1 {\sectionmark{#1} \@startsection {section}{1}{\z@}{-12pt plus -1ex minus -3pt} {4pt minus 2pt}{\Large\bf}[#1]{\Large\bf #1}} \def\subsection% {\@ifstar{\@subsectionstar}{\@subsectionnostar}} \def\@subsectionnostar{\@startsection{subsection}{2}{\z@} {-9pt minus -2pt}{4pt minus 2pt}{\large\bf}} \def\@subsectionstar{\@startsection{subsection}{2}{\z@} {-9pt minus -2pt}{4pt minus 2pt}{\large\bf}*} \def\subsubsection{\@startsection{subsubsection}{3}{\z@} {-9pt minus -2pt}{4pt minus 2pt}{\normalsize\bf}} \def\paragraph{\@startsection{paragraph}{4}{\z@} {6pt minus 2pt}{-1em}{\normalsize\it}} \def\subparagraph{\@startsection{subparagraph}{4}{\parindent} {6pt minus 2pt}{-1em}{\normalsize\it}} \setcounter{secnumdepth}{3} % Running headlines \mark{{}{}} \def\ps@headings {\let\@mkboth\markboth \def\@oddfoot{}% \def\@evenfoot{}% \def\@evenhead{\bf\thepage\hfil\it\leftmark\hfil\hbox{}}% \def\@oddhead{\hbox{}\hfil\it\rightmark\hfil\bf\thepage}% \def\sectionmark##1{\markright{##1}}% \def\chaptermark##1{\markboth{##1}{##1}}% \def\subsectionmark##1{}} \def\ps@myheadings {\@logicerr{The page style `myheadings' is not available.}} % Figures and tables \long\def\@makecaption#1#2{% \vskip 6pt \setbox\@tempboxa\hbox{\bf #1.\ \rm #2} \ifdim \wd\@tempboxa >\hsize \bf #1.\ \rm #2\par \else \hbox to\hsize{\hfil\box\@tempboxa\hfil} \fi } \long\def\@tablecaption#1#2{% \setbox\@tempboxa\hbox{\bf #1.\ \rm #2} \ifdim \wd\@tempboxa >\hsize \bf #1.\ \rm #2\par \else \hbox to\hsize{\hfil\box\@tempboxa\hfil} \fi \vskip 6pt} \newcounter{figure}[chapter] \def\thefigure{\@arabic\c@figure} \def\fps@figure{tbp} \def\ftype@figure{1} \def\ext@figure{lof} \def\fnum@figure{Fig. \thefigure} \def\figure{\@float{figure}} \let\endfigure\end@float \@namedef{figure*}{\@dblfloat{figure}} \@namedef{endfigure*}{\end@dblfloat} \newcounter{table}[chapter] \def\thetable{\@arabic\c@table} \def\fps@table{tbp} \def\ftype@table{2} \def\ext@table{lot} \def\fnum@table{Table \thetable} \def\table{\let\@makecaption\@tablecaption \@float{table}} \let\endtable\end@float \@namedef{table*}{\@dblfloat{table}} \@namedef{endtable*}{\end@dblfloat} % Modifications to the equation environment \@addtoreset{equation}{section} \def\theequation{\thesection.\arabic{equation}} \arraycolsep 5pt \tabcolsep 6pt \arrayrulewidth .4pt \doublerulesep 2pt \tabbingsep \labelsep % New theorem-like environments \@addtoreset{definition}{section} \newtheorem{definition}{Definition}[subsection] \newtheorem{theorem}[definition]{Theorem} \newtheorem{lemma}[definition]{Lemma} \newtheorem{algorithm}[definition]{Algorithm} \newtheorem{example}[definition]{Example} \newtheorem{examples}[definition]{Examples} \newtheorem{fact}[definition]{Fact} \newtheorem{observation}[definition]{Observation} \newtheorem{conjecture}[definition]{Conjecture} \newtheorem{convention}[definition]{Convention} \newtheorem{comment}[definition]{Comment} \newtheorem{proposition}[definition]{Proposition} \newtheorem{characterization}[definition]{Characterization} \newtheorem{corollary}[definition]{Corollary} \newtheorem{thesis}[definition]{Thesis} \newtheorem{notation}[definition]{Notation} \newtheorem{note}[definition]{Note} \newtheorem{remark}[definition]{Remark} \newtheorem{remarks}[definition]{Remarks} \newtheorem{puzzle}[definition]{Puzzle} \newtheorem{problem}[definition]{Problem} \newtheorem{application}[definition]{Application} \newtheorem{zexercise}[definition]{Exercise} \newtheorem{zexercises}[definition]{Exercises} \def\setthmfont{% \def\theoremtest{theorem} \def\proptest{proposition} \def\lemmatest{lemma} \def\coroltest{corollary} \ifx\@currenvir\theoremtest \def\@thmfont{\it}\else \ifx\@currenvir\proptest \def\@thmfont{\it}\else \ifx\@currenvir\lemmatest \def\@thmfont{\it}\else \ifx\@currenvir\coroltest \def\@thmfont{\it}\else \def\@thmfont{\rm}\fi\fi\fi\fi } \def\@begintheorem#1#2{% \setthmfont \par\addvspace{4pt}\noindent {\bf #1\ #2.}\ignorespaces \hskip 0.5pc\@thmfont} \def\@opargbegintheorem#1#2#3{% \setthmfont \par\addvspace{4pt}\noindent {\bf #1\ #2\ (#3).}\ignorespaces \hskip 0.5pc\@thmfont} \def\@endtheorem{\rm\vskip 4pt} % END OF PROOF BOX \def\pushright#1{{% % set up \parfillskip=0pt % so \par doesn't push \square to left \widowpenalty=10000 % so the page is not broken before \square \displaywidowpenalty=10000 % ditto \finalhyphendemerits=0 % TeXbook exercise 14.32 % % horizontal \leavevmode % \nobreak means lines not pages \unskip % remove previous space or glue \nobreak % don't break lines \hfil % ragged right if we spill over \penalty50 % discouragement to do so \hskip.2em % ensure some space \null % anchor following \hfill \hfill % push \square to right {#1} % the end-of-proof mark (or whatever) % % vertical \par}} % build paragraph \def\proof{% \followon{Proof}% } \def\endproof{% \ifSuppressEndOfProof \global\SuppressEndOfProoffalse \else \xqed \fi \endfollowon } \def\qed{\xqed\global\SuppressEndOfProoftrue} \newif\ifSuppressEndOfProof\SuppressEndOfProoffalse \def\xqed{\pushright\markendofproof} \def\markendofproof{\rule{2mm}{3mm}} \def\followon#1{\trivlist\item[\hskip\labelsep{\bf#1.}]} \def\endfollowon{\endtrivlist} \def\@beginexercises{% \subsection*{Exercises} \small \enumerate} \def\@opargbeginexercises[#1]{% \subsection*{Exercises\ (#1)} \small \enumerate} \def\@beginexercise{% \subsection*{Exercise} \small \leftskip 1pc \rightskip\leftskip} \def\@opargbeginexercise[#1]{% \subsection*{Exercise\ (#1)} \small \leftskip 1pc \rightskip\leftskip} \newenvironment{exercise}% {\begin{zexercise}\small}% {\end{zexercise}} \newenvironment{exercises}% {\begin{zexercises}\small\begin{itemize}}% {\end{itemize}\end{zexercises}} % List numbering and lettering \def\labelenumi{{\rm\arabic{enumi}.}} \def\theenumi{\arabic{enumi}} \def\labelenumii{{\rm(\alph{enumii})}} \def\theenumii{\alph{enumii}} \def\p@enumii{\theenumi} \def\labelenumiii{{\rm\roman{enumiii}.}} \def\theenumiii{\roman{enumiii}} \def\p@enumiii{\theenumi(\theenumii)} \def\labelenumiv{{\rm\Alph{enumiv}.}} \def\theenumiv{\Alph{enumiv}} \def\p@enumiv{\p@enumiii\theenumiii} \def\labelitemi{$\bullet$} \def\labelitemii{$\ast$} \def\labelitemiii{$\circ$} \def\labelitemiv{\bf --} \def\descriptionlabel#1{\hspace\labelsep \bf #1} \def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin \let\makelabel\descriptionlabel}} \let\enddescription\endlist \leftmargini 2.5em \leftmarginii 2.2em \leftmarginiii 1.87em \leftmarginiv 1.7em \leftmarginv 1em \leftmarginvi 1em \leftmargin\leftmargini \labelsep .5em \labelwidth\leftmargini\advance\labelwidth-\labelsep \def\@listI{\leftmargin\leftmargini \parsep \z@ \topsep 3pt plus .5pt \itemsep 1pt plus .5pt} \let\@listi\@listI \@listi \def\@listii{\leftmargin\leftmarginii \labelwidth\leftmarginii\advance\labelwidth-\labelsep \topsep 1pt plus .5pt \parsep \z@ \itemsep .5pt} \def\@listiii{\leftmargin\leftmarginiii \labelwidth\leftmarginiii\advance\labelwidth-\labelsep \topsep \z@ \parsep \z@ \partopsep 1pt plus 0pt minus 1pt \itemsep \topsep} \def\@listiv{\leftmargin\leftmarginiv \labelwidth\leftmarginiv\advance\labelwidth-\labelsep} \def\@listv{\leftmargin\leftmarginv \labelwidth\leftmarginv\advance\labelwidth-\labelsep} \def\@listvi{\leftmargin\leftmarginvi \labelwidth\leftmarginvi\advance\labelwidth-\labelsep} % Verse, quotation, and quote environments \def\verse{\let\\=\@centercr \list{}{\itemsep\z@ \itemindent -1.5em \listparindent\itemindent \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]} \let\endverse\endlist \def\quotation{\list{}{\listparindent 1.5em \itemindent\listparindent \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]} \let\endquotation=\endlist \def\quote{\list{}{\rightmargin\leftmargin}\item[]} \let\endquote=\endlist \skip\@mpfootins = \skip\footins \fboxsep = 3pt \fboxrule = .4pt % Table of contents \def\@pnumwidth{1.55em} \def\@tocrmarg {2.55em} \def\@dotsep{4.5} \setcounter{tocdepth}{2} % i.e. down to subsection only \def\tableofcontents{\section*{} \@starttoc{toc}} \def\l@chapter#1#2{\addpenalty{\@secpenalty} \addvspace{2.25em plus 1pt} \begingroup \@tempdima 3em \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth {\large \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}}\par \nobreak \endgroup} \def\l@section{\@dottedtocline{1}{0em}{1.5em}} \def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} \def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} \def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} \def\l@subparagraph{\@dottedtocline{5}{10em}{5em}} \def\listoffigures{\section*{List of Figures\@mkboth {List of Figures}{List of Figures}}\@starttoc{lof}} \def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} \def\listoftables{\section*{List of Tables\@mkboth {List of Tables}{List of Tables}}\@starttoc{lot}} \let\l@table\l@figure % Bibliography \def\thebibliography#1{% \section*{Bibliography\@mkboth{Bibliography}{Bibliography}} \list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]} \leftmargin\labelwidth \advance\leftmargin\labelsep \usecounter{enumi}} \def\newblock{\hskip .11em plus .33em minus .07em} \sloppy\clubpenalty4000\widowpenalty4000 \sfcode`\.=1000\relax} \let\endthebibliography=\endlist % ***** % Index % ***** \def\makeindex{% \if@filesw \newwrite\@subindexfile\immediate\openout\@subindexfile=\jobname.sbj \newwrite\@auindexfile\immediate\openout\@auindexfile=\jobname.aut \newwrite\@notindexfile\immediate\openout\@notindexfile=\jobname.not \def\subind{\@bsphack\begingroup \def\protect####1{\string####1\space}\@sanitize \@wrindex\@subindexfile} \typeout{Writing the subject index file: \jobname.sbj } \def\auind{\@bsphack\begingroup \def\protect####1{\string####1\space}\@sanitize \@wrindex\@auindexfile} \typeout{Writing the author index file: \jobname.aut } \def\notind{\@bsphack\begingroup \def\protect####1{\string####1\space}\@sanitize \@wrindex\@notindexfile} \typeout{Writing the notation index file: \jobname.not } \fi} \def\@wrindex#1#2{\let\thepage\relax \xdef\@gtempa{\write#1{\string\indexentry{#2}{\thepage}}} \endgroup\@gtempa \if@nobreak \ifvmode\nobreak\fi\fi\@esphack} \def\subind{\@bsphack\begingroup \@sanitize\@index} \def\auind{\@bsphack\begingroup \@sanitize\@index} \def\notind{\@bsphack\begingroup \@sanitize\@index} \def\@index#1{\endgroup\@esphack} \newif\if@restonecol \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi \columnseprule \z@ \columnsep 35pt\twocolumn[\chapter*{Index}] \@mkboth{Index}{Index}\thispagestyle{plain}\parindent\z@ \parskip\z@ plus .3pt\relax\let\item\@idxitem} \def\@idxitem{\par\hangindent 40pt} \def\subitem{\par\hangindent 40pt \hspace*{20pt}} \def\subsubitem{\par\hangindent 40pt \hspace*{30pt}} \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi} \def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax} \def\see#1#2{{\em see\/} #1} \def\printindex{\@input{\jobname.ind}} % Footnotes \def\footnoterule{\kern-3\p@ \hrule width .4\columnwidth \kern 2.6\p@} \long\def\@makefntext#1{\parindent 1em\noindent \hbox to 1.8em{\hss$^{\@thefnmark}$}#1} % Floats \setcounter{topnumber}{2} \def\topfraction{.9} \setcounter{bottomnumber}{2} \def\bottomfraction{.9} \setcounter{totalnumber}{3} \def\textfraction{.1} \def\floatpagefraction{.9} \setcounter{dbltopnumber}{2} \def\dbltopfraction{.7} \def\dblfloatpagefraction{.5} \def\abstract{% \if@twocolumn \section*{Abstract} \else \small \begin{center} {\bf Abstract\vspace{-.5em}\vspace{0pt}} \end{center} \quotation \fi} \def\endabstract{\if@twocolumn\else\endquotation\fi} % Date \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} % Appendix \def\appendix{\par \setcounter{section}{0} \setcounter{subsection}{0} \def\thesection{\Alph{section}}} \ps@headings \pagenumbering{arabic} \onecolumn \flushbottom %%%%%%%%%% \floatsep 0pt%6pt \textfloatsep 12pt \intextsep 12pt \@maxsep 12pt%20pt \dblfloatsep 12pt \dbltextfloatsep 14pt \@dblmaxsep 20pt \@fptop 0pt plus 1fil \@fpsep 10pt plus 2fil \@fpbot 0pt plus 1fil \@dblfptop 0pt plus 1fil \@dblfpsep 10pt plus 2fil \@dblfpbot 0pt plus 1fil