# Environment for Mathematics

I am writing some notes and in them there is 95% mathematics, give or take, so I use $...$. The problem is that if I want to go into a new line and I use the \\ there is the risk of badbox creation. Also because I write a lot of formulas in multiple lines I have to use a lot of times $...$ , which seems to me a little useless because my notes as I said are almost entirely mathematics. Is there an environment or another way so I can write mathematics like I write text? Something like the verbatim environment but for mathematics?

• would be my first guess. Then, have a look at the amsmath package for multiple line equations. – Lupino Apr 18 '14 at 0:52
• $...$ is intended for inline mathematics. You should probably look at amsmath which offers a range of environments for multi-line equations, groups of mathematical statements etc. – cfr Apr 18 '14 at 0:53
• The problem with these environments is that, as far I know, they don't "break" automatically the equation in a new line. – Adam Apr 18 '14 at 1:17
• Equations can't be broken as automatically as straight text, human intervention is still required. – vonbrand Apr 18 '14 at 2:13

From the comments you ask for automatic breaking of display math environments. The breqn package attempts to provide such a set-up. It is a big piece of work, but tuning it to your taste may not be easy.

\documentclass{article}

\usepackage{breqn}

\begin{document}

Here is a sample document with mathematics broken automatically:
\begin{dmath}
y = x^{70} - 20 x^{48} + x^{47} - 2 x^{39} - 17 x^{37} + 605 x^{28}
- 100006798 x^{25} + 7 x^{19} - 3 x^{10} + 50 x^7 - 506879 x^6 + 3 x^2 - 1
\end{dmath}

\end{document}