7

As many, I have been a regular visitor of TeX StackExchange for several years. Up to now, careful research in the different existing questions and threads had solved almost all my troubles and questions about LaTeX, but this time I take the plunge and ask my own question. Many thanks in advance for your dedicated help.

Please, be aware that I have been reading really a lot of threads related to my question: alignments and spacing issues when combining the split environnement and a phantom. This topic also led me to read some basics about the complicated notions of atoms, the particular "problems" introduced by the \left and \right delimiters, by \phantom. Any link to related questions will be welcome, but know that I couldn't solve all my question by going through the site.

Here is my MWE (I hope it is minimal enough; I think it is important to have my actual equations in this case and not something more canonical):

\documentclass[journal][enter image description here][1]{IEEEtran} % two column

\usepackage{mathtools} % general math package
\usepackage{bm} % bold math
\usepackage{commath} % for the () delimiters

% Gray phantom for debugging 
\usepackage{xcolor}
\newcommand*{\gphantom}[1]{{\color[gray]{.75}#1}}

%%% Some notation commands

\newcommand*\Vthn{V_{\textnormal{th,n}}}
\newcommand*\Vthp{V_{\textnormal{th,p}}}
\newcommand*\Vthon{V_{\textnormal{th0,n}}}
\newcommand*\Vthop{V_{\textnormal{th0,p}}}

\newcommand*\Vthh{\widehat{V}_{\textnormal{th}}}
\newcommand*\Vthnih{\widehat{V}_{\textnormal{th,n,1}}}
\newcommand*\Vthpih{\widehat{V}_{\textnormal{th,p,1}}}
\newcommand*\Vthniih{\widehat{V}_{\textnormal{th,n,2}}}
\newcommand*\Vthpiih{\widehat{V}_{\textnormal{th,p,2}}}

\begin{document}

%%% "Solution", with several \!

"Solution", with several \textbackslash! required to get the proper alignment (for which I don't fully understand the need)

\begin{equation}
\begin{split}
& w\left( \bm{\Vthh} \right) 
= 
\left(\frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}}\right)^2 
\cdot 
\left(\frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}}\right)^2
\cdot{}\\
&\! \exp \left( - \frac{1}{2} \left( 
\left( \left( \frac{\Vthnih - \Vthon}{\sigma_{\Vthn}} \right)^2 + \left( \frac{\Vthniih - \Vthon}{\sigma_{\Vthn}} \right)^2 \right) 
\right. \right. \\
& \qquad \qquad \qquad \qquad \qquad \cdot \left(1 - \left( \frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}} \right)^2 \right) 
\\
& 
\phantom{
\exp \left( - \frac{1}{2} \left(
\vphantom{
\left( \left( \frac{\Vthpih - \Vthop}{\sigma_{\Vthp}} \right)^2 + \left( \frac{\Vthpiih - \Vthop}{\sigma_{\Vthp}} \right)^2 \right)
} \!
\right. \right.
} \!
\left( \left( \frac{\Vthpih - \Vthop}{\sigma_{\Vthp}} \right)^2 + \left( \frac{\Vthpiih - \Vthop}{\sigma_{\Vthp}} \right)^2 \right) 
\\
& \qquad \qquad \qquad \qquad \qquad \left.  \left. \!
 \cdot \left(1 - \left( \frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}} \right)^2 \right) 
\right) \right)
\text{.}
\end{split}
\end{equation}

%%% Original version with \!
% Gray phantom for debugging

Original version without \textbackslash!, resulting in 
incorrect alignment:

\begin{equation}
\begin{split}
& w\left( \bm{\Vthh} \right) 
= 
\left(\frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}}\right)^2 
\cdot 
\left(\frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}}\right)^2
\cdot{}\\
& \exp \left( - \frac{1}{2} \left( 
\left( \left( \frac{\Vthnih - \Vthon}{\sigma_{\Vthn}} \right)^2 + \left( \frac{\Vthniih - \Vthon}{\sigma_{\Vthn}} \right)^2 \right) 
\right. \right. \\
& \qquad \qquad \qquad \qquad \qquad \cdot \left(1 - \left( \frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}} \right)^2 \right) 
\\
& 
\gphantom{
\exp \left( - \frac{1}{2} \left(
\vphantom{
\left( \left( \frac{\Vthpih - \Vthop}{\sigma_{\Vthp}} \right)^2 + \left( \frac{\Vthpiih - \Vthop}{\sigma_{\Vthp}} \right)^2 \right)
}
\right. \right.
}
\left( \left( \frac{\Vthpih - \Vthop}{\sigma_{\Vthp}} \right)^2 + \left( \frac{\Vthpiih - \Vthop}{\sigma_{\Vthp}} \right)^2 \right) 
\\
& \qquad \qquad \qquad \qquad \qquad \left.  \left. 
 \cdot \left(1 - \left( \frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}} \right)^2 \right) 
