]> mj.ucw.cz Git - saga.git/blobdiff - macros.tex
Korektury.
[saga.git] / macros.tex
index d75944d9aa34c7e1c488240c14e1494e32b3c376..bedae0c16f8539fd5fd1560e4ab0169ee92ece95 100644 (file)
 \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 %%%
 
 \parskip=1pt plus 1pt minus 0.3pt
 \rightskip=2em
 \itemcount=0
+\smallskip
 }
 \def\endalgo{\interlistskip\endgroup}
 \def\algopar{\par
 \leavevmode
 }
 \def\algoitem{
-\ifnum\itemcount=0\smallskip\fi
 \algopar\advance\itemcount by 1
 \hbox to 2em{\hss \the\itemcount. }%
 \futurelet\next\algoitemh}
 \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}
 \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 %%%