1

I need help making this monstrosity look presentable:

\documentclass[12pt, a4paper]{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{parskip}
\usepackage{enumitem}
\usepackage{float}
\usepackage{tabularx}
\usepackage{pdfpages}
\usepackage{pxfonts}
\usepackage{caption}
\usepackage{afterpage}
\usepackage{gensymb}
\usepackage[ngerman]{babel}
\usepackage{placeins}

\begin{document}

\begin{align}
    \Delta W = \sqrt{\left( \frac{\partial W}{\partial c_w} \Delta C_w \right)^2 + \left( \frac{\partial W}{\partial m_w} \Delta m_w \right)^2 + \left( \frac{\partial W}{\partial T_1} \Delta T_1 \right)^2 + \left( \frac{\partial W}{\partial T_2} \Delta T_2 \right)^2 + \left( \frac{\partial W}{\partial \overline{T}} \Delta \overline{T} \right)^2} \\
    \Delta W = \sqrt{\left( m_w \frac{T_1 - \overline{T}}{\overline{T} - T_2} \Delta c_w \right)^2 + \left( c_w \frac{T_1 - \overline{T}}{\overline{T} - T_2} \Delta m_w \right)^2 + \left( \frac{m_w C_w}{\overline{T} - T_2} \Delta T_1 \right)^2 + \left( c_w m_w \frac{T_1 - \overline{T}}{(\overline{T} - T_2)^2} \Delta T_2 \right)^2 + \left( c_w m_w \frac{T_1 - T_2}{(\overline{T} - T_2)^2} \Delta \overline{T} \right)^2} 
\end{align}

\end{document}

I tried breaking it up using \\ but it's just giving me loads of errors and I wasn't able to find a solution online.

2

3 Answers 3

1

Rather than splitting the contents of the radical I'd use a fractional exponent. By nesting split inside align, you get the equation numbers centered between the lines.

Don't use pxfonts, that's mostly deprecated.

\documentclass[12pt, a4paper]{article}
\usepackage{amsmath}
\usepackage{newpxtext,newpxmath}

\begin{document}

\begin{align}
\begin{split}
\Delta W &=
  \Biggl(
  \biggl(\frac{\partial W}{\partial c_w} \Delta C_w \biggr)^2
    + \biggl(\frac{\partial W}{\partial m_w} \Delta m_w \biggr)^2
    + \biggl(\frac{\partial W}{\partial T_1} \Delta T_1 \biggr)^2
  \\ & \qquad
    + \biggl(\frac{\partial W}{\partial T_2} \Delta T_2 \biggr)^2
    + \biggl(\frac{\partial W}{\partial \overline{T}} \Delta \overline{T} \biggr)^2
  \Biggr)^{1/2}
\end{split}
\\[2ex]
\begin{split}
\Delta W &=
  \Biggl(
  \biggl(m_w \frac{T_1 - \overline{T}}{\overline{T} - T_2} \Delta c_w \biggr)^2
    + \biggl(c_w \frac{T_1 - \overline{T}}{\overline{T} - T_2} \Delta m_w \biggr)^2
    + \biggl(\frac{m_w C_w}{\overline{T} - T_2} \Delta T_1 \biggr)^2
  \\ & \qquad
    + \biggl(c_w m_w \frac{T_1 - \overline{T}}{(\overline{T} - T_2)^2} \Delta T_2 \biggr)^2
    + \biggl(c_w m_w \frac{T_1 - T_2}{(\overline{T} - T_2)^2} \Delta \overline{T} \biggr)^2
  \Biggr)^{1/2}
\end{split}
\end{align}

\end{document}

enter image description here

I used \bigg size, because \left and \right use too big fences in the second equation, due to \overline.

Actually, I'd use \bar: see the output below.

enter image description here

1

Instead of creating superlong lines (vinculi?) which span two lines, I suggest you switch to [...]^{1/2} notation, with the opening bracket on one line and the ]^{1/2} term on the other.

