%OZT%&frtex 
%            French Torture Test with plain TeX
%                                     Copyright Bernard Gaulle as in french.doc
%
% SHOULD normally be frozen (used by frencht for Plain TeX tests) 
%
% This is a 7-bit ASCII file                              last mods: 2005/11/25
%%
%%      checksum        = "48379 295 686 11458"
%%
\catcode`@=11%
% just to validate loading and init of french and english with full plain TeX
\begingroup
\input fengl209.sty
\input frplain.sty
\endgroup%
% Don't use TeXXeT option of eTeX
\ifx\beginL\undefined
\else\TeXXeTstate=0\def\beginL{}\def\endL{}%
\fi
% just to allow them to be reloaded correctly
\let\frenchTeXmods\undefined
\let\englishTeXmods\undefined\input fengl209.sty

% Since french for Plain TeX is frozen and french for LaTeX is still changing:
% Compatibiliy macros are needed for the recent french.tst mods.
\def\frenchpack{french}% old french style name
\def\CheckSevenBits/#1/#2{}% gobble it
\def\fontencoding#1\selectfont{}% no-op
\def\textbackslash{{\tt\char'134}}%
\def\etc{~etc}
\def\nombre#1{#1}

% LaTeX compatibility macros are here:
% (just to test and print something readable)
% (giving a small LaTeX compatibility at the macro input level)
\begingroup
\catcode``=13
\gdef\@noligs{\let`=\@lquote}
\endgroup
\ifx\fontsze\undefined%
 \def\fontsze#1{#1}\fi% maybe \fontsze is not defined in plain
\ifECM% \ecfont loads EC fonts with appropriate names related to versions
  \ifx\ecfont\undefined\def\ecfont#1=#2#3#4\fontsze{\font#1=ec#4\fontsze}\fi%
\else%  \ecfonts loads the same as \font
  \ifx\ecfont\undefined\let\ecfont=\font\fi%
\fi
%\ecfont\normalsize=cmr\fontsze{10}% is defined in french
\ecfont\nbx=cmbx\fontsze{10} at 10truept%
\ecfont\Large=cmbx\fontsze{10} scaled \magstep1%
\ecfont\LARGE=cmbx\fontsze{10} scaled \magstep2%
\ecfont\huge=cmbx\fontsze{12} scaled \magstep2%
%\ecfont\small=cmr\fontsze{9} % is defined in french
\ecfont\sf=cmss\fontsze{10}%
% \sc is only a dummy def for \rm in french
\def\sc{\ecfont\FscF=cmcsc\fontsze{10}\FscF}\def\em{\it}
\def\textbf#1{{\bf #1}}\def\texttt#1{{\tt #1}}\def\textsf#1{{\sf #1}}
\def\textit#1{{\it #1}}\def\emph#1{{\em #1}}
\def\textsl#1{{\sl #1}}
\def\textrm#1{{\rm #1}}
\def\@lquote{{\kern\z@}`}
\let\mbox\hbox
\def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\def\@pen{\penalty\@M}
\def\linebreak{}%
\def\part{\vfill\eject\ \vfill\let\fonte\huge\@line}
\def\chapter{\vfill\eject\ \vfill\let\fonte\LARGE\@line}
\def\section{\let\fonte\Large\@line}
\def\subsection{\let\fonte\nbx\@line}
\def\subsubsection{\let\fonte\nbx\@line}
\def\bibliography{\let\fonte\Large\@line\uppercase{\bibname}}
\def\@line{\begingroup\@ifNextNB[{\@@lineM}{\@@lineN}%]
          }
\def\@@lineN{\@ifNextNB*{\@@lineQ}{\@@lineP}}
\def\@@lineQ*{\@@lineP}
\long\def\@@lineP#1{\par\vskip3\baselineskip
     \line{{\fonte #1}\hfill}\@pen\par\vskip2\baselineskip\endgroup}
\long\def\@@lineM[#1]#2{\@@lineN{#2}}
\def\@xobeysp{\leavevmode\penalty10000\ }
{\catcode`\ =\active\gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}}
\def\verb{\begingroup \catcode``=13 \@noligs
\tt \global\let\do\@makeother \dospecials \@verb}
\def\@sverb#1{\def\@tempa ##1#1{\leavevmode\null##1\endgroup}\@tempa}
\def\@verb{\@vobeyspaces \frenchspacing \@sverb}
\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12 |gdef|@xverbatim#1\end{verbatim}[#1|end[verbatim]]
|gdef|@sxverbatim#1\end{verbatim*}[#1|end[verbatim*]]
|endgroup
\def\@gobble#1{}
\def\@verbatim{\vskip\parskip
\obeylines \tt \catcode``=13 \@noligs \let\do\@makeother \dospecials}
\def\verbatim{\@verbatim \frenchspacing\@vobeyspaces \@xverbatim}
\let\endverbatim=\relax
\def\title#1{\ \vfill\bgroup\hbadness=10000
             \def\\{\hfill\break\vskip1\baselineskip\hfill}
             \hfill{\huge #1}\egroup}
\def\\{\vskip1\baselineskip}
\def\newline{\hfil\break}
\long\def\author#1{\title{#1\\}}
\let\footORI\footnote\def\footnote#1{\footORI*{#1}}
\def\footnotemark{}%$^*$}
\def\footnotetext#1{\footnote{#1}}
\def\thanks#1{\gdef\thethanks{#1}}
\def\LaTeXe{\LaTeX2e}
\def\maketitle{\vfill\footORI{*}{\thethanks}\cleardoublepage}
\def\hspace#1#2{\hskip#2}
\def\onecolumn{}\def\twocolumn{}
\def\NOP{\line{%
       \it \% il existe ici au moins une fonction non suport\'ee en plain
      \TeX{}\hfill}\line{ \hfill}}
