Math & Sciencebreqn | Automatic Line Break for Fraction

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
renyalvarado
Posts: 3
Joined: Mon Jun 04, 2012 6:16 pm

breqn | Automatic Line Break for Fraction

Post by renyalvarado »

Hi,

does somebody know how to automatic line break a long numerator in a fraction?

I made a program which generate a latex output, but sometimes the math formula is too wide and not fix in a page.
I used the dmath enviroment to break the equation, but when the numerator is long, dmath didn't break the formula.

Code: Select all

\documentclass{article}
\usepackage{amsmath} 
\usepackage{mathpazo}
\usepackage[mathpazo]{flexisym}
\usepackage{breqn}
\begin{document}

\begin{dmath*} 
\frac{x_{1} + x_{2} + x_{3} + x_{4} + x_{5} + x_{6} +
x_{7} + x_{8} + x_{9} + x_{10} + x_{11} + x_{12} + x_{13} + x_{14} +
x_{15} + x_{16} + x_{17} + x_{18} + x_{19} + x_{20} + x_{21} + x_{22}
+ x_{23} + x_{24} + x_{25} + x_{26} + x_{27} + x_{28} + x_{29} +
x_{30} + x_{31} + x_{32} + x_{33} + x_{34} + x_{35} + x_{36} + x_{37}
+ x_{38} + x_{39} + x_{40} + x_{41} + x_{42} + x_{43} + x_{44} +
x_{45} + x_{46} + x_{47} + x_{48} + x_{49} + x_{50}}{y}
\end{dmath*}
\end{document}
Thank you
Last edited by localghost on Mon Jun 04, 2012 7:07 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

breqn | Automatic Line Break for Fraction

Post by localghost »

The mechanism of breqn for automatic line break does not work for fractions.

Perhaps you should shorten the numerator. This is a common practice.

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}   % loads »amsmath«

\begin{document}
  \begin{equation}
    \frac{x_1+x_2+ \cdots + x_{50}}{y}
  \end{equation}
\end{document}

Best regards and welcome to the board
Thorsten
User avatar
renyalvarado
Posts: 3
Joined: Mon Jun 04, 2012 6:16 pm

Re: breqn | Automatic Line Break for Fraction

Post by renyalvarado »

Thanks for your answer!
Post Reply