I would also replace all instances of \left and \right with \biggl and \biggr, respectively, to assure consistent sizing of the tall brackets and parentheses. I'd also "snug up" the ^2 terms to the tall closing parentheses by writing \biggr)^{\!2}, where !` is "negative thinspace".

Finally, do note that the pxfonts package is borderline obsolete. I suggest you use the newpxtext and newpxmath packages instead.

enter image description here

\documentclass[12pt, a4paper]{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{parskip}
\usepackage{enumitem}
\usepackage{float}
\usepackage{tabularx}
\usepackage{pdfpages}
%\usepackage{pxfonts} % 'pxfonts' is borderline obsolete
\usepackage{newpxtext,newpxmath} % use these two packages instead
\usepackage{caption}
\usepackage{afterpage}
\usepackage{gensymb}
\usepackage[ngerman]{babel}
\usepackage{placeins}

\begin{document}

\begin{align}
    \Delta W &= \biggl[
                \biggl( \frac{\partial W}{\partial c_w} \Delta C_w \biggr)^{\!2} 
              + \biggl( \frac{\partial W}{\partial m_w} \Delta m_w \biggr)^{\!2} 
              + \biggl( \frac{\partial W}{\partial T_1} \Delta T_1 \biggr)^{\!2} \notag \\
             &\qquad
              + \biggl( \frac{\partial W}{\partial T_2} \Delta T_2 \biggr)^{\!2} 
              + \biggl( \frac{\partial W}{\partial \overline{T}} \Delta \overline{T} \biggr)^{\!2} 
                \biggr]^{1/2} \\[2\jot]
    \Delta W &= \biggl[
                \biggl( m_w \frac{T_1 - \overline{T}}{\overline{T} - T_2} \Delta c_w \biggr)^{\!2} 
              + \biggl( c_w \frac{T_1 - \overline{T}}{\overline{T} - T_2} \Delta m_w \biggr)^{\!2} 
              + \biggl( \frac{m_w C_w}{\overline{T} - T_2} \Delta T_1 \biggr)^{\!2} \notag \\
             &\qquad
              + \biggl( c_w m_w \frac{T_1 - \overline{T}}{(\overline{T} - T_2)^2} \Delta T_2 \biggr)^{\!2} 
              + \biggl( c_w m_w \frac{T_1 - T_2}{(\overline{T} - T_2)^2} \Delta \overline{T} \biggr)^{\!2} 
                \biggr]^{1/2}
\end{align}

\end{document}
0

I was able to work around the problem by splitting the first and second lines into different \align environments and by using the \aligned command to fit multiple lines under the square root:

\begin{align}
    \Delta W = \sqrt{\left( \frac{\partial W}{\partial c_w} \Delta C_w \right)^2 + \left( \frac{\partial W}{\partial m_w} \Delta m_w \right)^2 + \left( \frac{\partial W}{\partial T_1} \Delta T_1 \right)^2 + \left( \frac{\partial W}{\partial T_2} \Delta T_2 \right)^2 + \left( \frac{\partial W}{\partial \overline{T}} \Delta \overline{T} \right)^2}
\end{align}

\begin{align}
    \Delta W = \sqrt{
    \begin{aligned}
        &\left( m_w \frac{T_1 - \overline{T}}{\overline{T} - T_2} \Delta c_w \right)^2 + \left( c_w \frac{T_1 - \overline{T}}{\overline{T} - T_2} \Delta m_w \right)^2 \\
        &+ \left( \frac{m_w C_w}{\overline{T} - T_2} \Delta T_1 \right)^2 + \left( c_w m_w \frac{T_1 - \overline{T}}{(\overline{T} - T_2)^2} \Delta T_2 \right)^2 \\
        &+ \left( c_w m_w \frac{T_1 - T_2}{(\overline{T} - T_2)^2} \Delta \overline{T} \right)^2
    \end{aligned}} 
\end{align}

I haven't tried Barbara's solution but it seems very reasonable, thank you for responding!

1
  • If you place the `\\` line-break directive after the third rather than the second additive term, you should be able to typeset the square root material in two rather than three lines.
    – Mico
    Sep 24 at 14:24

You must log in to answer this question.

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