summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/oubraces/oubraces.tex
blob: 3fe0fd0c6e3578d055c5d9570562f152e0f58f92 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
\documentclass[a4paper]{article}
\usepackage{oubraces}
\begin{document}
\title{Braces over and under equations}
\author{Donald Arseneau}
\vspace{-\fill}
\maketitle
\thispagestyle{empty}

The syntax is:
\begin{verbatim}
  \overunderbraces{upper_braces}{main_formula}{lower_braces}
\end{verbatim}
Suppose we want the equation:
\[
  \overunderbraces{&\br{2}{x}& &\br{2}{y}}%
   {a + b +&c + d +&e + f&+&g + h&+ i + j&+ k + l + m}%
   {& &\br{3}{z}}
 = \pi r^2
\]
There are seven segments:
\begin{verbatim}
               x               y
         ,-----^-----.   ,-----^-----.
 a + b + c + d + e + f + g + h + i + j + k + l + m = \pi r^2
 11111111222222223333344455555666666667777777777...
                 `-----v-----'
                       z
\end{verbatim}
Insert \texttt{\&} between each segment (where the tips of the braces point)
to type the main\_formula:
\begin{verbatim}
               x               y
         ,-----^-----.   ,-----^-----.
 a + b +&c + d +&e + f&+&g + h&+ i + j&+ k + l + m
                 `-----v-----'
                       z
\end{verbatim}
Each brace should be specified by typing
\begin{verbatim}
\br{number_of_segments}{label},
\end{verbatim}
separated by \texttt{\&} to indicate which segment to start at; use
\texttt{\& \&} to skip a segment that has no brace.  For our example
formula, the upper and lower brace specifiers are:
\begin{center}
  \begin{tabular}{ll}
  top row:  \verb|&\br{2}{x}& &\br{2}{y}|
  bottom row:  \verb|& &\br{3}{z}|
\end{tabular}
\end{center}
Now put them all together:
\begin{verbatim}
\overunderbraces{&\br{2}{x}& &\br{2}{y}}%
   {a + b +&c + d +&e + f&+&g + h&+ i + j&+ k + l + m}%
   {& &\br{3}{z}}
 = \pi r^2
\end{verbatim}
\dots{} and we're done (that code was used to typeset the display at
the start of this document).

\enlargethispage{2\baselineskip}
\vspace*{0.5\baselineskip}
\small
\noindent This documentation derived from the comments the original
package, by Robin Fairbairns (2010-02-22)
\end{document}