2

I have an equation which is a little longer than the page margin. I don't want to split it, but I was wondering if it is possible to get it a little more dense (something like setstretch for an equation itself).

Appreciate any help.

MWE:

\documentclass[twocolumn]{article}
\usepackage{amssymb}
\begin{document}
example text example text example text example text example text example text example text example text example text example text example text example text 

equation: 
\begin{equation}
x^2 +y^2+z^2+w^2+\int_{\alpha\in \mathbb{R}} d\alpha f(x,y,z,w)\exp{-2y^2+z^2-w^2}
\end{equation}
\end{document}

the w^2 part is out of the column

1

1 Answer 1

3

You can locally redefine the spacing used around operators which are (in the standard 10pt setting)

\thinmuskip=3mu
\medmuskip=4mu plus 2mu minus 4mu
\thickmuskip=5mu plus 5mu

Hard to give suggested values without seeing an example.


It's pretty marginal squeezing that expression to fit. I think I'd split it or use a smaller font, but...

enter image description here

\documentclass[twocolumn]{article}
\usepackage{amssymb}
\begin{document}
example text example text example text example text example text example text example text example text example text example text example text example text 

equation: 
{\thinmuskip=2mu
\medmuskip=3mu plus 2mu minus 3mu
\thickmuskip=4mu plus 5mu minus 2mu
\begin{equation}
x^2 +y^2+z^2+w^2+\int\limits_{\alpha\in \mathbb{R}}\! d\alpha f(x,y,z,w)\exp{-2y^2+z^2-w^2}
\end{equation}}
\end{document}
5
  • thanks. Is there a way to do this automated? I don't really know what these parameters mean.
    – yoki
    Commented Apr 28, 2013 at 17:04
  • Not really the main one there is meduskip which is the amount of space tex puts around infix binary operators like + but you would not want to reduce them that much normally, and then again I pushed the limit of the integral into the limits position below the sign rather than the subscript position which isn't what you'd normally do, but is reasonably OK in this case as there is no upper limit. Similarly I added a negative space \! as I judged by eye I could risk it. All these have a real chance of messing up the equation (and some would say that I have done:-) Commented Apr 28, 2013 at 17:14
  • Safer automatic approaches would be to scale the equation to fit, so using smaller fonts etc. eg put it in \resizebox{\textwidth}... Commented Apr 28, 2013 at 17:15
  • Hmm, I'm not sure what you're doing with all these spacing redefinitions in this example. Here only the \thinmuskip is relevant! The major point is that the braces in \exp{-2y^2+z^2-w^2} would have to be replaces with parentheses ... Other than that TeX does most of the squeezing itself, doesn't it? (Of course, if there was a relation, then the redefinition of the \thickmuskip would help.) Commented May 3, 2013 at 19:44
  • 1
    @HendrikVogt yes I probably should have said I reduced all three skips for consistency even though they are not all used here. Commented May 3, 2013 at 20:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .