1

How can we break formula mentioned below into into two lines?

$\displaystyle \boldsymbol{{\left( {x\log x} \right)^{\log \log x}}\left\{ {\frac{1}
{{x\log x}}\left( {\log x + \log \log x} \right) + \left( {\log \log x} \right)\left( {\frac{1}{x} + \frac{1}{{x\log x}}} \right)} \right\} }$

FYI: I'm using two column layout and this symbol is getting overlapped over next column.

EDIT: Added sample tex file having issue mentioned above:

\documentclass[addpoints,answers,10pt]{exam}
\usepackage[margin=0.7in,headheight=3.5\baselineskip,headsep=1\baselineskip,includehead]{geometry}
\usepackage{multicol}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{nonfloat}
\usepackage{caption}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{ifpdf}
\usepackage{chemfig}
\usepackage[export]{adjustbox}
\begin{document}   \begin{multicols}{2} \begin{questions}
\question[4] Ref: (111)\\If\ $\displaystyle \boldsymbol{y = {\left( {x\log x} \right)^{\log \log x}} }$ , then\ $\displaystyle \boldsymbol{\frac{{dy}}
{{dx}} =  }$
\begin{choices} \choice $\displaystyle \boldsymbol{{\left( {x\log x} \right)^{\log \log x}}\left\{ {\frac{1}
{{x\log x}}\left( {\log x + \log \log x} \right) + \left( {\log \log x} \right)\left( {\frac{1}
{x} + \frac{1}
{{x\log x}}} \right)} \right\} }$
\choice $\displaystyle \boldsymbol{{\left( {x\log x} \right)^{x\log x}}\log \log x\left[ {\frac{2}
{{\log x}} + \frac{1}
{x}} \right] }$
\choice $\displaystyle \boldsymbol{{\left( {x\log x} \right)^{x\log x}}\frac{{\log \log x}}
{x}\left[ {\frac{1}
{{\log x}} + 1} \right] }$
\choice none of these
 \end{choices}
\end{questions}
\end{multicols}
\end{document}
Pawan Mude
  • 2,921
  • 2
    Please, take a look at http://tex.stackexchange.com/questions/3782/how-can-i-split-an-equation-over-two-lines?rq=1 –  Aug 24 '13 at 14:11
  • Thank Papiro, I tried that, it's giving Latex Error : "\item invalid in math mode" . I'm using exam class with two column layout. Symbol mentioned above is one of the \choice in Multiple choice question. – Pawan Mude Aug 24 '13 at 14:18
  • 2
    My misunderstanding, then. Could you post an MWE? – Sean Allred Aug 24 '13 at 14:19
  • I've added sample tex file – Pawan Mude Aug 24 '13 at 14:50
  • 1
    See also http://tex.stackexchange.com/questions/21290/how-to-make-left-right-pairs-of-delimiter-work-over-multiple-lines. – Sean Allred Aug 24 '13 at 15:59

1 Answers1

2

Your problem was caused by having a \left \right pair break across a line. For reasons unknown to me, this can't be done. Use \big, \bigg, \Big, or \Bigg as appropriate when you need this.

Adding the breqn package allows this functionality.

Note that you cannot use \boldsymbol with a line break or an alginment marker (&), either. I recommend against using bold math this way anyway, but as a workaround, you can just embolden each line separately.

\documentclass[addpoints,answers,10pt]{exam}
\usepackage[margin=0.7in,headheight=3.5\baselineskip,headsep=1\baselineskip,includehead]{geometry}
\usepackage{multicol}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{nonfloat}
\usepackage{caption}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{ifpdf}
\usepackage{chemfig}
\usepackage[export]{adjustbox}

\usepackage{mwe}

\newcommand{\dydx}{\frac{\mathrm{d}y}{\mathrm{d}x}}

\begin{document}
\begin{multicols}{2}
  \begin{questions}
    \question[4] Ref: (111)

    If $\displaystyle \boldsymbol{y = {\left( {x\log x} \right)^{\log \log x}}}$ , then $\displaystyle \boldsymbol{\dydx =}$
    \begin{choices}
      \choice \parbox{\linewidth}{
        \def\mypr#1{\left(#1\right)} % clarity
        \def\mybr#1{\left\{#1\right\}} % clarity
      \begin{align*}
        \boldsymbol{\mypr{x\log x}^{\log \log x}} &\boldsymbol{\Big\{\frac{1}{x\log x} \mypr{\log x + \log \log x}} \\
              &\boldsymbol{+ \mypr{\log \log x} \mypr{\frac{1}{x} + \frac{1}{x\log x}} \Big\}}
      \end{align*}
      }
      \choice\parbox{\linewidth}{
      \begin{equation*}
        \boldsymbol{{\left( {x\log x} \right)^{x\log x}}\log \log x\left[ {\frac{2}
            {{\log x}} + \frac{1}
            {x}} \right] }
      \end{equation*}
      }
      \choice \parbox{\linewidth}{
      \begin{equation*}
        \boldsymbol{{\left( {x\log x} \right)^{x\log x}}\frac{{\log \log x}}
        {x}\left[ {\frac{1}
            {{\log x}} + 1} \right] }
      \end{equation*}
      }
      \choice none of these
    \end{choices}
    \question \lipsum
  \end{questions}
\end{multicols}
\end{document}

enter image description here

David Carlisle
  • 757,742
Sean Allred
  • 27,421
  • 2
    the requirement that \left and \right be matched within a "cell" of an alignment (the component between an end of a line and a & or between two &s is built into tex itself; explained in the texbook, p.148: "TeX needs to typeset the subformula that appears between \left and `right` before it can decide how big to make the delimiters." – barbara beeton Aug 24 '13 at 18:25