3

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?

  • 1
    \begin{equation}\end{equation} would be my first guess. Then, have a look at the amsmath package for multiple line equations. – Lupino Apr 18 '14 at 0:52
  • 3
    $...$ 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
  • 1
    Equations can't be broken as automatically as straight text, human intervention is still required. – vonbrand Apr 18 '14 at 2:13
4

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.

Sample output

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.