I'm re-platforming a math paper I'm writing from Word to TeXShop and one formula extends into the right page boarder. The LaTex I am using is:
(I pasted the image above because the brackets [ ] didn't show up when I pasted the text here.)
In MathJax on Mathematics Stack Exchange it looks like this:
In TeXShop it looks like this:
I have include some text in the last image to show how it extends beyond the normal word-wrap on the page. Ideally, I would like to keep the formula on one line to save vertical space. Is there a way to shrink the equation horizontally or do I have to break it up into two parts?




$$in latex and never use\\in display math. It would be more readable if you used the amsmath multline enviornment to split it over two lines, but you could use\smallor\footnotesizeor whatever size is needed if you really must keep it on one line – David Carlisle Sep 04 '19 at 20:20{}button in the editor, preferably as a complete small test document) posting code as an image makes it hard for anyone to test answers – David Carlisle Sep 04 '19 at 20:21breqn, but then more robust. – Marijn Sep 04 '19 at 20:31$is for inline math, you should use\[...\]for display math and do not use\\to post code highlight the code and then use the{}button, (mathjax is not running on this site so tex in the page does not display as formatted math) – David Carlisle Sep 04 '19 at 21:36\scalebox, as in\[\scalebox{.8}{$\displaystyle y = \frac{a}{2}x + b$} \], the unscaled equivalent being\[ y = \frac{a}{2}x + b \](graphicxpackage required) – Steven B. Segletes Sep 05 '19 at 12:00