\right) \right)
\text{.}
\end{split}
\end{equation}

\end{document}

And you can find attached the output, embellished with some color lines to emphasize the alignment and spacing issues.

Debugging the alignment and spacing issues

I hope my summarizing picture helps you to understand why, with either of my two "solutions", I am not satisfied of the imperfect alignment which results.

I wish that you could help me in:

  1. Understanding why the "apparently sound" solution 2 (without any introduced \!) is visually unsatisfying. Do not hesitate to refer to quite theoretical concepts like those of atoms or specific LaTeX spacing issues.
  2. Telling me how to solve the different causes of different spacing. I suspect that there are different things to be discussed: the small alignment mismatch between w and the exp (corresponding to one thin space, corrected with a \!); the introduced spaces by the combination of phantom and multiple \left and \right delimiters.
  3. Is the introduced "fix" \cdot{}\\ at the end of the first equation line correct and the right way to do it? Can you tell me what stands the {} for in this situation?
  4. Biefly outlying and advising me about a systematic approach in solving those alignment issues (like by introducing artificial atom or space corrections at the appropriate places?), as I spent multiple hours only on this case with a limited success in the end. I must confess that I am a bit tired, even though I am usually quite a LaTeX driller (yet probably much less that some experts among all of you).

Thanks in advance and don't hesitate to ask me to improve my question.

Update

A "+" was missing between lines 3 et 4.

+ was missing

But the core of my questions remains.

5
  • 1
    Welcome to TeX.SE!
    – Mensch
    Commented Jul 7, 2021 at 20:32
  • 1
    \left\right introduces unwanted extra horizontal space even when it does not stretch the brackets, it makes them too large here as well. I'd use ( \bm{\Vthh} ) for example, not \left( \bm{\Vthh} \right) Commented Jul 7, 2021 at 20:52
  • 1
    your alignment seems slightly strange you are wrapping the line to the left of the =, I think a more conventional layout would have use &= for the first row so the long expression wrapped to the right of the =. Commented Jul 7, 2021 at 20:56
  • 1
    also commath is unfortunately completely wrong by design, I would not use it. Commented Jul 7, 2021 at 20:57
  • Hello David, thanks a lot for your meaningful comments. Because all of them are (obviously) consistent with @egreg's solution, I am going to address a a few questions here below instead. Commented Jul 8, 2021 at 9:34

4 Answers 4

8

Here's a \phantom free implementation, using instead a nested aligned.

The biggg fences are courtesy of https://tex.stackexchange.com/a/387592/4427, but you should try harder to avoid them: I find the formula very hard to interpret. I'd probably use brackets [] in order to better show the nesting instead of relying on the size of parentheses.

Some \! are also necessary in order not to leave holes between high fences and exponents.

\documentclass[journal]{IEEEtran} % two column

\usepackage{mathtools} % general math package
\usepackage{bm} % bold math

%\usepackage{commath} % don't use, it's very buggy

%%% Some notation commands

\newcommand*\Vthn{V_{\textnormal{th,n}}}
\newcommand*\Vthp{V_{\textnormal{th,p}}}
\newcommand*\Vthon{V_{\textnormal{th0,n}}}
\newcommand*\Vthop{V_{\textnormal{th0,p}}}

\newcommand*\Vthh{\widehat{V}_{\textnormal{th}}}
\newcommand*\Vthnih{\widehat{V}_{\textnormal{th,n,1}}}
\newcommand*\Vthpih{\widehat{V}_{\textnormal{th,p,1}}}
\newcommand*\Vthniih{\widehat{V}_{\textnormal{th,n,2}}}
\newcommand*\Vthpiih{\widehat{V}_{\textnormal{th,p,2}}}

