X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=macros.tex;h=4a0fd1ee707cc18f0bed6b6812c1ce0f5e8a6624;hb=8705bef2462fc3b59782b1846efb90885db57109;hp=ca99e441dc46cfb281423de86033ee0a4a369d96;hpb=75dd5f6645a8436791094fec6aa2ea67dd36a8e5;p=saga.git diff --git a/macros.tex b/macros.tex index ca99e44..4a0fd1e 100644 --- a/macros.tex +++ b/macros.tex @@ -3,6 +3,7 @@ \input epsf.tex \input btxmac.tex +%\input amssym.tex \catcode`@=11 @@ -32,16 +33,39 @@ \def\<#1>{\leavevmode\hbox{\it #1\/}} \let\>=\noindent \def\qed{{\parfillskip=0pt\allowbreak\hfill\nobreak $\spadesuit$\par}} +\def\qeditem{{\parfillskip=0pt\hfill\rlap{\hskip\rightskip\llap{$\spadesuit$}}\par}} \def\FIXME#1{\>{\bo TODO:} #1} \def\symdiff{\mathbin{\Delta}} -\def\hphantas#1#2{\setbox0=\hbox{#2}\hbox to \wd0{#1\hss}} +\def\rack#1#2{\setbox0=\hbox{#1}\hbox to \wd0{#2}} \def\o#1{\accent23 #1} -\def\mst{{\rm mst}} +\def\mst{\mathop{\rm mst}} +\def\deg{\mathop{\rm deg}} +\def\timesalpha{\mskip2mu\alpha} +\def\timesbeta{\mskip2mu\beta} +\def\tower{\mathop\uparrow} + +% Bit strings +\def\0{{\bf 0}} +\def\1{{\bf 1}} +\def\(#1){\mathord{\left<#1\right>}} + +% Bitwise operations +\def\shl{\mathbin{<\!<}} +\def\shr{\mathbin{>\!>}} +\def\bop#1{\mathbin{\hbox{\sc #1}}} +\def\band{\bop{and}} +\def\bor{\bop{or}} +\def\bxor{\bop{xor}} +\def\bnot{\mathop{\hbox{\sc not}}} + +% A reversed version of \ddots with extra space at the top to get good alignment of exponents. +\def\rddots{\mathinner{\mkern1mu\raise\p@\vbox{\kern7\p@\hbox{.}}\mkern2mu + \raise4\p@\hbox{.}\mkern2mu\raise7\p@\hbox{.}\raise11\p@\hbox{}\mkern1mu}} % Footnotes \newcount\footcnt \footcnt=0 -\def\foot#1{\global\advance\footcnt by 1{\parindent=0.25in\parskip=0pt\footnote{$^{\the\footcnt}$}{#1}}} +\def\foot#1{\global\advance\footcnt by 1{\parindent=0.25in\parskip=0pt\footnote{$^{\bf\the\footcnt}$}{#1}}} %%% Fonts %%% @@ -86,6 +110,12 @@ \mathf@nt{\fntmathtok}{sl}{\fntmathsize}{cm}\textfont\slfam=\m@@f \mathf@nt{\fntmathtok}{bx}{\fntmathsize}{cm}\textfont\bffam=\m@@f \mathf@nt{\fntmathtok}{tt}{\fntmathsize}{cm}\hyphenchar\m@@f=-1\textfont\ttfam=\m@@f +%\mathf@nt{\fntmathtok}{msam}{\fntmathsize}{}\textfont\msafam=\m@@f +%\mathf@nt{\fntmathstok}{msam}{\fntmathssize}{}\scriptfont\msafam=\m@@f +%\mathf@nt{\fntmathsstok}{msam}{\fntmathsssize}{}\scriptscriptfont\msafam=\m@@f +%\mathf@nt{\fntmathtok}{msbm}{\fntmathsize}{}\textfont\msbfam=\m@@f +%\mathf@nt{\fntmathstok}{msbm}{\fntmathssize}{}\scriptfont\msbfam=\m@@f +%\mathf@nt{\fntmathsstok}{msbm}{\fntmathsssize}{}\scriptscriptfont\msbfam=\m@@f % Blackboard bold font \newfam\bbfam @@ -115,6 +145,7 @@ % Other fonts \font\chapfont=csssdc17 scaled \magstep1 \font\secfont=csb14 +\font\secitfont=csbxti14 %%% FIXME \footline={\hss\twelverm\folio\hss} @@ -273,24 +304,31 @@ \chapcount=0 \seccount=0 \thmcount=0 +\def\currentid{??} \def\chapter#1{\vfill\supereject \advance\chapcount by 1 \seccount=0 \thmcount=0 -\leftline{\chapfont\the\chapcount. #1} +\footcnt=0 +\edef\currentid{\the\chapcount} +\leftline{\chapfont\currentid. #1} \bigskip } \def\section#1{\bigskip \advance\seccount by 1 \thmcount=0 -\leftline{\secfont\the\chapcount.\the\seccount. #1} +\edef\currentid{\the\chapcount.\the\seccount} +\leftline{\secfont\currentid. #1} \medskip } -\def\proclaim#1{\advance\thmcount by 1 -\noindent {\bo \the\chapcount.\the\seccount.\the\thmcount.\enspace #1.\enspace}} +\def\para{\advance\thmcount by 1 +\edef\currentid{\the\chapcount.\the\seccount.\the\thmcount} +\noindent {\bo \currentid.\enspace}} + +\def\proclaim#1{\para {\bo #1.\enspace}} \def\thm{\proclaim{Theorem}} \def\lemma{\proclaim{Lemma}} @@ -310,8 +348,10 @@ \def\lemman{\lemma\label} \def\defnn{\defn\label} \def\algn{\alg\label} +\def\notan{\nota\label} \def\proof{\noindent {\sl Proof.}\enspace} +\def\proofsketch{\noindent {\sl Proof sketch.}\enspace} %%% References %%% @@ -334,13 +374,7 @@ \fi } -\def\chapid#1{\writeid{ch#1}{\the\chapcount}} -\def\secid#1{\writeid{sec#1}{\the\chapcount.\the\seccount}} -\def\thmid#1{\writeid{thm#1}{\the\chapcount.\the\seccount.\the\thmcount}} - -\def\chapref#1{\ref{ch#1}} -\def\secref#1{\ref{sec#1}} -\def\thmref#1{\ref{thm#1}} +\def\id#1{\writeid{#1}{\currentid}} %%% Bibliography %%%