[texhax] Measuring height of displayed maths
Dan
vi5u0-texhax at yahoo.co.uk
Fri Nov 20 12:17:12 CET 2009
Dear All,
I'm trying to measure the height of some displayed maths as part of an
attempt to get the size of parentheses right in a multi-line
equation. This represents the sort of effect I want:
\documentclass{minimal}
\usepackage{amsmath}
\newcommand{\pnc}[1]{\textrm{#1}}
\begin{document}
\newlength{\funnyname}
\settoheight{\funnyname}{\[\frac{1}{P^2}\left(\frac{\left(P+1\right)\left(P+E\right)+1}{P\left(E+1\right)\left(P+E\right)}+\frac{1}{E^2\left(E-1\right)}\right)O-\frac{1}{E^3}-\frac{1}{2E^4\left(E+1\right)}-\frac{1}{E^4\left(E-1\right)f_0}\]}
\begin{equation}
\begin{split}
e_{1,0,s} =
\left(\frac{1}{729\left(E-1\right)}\left(\rule{0pt}{\funnyname}\right.\right.&\left.\left.\frac{1}{P^2}\left(\frac{\left(P+1\right)\left(P+E\right)+1}{P\left(E+1\right)\left(P+E\right)}+\frac{1}{E^2\left(E-1\right)}\right)O-\frac{1}{E^3}-\frac{1}{2E^4\left(E+1\right)}\right.\right.\\{}
&\left.\left.\rule{0pt}{\funnyname}-\frac{1}{E^4\left(E-1\right)f_0}\right)\frac{1}{f_0^6}+\frac{\left(1+3PJ\right)f_0}{27E^2\left(E-1\right)^2f_0^2}-\frac{\left(3E-2\right)e_{1,0,s,l}}{3E\left(E-1\right)}\right)\frac{1}{f_0}\pnc{;}
\end{split}
\end{equation}
\end{document}
but unfortunately, it refuses to compile with a "missing $" error. Any ideas, please?
--
Thanks,
Dan
More information about the texhax
mailing list