[texhax] parenthesis problem in LaTeX

Tom Schneider toms at ncifcrf.gov
Wed Jan 14 05:04:04 CET 2009


Steve:

> You were the sharp one to diagnose the problem as the descending "g".
> That was the hard bit.

Thanks.  Unfortunately it took a while, but it was part of the
principle to boil the problem down so that others (or I!) could figure
it out!  Basically, http://www.ccrnp.ncifcrf.gov/~toms/bugs.html  :-)

> To fix, just add something that doesn't print but
> takes up the same vertical dimension, namely a \vphantom{g}:
> 
> \begin{equation}
> H =
> P_{\mbox{ring}}   \times \left( -\log_2 ( P_{\mbox{ring}})   \right)
> +
> P_{\mbox{silent}} \times \left( -\log_2 ( P_{\mbox{silent\vphantom{g}}})
> \right)
> \end{equation}
> 
> This worked fine when I tested it.
> 
> I use phantoms all the time - be they \vphantoms, \hphantoms, or full
> \phantoms.

Excellent!

I was pretty sure there was a way to do it but haven't used phantoms
before.

THANKS much for this clean solution!

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