5

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.

1

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}

...

\begin{adjustbox}{width=\textwidth}
  \begin{table}{...}
     ...
  \end{table}
\end{adjustbox}

(Works also for figures and everything else.) This might result in a very small font size.

2

The answers to this TeX.SE question describe the difficulty of your question. (Unfortunately, TeX is unwilling to see an overfull hbox and fix it for you.)

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.