home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / tex / inputs.sit / TeX-inputs / fleqn.doc < prev    next >
Encoding:
Text File  |  1989-09-18  |  2.1 KB  |  56 lines  |  [TEXT/????]

  1. % FLEQN DOCUMENT-STYLE OPTION - released 24 May 1989
  2. %    for LaTeX version 2.09
  3. % Copyright (C) 1989 by Leslie Lamport
  4.  
  5. % The following commands make the displayed math environments flush left,
  6. % with an indentation of \mathindent from the prevailing left margin.
  7.  
  8. % Definitions of \[ and \] changed 9 Mar 87 to use \begin{trivlist} ...
  9. % \end{trivlist} instead of simulating it; corrects bug that caused
  10. % following text always to start new paragraph.
  11. %
  12. % \[ and \equation changed to set \@beginparpenalty and \@endparpenalty
  13. % to \predisplaypenalty and \postdisplaypenalty.  Change made
  14. % 24 May 89, suggested by Rainer Sch\"opf and Frank Mittelbach.
  15.  
  16. \def\[{\relax\ifmmode\@badmath\else\bgroup\@beginparpenalty\predisplaypenalty
  17.   \@endparpenalty\postdisplaypenalty
  18.   \begin{trivlist}\item[]\leavevmode
  19.   \hbox to\linewidth\bgroup$ % $ TO MAKE 'DOLLAR' NESTING OK
  20.   \displaystyle
  21.   \hskip\mathindent\bgroup\fi}
  22.  
  23. \def\]{\relax\ifmmode \egroup $\hfil % $ TO MAKE DOLLAR NESTING IN THIS FILE OK
  24.        \egroup \end{trivlist}\egroup\else \@badmath \fi}
  25.  
  26. \def\equation{\@beginparpenalty\predisplaypenalty
  27.   \@endparpenalty\postdisplaypenalty
  28. \refstepcounter{equation}\trivlist \item[]\leavevmode
  29.   \hbox to\linewidth\bgroup $ % $ TO MAKE DOLLAR NESTING OK
  30.   \displaystyle
  31. \hskip\mathindent}
  32.  
  33. \def\endequation{$\hfil % $ TO MAKE DOLLAR NESTING IN THIS FILE OK
  34.            \displaywidth\linewidth\@eqnnum\egroup \endtrivlist}
  35.  
  36. \def\eqnarray{\stepcounter{equation}\let\@currentlabel=\theequation
  37. \global\@eqnswtrue
  38. \global\@eqcnt\z@\tabskip\mathindent\let\\=\@eqncr
  39. \abovedisplayskip\topsep\ifvmode\advance\abovedisplayskip\partopsep\fi
  40. \belowdisplayskip\abovedisplayskip
  41. \belowdisplayshortskip\abovedisplayskip
  42. \abovedisplayshortskip\abovedisplayskip
  43. $$\halign % $$ DOLLAR MATCHING
  44. to \linewidth\bgroup\@eqnsel\hskip\@centering$\displaystyle\tabskip\z@
  45.   {##}$&\global\@eqcnt\@ne \hskip 2\arraycolsep \hfil${##}$\hfil
  46.   &\global\@eqcnt\tw@ \hskip 2\arraycolsep $\displaystyle{##}$\hfil 
  47.    \tabskip\@centering&\llap{##}\tabskip\z@\cr}
  48.  
  49. \def\endeqnarray{\@@eqncr\egroup
  50.       \global\advance\c@equation\m@ne$$\global\@ignoretrue % $$ MATCHING
  51.       }
  52.  
  53. \newdimen\mathindent 
  54. \mathindent = \leftmargini
  55.   
  56.