X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=macros.tex;h=bedae0c16f8539fd5fd1560e4ab0169ee92ece95;hb=7a1030f60c97222209cf421937baddb3b825cba9;hp=d75944d9aa34c7e1c488240c14e1494e32b3c376;hpb=137b8cc9dde7ad1a4e6597a4d20aab1f669392ce;p=saga.git diff --git a/macros.tex b/macros.tex index d75944d..bedae0c 100644 --- a/macros.tex +++ b/macros.tex @@ -32,14 +32,18 @@ \def\<#1>{\leavevmode\hbox{\it #1\/}} \let\>=\noindent \def\qed{{\parfillskip=0pt\allowbreak\hfill\nobreak $\spadesuit$\par}} -\def\FIXME#1{\>{\bo FIXME:} #1} +\def\FIXME#1{\>{\bo TODO:} #1} \def\symdiff{\mathbin{\Delta}} \def\hphantas#1#2{\setbox0=\hbox{#2}\hbox to \wd0{#1\hss}} +\def\o#1{\accent23 #1} +\def\mst{\mathop{\rm mst}} +\def\deg{\mathop{\rm deg}} +\def\timesalpha{\mskip2mu\alpha} % 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 %%% @@ -240,6 +244,7 @@ \parskip=1pt plus 1pt minus 0.3pt \rightskip=2em \itemcount=0 +\smallskip } \def\endalgo{\interlistskip\endgroup} \def\algopar{\par @@ -249,7 +254,6 @@ \leavevmode } \def\algoitem{ -\ifnum\itemcount=0\smallskip\fi \algopar\advance\itemcount by 1 \hbox to 2em{\hss \the\itemcount. }% \futurelet\next\algoitemh} @@ -271,36 +275,44 @@ \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} +\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 #1 \the\chapcount.\the\seccount.\the\thmcount.\enspace}} +\edef\currentid{\the\chapcount.\the\seccount.\the\thmcount} +\noindent {\bo \currentid.\enspace #1.\enspace}} -\def\theorem{\proclaim{Theorem}} +\def\thm{\proclaim{Theorem}} \def\lemma{\proclaim{Lemma}} \def\defn{\proclaim{Definition}} \def\problem{\proclaim{Problem}} \def\obs{\proclaim{Observation}} \def\rem{\proclaim{Remark}} \def\alg{\proclaim{Algorithm}} +\def\impl{\proclaim{Implementation}} +\def\cor{\proclaim{Corollary}} +\def\nota{\proclaim{Notation}} +\def\example{\proclaim{Example}} \def\label#1{{\sl (#1)\/}\enspace} -\def\theoremn{\theorem\label} +\def\thmn{\thm\label} \def\lemman{\lemma\label} \def\defnn{\defn\label} \def\algn{\alg\label} @@ -328,13 +340,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 %%%