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