\makeatletter
\newcommand{\biggg}{\bBigg@{3}}
\newcommand{\Biggg}{\bBigg@{3.5}}
\makeatother
\def\bigggl{\mathopen\biggg}
\def\bigggm{\mathrel\biggg}
\def\bigggr{\mathclose\biggg}
\def\Bigggl{\mathopen\Biggg}
\def\Bigggm{\mathrel\Biggg}
\def\Bigggr{\mathclose\Biggg}

\begin{document}

The \verb|\!| command is necessary to countermand
the thin space inserted by the math operator \verb|\exp|.
I'd avoid so many \verb|\left| and \verb|\right|. Here
I use \texttt{biggg} fences, but I don't really like them
\begin{equation}
\begin{aligned}
& w( \bm{\Vthh}) =
\left(\frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}}\right)^{\!2} 
\cdot 
\left(\frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}}\right)^{\!2}
\cdot{}\\
&\! \exp \Bigggl(
   - \frac{1}{2} \bigggl(
   \begin{aligned}[t]
     & \Biggl( \biggl( \frac{\Vthnih - \Vthon}{\sigma_{\Vthn}} \biggr)^{\!2} +
       \biggl( \frac{\Vthniih - \Vthon}{\sigma_{\Vthn}} \biggr)^{\!2} \Biggr) 
\\
     & \hspace{6em} \cdot \Biggl(
         1 - \biggl( \frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}} \biggr)^{\!2}
       \Biggr) 
\\
     & \Biggl( \biggl( \frac{\Vthpih - \Vthop}{\sigma_{\Vthp}} \biggr)^{\!2} +
       \biggl( \frac{\Vthpiih - \Vthop}{\sigma_{\Vthp}} \biggr)^{\!2} \Biggr) 
\\
     & \hspace{6em} \cdot \Biggl(
         1 - \biggl( \frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}} \biggr)^{\!2}
       \Biggr) 
\bigggl) \Bigggr)\text{.}\end{aligned}
\end{aligned}
\end{equation}

\end{document}

enter image description here

I'd also add

\usepackage{newtxtext,newtxmath}

to improve the typesetting of math formulas. By default, IEEEtran uses mathptmx, which is a 25 year old hack made when nothing else was available.

In this case you also have to fix a couple of lines

\makeatletter
\newcommand{\biggg}{\bBigg@{3.5}}
\newcommand{\Biggg}{\bBigg@{4}}
\makeatother

enter image description here

