I'm having troubles (again!) with some equations alignments. See the following MWE:
\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\begin{document}
\noindent
Blablabla bla bla blabla bla blabla bla bla blablabla blabla bla blabla bla bla bla bla blabla:
\begin{align*}
A &= BBB \\
= CCCC \text{to be centered on the whole line} CCCC & \\
&= DDD.
\end{align*}
Blablabla bla bla blabla bla blabla bla bla blablabla blabla bla blabla bla bla bla bla blabla:
\end{document}
Preview:
As shown in red on the picture, I need the first and third lines to be aligned with their equal sign, approximately at the center of the page (as it is usually done within the align environment), while the second line should be centered (not aligned with the first and third lines).
The second line is what gives me the trouble.
How can I do that without cheating and hacking a lot with many \phantom
or \mathclap
commands?