Journals often require line numbering for the review process. This is achieved using lineno package. Next, it seems like a good idea to use breqn package (dmath environment) to auto-break long formulas.
But, not switching line numbering off before dmath environment (\begin{nolinenumbers}, \end{nolinenumbers}), causes pdftex to hang (it just consumes 100% CPU, and compilation never finishes).
- Why is this happening?
How to redefine
dmath(anddmath*) environment to havenolinenumbersenvironment automaticly added around it.\documentclass[twocolumn,12pt]{article} \usepackage{breqn} \usepackage{lineno} \begin{document} \linenumbers First paragraph. \begin{nolinenumbers} \begin{dmath} f(x)=x^9+x^8-x^7+x^6-x^5-x^4-x^3+x^2-x+1. \end{dmath} \end{nolinenumbers} \end{document}

pdftex? Your MWE compiles fine on my machine usingpdfLaTeX. For your other request you can useetoolboxand issue\BeforeBeginEnvironment{dmath}{\begin{nolinenumbers}} \AfterEndEnvironment{dmath}{\end{nolinenumbers}}– Jörg Dec 11 '12 at 14:44\begin{nolinenumbers}...\end{nolinenumbers}. Your solu – troubler Dec 11 '12 at 14:47./Untitled.tex:21: LaTeX Error: \begin{nolinenumbers} on input line 17 ended by \end{document}.– troubler Dec 11 '12 at 14:53pdftexand\documentclass? Anyway, the lineno manual states that it does not work well with math environments and provides a few patches for this. As you identified, one way to solve is to turn off line numbering for math. – Jörg Dec 11 '12 at 14:55pdftexconsuming 99% CPU. – troubler Dec 11 '12 at 15:12