I have a paper where I need to format a series of ugly 'fraction expressions' -- ugly because the term in the numerator is (often) a complex sum or series, and in order to get it to `fit', I usually have to break the expression in the numeratorover 2 or more lines. Typically, I accomplish this using \splitfrac. The denominator for these equations is often simple say, a single term, or single-line expression.
But, a challenge arises if I want (or, more often, need) to bracket the whole equation, using (say) \left( and \right), I end up with lots of extra whitespace around the denominator.
One approach tried was embedding everything in a pmatrix -- this gets rid of the whitespace in the denominator, but, I can't quite figure out how to centre a coefficient at the line separating the numerator and denominator (the vinculum, to be semantic about it ;-)
And that is what I'm hoping to be able to work out -- I have a number of equations that might require such 'centering'.
The following MWE shows both the 'ugly' and 'somewhat better' versions. Suggestions welcomed -- thanks in advance.
\documentclass[11pt]{article}
% set up basic package list
\usepackage{amsmath,amstext,mathtools,amssymb}
\begin{document}
One form of the equation -- ugly white space in denominator
\begin{equation*}
D = -2 \left(\dfrac{
\splitfrac{ \sum_{t=1}^T \sum_{i=1}^n \log \bigl( \text{Pois}(y_i | \exp(\beta_0^{(t)}}
{+\beta_1^{(t)} x_{1,i} + \ldots + \beta_p^{(t)} x_{p,i})\bigr)}
} {T}\right)
\end{equation*}
Better form (IMO) of the equation, using pmatrix `trick', but coefficient (-2) not centered
on horizontal line separating numerating and denominator:
\begin{equation*}
D=-2\begin{pmatrix} \dfrac{
\splitfrac{ \sum_{t=1}^T \sum_{i=1}^n \log \bigl( \text{Pois}(y_i | \exp(\beta_0^{(t)}}
{+\beta_1^{(t)} x_{1,i} + \ldots + \beta_p^{(t)} x_{p,i})\bigr)}
} {T}
\end{pmatrix}
\end{equation*}
\end{document}