# Applying breqn in bulk to typeset a math book for my kindle?

I'm trying to typeset this book for my Kindle: http://linear.ups.edu/

Unfortunately some of the equations result in overfull hboxes, and I can't read them.

Though I've managed to manually convert some of the examples, the process is very difficult. The tricky bits primarily involve removing alignment markers from amsmath align environments, and nesting each sub-equation in its own \begin{dmath*}... For example:

\begin{align*}
2x+3y-4z&=13
&
4x_1+5x_2-x_3+x_4+x_5&=0
&
9a-2b+7c+2d&=-7
\end{align*}


(I've not even begun trying to figure out tables, so automatically scaling those would also be nice!)

Perhaps there is a simple way to automatically wrap or scale all equasions/tables? I'm not so concerned with them looking that good yet, my first priority is being able to see them...

I based my approach on LaTeX options for kindle? but this type of conversion is too much even with liberal application of Perl.

If you just want to change the size, so that it fits to the page, you can use the adjustbox package, see also this answer:

\usepackage{adjustbox}

...


As noted in section 6 of this document, changing the align* environment is messy and difficult. You mention Perl—have you tried writing a script to scan the TeX source and delete each instance of & or \\ between \begin{align*} and \end{align*} and then change each align* to breqn? Any sort of useful solution to your problem will have to involve mass automated editing of this sort.