"Fossies" - the Fresh Open Source Software Archive

Member "hevea-2.35/examples/mp.tex" (16 Jan 2021, 855 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{mathpartir}
    3 \usepackage[dvips]{color}
    4 \begin{document}
    5 \section*{Infererence rule}
    6 Check vertical alignment.
    7 $$
    8 \infer*
    9 {\infer*{}{A}\and\infer*{\infer*{B'\and{}B''}{B}\and{}X}{C}}
   10 {C \and D}
   11 $$
   12 \section*{Mathpar}
   13 \subsection*{Command}
   14 Command defined inside \texttt{mathpar} environment.
   15 \begin{mathpar}
   16 \newcommand{\for}[2]{\left#1\begin{array}{cc}1&2\\3&4\end{array}\right#2}%
   17 \for\{\} \and \for() \and \for\vert.\\
   18 \for\vert\vert \and \for\lfloor\rfloor
   19 \end{mathpar}
   20 
   21 \subsection*{Font change (orange color)}
   22 First cell in black.
   23 Three last cells in {\textcolor[named]{Orange}{orange}}.
   24 No cell in bold font.
   25 {\bfseries This is bold. \begin{mathpar}
   26 F(0) = 1 \and \color[named]{Orange}F(1) = 1 \and F(2) = 2
   27 \\ F(n+2) = F(n+1) + F(n)
   28 \end{mathpar}
   29 This is bold also.}
   30 This is normal font in black.
   31 
   32 \end{document}