7

I want to rewrite the following equation in two line due to columnwidth of the article.

\begin{eqnarray}
y&=\pm &\sqrt{\frac{Q}{2\pi \sigma_y\sigma_z u C(x,y,z) } \exp{\left(\!-\frac{y^2}{2\sigma_y^2}\right)} \left[ \exp\!{\bigg(\!-\!\frac{\left(z-H\right)^2}{2\sigma_z^2}\!\bigg)}\right. \left.+ \exp\!{\bigg(\!-\!\frac{\left(z+H\right)^2}{2\sigma_z^2}\!\bigg)}\right]}\nonumber\\
\end{eqnarray} 

3 Answers 3

13

Some suggestions

  • Don't use eqnarray -- it's badly deprecated. If you need to align consecutive equations on some chosen marker (say, an = symbol), use the align environment of the amsmath package.

  • The term \exp is a math operator and doesn't take an argument. Really.

  • Don't over-use \left and \right to auto-size parentheses. Among other things, using \left and \right introduces extra white-space, which isn't desirable here, is it?

  • Instead of \bigg(\!-\!\frac..., write \biggl(-\frac.... (And, use \biggr) instead of just \bigg).) TeX's spacing rules treat - as a unary operator if it's preceded by an object to type math-open; \biggl( is such an object, whereas \bigg( is not.

  • The equation is simply too wide to fit inside the text block, it has to be broken up into two lines. I suggest you use a split environment inside an equation environment for this purpose. And, use \biggl\{ in the first row and \biggr\}^{1/2} in the second to denote the start and end of the material whose square root is being taken.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for 'split' environment
\begin{document}
\begin{equation}
\begin{split}
y&=\pm\biggl\{
   \frac{Q}{2\pi \sigma_y\sigma_z u C(x,y,z) } 
   \exp\biggl(-\frac{y^2}{2\sigma_y^2}\biggr) \\
 &\qquad\quad \times\biggl[ 
        \exp\biggl(-\frac{(z-H)^2}{2\sigma_z^2}\biggr)+ 
        \exp\biggl(-\frac{(z+H)^2}{2\sigma_z^2}\biggr)
  \biggr] 
  \biggr\}^{\!1/2}
\end{split}
\end{equation}
\end{document}
5

Given the twocolumn constraint, multline is still an option:

\documentclass[twocolumn]{article}
\usepackage{amsmath} % for 'multline' environment
\begin{document}

And a multline equation ...
\begin{multline}
y=\pm\biggl\{
   \frac{Q}{2\pi \sigma_y\sigma_z u C(x,y,z) } 
   \exp\biggl(-\frac{y^2}{2\sigma_y^2}\biggr) \\
  \times\biggl[ 
        \exp\biggl(-\frac{(z-H)^2}{2\sigma_z^2}\biggr)+ 
        \exp\biggl(-\frac{(z+H)^2}{2\sigma_z^2}\biggr)
  \biggr] 
  \biggr\}^{\!1/2}
\end{multline}

\end{document}

enter image description here

6
  • I'm not sure, actually, if the OP has indicated that the document is being typeset in two-column mode. All he/she has indicated, for sure, is that the equation, as posted, doesn't fit inside the given column. Let's see if the OP clarifies this issue. Aside: I'm glad to see my coding is so helpful... :-)
    – Mico
    Commented Mar 13, 2016 at 8:13
  • 1
    Sure, your code is nice ;-) - I suggested that for standard common paper sizes (letter or A4), the equation would fit anyway. So, I drew my assumption of twocolumn. OK, let's see if the OP clarifies this!
    – AboAmmar
    Commented Mar 13, 2016 at 8:21
  • By the way, I'm always pleased if my code appears to be helpful.
    – Mico
    Commented Mar 13, 2016 at 8:30
  • 2
    So, I deserve a (+1) for being smart, Hahaha.
    – AboAmmar
    Commented Mar 13, 2016 at 8:34
  • 1
    @AboAmmar - +1. You definitely deserve such an upvote. :-)
    – Mico
    Commented Mar 13, 2016 at 9:06
1

Using \delimitershortfall for better heights of ({[]})

\documentclass{article}
\usepackage{amsmath}
\begin{document}

{\delimitershortfall=-1pt% hold it local
\begin{multline}
y =\pm\left\{
    \frac{Q}{2\pi \sigma_y\sigma_z u C(x,y,z) } 
      \exp\left(-\frac{y^2}{2\sigma_y^2}\right)\right. \\
    \times\left.\left[ 
       \exp\left(-\frac{(z-H)^2}{2\sigma_z^2}\right)+ 
       \exp\left(-\frac{(z+H)^2}{2\sigma_z^2}\right)
    \right] \right\}^{\!1/2}
    \end{multline}}
\end{document}

enter image description here

2
  • The closing curly brace looks to be quite a bit larger than the opening curly brace on the preceding line.
    – Mico
    Commented Mar 13, 2016 at 8:04
  • yes, I forgot the \vphantom{\left[...\right]} for the first equation.
    – user2478
    Commented Mar 13, 2016 at 8:08

You must log in to answer this question.

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