|
|
@ -134,3 +134,60 @@ |
|
|
|
\def\mod{\mathrel{\rm mod}} |
|
|
|
|
|
|
|
\settextsize{12} |
|
|
|
|
|
|
|
|
|
|
|
\def\unparskip{\vskip-\parskip} |
|
|
|
|
|
|
|
\def\floatinsert#1{\par{ |
|
|
|
\setbox0=\vbox{\boxmaxdepth=2pt\relax #1} |
|
|
|
\dimen0=\dimexpr \ht0 + \dp0 + \baselineskip + \pagetotal - \pageshrink \relax |
|
|
|
\ifdim\dimen0 > \pagegoal |
|
|
|
\insert\topins{ |
|
|
|
\penalty 100 |
|
|
|
\splittopskip=0pt |
|
|
|
\splitmaxdepth=\maxdimen |
|
|
|
\floatingpenalty=0 |
|
|
|
\box0 |
|
|
|
\nobreak\bigskip\medskip |
|
|
|
} |
|
|
|
\else |
|
|
|
\goodbreak\bigskip |
|
|
|
\box0 |
|
|
|
\goodbreak\bigskip |
|
|
|
\unparskip |
|
|
|
\fi |
|
|
|
}} |
|
|
|
|
|
|
|
% Obecny plovouci objekt: \float{objekt}{popisek}{optional-id} |
|
|
|
\def\float#1#2#3{\floatinsert{ |
|
|
|
\medskip |
|
|
|
\centerline{#1} |
|
|
|
\medskip |
|
|
|
\smallskip |
|
|
|
{ |
|
|
|
\setbox0=\hbox{#2} |
|
|
|
\ifdim\wd0 < 0.8\hsize |
|
|
|
\centerline{\box0} |
|
|
|
\else |
|
|
|
\centerline{\vtop{ |
|
|
|
\hsize=0.8\hsize |
|
|
|
\parindent=0pt |
|
|
|
\leftskip=0pt plus 0.3\hsize |
|
|
|
\rightskip=0pt plus 0.3\hsize |
|
|
|
\parfillskip=0pt |
|
|
|
\spaceskip=0.3333em |
|
|
|
#2 |
|
|
|
}} |
|
|
|
\fi |
|
|
|
}}} |
|
|
|
|
|
|
|
% Dva floaty vedle sebe: \float{objekt1}{popisek1}{id1}{objekt2}{popisek2}{id2} |
|
|
|
\def\twofloats#1#2#3#4#5#6{\floatinsert{ |
|
|
|
\medskip |
|
|
|
\centerline{\vbox{\halign{\hss##\hss&\qquad\hss##\hss\cr |
|
|
|
#1\cr |
|
|
|
\noalign{\medskip\smallskip} |
|
|
|
#2\cr |
|
|
|
}}} |
|
|
|
}} |
|
|
|
|
|
|
|