7
  • Thanks a lot Enrico for your help! I will very likely accept your answer, but I wish to push my understanding to the end. Commented Jul 8, 2021 at 9:37
  • 1
    I will definitely stop using 'commath', following your remark as well as David Carlisle's one. Commented Jul 8, 2021 at 9:38
  • I am not married to this package. Generally speaking, should I avoid using the \left(...\right) structure and managing the parenthesis size manually with those \biggl(, \Biggl(,...? It might seem a bit tedious at first glance, but perhaps just a matter of habit. Commented Jul 8, 2021 at 9:50
  • 2
    @LéopoldVanBrandt The IEEEtran class wants Times-like fonts.
    – egreg
    Commented Jul 8, 2021 at 10:02
  • 3
    split is a very clever environment that can work with nested splits in an outer align it can be used in simple cases like a version of aligned but aligned is a lot simpler and I'd always use that first and only use split when needed. Commented Jul 8, 2021 at 10:11
6

I would use nested aligned rather than trying to force align,ent with phantoms, I would also use the seconf form I think with defined variables for the subterms (I wouldn't leave the first form with the trailing open ( but I leave that for now as I would use teh second layout.

enter image description here

\documentclass[journal]{IEEEtran} % two column

\usepackage{mathtools} % general math package
\usepackage{bm} % bold math

% not really usable \usepackage{commath} % for the () delimiters

% Gray phantom for debugging 
\usepackage{xcolor}
\newcommand*{\gphantom}[1]{{\color[gray]{.75}#1}}

%%% Some notation commands

% \text... uses the text font not math, use \mathrm here 
\newcommand*\Vthn{V_{\mathrm{th,n}}}
\newcommand*\Vthp{V_{\mathrm{th,p}}}
\newcommand*\Vthon{V_{\mathrm{th0,n}}}
\newcommand*\Vthop{V_{\mathrm{th0,p}}}

\newcommand*\Vthh{\widehat{V}_{\mathrm{th}}}
\newcommand*\VthniI{\widehat{V}_{\mathrm{th},n,i}}
\newcommand*\Vthnih{\widehat{V}_{\mathrm{th,n,1}}}
\newcommand*\Vthpih{\widehat{V}_{\mathrm{th,p,1}}}
\newcommand*\Vthniih{\widehat{V}_{\mathrm{th,n,2}}}
\newcommand*\Vthpiih{\widehat{V}_{\mathrm{th,p,2}}}

\begin{document}

%%% "Solution", with several \!


\noindent
X\dotfill X
\begin{equation}
\begin{aligned}
 w( \bm{\Vthh}) 
&= 
\Bigl(\frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}}\Bigr)^2 
\cdot 
\Bigl(\frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}}\bigr)^2
\cdot \exp \Biggl(
\\
& - \frac{1}{2} \Biggl( 
\begin{aligned}[t]
&\biggl(\Bigl( \frac{\Vthnih - \Vthon}{\sigma_{\Vthn}} \Bigr)^2 + \Bigl( \frac{\Vthniih - \Vthon}{\sigma_{\Vthn}} \Bigr)^2 \biggr) 
\\
& \qquad \qquad \qquad \qquad \cdot \biggl(1 - \Bigl( \frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}} \Bigr)^2 \biggr) 
\\
& 
\biggl(\Bigl( \frac{\Vthpih - \Vthop}{\sigma_{\Vthp}} \Bigr)^2 + \Bigl( \frac{\Vthpiih - \Vthop}{\sigma_{\Vthp}} \Bigr)^2 \biggr) 
\\
& 
\qquad \qquad \qquad \qquad  \cdot \biggl(1 - \Bigl( \frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}} \Bigr)^2 \biggr)
\Biggr)\Biggr)
\text{.}
\end{aligned}
\end{aligned}
\end{equation}
X\dotfill X

\bigskip

\noindent
let $w_n=\Bigl(\frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}}\Bigr)^2$ and
$W_{ni}=\Bigl(\frac{\VthniI - \Vthon}{\sigma_{\Vthn}}\Bigr)^2$
\begin{equation}
\begin{aligned}
 w( \bm{\Vthh}) 
&= 
w_n \cdot w_p \\
&\cdot \exp\Bigl( - \frac{1}{2} \Bigl( 
\begin{aligned}[t]
&(W_{n1} + W_{n2})
 \cdot (1 - w_n ) \cdot{}\\
&(W_{p1}+W_{p2}) 
 \cdot{}
 (1 - w_p)
\Bigr)\Bigr)
\text{.}
\end{aligned}
\end{aligned}
\end{equation}
X\dotfill X

\end{document}

I think you were missing an operator between lines three and four?

4
  • Many thanks again, David. Like Enrico, you propose a solution with on nested aligned, which is fine (I question Enrico above to improve my feeling about this), and manual parenthesis sizing. Commented Jul 8, 2021 at 10:01
  • I am also very grateful for your attempt in improving the aesthetics of the equation. I missed one "+" operation at the before last line and I will update my question soon (together with the multiple improvements I already received!) to converge to a final solution. Commented Jul 8, 2021 at 10:03
  • Nice job with the \dotfill ! Commented Jul 8, 2021 at 10:03
  • @LéopoldVanBrandt if you search this site you will find hundreds of examples of that, I always add it to get a visual clue of how far over full the expression is. Commented Jul 8, 2021 at 10:20
5

Here's a solution that uses no \left and \right directives, no \phantom and \vphantom directives, but does use curly braces and square brackets instead of round parentheses for the two outermost brace groups. I've also used \times instead of \cdot.

It would appear that the square brackets aren't needed and could be deleted, right?

enter image description here

\documentclass[journal]{IEEEtran} % two column
\usepackage{mathtools,bm} 
\usepackage{newtxtext,newtxmath} % Times Roman text and math font

