Let's say I have a document with a narrow text width and lots of margin to spare. If I had a particularly long equation that failed to fit into the given width, the general solution would be to break the equation across multiple lines.
But if a particular equation was not well suited to that approach, is there a convenient way to temporarily change the margins just for a given equation? I provide a kludged approach below, but it requires manually inserted \vspace
of an empirically derived magnitude. It just seems that there should be a better way. It also requires a specification of the widened textwidth, but that is OK, since I would prefer some uniformity of expansion, if the technique has to be used more than once in a document.
\documentclass{article}
\usepackage[nopar]{lipsum}
\begin{document}
\lipsum[1]
\begin{equation}
y = mx + b
\end{equation}
\lipsum[2]
% HERE IS THE KLUDGE
\par\vspace{-.5\topskip}\noindent\makebox[\textwidth]{\begin{minipage}{7in}
\begin{equation}
E = mc^2 + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x +
x + x + x + x + x + x + x + x + x
\end{equation}
\end{minipage}}\vspace{\topskip}\par
% END KLUDGE
\lipsum[2]
\begin{equation}
\nu = c / \lambda
\end{equation}
\end{document}
As an afterthought, I would note that \leftskip
and \rightskip
approaches do not seem to change what happens inside the equation.