# why changing page margins using geometry package causes bad math inline break?

I had no idea that changing page margin size can cause problems with line break with in-line math. I have this MWE that shows one problem.

I like to make the page margins smaller, so I can fit more things on the page. But when I do that, sometimes I notice problems, like this:

\documentclass[12pt]{article}
%uncommenting this line below shows the problem
%\usepackage[left=.7in,right=.7in,top=.9in,bottom=.9in]{geometry}

\begin{document}
So the point $p$ appears to move is the opposite direction with tangential
acceleration $-\left( \sqrt{13}\dot{\omega}_{3}\right) \sin\theta \mathbf{i-}\left( \sqrt{13}\dot{\omega}_{3}\right) \cos\theta\mathbf{k}$ and
normal acceleration $-\left( \sqrt{13}\omega_{3}^{2}\right) \cos \theta\mathbf{i+}\left( \sqrt{13}\omega_{3}^{2}\right) \sin\theta\mathbf{k}$
Where $\theta=\tan^{-1}\left( \frac{3}{2}\right)$, hence $\cos\theta =\frac{2}{\sqrt{13}}$ and $\sin\theta=\frac{3}{\sqrt{13}}$therefore%
\end{document}


Using TL 2013. ps. code above is auto-generated.

Do I really have to worry about these problems if I change page size? I thought Latex math breaking algorithm is supposed to take care of these things automatically? Or Am I doing something wrong?

• TeX only breaks math content at specific locations - around binary relations and operators. Not around "atoms". So, of course, changing the geometry could cause different elements to fall close to the line-break, causing the problem. In such cases, rewording the sentence is a viable option for changing the breaking point (apart from initiating possible breaking points inside the math structure).
– Werner
Oct 22 '13 at 22:29
• @Werner thanks. I had no idea. This means each time one changes page margin, they need to go review it all over and change latex code if needed. The problem, I never can make up my mind on what margin size to use, and keep changing them all the time. Oct 22 '13 at 22:32
• That "never" has to have an end, which should be just before you consider the work to be complete (publishing, archiving, or whatever). Then you can skim over the entire document and take care of such (minor) things.
– Werner
Oct 22 '13 at 22:34
• tex doesn't break lines between \left..\right so if you want line breaking you should remove most of those. (there is also a space missing before therefore) Oct 22 '13 at 22:59
• If you write longer paragraphs with more text then TeX paragraph engine tends to be kinder to you, because it has more potential break points to play with. It's also important not to omit periods (like you have before "Where") or spaces (as you have before "therefore") as these all affect the paragraph breaking algorithm. TeX considers the whole paragraph when trying to come up with the best set of line breaks. You might also like to make your formulae shorter: eg use $r\sin\theta...$ instead of writing the explicit value. Oct 22 '13 at 22:59