# [texhax] parenthesis problem in LaTeX

Tom Schneider toms at ncifcrf.gov
Wed Jan 14 01:43:42 CET 2009

Here's a puzzle for the sharp folks on this list!

\documentclass{article}
\newcommand{\theversion}{{version = 1.00 of latex2009jan13.tex 2009 Jan 13 }}
\begin{document}
\begin{center}
\textbf{A Bug in \LaTeX?}
\\
\theversion
\end{center}

$$H = P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right) + P_{\mbox{silent}} \times \left( -\log_2 ( P_{\mbox{silent}}) \right)$$

The outer pair of parenthesis on the left are made using
\verb|\left(|
and
\verb|\right)|, and indeed they show up as larger than the inner parenthesis.
However, on the right side of the equation, the same
pair of commands fails to give the same size parenthesis.

Ok, try go get around the bug by using big:

$$H = P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right) + P_{\mbox{silent}} \times \big( -\log_2 ( P_{\mbox{silent}}) \big)$$
That failed.

Try bigg:
$$H = P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right) + P_{\mbox{silent}} \times \bigg( -\log_2 ( P_{\mbox{silent}}) \bigg)$$
bigg is too big!

$$H = P_{\mbox{ring}} \times \bigg( -\log_2 ( P_{\mbox{ring}}) \bigg) + P_{\mbox{silent}} \times \bigg( -\log_2 ( P_{\mbox{silent}}) \bigg)$$

Extra braces do not help:
$$H = {P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right)} + {P_{\mbox{silent}} \times \left( -\log_2 ( P_{\mbox{silent}}) \right)}$$

Finally, make the equation parts exactly identical:
$$H = P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right) + P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right)$$
That worked.  So why would the height be different?  It's the g'?

Try removing the g:
$$H = P_{\mbox{ring}} \times \left( -\log_2 ( P_{\mbox{ring}}) \right) + P_{\mbox{rinc}} \times \left( -\log_2 ( P_{\mbox{rinc}}) \right)$$
Now they are the same, but of course it says the wrong thing.

So how should this be typeset?

\begin{verbatim}

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/
\end{verbatim}
\end{document}
`