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.

This is a frequent question, so let me specify a bit more what the problem is.

I have equations with very long fractions that are within integrals,

\begin{equation}
\int A \int \frac{A B C D E \ldots Z}{A' B' C' D' \ldots Z'} dx dy
\end{equation}

Any suggestions how to break these and still make the equations look alright? I must say I am almost ready to typeset the offending pages with text running vertically.

EDIT: per @egreg's request, here is a typical form of the equation I am struggling with:

\int f(\vec x_{i}) 
\frac{\int A(\vec x_{0}) A(\vec x_{1} \mid \vec x_{0}) \ldots 
      A(\vec x_{i} \mid \vec x_{i-1}) d\vec x_{0} d\vec x_{1} \ldots d\vec x_{i-1}}
{\int A(\vec x_{0}) A(\vec x_{1} \mid \vec x_{0}) \ldots 
      A(\vec x_{i} \mid \vec x_{i-1}) d\vec x_{0} d\vec x_{1} \ldots d\vec x_{i-1}} 
\left(\frac{B(\vec x_{i})}{C(\vec x_{i})}\right) d\vec x_{i}
share|improve this question
2  
Are you in a two-column article? Can you show a “real world” example? –  egreg Nov 7 '13 at 14:19
    
@egreg: I am on a regular letter-sized page, but using classicthesis so the text is not exactly wide. –  ANSI C Mastah Nov 7 '13 at 14:23
    
One way is to leave the actual integral in an abbreviated form such as you provided, and then underneath it, define all the terms A, B, ...A', B';, etc. in separate equations. –  Steven B. Segletes Nov 7 '13 at 14:23
    
Unfortunately, this equation is part of a derivation, so things change from line to line, and the terms A, B, and so on are as compact as possible. Defining them elsewhere does not make sense in this case, unfortunately. –  ANSI C Mastah Nov 7 '13 at 14:28

2 Answers 2

up vote 5 down vote accepted

I can only suggest to make things more compact:

\documentclass{scrbook}
\usepackage{classicthesis}

\newcommand{\diff}{\mathop{}\!d} % better differential
\newcommand{\bmid}{\mathbin{|}}  % binary mid

\usepackage{amsmath}
\begin{document}
\begin{equation}
\int f(\vec{x}_{i}) 
\frac
 {
  \int \tilde{A}(\vec{x}_{0},\dots,\vec{x}_{i})
  \diff\vec{x}_{0} \diff\vec{x}_{1} \dots \diff\vec{x}_{i-1}
 }
 {
  \int\tilde{Z}(\vec{x}_{0},\dots,\vec{x}_{i})
  \diff\vec{x}_{0} \diff\vec{x}_{1} \dots \diff\vec{x}_{i-1}
 } 
\left(\frac{B(\vec{x}_{i})}{C(\vec{x}_{i})}\right) \diff\vec{x}_{i}
\end{equation}
where $\tilde{A}(\vec{x}_{0})=A(\vec{x}_{0})$ and, for $k>0$,
\[
\tilde{A}(\vec{x}_{0},\vec{x}_{1},\dots,\vec{x}_{k})=
   A(\vec{x}_{0}) A(\vec{x}_{1} \bmid \vec{x}_{0}) \dots
   A(\vec{x}_{k} \bmid \vec{x}_{k-1})
\]
\end{document}

enter image description here

share|improve this answer
    
Thanks! Not sure if I will go this route, but it seems that a change in notation is necessary. –  ANSI C Mastah Nov 7 '13 at 14:51
    
@ANSICMastah It's not clear whether the integral in the numerator really depends only on the last variable, which could make an even more economic notation by adding the integral in the shorthand. –  egreg Nov 7 '13 at 14:54
    
@egreg According to page 12 of Short Math Guide for LaTeX, the dots could be typpset using \dotsc and \dotso. –  Svend Tveskæg Nov 7 '13 at 14:59
1  
@SvendTveskæg The \dots macro in amsmath does a “look ahead”, so it generally does “the right thing”; \dotsc, \dotsm and \dotso should be used when the dots are at the end of an expression (say to denote an undetermined number of summands), not in between two items. –  egreg Nov 7 '13 at 15:02
    
Okay. Sorry for 'interrupting' and thank you for correcting me. –  Svend Tveskæg Nov 7 '13 at 15:03

To break up very long expressions in numerators and denominators, you could use the \splitdfrac{}{} macro of the mathtools package. In the example below, I place parentheses around the split numerator and denominator terms, but doing so may not appeal to your math style preferences. Separately, I would suggest you make the main integral symbol (really) big, e.g., by using one of the macros of the bigints package.

enter image description here

\documentclass{article}
\usepackage{mathtools,bigints}
\begin{document}    
Before:
\begin{equation}
\int f(\vec x_{i})
\frac{\int A(\vec x_{0}) A(\vec x_{1} \mid \vec x_{0}) \dots
      A(\vec x_{i} \mid \vec x_{i-1}) d\vec x_{0} d\vec x_{1} \dots d\vec x_{i-1}}
{\int A(\vec x_{0}) A(\vec x_{1} \mid \vec x_{0}) \dots
      A(\vec x_{i} \mid \vec x_{i-1}) d\vec x_{0} d\vec x_{1} \dots d\vec x_{i-1}}
\left(\frac{B(\vec x_{i})}{C(\vec x_{i})}\right) d\vec x_{i}
\end{equation}

After:
\begin{equation}
\bigintss \! f(\vec x_{i}) \,
\dfrac{ 
  \left(\splitdfrac{\int A(\vec x_{0}) A(\vec x_{1} \mid \vec x_{0}) \dots
      A(\vec x_{i} \mid \vec x_{i-1})}{ d\vec x_{0} d\vec x_{1} \dots d\vec x_{i-1}} \right)}{
  \left(\splitdfrac{\int A(\vec x_{0}) A(\vec x_{1} \mid \vec x_{0}) \dots
      A(\vec x_{i} \mid \vec x_{i-1})}{ d\vec x_{0} d\vec x_{1} \dots d\vec x_{i-1}} \right)}
  \, \frac{B(\vec x_{i})}{C(\vec x_{i})} \, d\vec x_{i}
\end{equation}
\end{document}
share|improve this answer

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.