summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/math-e/04-11-4.ltx
blob: 7b2c4e7718e0f60a3ec4f5a734a7411fac8fc5f6 (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
%% 
%%  An UIT Edition example
%% 
%%  Example 04-11-4 on page 61.
%% 
%%  Copyright (C) 2010 Herbert Voss
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 
%% 
%% ==== 
% Show page(s) 1
%% 
\documentclass[]{exaarticle}
\pagestyle{empty}
\setlength\textwidth{129.70511pt}
\makeatletter
\def\@bracketheight{2pt}
\def\underbracket{%
  \@ifnextchar[{\@underbracket}{\@underbracket[\@bracketheight]}}
\def\@underbracket[#1]{%
  \@ifnextchar[{\@under@bracket[#1]}{\@under@bracket[#1][0.4em]}}
\def\@under@bracket[#1][#2]#3{%\message {Underbracket: #1,#2,#3}
  \mathop{\vtop{\m@th\ialign{##\crcr $\hfil \displaystyle {#3}\hfil $%
  \crcr\noalign{\kern 3\p@ \nointerlineskip }\upbracketfill {#1}{#2}
  \crcr\noalign{\kern 3\p@ }}}}\limits}
\def\upbracketfill#1#2{$\m@th \setbox \z@ \hbox {$\braceld$}
  \edef\@bracketheight{\the\ht\z@}\bracketend{#1}{#2}
  \leaders \vrule \@height #1 \@depth \z@ \hfill
  \leaders \vrule \@height #1 \@depth \z@ \hfill \bracketend{#1}{#2}$}
\def\bracketend#1#2{\vrule height #2 width #1\relax} %$
\makeatother
\AtBeginDocument{\setlength\parindent{0pt}}
\StartShownPreambleCommands

\StopShownPreambleCommands
\begin{document}
$\underbracket{foo~bar}$ $\underbracket[.1pt]{foo~bar}$
$\underbracket[2pt][1em] {foo~bar}$
\end{document}