%%% Some notation commands
\newcommand*\Vthn{V_{\mathrm{th,n}}}
\newcommand*\Vthp{V_{\mathrm{th,p}}}
\newcommand*\Vthon{V_{\mathrm{th0,n}}}
\newcommand*\Vthop{V_{\mathrm{th0,p}}}
\newcommand*\Vthh{\widehat{V}_{\mathrm{th}}}
\newcommand*\Vthnih{\widehat{V}_{\mathrm{th,n,1}}}
\newcommand*\Vthpih{\widehat{V}_{\mathrm{th,p,1}}}
\newcommand*\Vthniih{\widehat{V}_{\mathrm{th,n,2}}}
\newcommand*\Vthpiih{\widehat{V}_{\mathrm{th,p,2}}}

\begin{document}

\begin{equation}
\begin{aligned}[b]
&w( \widehat{\bm{V}}_{\mathrm{th}} ) 
    = 
\biggl(\frac{\hat{\sigma}_{\Vthn}}{\sigma_{\Vthn}}\biggr)^{\!2} 
\times 
\biggl(\frac{\hat{\sigma}_{\Vthp}}{\sigma_{\Vthp}}\biggr)^{\!2}
\\
&\times\exp \Biggl\{ - \frac{1}{2} \Biggl[ \,
\Biggl( \biggl( \frac{\Vthnih - \Vthon}{\sigma_{\Vthn}} \biggr)^{\!2} 
      + \biggl( \frac{\Vthniih- \Vthon}{\sigma_{\Vthn}} \biggr)^{\!2}\,\Biggr) 
\\
& \qquad\qquad\times 
\Biggl(1 - \biggl( \frac{\hat{\sigma}_{\Vthn}}{\sigma_{\Vthn}} \biggr)^{\!2}\,\Biggr) 
\\
& \qquad\qquad\times
\Biggl( \biggl( \frac{\Vthpih - \Vthop}{\sigma_{\Vthp}} \biggr)^{\!2} 
      + \biggl( \frac{\Vthpiih- \Vthop}{\sigma_{\Vthp}} \biggl)^{\!2}\,\Biggr) 
\\
& \qquad\qquad\times
\Biggl(1 - \biggl( \frac{\hat{\sigma}_{\Vthp}}{\sigma_{\Vthp}} \biggr)^{\!2}\,\Biggr) 
\,\Biggr] \Biggr\}
\,.
\end{aligned}
\end{equation}

\end{document}

Update, upon learning that a + symbol was missing in the OP's original write-up: To make use of this piece of information, I would (a) replace the \times directive at the start of the 4th row with + and (b) indent rows 3 and 5 a bit more via an additional \qquad directive.

enter image description here

10
  • 1
    @LéopoldVanBrandt in almost all cases I would use neither and just use implied multiplication. The floating dots really don't help undersanding. Especially if this is real numeric multiplication not some operation in some non standard field. Commented Jul 8, 2021 at 10:17
  • 2
    @LéopoldVanBrandt \textnormal is wrong (and 4 times slower) it will use the font setup for text outside the math, not the roman font specified for use in mathematics. (these might be the same, but they might not be the same) Commented Jul 8, 2021 at 10:18
  • 1
    @LéopoldVanBrandt - If the \times symbol at the start of the next-to-last line really ought to be a + symbol, then my final comment, viz., "It would appear that the square brackets aren't needed and could be deleted", would definitely be moot.
    – Mico
    Commented Jul 8, 2021 at 10:22
  • 1
    @LéopoldVanBrandt - About \times versus \cdot: both symbols are commonly understood to denote multiplication. \cdot is (obviously) less conspicuous than \times, so I'd use \cdot only where I would want the multiplication symbol to be less conspicuous, and only where it's absolutely needed to eliminate some potential ambiguity. OTOH, if I want to make sure that readers have no doubt how one line in a multi-line equation is related to the preceding one, I'd have no qualms about using \times to provided that bit of clarity.
    – Mico
    Commented Jul 8, 2021 at 10:29
  • 1
    @LéopoldVanBrandt - I've posted an update to show how I would incorporate the piece of information that the \times symbol at the start of row 4 really ought to a + symbol.
    – Mico
    Commented Jul 8, 2021 at 10:41
2

I propose a final solution (actually two, as you will see), which really combines multiple ingredients and advices picked from @David Carlisle, @egreg and @Mico's detailed answers, and the related comments and subquestions. A big thank you again to our three experts for their time and dedicated useful help. All their three answers had deserved to be accepted too.

\documentclass[journal]{IEEEtran} % two-column

\usepackage{newtxtext,newtxmath}  % Times Roman text and math font

