"Fossies" - the Fresh Open Source Software Archive

Member "hevea-2.35/examples/amstex.tex" (16 Jan 2021, 4592 Bytes) of package /linux/www/hevea-2.35.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TeX and LaTeX source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 \documentclass{article}
    2 \usepackage{a4wide}
    3 \usepackage{amsmath}
    4 \usepackage{ifthen}
    5 \usepackage{calc}
    6 
    7 \title{Test de primitives amstex}
    8 \date{}
    9 \numberwithin{equation}{section}
   10 \renewcommand{\theequation}{\thesection.\alph{equation}}
   11 
   12 \begin{document}
   13 \maketitle
   14 
   15 \part{Some tests}
   16 \section{Matrices}
   17 \section*{Toutes les r\'ef\'erences}
   18 Les num\'eros sont~:
   19 
   20 \begin{tabular}{*{5}{|c}|}\hline
   21 \ref{bigmat} & \ref{dessus} & \ref{dessous} & \ref{t_2_formula}\\ \hline
   22 \end{tabular}
   23 
   24 \subsection{Simple}
   25 \begin{gather}
   26 \begin{matrix} 1 & 0\\ 0 & 1\end{matrix}
   27 \quad
   28 \begin{pmatrix} 1 & 0\\ 0 & 1\end{pmatrix}
   29 \quad
   30 \begin{Vmatrix} 1 & 0\\ 0 & 1\\ 1 & 2\end{Vmatrix}
   31 \end{gather}
   32 
   33 \subsection{Compliqu\'e}
   34 \setcounter{MaxMatrixCols}{20}
   35 \newcounter{x}
   36 \newcommand{\row}[1]{%
   37 \hdotsfor{#1} &
   38 \setcounter{x}{#1}\addtocounter{x}{1}\thex
   39 \setcounter{x}{-\value{x}}\addtocounter{x}{20} &
   40 \hdotsfor{\value{x}}}
   41 \begin{equation}
   42 \begin{pmatrix}
   43 1 & \hdotsfor{19}\\
   44 \row{1}\\
   45 \row{2}\\
   46 \row{3}\\
   47 \row{4}\\
   48 \row{5}\\
   49 \row{6}\\
   50 \row{7}\\
   51 \row{8}\\
   52 \row{9}\\
   53 \row{10}\\
   54 \row{11}\\
   55 \row{12}\\
   56 \row{13}\\
   57 \row{14}\\
   58 \row{15}\\
   59 \row{16}\\
   60 \row{17}\\
   61 \row{18}\\
   62 \hdotsfor{19} & 20
   63 \end{pmatrix}\label{bigmat}
   64 \end{equation}
   65 
   66 \section{Environement \texttt{cases}}
   67 To summarize, we obtain the following exact representation for the
   68 inverse of~$x^2e^x+1$:
   69 \[\begin{cases}
   70 Y(x) = y(\log x),\quad&\text{$y_{\phantom{0}}$ inverse of~$2\log
   71 x+x+\log(1+e^{-x}/x^2)$},\\
   72 y[x+\log(1+y_0^{-2}(x)e^{-y_0(x)})] = y_0(x),\quad&\text{$y_0$
   73 inverse of~$x+2\log x$,}\\
   74 y_0(x) = y_1(\log x),\quad&\text{$y_1$ inverse of~$\log x+\log(1+2\log x/x)$},\\
   75 y_1(x) = \exp(y_2(x)),\quad&\text{$y_2$ inverse of~$x+\log(1+2xe^{-x})$},\\
   76 y_2[x+\log(1+2y_3(x)e^{-y_3(x)})] = y_3(x),&\text{$y_3$ inverse
   77 of~$x$.}
   78   \end{cases}
   79 \]
   80 
   81 \section{Test d'alignement}
   82 Now the $\phi_i$s are very easy to compute:
   83 \begin{align*}
   84 \phi_1&  =  y_0 = 1/t_2,\\
   85 \phi_2&  = \phi_1(y_0(x+g))-\phi_1 = {t_3t_2^2\over(1+2t_2)}
   86 -{1+4t_2+2t_2^2\over2(1+2t_2)^3}t_2^4t_3^2+O(t_3^3),\\
   87 \phi_3&  = \phi_2(y_0(x+g))-\phi_2 = -{1+4t_2+2t_2^2\over(1+2t_2)^3}t_2^4t_3^2+O(t_3^3),
   88 \end{align*}
   89 
   90 A similar treatment applies to~(\ref{bigmat}), and leads to
   91 \begin{alignat*}{5}
   92 x+\log(1+2xe^{-x})&  =  1/t_1(y_3(x+g))&&  =  x+2xe^{-x}-2x^2e^{-2x}+O(x^3e^{-3x}),\\
   93 \exp[-x+\log(1+2xe^{-x})]&  =  t_2(y_3(x+g))&&  =  e^{-x}-2xe^{-2x}+4x^2e^{-3x}+O(x^3e^{-4x}).
   94 \end{alignat*}
   95 
   96 \subsection{\texttt{gather}, \texttt{multline}}
   97 or one of the following (successive) refinements:
   98 \begin{gather}\label{dessus}
   99 \exp(e^U)\left[1-\frac{2e^{-U^{1/2}}}{U^{1/2}+4}
  100 +\frac{2e^{-2U^{1/2}}}{(U^{1/2}+4)^2}
  101 -\frac{4}{3}\frac{e^{-3U^{1/2}}}{(U^{1/2}+4)^3}+O(e^{-4U^{1/2}})\right],\\
  102 \exp(e^U)\exp\left[-\frac{2e^{-U^{1/2}}}{U^{1/2}+4}\right]\left[1+
  103 \frac{8-2U^{-1/2}-U^{-1}+U^{-3/2}}{(4+U^{-1/2})^3}
  104 e^{-U-2U^{1/2}}+O(e^{-2U})\right],\label{dessous}
  105 \end{gather}
  106 
  107 Cette \'equation a le num\'ero~\ref{t_2_formula}, celles d'au dessus les
  108 num\'ero~\ref{dessus} et~\ref{dessous}.
  109 \begin{multline}    \label{t_2_formula}
  110 1/t_2(y_0(x+g)) = y_0(x+\log(1+y_0^{-2}e^{-y_0}))\\
  111  = y_0+{e^{-y_0}\over y_0^2(1+2/y_0)}
  112 -{1+4/y_0+2/y_0^2\over 2y_0^4(1+2/y_0)^3}e^{-2y_0}+O(e^{-3y_0}).
  113 \end{multline}
  114 
  115 \part{Other tests}
  116 
  117 \section{Z\'ero}
  118 
  119 \begin{equation}
  120 x^2+y^2 = z^2\label{un:un}
  121 \end{equation}
  122 \begin{equation*}
  123 x^2+y^2 = z^2
  124 \end{equation*}
  125 \begin{equation}
  126 x^2+y^2 = z^2\label{un:deux}
  127 \end{equation}
  128 \begin{equation}
  129 x^2+y^2 = z^2\notag
  130 \end{equation}
  131 \begin{equation*}
  132 \tag{oups}x^2+y^2 = z^2\label{oups}
  133 \end{equation*}
  134 Au desus \ref{un:un}, \ref{un:deux} et \ref{oups}.
  135 Apr\`es
  136 \theequation
  137 
  138 \section{Deux}
  139 \begin{gather}
  140 x^2+y^2 = z^2\\
  141 x^3+y^3 = z^3\\
  142 x^4+y^4 = z^4\\
  143 x^5+y^5 = z^5\\
  144 x^6+y^6 = z^6\\
  145 x^7+y^7 = z^7
  146 \end{gather}
  147 
  148 \section{Un}
  149 \begin{gather}
  150 x^2+y^2 = z^2 \label{eq:r2}\\
  151 x^3+y^3 = z^3 \notag\\
  152 x^4+y^4 = z^4 \tag{$*$}\label{foo}\\
  153 x^5+y^5 = z^5 \tag*{$*$}\\
  154 x^6+y^6 = z^6 \tag*{\ref{eq:r2}$'$}\\
  155 x^7+y^7 = z^7
  156 \end{gather}
  157 Ben mon vieux pour avoir l'\'equation~\ref{foo}.
  158 
  159 \section{Trois}
  160 \begin{gather*}
  161 x^2+y^2 = z^2\tag{$+$}\\
  162 x^3+y^3 = z^3\\
  163 x^4+y^4 = z^4\\
  164 x^5+y^5 = z^5\\
  165 x^6+y^6 = z^6\\
  166 x^7+y^7 = z^7
  167 \end{gather*}
  168 
  169 \section{Quatre}
  170 \begin{gather}
  171 x^2+y^2 = z^2\\
  172 x^3+y^3 = z^3\\
  173 x^4+y^4 = z^4\\
  174 x^5+y^5 = z^5\\
  175 x^6+y^6 = z^6\\
  176 x^7+y^7 = z^7
  177 \end{gather}
  178 Maintenant~: \theequation.
  179 
  180 \section{Cinq}
  181 \begin{align}
  182 \tag{a} x^2+y^2 &= z^2 & x^3+y^3 &= z^3\label{a}\\
  183 \notag x^4+y^4 &= z^4 & x^5+y^5 &= z^5\label{b}\\
  184 x^6+y^6 &= z^6 & x^7+y^7 &= z^7
  185 \end{align}
  186 Au dessus ya l'\'equation~\eqref{a}.
  187 
  188 \section{Multline}
  189 \begin{multline}
  190 x+1 =\\
  191 y+2
  192 \end{multline}
  193 
  194 \end{document}