I want to write chains of equations like ugly formula = expanded = moving things around = simplified = nice formula and to have linebreaks in space-efficient places regardless of margin size and the number of columns. I feel like the formulas shouldn't be broken up so that the reader can parse them without moving their eyes all the time. I was looking around and stumbled upon breqn, which seems to be powerful enough but somehow not willing to fulfill my wishes. It linebreaks on any =, for example
\documentclass{article}
\usepackage{breqn}
\begin{document}
\begin{dmath*}
a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a
\end{dmath*}
\end{document}
will make a tower of =as. The =s can be substituted with \hiderel{=}s but then it never linebreaks. I thought for a moment that breqn is just a scam and only changes the default between "linebreak" and "no linebreak", but then I discovered that something like \begin{dmath*} a+a+...\end{dmath*} actually produces what I'd want - it tries to fit as many as in a row as possible, but if there's too much of them moves them to the next line. Could it do the same for me but with =s?


a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a=a-- with "linebreaks in space-efficient places" or in any other manner. Might you be willing to provide a slightly more realistic use case? Oh, and why did you think, even for a moment, that "thatbreqnis just a scam"? – Mico Dec 25 '19 at 05:14a=a=...was just an example to illustrate how breqn works. I thought it actually can't automatically break lines, but it can, I just don't know how to make it do that at=. – acupoftea Dec 25 '19 at 16:52