\usepackage{mathtools} % general math package
\usepackage{bm} % bold math

%%% Some notation commands

% use \mathrm to upright the subscripts

\newcommand*\Vthn{V_{\mathrm{th,n}}}
\newcommand*\Vthp{V_{\mathrm{th,p}}}
\newcommand*\Vthon{V_{\mathrm{th0,n}}}
\newcommand*\Vthop{V_{\mathrm{th0,p}}}

\newcommand*\Vthh{\widehat{V}_{\mathrm{th}}}
\newcommand*\Vthnih{\widehat{V}_{\mathrm{th,n,1}}}
\newcommand*\Vthpih{\widehat{V}_{\mathrm{th,p,1}}}
\newcommand*\Vthniih{\widehat{V}_{\mathrm{th,n,2}}}
\newcommand*\Vthpiih{\widehat{V}_{\mathrm{th,p,2}}}

\begin{document}

\noindent
X\dotfill X % just a very nice trick to separate the parts of the MWE output, and to visualize the \linewidth

Solution 1: if the \emph{parenthesis hierarchy} is important for you. The price to pay is that some inner, low-level pairs of parenthesis could seem undersized (here for the squared $\widehat{\sigma}/\sigma$ ratios and the fractions). I think this is just a matter of personal appreciation of the aesthetics.

\noindent
X\dotfill X
\begin{equation}
\begin{aligned}
w( \bm{\Vthh} ) 
={}&
\Bigl(\frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}}\Bigr)^{\!2}
\cdot 
\Bigl(\frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}}\Bigr)^{\!2}
\cdot{}\\
& \! \exp \Biggl( - \frac{1}{2} \Biggl[
\begin{aligned}[t]
& \biggl(\Bigl( \frac{\Vthnih - \Vthon}{\sigma_{\Vthn}} \Bigr)^{\!2} + \Bigl( \frac{\Vthniih - \Vthon}{\sigma_{\Vthn}} \Bigr)^{\!2} \biggr) 
\\
& \qquad \qquad \cdot \biggl(1 - \Bigl( \frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}} \Bigr)^{\!2} \biggr) 
\\
& 
\mathllap{{}+{}}
\biggl(\Bigl( \frac{\Vthpih - \Vthop}{\sigma_{\Vthp}} \Bigr)^{\!2} + \Bigl( \frac{\Vthpiih - \Vthop}{\sigma_{\Vthp}} \Bigr)^{\!2} \biggr) 
\\
& 
\qquad \qquad \cdot \biggl(1 - \Bigl( \frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}} \Bigr)^{\!2} \biggr)
\Biggr]\Biggr)
\text{.}
\end{aligned}
\end{aligned}
\end{equation}
X\dotfill X

Solution 2: if you accept that two successive parentheses have the same size, in order to avoid "undersized" parenthesis. We don't use \verb|\Big| anymore, always at least \verb|\bigg|. Note that the handy \verb|\left(...\right)| finely worked for the right-hand side of the first line (product of squared $\widehat{\sigma}/\sigma$ ratios), but it seemed nice both to my typing and my eye to be consistent in the parenthesis sizing all through the equation.

\noindent
\begin{equation}
\begin{aligned}
w( \bm{\Vthh} ) 
={}&
\biggl(\frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}}\biggr)^{\!2} 
\cdot 
\biggl(\frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}}\biggr)^{\!2}
\cdot{}\\
& \! \exp \Biggl( - \frac{1}{2} \Biggl[
\begin{aligned}[t]
& \biggl(\biggl( \frac{\Vthnih - \Vthon}{\sigma_{\Vthn}} \biggr)^{\!2} + \biggl( \frac{\Vthniih - \Vthon}{\sigma_{\Vthn}} \biggr)^{\!2} \biggr) 
\\
& \qquad \qquad \cdot \biggl(1 - \biggl( \frac{\widehat{\sigma}_{\Vthn}}{\sigma_{\Vthn}} \biggr)^{\!2} \biggr) 
\\
& 
\mathllap{{}+{}}
\biggl(\biggl( \frac{\Vthpih - \Vthop}{\sigma_{\Vthp}} \biggr)^{\!2} + \biggl( \frac{\Vthpiih - \Vthop}{\sigma_{\Vthp}} \biggr)^{\!2} \biggr) 
\\
& 
\qquad \qquad \cdot \biggl(1 - \biggl( \frac{\widehat{\sigma}_{\Vthp}}{\sigma_{\Vthp}} \biggr)^{\!2} \biggr)
\Biggr]\Biggr)
\text{.}
\end{aligned}
\end{aligned}
\end{equation}
X\dotfill X

