Retour

Source de newplain.tex

Fichier TeX
%% fichier 'newplain.tex'
% redef de certaines macros du format plain.tex

\catcode`\@=11

\def\footnote#1{\let\@sf\empty % parameter #2 (the text) is read later
  \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
  #1\@sf\vfootnote{#1}}
\def\vfootnote#1{\insert\footins\bgroup
  \interlinepenalty\interfootnotelinepenalty
  \splittopskip\ht\strutbox % top baseline for broken footnotes
  \splitmaxdepth\dp\strutbox \floatingpenalty\@MM
  \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip
  \textindent{#1}\footstrut\futurelet\next\fo@t}
\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
  \else\let\next\f@t\fi \next}
\def\f@@t{\bgroup\aftergroup\@foot\let\next}
\def\f@t#1{#1\@foot}
\def\@foot{\strut\egroup}
\def\footstrut{\vbox to\splittopskip{}}
\skip\footins=\bigskipamount % space added when footnote is present
\count\footins=1000 % footnote magnification factor (1 to 1)
\dimen\footins=8in % maximum footnotes per page



% redefinition de la macro \footnote (TeXbook p 416)
\def \footnote#1{%
   \edef \@sf{%
      \spacefactor \the \spacefactor}%
   #1\@sf
   \insert \footins \bgroup
      \eightpoint \rm
      \interlinepenalty = 100 
      \let \par = \endgraf
      \leftskip = 0pt
      \rightskip = 0pt
      \splittopskip = 10pt plus 1pt minus 1pt
      \floatingpenalty = 20000
%      \smallskip
      \item{#1}
      \bgroup
         \strut
         \aftergroup \@foot
         \let \next} % elimine l'accolade ouvrante qui suit
\skip \footins = 12pt plus 2pt minus 4pt % space addes when footnote exists
\dimen \footins = 30pc % maximum footnote per page

% =================== redef de \do ==================================

\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
  \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~\do\|}

% =================== redef de \item =================================

\newskip \itemindent \itemindent = \parindent

\parindent = 0pt

\def\hang{\hangindent\itemindent}
\def\textindent#1{\hskip\itemindent\llap{#1\enspace}\ignorespaces}
\def\item{\par\hang\textindent}
\def\itemitem{\par\hskip\itemindent \hangindent2\itemindent \textindent}
\def\narrower{\advance\leftskip\itemindent
  \advance\rightskip\itemindent}

\catcode`\@=12