Automatic line-breaking in equations
Typically, we meticulously design formulas, especially in multiline equations, manually selecting optimal breakpoints and alignment positions. However, envision a lengthy chain of calculations, like those found in proofs or mathematical assignments. It would be incredibly beneficial if LaTeX could automatically wrap displayed formulas the way it handles regular text. And indeed, it’s achievable.
How to do it...
The breqn package is specifically crafted for this precise purpose. This recipe will illustrate its functionality. We’ll employ the beamer class because seminar slides typically have space limitations. Follow these steps:
- Specify the document class:
\documentclass[12pt]{beamer}
- As the beamer class uses sans-serif math font by default, we switch to the serif math font as in regular documents:
\usefonttheme[onlymath]{serif}
- Load the breqn package:
\usepackage{breqn}
- Begin the document and a frame for a presentation...