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 in my document which is unbreakable and does not fit on one line using the twocolumn global option. Am I forced to shrink the text size here? And how do I go about doing it? \resizebox does not function in math mode.

http://i.imgur.com/Bbn2CZj.png?1

\documentclass[twocolumn]{ltxdoc}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\sum_{q_\mathrm{total}=0}^{q_A+N_A+q_B+N_B-2}\left(\sum_{q_A=0}^{q_\mathrm{total}}\left(\binom{q_A+N_A-1}{q_A}\binom{q_B+N_B-1}{q_B}\right)\right)x^{q_\mathrm{total}}
\end{equation}
\end{document}
share|improve this question
2  
You can use \small or whatever works before the equation, or just simply introduce variables for the subterms so it fits –  David Carlisle Aug 20 at 14:24

3 Answers 3

up vote 4 down vote accepted

Resizebox should work.

\documentclass[twocolumn]{ltxdoc}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{graphics}
\begin{document}
\lipsum[1]
\begin{equation}
\resizebox{0.5\textwidth}{!}{$\sum_{q_\mathrm{total}=0}^{q_A+N_A+q_B+N_B-2}\left(\sum_{q_A=0}^{q_\mathrm{total}}\left(\binom{q_A+N_A-1}{q_A}\binom{q_B+N_B-1}{q_B}\right)\right)x^{q_\mathrm{total}}$}
\end{equation}
\lipsum[2-4]
\end{document}

Or maybe consider splitting your equation.

share|improve this answer
2  
It's what the OP asked for, but arbitrarily scaling text so it fits in a space is so evil :-( –  David Carlisle Aug 20 at 14:45
    
@DavidCarlisle From a typographic-aesthetic point of view? Or personal preference? –  1010011010 Aug 20 at 19:25
1  
@1010011010 All of above. It shouts as hey I couldn't fit it here so I scaled it, deal with it. Valid but says much about you instead of the equation :P –  percusse Aug 20 at 19:54
1  
@1010011010 just ask yourself how many professionally typeset works you have seen where text elements are using arbitrarily scaled fonts to make the element fit the space rather than one of a limited number of matched design sizes. –  David Carlisle Aug 20 at 20:04
1  
@1010011010 Not really. There is always a better way. Logical argument chain is never too complicated to state concisely. Similar to what @tohecz said, define n=q_a+N_A-1 and m=q_b+N_B-1 then you only need n and m for the sum limits and binomials (or whatever single letter abbreviation you wish). It should then fit. –  percusse Aug 20 at 21:09

I don't think you have a much better option than this. Btw, you seem to use q_A for two different things.

enter image description here

\documentclass[twocolumn]{ltxdoc}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\sum_{q_\mathrm{tot}=0}^{Q_A+Q_B-2}\sum_{q_A=0}^{q_\mathrm{tot}}{\textstyle\binom{Q_A-1}{q_A}\binom{Q_B-1}{q_B}}x^{q_\mathrm{tot}},
\end{equation}
where $Q_A=q_A+N_A$ and $Q_B=q_B+N_B$.
\end{document}
share|improve this answer
    
@Mico Well, it doesn't hurt :p But you're right that it should not be there. Thanks for pointing out :) –  tohecz Aug 20 at 21:13

The cuted package (from the sttools bundle) can temporarily leave two columns mode with its strip environment. An example with the equation entered in the second column:

\documentclass[twocolumn]{ltxdoc}
\usepackage{mathtools, cuted}
\usepackage{lipsum, color}

\begin{document}
\lipsum[1-2]

\lipsum[1]

\textsf{\color{red}Equation entered here: }

\begin{strip}
\begin{equation}
  \sum_{q_\mathrm{total}=0}^{q_A+N_A+q_B+N_B-2}\left(\sum_{q_A=0}^{q_\mathrm{total}}\left(\binom{q_A+N_A-1}{q_A}\binom{q_B+N_B-1}{q_B}\right)\right)x^{q_\mathrm{total}}
\end{equation}
\end{strip}

Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.

\lipsum[3-5]
\end{document} 

enter image description here

share|improve this answer
    
this example shows the wide display entered in the first column. the original question shows it occurring in the second column. can you adjust your example to reproduce that situation? –  barbara beeton Aug 20 at 15:54
    
@barbara beeton: see my updated answer. –  Bernard Aug 20 at 16:15

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.