I write article
at first, but I also need pdf in beamer
version. But I found for those long equations appears fine in "article" will exceed the page width in "beamer" mode. So is there a method to avoid this automatically?
A MWE is as follows:
\documentclass[12pt]{beamer} \usepackage{amsmath,amssymb,amsthm}
\begin{document}
\begin{equation}\label{}
\int_C {{\mathbf{F}}\left( {x,y} \right) \cdot d{\mathbf{r}}} = \int_C {\left( {f\left( x \right){\mathbf{i}} + g\left( y \right){\mathbf{j}}} \right) \cdot \left( {dx{\mathbf{i}} + dy{\mathbf{j}}} \right)} = \int_C {f\left( x \right)dx} + \int_C {g\left( y \right)dy}
\end{equation}
\end{document}
gives
After change documentclass from article
to beamer
\documentclass[12pt]{beamer}
\usepackage{amsmath,amssymb,amsthm}
\begin{document}
\begin{equation}\label{}
\int_C {{\mathbf{F}}\left( {x,y} \right) \cdot d{\mathbf{r}}} = \int_C {\left( {f\left( x \right){\mathbf{i}} + g\left( y \right){\mathbf{j}}} \right) \cdot \left( {dx{\mathbf{i}} + dy{\mathbf{j}}} \right)} = \int_C {f\left( x \right)dx} + \int_C {g\left( y \right)dy}
\end{equation}
\end{document}
gives
\\
line breaks should be the expected outcome.