summaryrefslogtreecommitdiff
path: root/info/epslatex/french/block.sty
blob: 7708eba4b892fbc2878e20d94a8fd1bbd1f22c93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
\ifx\endBlock\undefined
\def\BL@CK{\begingroup%
\def\endBL@CK{\egroup\endgroup}%
\vbox\bgroup}%
\long\def\Block{\begingroup%
\def\endBlock{\unskip\egroup\endgroup}%
\pagebreak[2]\vspace*{\parskip}\vbox\bgroup\par\noindent\ignorespaces}
\long\def\IBlock{\begingroup%
\def\endIBlock{\unskip\egroup\endgroup}%
\pagebreak[2]\vspace*{\parskip}\vbox\bgroup\par\ignorespaces}
%\newdimen\@@dimenA
% reservation verticale
%\def\need#1{{\ifhmode\unskip\par\fi
%%  \@@dimenA=\pagegoal
%  \@@dimenA=\textheight
%  \advance\@@dimenA by -\pagetotal
%  \ifdim\pagetotal>\z@
%    \ifdim\@@dimenA>\z@
%      \ifdim\@@dimenA<#1%
%        \vfill\eject\typeout{WARNING- EJECT BY NEED}
%      \fi
%    \fi
%  \fi}
%}
\def\need#1{\ifhmode\unskip\par\fi \penalty-100 \begingroup % preserve \dimen@, \dimen@i
   \ifdim\prevdepth>\maxdepth \dimen@i\maxdepth \else \dimen@i\prevdepth\fi
   \kern-\dimen@i
   \dimen@\pagegoal \advance\dimen@-\pagetotal % space left
   \ifdim #1>\dimen@
        \vfill\eject\typeout{WARNING- EJECT BY NEED}
   \fi
   \kern\dimen@i
   \endgroup}
\def\lneed#1{\need{#1\baselineskip}}
% \begin{BL@CK} ... \end{BL@CK} delimite un bloc qui restera, si possible, sur une seule page.
\long\def\TBlock{\begingroup%
\def\endTBlock{\unskip\egroup\endgroup}%
\pagebreak[2]\vspace*{\parskip}\vtop\bgroup\par\noindent\ignorespaces}
\else
\typeout{block.sty already loaded}
\fi
\endinput

\def\need#1{\par \penalty-100 \begingroup % preserve \dimen@, \dimen@i
   \ifdim\prevdepth>\maxdepth \dimen@i\maxdepth \else \dimen@i\prevdepth\fi
   \kern-\dimen@i
   \dimen@\pagegoal \advance\dimen@-\pagetotal % space left
   \ifdim #1>\dimen@ \vfil \eject \fi 
   \kern\dimen@i
   \endgroup}