From c4e458377ddcd72ee50f86efd022f8261069b018 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 24 Feb 2010 01:07:29 +0000 Subject: oubraces doc update, own package (23feb10) git-svn-id: svn://tug.org/texlive/trunk@17175 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/oubraces/oubraces.pdf | Bin 0 -> 52584 bytes Master/texmf-dist/doc/latex/oubraces/oubraces.tex | 67 ++++++++++++++++ Master/texmf-dist/tex/latex/ltxmisc/oubraces.sty | 92 ---------------------- Master/texmf-dist/tex/latex/oubraces/oubraces.sty | 92 ++++++++++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/oubraces.tlpsrc | 0 7 files changed, 161 insertions(+), 93 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/oubraces/oubraces.pdf create mode 100644 Master/texmf-dist/doc/latex/oubraces/oubraces.tex delete mode 100644 Master/texmf-dist/tex/latex/ltxmisc/oubraces.sty create mode 100644 Master/texmf-dist/tex/latex/oubraces/oubraces.sty create mode 100644 Master/tlpkg/tlpsrc/oubraces.tlpsrc diff --git a/Master/texmf-dist/doc/latex/oubraces/oubraces.pdf b/Master/texmf-dist/doc/latex/oubraces/oubraces.pdf new file mode 100644 index 00000000000..148d87eee64 Binary files /dev/null and b/Master/texmf-dist/doc/latex/oubraces/oubraces.pdf differ diff --git a/Master/texmf-dist/doc/latex/oubraces/oubraces.tex b/Master/texmf-dist/doc/latex/oubraces/oubraces.tex new file mode 100644 index 00000000000..3fe0fd0c6e3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oubraces/oubraces.tex @@ -0,0 +1,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} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/oubraces.sty b/Master/texmf-dist/tex/latex/ltxmisc/oubraces.sty deleted file mode 100644 index ebe2a410369..00000000000 --- a/Master/texmf-dist/tex/latex/ltxmisc/oubraces.sty +++ /dev/null @@ -1,92 +0,0 @@ -% oubraces.sty: Interleave \overbrace with \underbrace -% Donald Arseneau, 1993 -% -% \overunderbraces{upper_braces}{main_formula}{lower_braces} -% -% Instructions are given below, after \endinput. -% -% First, set catcode of @ in case it isn't a "letter" already -\expandafter\edef\csname REST@catcode\endcsname - {\catcode`\noexpand\@=\the\catcode`\@ - \let \csname SREST@catcode\endcsname \noexpand\UnDefinedButNoAt} -\catcode`\@=11 - -\def\overunderbraces #1#2#3{{% - \baselineskip\z@skip \lineskip4\p@ \lineskiplimit4\p@ - \displaystyle % deliberately generate error if not in math mode! -% first, do the top half of the alignment in a save-box ... - \setbox\z@\vbox{\ialign{&\hfil${}##{}$\hfil\cr - \global\let\br\br@label #1\cr % upper labels - \global\let\br\br@down #1\cr % upper braces - #2\cr % main line of the formula - }}% finished partial alignment and \vbox. - \dimen@-\ht\z@ % Measure height of partial alignment -- -% ... it is the height we want for the whole. -% Now do the whole alignment (notice the repetition from above) - \setbox\z@\vbox{\ialign{&\hfil${}##{}$\hfil\cr - \global\let\br\br@label #1\cr % upper labels - \global\let\br\br@down #1\cr % upper braces - #2\cr % main line of the formula - \global\let\br\br@up #3\cr % lower braces - \global\let\br\br@label #3\cr % lower labels - }}% finished whole alignment and \vbox. - \advance\dimen@\ht\z@ % calc. the necessary lowering - \lower\dimen@\hbox{\box\z@}% shift to get the desired height -}} - -% Three aliases for \br. -% #1=number of spanned columns, #2=label -\def\br@up#1#2{\multispan{#1}\upbracefill} -\def\br@down#1#2{\multispan{#1}\downbracefill} -\def\br@label#1#2{\multispan{#1}\hidewidth $#2$\hidewidth} - -\REST@catcode - -\endinput -% -%----------------------------------------------------------------- -% -% oubraces.sty: Interleave \overbrace with \underbrace -% Donald Arseneau, 1993 -% -% The syntax is: -% -% \overunderbraces{upper_braces}{main_formula}{lower_braces} -% -% Suppose we want the equation: -% x y -% ,-----^-----. ,-----^-----. -% a + b + c + d + e + f + g + h + i + j + k + l + m = \pi r^2 -% `-----v-----' -% z -% There are seven segments: -% x y -% ,-----^-----. ,-----^-----. -% a + b + c + d + e + f + g + h + i + j + k + l + m = \pi r^2 -% 11111111222222223333344455555666666667777777777... -% `-----v-----' -% z -% Insert & between each segment (where the tips of the braces point) -% to type the main_formula: -% x y -% ,-----^-----. ,-----^-----. -% a + b +&c + d +&e + f&+&g + h&+ i + j&+ k + l + m -% `-----v-----' -% z -% Each brace should be specified by typing -% -% \br{number_of_segments}{label}, -% -% separated by & to indicate which segment to start at; and -% where & & skips a segment that has no brace. For our -% example formula, the upper and lower brace specifiers are: -% -% top row: &\br{2}{x}& &\br{2}{y} -% bot row: & &\br{3}{z} -% -% Now put them all together: -% -% \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 diff --git a/Master/texmf-dist/tex/latex/oubraces/oubraces.sty b/Master/texmf-dist/tex/latex/oubraces/oubraces.sty new file mode 100644 index 00000000000..ebe2a410369 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oubraces/oubraces.sty @@ -0,0 +1,92 @@ +% oubraces.sty: Interleave \overbrace with \underbrace +% Donald Arseneau, 1993 +% +% \overunderbraces{upper_braces}{main_formula}{lower_braces} +% +% Instructions are given below, after \endinput. +% +% First, set catcode of @ in case it isn't a "letter" already +\expandafter\edef\csname REST@catcode\endcsname + {\catcode`\noexpand\@=\the\catcode`\@ + \let \csname SREST@catcode\endcsname \noexpand\UnDefinedButNoAt} +\catcode`\@=11 + +\def\overunderbraces #1#2#3{{% + \baselineskip\z@skip \lineskip4\p@ \lineskiplimit4\p@ + \displaystyle % deliberately generate error if not in math mode! +% first, do the top half of the alignment in a save-box ... + \setbox\z@\vbox{\ialign{&\hfil${}##{}$\hfil\cr + \global\let\br\br@label #1\cr % upper labels + \global\let\br\br@down #1\cr % upper braces + #2\cr % main line of the formula + }}% finished partial alignment and \vbox. + \dimen@-\ht\z@ % Measure height of partial alignment -- +% ... it is the height we want for the whole. +% Now do the whole alignment (notice the repetition from above) + \setbox\z@\vbox{\ialign{&\hfil${}##{}$\hfil\cr + \global\let\br\br@label #1\cr % upper labels + \global\let\br\br@down #1\cr % upper braces + #2\cr % main line of the formula + \global\let\br\br@up #3\cr % lower braces + \global\let\br\br@label #3\cr % lower labels + }}% finished whole alignment and \vbox. + \advance\dimen@\ht\z@ % calc. the necessary lowering + \lower\dimen@\hbox{\box\z@}% shift to get the desired height +}} + +% Three aliases for \br. +% #1=number of spanned columns, #2=label +\def\br@up#1#2{\multispan{#1}\upbracefill} +\def\br@down#1#2{\multispan{#1}\downbracefill} +\def\br@label#1#2{\multispan{#1}\hidewidth $#2$\hidewidth} + +\REST@catcode + +\endinput +% +%----------------------------------------------------------------- +% +% oubraces.sty: Interleave \overbrace with \underbrace +% Donald Arseneau, 1993 +% +% The syntax is: +% +% \overunderbraces{upper_braces}{main_formula}{lower_braces} +% +% Suppose we want the equation: +% x y +% ,-----^-----. ,-----^-----. +% a + b + c + d + e + f + g + h + i + j + k + l + m = \pi r^2 +% `-----v-----' +% z +% There are seven segments: +% x y +% ,-----^-----. ,-----^-----. +% a + b + c + d + e + f + g + h + i + j + k + l + m = \pi r^2 +% 11111111222222223333344455555666666667777777777... +% `-----v-----' +% z +% Insert & between each segment (where the tips of the braces point) +% to type the main_formula: +% x y +% ,-----^-----. ,-----^-----. +% a + b +&c + d +&e + f&+&g + h&+ i + j&+ k + l + m +% `-----v-----' +% z +% Each brace should be specified by typing +% +% \br{number_of_segments}{label}, +% +% separated by & to indicate which segment to start at; and +% where & & skips a segment that has no brace. For our +% example formula, the upper and lower brace specifiers are: +% +% top row: &\br{2}{x}& &\br{2}{y} +% bot row: & &\br{3}{z} +% +% Now put them all together: +% +% \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 diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 1fde7e5f25d..f8db344845c 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -204,7 +204,7 @@ my @TLP_working = qw( ntgclass ntheorem-vn numname numprint oberdiek ocr-latex octavo ofs ogham oldstyle onlyamsmath onrannual opcit - ordinalpt orkhun othello outline + ordinalpt orkhun othello oubraces outline pagecont pagenote pagerange paper papercdcase papertex parallel paresse parrun passivetex patch patchcmd patgen2-tutorial pauldoc pax pbox pb-diagram diff --git a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc index 0bc83e0c455..5035fd8bd5e 100644 --- a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc @@ -21,6 +21,7 @@ depend mattens depend mhequ depend multiobjective depend nath +depend oubraces depend proba depend shuffle depend statex2 diff --git a/Master/tlpkg/tlpsrc/oubraces.tlpsrc b/Master/tlpkg/tlpsrc/oubraces.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3