[texhax] parenthesis problem in LaTeX
Reinhard Kotucha
reinhard.kotucha at web.de
Sat Jan 17 00:56:55 CET 2009
Tom Schneider writes:
> Reinhard:
>
> > Tom Schneider writes:
> > > Here's a puzzle for the sharp folks on this list!
> >
> > Hi Tom,
> > the problem is obviously that unlike "silent", the word "ring"
> > contains the letter "g" which has a descender, as Steve explained
> > already.
> >
> > How can you achieve that all braces have the same size? There are
> > many possible solutions. You could use struts or phantoms.
> >
> > However, there is a very elegant solution. All *tex programs except
> > Knuth's tex itself are using the eTeX extensions for a couple of years
> > now.
> >
> > $ pdftex \\relax\\bye
> > This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
> > %&-line parsing enabled.
> > entering extended mode <===========
> > No pages of output.
> > Transcript written on texput.log.
> >
> > You are using \left and \right already, but eTeX provides a new
> > primitive called \middle. See:
> >
> > http://tug.ctan.org/tex-archive/systems/e-tex/v2/doc/etex_man.pdf
> >
> > section 3.9 on page 12.
>
> Ok, thanks. I'm unsure how it would be used in this case.
Hi Tom,
a simple example:
\begin{equation}
\left( a+b \middle) \times \middle( \frac{a}{b} \right)
\end{equation}
As always: Whenever you've found out how things work, then you also
understand the manual. :)
But there is a hint in the manual though it can easily be overlooked:
\middle<delimiter>. This explains the error message you got
(! Missing delimiter).
BTW, here is a single-line example file for plain TeX:
$$ \left( a+b \middle) \times \middle( a \over b \right) $$ \bye
Please note that it doesn't work with tex. You have to use etex,
pdftex, pdfetex, ... instead. I didn't try, but I'm very sure that
you can use \middle in Context, eplain, texinfo,... too. In short: It
works on any machine which prints "entering extended mode" to screen.
Regards,
Reinhard
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------
More information about the texhax
mailing list