\end{document}

and the produced output:

Final Solution

The result is just fine to me! What a world of difference compared to the original output, right? But, please, don't hesitate to suggest further improvements, even though they would seem very personal or qualitative. Note that thanks to the various improvements, horizontal room as earned and allowed to align the split equation to the right of the = sign as @David Carlisle wished to see instead. I think that, comparing with my hand-written notes (this is a really instructive process, because you realize that even manually you don't really resort to excessively huge parentheses, and that your eye is able to accommodate moderate sizing discrimination), I might retain "Solution 2" and not "Solution 1"; what do you think?

I however din't retain the @David Carlisle's second solution which aimed at lightening the equation by defining new quantities. It is definitely a great general advice (structure, lighten and avoid huge equations the best you can), but it didn't fit my particular need here: I want this equation to be a little bit heavy, systematic and expanded, because it takes place in an Appendix of a journal paper and should be ready to use for other researchers.

I summarize the different improvements, starting with the important ones directly related to the question:

  1. Regarding the parentheses. Definitely don't use the commath package which presumably allowed for excessively large automate \left(... \right) delimiters. It is quite buggy, it seems to introduce several abnormal and uncontrolled spaces. If you are used to use \left(... \right) almost systematically (like I was), you could resist changing to manual parenthesis sizing. See related discussion. It might indeed seem counter-intuitive and tedious to get back to manual things while using LaTeX, but reconsidered, it isn't LaTeX's job to refine the pure aesthetics (deciding where to use parentheses or brackets [] instead, of which size depending on your need and taste,...), it is yours!. Here, I preferred to limit myself to the use of the standard "big" parentheses that are \Big, \bigg, \Bigg. @egreg nicely explains in his answer how to "create" new even larger ones (but this should be avoided, mostly for aesthetic reasons). Note that I have retained @Mico and @egreg's suggestion to make use of at least on [] for the higher-level parenthesis pair.
  2. The solution is now based on a main aligned plus a nested aligned, all inside one equationenvironment (because it is one single equation, with one single tag). I haven't tested it, but I guess a split+ aligned (or vice-versa?) could also do the job, for the purists. It might be difficult to draw a very general conclusion about the use of aligned versus split to... split (but with alignment constraints...) a long equation. I will remember @David Carlisle's comment: "split is a very clever environment that can work with nested splits in an outer align it can be used in simple cases like a version of aligned but aligned is a lot simpler and I'd always use that first and only use split when needed".
  3. Note that they are some necessary atoms like ={}&for the proper right alignement, or \cdot{}\\ because the operation occurs at the very end of one line. Also, as pointed by @egreg, several \! are required to cancel some introduced little spaces (either by \exp or the larger parentheses). My own feeling is that this practice is "okay" because we fully master the origin of those spaces (unlike in my original code, at least for a non-expert), and we want to correct them for aesthetic considerations.

A few transversal and more or less minor points were also addressed (thanks again to all three of you for your patient and clear answers) :

  • I preferred to stick to my \cdotfor the multiplications, even though @Mico's \times is tempting: " About \times versus \cdot: both symbols are commonly understood to denote multiplication. \cdot is (obviously) less conspicuous than \times, so I'd use \cdot only where I would want the multiplication symbol to be less conspicuous, and only where it's absolutely needed to eliminate some potential ambiguity. OTOH, if I want to make sure that readers have no doubt how one line in a multi-line equation is related to the preceding one, I'd have no qualms about using \times to provided that bit of clarity."
  • \mathrm should be used to upright the mathematical subscripts (all italicized is a too frequently met bad practice, in my opinion for typographical reasons), not \textnormal. See related discussion, for instance.
  • \usepackage{newtxtext,newtxmath} improves both text and math Times Roman fonts (specific requirement of the IEEEtran class, and probably of many other journal editors).

I used to consider myself as "not that bad" in LaTeX, but I made nice progress by working with you on this question, this was also the purpose. Thanks a lot! Feel free to edit this answer, that I will accept when allowed (tomorrow evening).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .