# \addtolength{\leftskip}{2em} does not apply to equations in the paragraph

I have a paragraph which should be emphasized using left and right skips. Thereby I recognized that it simply ignores equations in this paragraph. Is this reasonable?

\documentclass{article}
\usepackage{changepage}% http://ctan.org/pkg/changepage
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\lipsum[1]
{
\lipsum[2]
$$a+b=c\textrm{ is a very very very very very very long equation }a+b=c$$
\lipsum[3]
}
\lipsum[4]
\end{document}


During testing you will register no warning. However the equation is broader than the current text's width.

Is there a way without using any environment in order to sqeeze the equation to the surrounding textwidth?

-
–  cmhughes Apr 12 '13 at 15:39

\leftskip and \rightskip are primitive TeX registers that should never be set directly in LaTeX or all list constructs (which is almost all display constructs) will get confused. You should copy the definition of quote in article class and set \leftmargin and \rightmargin

\documentclass{article}
\usepackage{changepage}% http://ctan.org/pkg/changepage
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\lipsum[1]
{
\lipsum[2]
$$\textrm{This is a long long long long long long equation}$$
\lipsum[3]
}

\newenvironment{zz}
{\list{}{\leftmargin10em \rightmargin\leftmargin}%
\item\relax}
{\endlist}

\begin{zz}
\lipsum[2]
$$\textrm{This is a long long long long long long equation}$$
\lipsum[3]
\end{zz}

\lipsum[4]
\end{document}

-
And how would you write it without the environment? –  strpeter Apr 12 '13 at 14:13
@strpeter The whole latex syntax is based on environment syntax why would you not want that? although as for most environments you can go \begingroup\zz .... \par\endzz\endgroup if you must. –  David Carlisle Apr 12 '13 at 14:16

You have LaTeX environments quotation and quote, which emphasize in the manner that you are expecting. Equations are unbreakable, so you should break them manually.

-

Try this:

\documentclass{article}

Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Torbjørn T. Apr 21 '13 at 6:59