# Too long equation without splitting

I am writing an equaition which is too long-wide. I don't want it to split. I tried to change the fontsize within the equation enviroment but it didn't work. I am using

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\begin{document}
$${\footnotesize G=centroid\cdot \frac{range[V]}{\#\,channels}\cdot\frac{W_{pair}[eV]} {E_{particle}[keV]}\cdot \frac{1}{(coarse\,gain)\cdot(fine\,gain)}\cdot \frac{10^6} {X[mV]\cdot E_{cg}[eV]}} \label{eq:Gain}$$
\end{document}


Is there a way to achieve that? My output is

Any ideas?

-
It’s also a good idea to avoid using math italics to write normal text, as the kerning is different. Compare $if$ \emph{if}, and $rs$ \emph{rs}. Use of \text, as in the answers below, avoids this. –  Daniel Harbour Oct 10 '12 at 21:33

You could set the fractions in \textstyle:

\documentclass[11pt]{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
$$G=\textstyle\text{centroid}\cdot \frac{\text{range}[V]}{\text{\# channels}}\cdot \frac{W_{\text{pair}}[eV]}{E_{\text{particle}}[keV]}\cdot \frac{1}{(\text{coarse gain})\cdot(\text{fine gain})}\cdot \frac{10^6}{X[mV]\cdot E_{cg}[eV]} \label{eq:Gain}$$
\end{document}


(you may even consider using \small centroid as well) or scale it to fix using \resizebox from graphicx:

\documentclass[11pt]{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\begin{document}
$$\resizebox{.9\textwidth}{!}{\displaystyle G=\text{centroid}\cdot \frac{\text{range}[V]}{\text{\# channels}}\cdot \frac{W_{\text{pair}}[eV]}{E_{\text{particle}}[keV]}\cdot \frac{1}{(\text{coarse gain})\cdot(\text{fine gain})}\cdot \frac{10^6}{X[mV]\cdot E_{cg}[eV]}} \label{eq:Gain}$$
\end{document}

-
Thank you very for your double approach to this issue!!!Thank you soooo much!It is working like a charm!!! –  Thanos Oct 6 '12 at 20:17

Package resizegather allows the automatically resizing the equation to line width, if the equation is too large:

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{resizegather}
\begin{document}
\begin{gather}
G=centroid\cdot
\frac{range[V]}{\#\,channels}\cdot\frac{W_{pair}[eV]}
{E_{particle}[keV]}\cdot \frac{1}{(coarse\,gain)\cdot(fine\,gain)}\cdot
\frac{10^6}   {X[mV]\cdot E_{cg}[eV]}
\label{eq:Gain}
\end{gather}
\end{document}


And with setting text and units as text and not as product of variables:

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{resizegather}
\begin{document}
\begin{gather}
G=\text{centroid}\cdot
\frac{\text{range}[\text{V}]}{\#\,\text{channels}}\cdot
\frac{W_\text{pair}[\text{eV}]}{E_\text{particle}[\text{keV}]}\cdot
\frac{1}{(\text{coarse\,gain})\cdot
(\text{fine\,gain})}\cdot
\frac{10^6}   {X[\text{mV}]\cdot E_{cg}[\text{eV}]}
\label{eq:Gain}
\end{gather}
\end{document}


Also I have used the fonts Latin Modern instead of Computer Modern, because the kerning of eV is much better there.

-
Thank you very much for your annswer!I tried to use this package, but to be quite frank I cannot see any difference. It is exactly the same, I'm afraid... –  Thanos Oct 6 '12 at 20:02
There is only a difference, if the equation (as gather) is exceeding the line width. In the first example it is 67.5315pt and the second example it is 45.16924pt. Both values are quite high, remember scaling an equation down or using smaller font sizes are a last resort measure. It's disrupting the uniformity of the document. –  Heiko Oberdiek Oct 6 '12 at 20:14
Thank you very much for that comment!It is really useful and I'll keep it in mind while working with equations. Thank's!!! –  Thanos Oct 6 '12 at 20:19

Now this is a different approach. Practically I am cheating a bit by forcing LaTeX to ignore any proper page settings and go into the margins to fit the equation and its number into one line. I (ab)use the adjmulticol package for this to happen. Then everything return to normal:

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{lipsum}
$${\footnotesize G=centroid\cdot \frac{range[V]}{\#\,channels}\cdot\frac{W_{pair}[eV]} {E_{particle}[keV]}\cdot \frac{1}{(coarse\,gain)\cdot(fine\,gain)}\cdot \frac{10^6} {X[mV]\cdot E_{cg}[eV]}} \label{eq:Gain}$$

This is a very nice way of doing it!!!It can keep the same fontsize, which is something I like a lot!!! However I am having trouble with the package. Even if I install it and refreshing MikteX it doesn't seem to be working...Too bad... –  Thanos Oct 6 '12 at 20:10
The typical error when a package isn't installed Package adjmulticol.sty not found...I believe it has to do with my system, because lately it does a lot of crazy stuff... –  Thanos Oct 7 '12 at 6:39