Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
  • I have an equation extending into the right margin and off the page.
  • I have many equations. For this equation only, I would like to shift
  • it to the left.

    MWE below.

    \documentclass[twoside]{book}                           
    \usepackage{amsmath}                                      
         \begin{document}
            \begin{equation}
                    \text{Some big equation}
            \end{equation}
    \end{document}
    

Here is an example of an equation I wish to shift left horizontally as it is too far to the right.

\documentclass[a4paper,12pt,twoside]{book}                      

        \newcommand{\MyLeftRoundBracket}{(}                                                                         
        \newcommand{\MyRightRoundBracket}{)}                                                                        
        \newcommand{\MyLeftSquareBracket}{[}                                                                        
        \newcommand{\MyRightSquareBracket}{]} 

        \usepackage{amsmath}                                      

     \begin{document}

                \begin{align}\label{eq:CIR_Expected_Return_Variance_Spread}
     ^{Spread}_{CIR}\sigma^2(X^L,X^U,c) &= -{(c-X^L+X^U)^2 \over {_{CIR}\theta_1}^2} {1 \over \Bigg \MyLeftSquareBracket \frac{\partial \Phi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2
   {_{CIR}\theta_1} X^L}{{_{CIR}\theta_3}}\Big)-}  \cdots  \notag \\
&\qquad {1 \over 
        \frac{\partial \Phi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
   X^U}{{_{CIR}\theta_3}}\Big) -\frac{\partial \Psi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^L}{{_{CIR}\theta_3}}\Big) + }  \cdots  \notag        \\
   & \qquad\qquad {1 \over \frac{\partial \Psi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1}
   {_{CIR}\theta_2}}{{_{CIR}\theta_3}}, \frac{2 {_{CIR}\theta_1} X^U}{{_{CIR}\theta_3}}\Big) \Bigg \MyRightSquareBracket^3 } 
\times      \notag  \\
&\qquad \Bigg [ \frac{\partial \Phi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1}  {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
   X^L}{{_{CIR}\theta_3}}\Big)^2-\frac{\partial \Phi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
   X^U}{{_{CIR}\theta_3}}\Big)^2 + \notag \\
&\qquad   \frac{\partial \Phi^2}{\partial a^2}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
   X^U}{{_{CIR}\theta_3}}\Big)-\frac{\partial \Phi^2}{\partial a^2}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^L}{{_{CIR}\theta_3}}\Big)+ \notag \\
&\qquad  \frac{\partial \Psi}{\partial a}\Big(0,\frac{2
   {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^L}{{_{CIR}\theta_3}}\Big)^2-\frac{\partial \Psi^2}{\partial a^2}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
   X^L}{{_{CIR}\theta_3}}\Big)-         \notag \\
&\qquad   \frac{\partial \Psi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^U}{{_{CIR}\theta_3}}\Big)^2+\frac{\partial \Psi^2}{\partial a^2}\Big(0,\frac{2 {_{CIR}\theta_1}
   {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^U}{{_{CIR}\theta_3}}\Big)\Bigg ]
   \end{align}              

\end{document}
share|improve this question
1  
Could you include the actual equation? Is breaking the equation up in multiple lines an option? –  Michel Mar 30 '11 at 7:52
    
@Michel,all I want to do do is shift anything wrapped in the equation command to the left. This should be a common requirement. I have 100's of equations but 5 or so overlap off the page of my PhD thesis. I want to shift those equations only to the left. I gave ab example of an equation as requested.NOTE: There are other formatting issues going on,so the example is not off the page but does extend far right. I added the example to a separate section as not to clutter the real question. Which is just to shift anything in the equation or dmath or align command to the right. –  Ian Gregory Mar 30 '11 at 8:43
    
Is not the same question ! I modified my answer –  Alain Matthes Mar 30 '11 at 8:55
    
Please edit your question if you want to provide more details. The answer section is for solutions only. I moved your answer to the question to keep the site tidy. –  Martin Scharrer Mar 30 '11 at 11:12
add comment

1 Answer

up vote 8 down vote accepted
![\documentclass[twoside]{book}                           
\usepackage{amsmath}                                      
\begin{document}
\begin{equation}
 \hspace*{-10cm}   \text{Some big equation}
\end{equation}
\begin{equation}
       \text{Some big equation}
\end{equation}
\end{document}]

enter image description here

With align

\documentclass[a4paper,12pt,twoside]{book}                      

        \newcommand{\MyLeftRoundBracket}{(}                                                                         
        \newcommand{\MyRightRoundBracket}{)}                                                                        
        \newcommand{\MyLeftSquareBracket}{[}                                                                        
        \newcommand{\MyRightSquareBracket}{]} 

        \usepackage{amsmath}                                      

     \begin{document}

  \hspace*{-3cm}\vbox{\begin{align}\label{eq:CIR_Expected_Return_Variance_Spread}
       ^{Spread}_{CIR}\sigma^2(X^L,X^U,c) &= -{(c-X^L+X^U)^2 \over {_{CIR}\theta_1}^2} {1 \over \Bigg \MyLeftSquareBracket \frac{\partial \Phi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2
     {_{CIR}\theta_1} X^L}{{_{CIR}\theta_3}}\Big)-}  \cdots  \notag \\
  &\qquad {1 \over 
          \frac{\partial \Phi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
     X^U}{{_{CIR}\theta_3}}\Big) -\frac{\partial \Psi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^L}{{_{CIR}\theta_3}}\Big) + }  \cdots  \notag        \\
     & \qquad\qquad {1 \over \frac{\partial \Psi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1}
     {_{CIR}\theta_2}}{{_{CIR}\theta_3}}, \frac{2 {_{CIR}\theta_1} X^U}{{_{CIR}\theta_3}}\Big) \Bigg \MyRightSquareBracket^3 } 
  \times      \notag  \\
  &\qquad \Bigg [ \frac{\partial \Phi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1}  {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
     X^L}{{_{CIR}\theta_3}}\Big)^2-\frac{\partial \Phi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
     X^U}{{_{CIR}\theta_3}}\Big)^2 + \notag \\
  &\qquad   \frac{\partial \Phi^2}{\partial a^2}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
     X^U}{{_{CIR}\theta_3}}\Big)-\frac{\partial \Phi^2}{\partial a^2}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^L}{{_{CIR}\theta_3}}\Big)+ \notag \\
  &\qquad  \frac{\partial \Psi}{\partial a}\Big(0,\frac{2
     {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^L}{{_{CIR}\theta_3}}\Big)^2-\frac{\partial \Psi^2}{\partial a^2}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1}
     X^L}{{_{CIR}\theta_3}}\Big)-         \notag \\
  &\qquad   \frac{\partial \Psi}{\partial a}\Big(0,\frac{2 {_{CIR}\theta_1} {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^U}{{_{CIR}\theta_3}}\Big)^2+\frac{\partial \Psi^2}{\partial a^2}\Big(0,\frac{2 {_{CIR}\theta_1}
     {_{CIR}\theta_2}}{{_{CIR}\theta_3}},\frac{2 {_{CIR}\theta_1} X^U}{{_{CIR}\theta_3}}\Big)\Bigg ]
     \end{align}  }            

\end{document} 

enter image description here

share|improve this answer
1  
The problem here is that the equation is simply too wide, it's wider than the textblock. A better solution would be to change the equation, a break after the equals sign could be an option. –  Michel Mar 30 '11 at 9:07
1  
@Michel I agree with you but the OP wants to shift left horizontally the equation so ... –  Alain Matthes Mar 30 '11 at 9:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.