\def\tableofcontents{\chapter*\relax\relax\NOP}
\def\glossary#1{\relax}\def\index#1{\relax}
\def\printglossary[#1]{\relax\NOP}
\def\abstract{\medskip{\bf \centerline{\abstractname}}\medskip}
\def\begin#1{\@ifundefined{#1}{\def\@tempa{\message{Environment #1
  undefined}}}{\def\@tempa{\def\@currenvir{#1}%
  \csname #1\endcsname}}\bgroup\@tempa}
\let\enddocument\end
\def\verse{\par\medskip}% ??
\def\endverse{\par}
\def\minipage[t]#1{\par\bgroup\hsize=#1}
\def\endminipage{\egroup\par}
\def\tabbing{\par\medskip\NOP\begingroup\def\>{\space}%
             \def\={\space}\def\kill{\par}\def\\{\par}%
             \def\a`##1{\`##1}\@Skill}
\def\@Skill#1\kill{}
\def\endtabbing{\endgroup}
\def\quotation{\par\bgroup% en fait un \narrower%
               \rightskip=\parindent%
               \advance\textwidth by -\rightskip%
               \hsize=\textwidth%
               \hfill\hbox to \hsize\bgroup\vbox\bgroup}
\def\endquotation{\egroup\egroup\egroup}%
\def\end#1{\csname end#1\endcsname\egroup}%
%%% mon \center ne marche pas !
\def\center{\par\noindent\hbox to \hsize\bgroup\hfill\vbox\bgroup}
\def\endcenter{\egroup\hfill\egroup\par}
\let\frenchmathcomma\relax% introduced with french V5.00
\let\regularmathcomma\relax%

\ifx\mbentoure\relax\endinput\else\let\mbentoure=\relax\fi
\newdimen\entourehor \entourehor=6pt
\newdimen\entourever \entourever=6pt
\newdimen\entouregra \entouregra=.4pt
\newdimen\lgcadre
\lgcadre=\hsize
\newdimen\lgtexte
\newdimen\lgtete
\newbox\entbox
\long\def\entoure#1{\vbox{\hrule height\entouregra%
                          \hbox{\vrule width\entouregra%
                                \kern\entourehor%
                                 \vbox{\kern\entourever%
                                       \hbox{#1}\kern\entourever}%
                                 \kern\entourehor\vrule width\entouregra}%
                           \hrule height\entouregra}}%
\def\entoureformule#1{\entoure{\vbox{\hbox{$\displaystyle #1$}}}}%
\long\def\C@dre#1\par{\par\tolerance=2000\pretolerance=2000\vbadness=10000%
\lgtexte=\lgcadre \advance\lgtexte by -2\entourehor%
\advance\lgtexte by -2\entouregra%
\setbox\entbox=\vbox{\hsize\lgtexte #1\par}%
   \hbox to\lgcadre{\vrule width\entouregra%
     \kern\entourehor\vbox{\kern\entourever%
         \hbox{\vbox{\box\entbox}}\kern\entourever}%
     \kern\entourehor\vrule width\entouregra}%
}%
\long\def\debcad#1\par{\lgtete=\lgcadre\advance\lgtete by 4\entouregra%
   \vskip\entourever\hrule height\entouregra width\lgtete%
\ifx#1\fincad\hrule height\entouregra width\lgtete%
\vskip\entourever\let\next=\relax%
\else \C@dre #1\par\let\next=\suitecad%
\fi\next}%
\long\def\suitecad#1\par{\vskip-1pt%
\ifx#1\fincad\hrule height\entouregra width\lgtete%
\vskip\entourever\let\next=\relax%
\else \C@dre #1\par\let\next=\suitecad%
\fi\next}%
%\def\fboxsep#1{}\def\fboxrule#1{}%
\long\def\fbox#1{\hbox{\raise-0.5\baselineskip%
                       \hbox\bgroup\entoure{#1}\egroup}}%
\long\def\parbox#1#2{\bgroup\def\\{\newline}%
         \hbox{\vbox{\hsize=#1\noindent#2}}\egroup}
%\def\hspace*#1{\hbox{}\hskip#1}%
\def\newpage{}\def\cleardoublepage{\vfill\eject}
\let\thepage\folio%
\def\ldots{\ldotp\ldotp\ldotp}
\def\renewcommand#1#2{\relax}%{\expandafter\long\def\csname#1\endcsname{#2}}
\def\setcounter#1#2{\relax}
\def\addtocounter#1#2{\relax}
\def\thispagestyle#1{\relax}
\def\enlargethispage#1{}%
\def\label#1{\relax}
\def\ref#1{ ?? }\def\pageref{ ?? }
\def\hline{\break\noindent\hbox to\hsize{\hrulefill}\vskip0.5\baselineskip}
\def\marginpar#1{\relax}
\def\etiq{\figurename\space??\space:\space}
\def\caption{\@dblarg\@caption}
\long\def\@caption[#1]#2{\penalty10000\par\line{{\let\\=\relax%
                                           \hfill\etiq #2\hfill}}%
                    \par\penalty10000}%
\catcode`&=\active
\def\table{\@table}
\def\@table[#1]{\catcode`&=\active\vskip2\baselineskip%
                \def\etiq{\tablename\space??\space:\space}}
\expandafter\let\csname table*\endcsname\table
\def&{\hfill}
\def\endtable{\catcode`&=4\vskip2\baselineskip}
\expandafter\let\csname endtable*\endcsname\endtable
\long\def\tabular#1{\vbox\bgroup\def\\{\hfill\par\vskip0.25\baselineskip}
                    \catcode`&=\active\vskip2\baselineskip}
\def\endtabular{\catcode`&=4\egroup\vskip2\baselineskip}
\catcode`&=4
\def\figure[#1]{\vskip2\baselineskip%
                \def\etiq{\figurename\space??\space:\space}}
\def\endfigure{\vskip2\baselineskip}
\let\itemORI\item
\newdimen\itemindent\itemindent=2em
\def\labelitemi{$\bullet$}
\def\item{\hfill\break\hbox to 1\parindent{}%
          \hbox to1\itemindent{\hfill\labelitemi\space}}
\def\itembib{\hfill\break\hbox to 1\parindent{}%
          \hbox to1\itemindent{\hfill[??]\space}}
\def\bibitem{\@ifNextNB[{\@bibcro}{\@bibsimp}}
\def\@bibsimp#1{\itembib}
\def\@bibcro[#1]#2{\itembib}
\def\itemize{\advance\itemindent by 1em\vskip1\baselineskip}
\def\enditemize{\advance\itemindent by -1em\vskip1\baselineskip}
\def\listoffigures{\section{\listfigurename}\NOP}
\def\listoftables{\section{\listtablename}\NOP}
\def\cite{\@ifNextNB[{\@cite@}{\@cite}%]emacs
         }
\def\@cite@[#1]#2{[??,#1]}
\def\@cite#1{[??]}
\def\nocite#1{}
\def\bibliographystyle#1{\relax}
\def\thebibliography#1{\section{\bibname}\NOP}
\def\endthebibliography{\relax}
\def\flushleft{\bgroup\raggedright}
\def\endflushleft{\egroup}
\def\sloppypar{\par\sloppy}
\def\endsloppypar{\par}
\def\eqnarray#1#2\end#3{\iffalse{#2}\fi\egroup}% noop for Plain
\def\array#1#2\end#3{\@array{#2}}
\def\@array#1{\iffalse{\let\\=\cr\matrix{#1}}\fi\egroup}% noop for Plain
\let\guillemetsinarrays\relax% french.tst V4,04
\let\noguillemetsinarrays\relax% french.tst V4,04
\def\NOF#1{\line{\it \% le listing de #1 %
           est volontairement omis ici.\hfill}%
            \line{ \hfill}\egroup\catcode`\_=8}

\catcode`@=12
\hsize 15cm \vsize 24cm

\let\iflatex=\iffalse
%\let\Mylisting\NOF (retire du fait que ``_'' peut exister dans les noms de
% fichiers). 
\catcode`\_=13\let_=\_\catcode`\_=8
\def\Mylisting{\catcode`\_=13\bgroup\NOF}
\hfuzz=1pt

{\catcode`\<=\active\catcode`\>=\active%
% Je veux :
%\global\def<{\left\langle}\global\def>{\right\rangle}
% Et pour ne pas pouvoir avoir l'effet que localement,
% je fais :
\gdef<{\myinf}\gdef>{\mysup}
}
%\frhyphex% loading of exceptions is not possible with plain TeX
%         % because there is no \begin{document}
\input frplain.sty

%%%% premier passage en francais %%%%
\let\ORIfrench\french\let\ORIenglish\english
\global\let\stdiORI\originalinput%
\def\onecolumn{% On demarre au premier \onecolumn
               \long\gdef\english##1\french{\ORIfrench}}
\def\originalinput#1{\ORIenglish\input #1\ORIfrench}

\frenchtest
\clearpage

%%%% deuxieme passage en anglais %%%%
\def\onecolumn{\gdef\onecolumn{\endinput}}% Reset \onecolumn
\global\let\originalinput\stdiORI% reset appropriate def
\gdef\english{\ORIenglish}
\long\gdef\french#1\english{\ORIfrench\iffalse#1\fi\ORIenglish}
\frenchtest

\\ \ \\
\centerline{\it $\ldots$ as you can see plain \TeX{} isn't \LaTeX{}$\ldots$}
\\ \ \\
\centerline{\huge The End}
\end{document}
