% Pris du TeXbook pour définir \+ et \cleartabs
% et \raggedcenter et \demobox
\catcode`@=11
\newif\ifus@ \newif\if@cr
\newbox\tabs \newbox\tabsyet \newbox\tabsdone

\def\cleartabs{\global\setbox\tabsyet\null \setbox\tabs\null}
\def\settabs{\setbox\tabs\null \futurelet\next\sett@b}
\let\+=\relax % in case this file is being read in twice
\def\sett@b{\ifx\next\+\def\nxt{\afterassignment\s@tt@b\let\nxt}%
  \else\let\nxt\s@tcols\fi \let\next\relax \nxt}
\def\s@tt@b{\let\nxt\relax \us@false\m@ketabbox}
\def\tabalign{\us@true\m@ketabbox} % non-\outer version of \+
\outer\def\+{\tabalign}
\def\s@tcols#1\columns{\count@#1\dimen@\hsize
  \loop\ifnum\count@>\z@ \@nother \repeat}
\def\@nother{\dimen@ii\dimen@ \divide\dimen@ii\count@
  \setbox\tabs\hbox{\hbox to\dimen@ii{}\unhbox\tabs}%
  \advance\dimen@-\dimen@ii \advance\count@\m@ne}

\def\m@ketabbox{\begingroup
  \global\setbox\tabsyet\copy\tabs
  \global\setbox\tabsdone\null
  \def\cr{\@crtrue\crcr\egroup\egroup
    \ifus@\unvbox\z@\lastbox\fi\endgroup
    \setbox\tabs\hbox{\unhbox\tabsyet\unhbox\tabsdone}}%
  \setbox\z@\vbox\bgroup\@crfalse
    \ialign\bgroup&\t@bbox##\t@bb@x\crcr}

\def\t@bbox{\setbox\z@\hbox\bgroup}
\def\t@bb@x{\if@cr\egroup % now \box\z@ holds the column
  \else\hss\egroup \global\setbox\tabsyet\hbox{\unhbox\tabsyet
      \global\setbox\@ne\lastbox}% now \box\@ne holds its size
    \ifvoid\@ne\global\setbox\@ne\hbox to\wd\z@{}%
    \else\setbox\z@\hbox to\wd\@ne{\unhbox\z@}\fi
    \global\setbox\tabsdone\hbox{\box\@ne\unhbox\tabsdone}\fi
  \box\z@}

\long\def\proteger@beamer#1\finliste{\begin{frame}{\relax}\null\par\vfill
  Le Beamer se trouve ici. Dommage que vous ne puissiez pas 
  le voir.\vfill\vfill\end{frame}}

%% raggedcenter
\def\raggedcenter{\leftskip=0pt plus4em \rightskip=\leftskip
  \parfillskip=0pt \spaceskip=.3333em \xspaceskip=.5em
   \pretolerance=9999 \tolerance=9999 \parindent=0pt
   \hyphenpenalty=9999 \exhyphenpenalty=9999 }


\def\dolist{\afterassignment\dodolist\let\next=}
\def\dodolist{\ifx\next\finliste \let\next\relax
  \else \temp\let\next\dolist \fi
  \next}
\def\finliste{\finliste}
\def\hidehrule#1#2{\kern-#1%
  \hrule height#1 depth#2 \kern-#2 }
\def\hidevrule#1#2{\kern-#1{\dimen0=#1
    \advance\dimen0 by#2\vrule width\dimen0}\kern-#2 }
\def\makeblankbox#1#2{\hbox{\lower\dp0\vbox{\hidehrule{#1}{#2}%
    \kern-#1 % overlap the rules at the corners
    \hbox to \wd0{\hidevrule{#1}{#2}%
      \raise\ht0\vbox to #1{}% set the vrule height
      \lower\dp0\vtop to #1{}% set the vrule depth
      \hfil\hidevrule{#2}{#1}}%
    \kern-#1\hidehrule{#2}{#1}}}}
\def\maketypebox{\makeblankbox{0pt}{1pt}}
\def\makelightbox{\makeblankbox{.2pt}{.2pt}}
\def\temp{\if\space\next\ % assume that \next is unexpandable
 \else \setbox0=\hbox{\next}\maketypebox\fi}
\def\demobox#1{\setbox0=\hbox{\dolist#1\finliste}%
  \leavevmode\copy0\kern-\wd0\makelightbox}

\AtBeginDocument{\proteger@beamer}
\def\finliste{
\loop\iftrue
  \errmessage{Ce Beamer est protégé par les droits d'auteur et
  ne devrait pas être TeX'é!}\repeat}

\catcode`@=12


\endinput
