I do not like it when my maths spills over onto a second line. For example, what I am currently doing spits out stuff like,
...just some talking then we have some maths Aut(G)
< H/K and lo! it has spilled onto another line...
However, I feel that the following is much neater,
...just some talking then we have some maths
Aut(G) < H/K and lo! it has not spilled onto another
line...
Is there anyway of getting LaTeX to do this for me? I thought the command \mbox
would work, or putting \relpenalty=10000' and
\binoppenalty=10000' in the preamble, but these are `dumb' and do not think - they will spit out,
...just some talking then we have some maths Aut(G) < H/K
and lo! it has spilled onto another line, and has
gone into the margin...
and we get the overspill into the margin. This is also true of the other fixes I have seen when I've been searching. I was wondering if there was some sort of `intelligent' thing, a package I could use or something I could put in the preamble, which makes math mode stick to the margins but keeps a block of maths on the same line.
Thanks in advance!
(There are two other `obvious' fixes:
I could use double dollar signs or square brackets to put my maths on a line of its own. However, I do use this for longer strings of maths, but for short things like Aut(G) < H/K this is just overkill and is distracting when you are reading it.
I could go through my document and look at every instance of this problem and either add words or take away words earlier in the paragraph to make the maths sit on one line. However, I am trying to write something which will render nicely using different class files, and this fix is very much dependent on the class file I will be using ('cause of font sizes, etc.))
\relpenalty
and\binoppenalty
as you did, plus\raggedright
. Of course, this will give you a ragged right margin, but you can't have everything, I guess. It may work better with some classes than others, you could trytufte-book
, for instance.\relpenalty=9999
and\binoppenalty=9999
and\tolerance=9999
, this way formulas would only be broken in a real emergency.