[texhax] parenthesis problem in LaTeX
Tom Schneider
toms at ncifcrf.gov
Fri Jan 16 23:23:58 CET 2009
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.
\left( ..part A ring .. \right)
\middle??
\left( ..part B silent .. \right)
fails with '! Missing delimiter (. inserted).
<to be read again>
?
l.84 \middle?'
or
\begin{equation}
\left( ..part A ring .. \right)
\middle(silent right \middle)
\left( ..part B silent .. \right)
\end{equation}
gives 'extra middle('
\begin{equation}
\middle(
\left( ..part A ring .. \right)
\left( ..part B silent .. \right)
\middle)
\end{equation}
gives 'extra middle('
\middle(
\left( ..part A ring .. \right)
\left( ..part B silent .. \right)
\middle)
In the original context
\begin{equation}
H =
P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right)
+
P_{\mbox{rinc}} \times \left( -\log_2 ( P_{\mbox{rinc}}) \right)
\end{equation}
doing this:
\begin{equation}
\middle(
H =
P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right)
+
P_{\mbox{rinc}} \times \left( -\log_2 ( P_{\mbox{rinc}}) \right)
\middle)
\end{equation}
Also gives the error message 'extra middle('.
Even trying to follow their exact words,
\begin{equation}
\middle(
H =
P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right)
\middle)
+
\middle(
P_{\mbox{rinc}} \times \left( -\log_2 ( P_{\mbox{rinc}}) \right)
\middle)
\end{equation}
gives the same error.
I have no idea how to use this thing.
Thanks,
Tom
Dr. Thomas D. Schneider
National Institutes of Health
National Cancer Institute
Center for Cancer Research Nanobiology Program
Molecular Information Theory Group
Frederick, Maryland 21702-1201
toms at ncifcrf.gov
permanent email: toms at alum.mit.edu
http://www.ccrnp.ncifcrf.gov/~toms/
More information about the texhax
mailing list