I would like to have math mode expressions in dollar signs always to stay on the same line, which is what happens to a sequence of characters with no spaces while not in math mode. Is there a way to avoid having to do this manually by adding line breaks every time (which is terrible style, and gets very messy if one has to go back and change things, altering everithing that comes after)?
|
The following two lines put at the document preamble should help:
It is a good idea to add However, this will completely forbid implicit linebreaks inside inline mathematics. I don't think it is a good idea. Better idea would be to set the pelanties to some value that will discourage the breaks, but allow them if really necessary:
|
|||
|
|
The usual way to typeset a function is
(
will do. You can of course define a macro for this:
to be called as
but I believe this is unnecessary. Just check the line during the final revision, adding |
|||||||
|
\mbox{$...$}. Making this a rule seems a bit harsh, since longer expressions are typically allowed to break around binary and relational operators, which looks okay. – Werner Jan 4 at 19:42\mbox{$...$}solves this by making the whole expression stay on the first line, but that isn't exactly what I was after: I would like everything inside the dollar signs to be treated as it it were a sequence of characters with no spaces, so if it all doesn't fit on the first line, I would like it to be typeset on the line below that, adjusting spacing accordingly. Is this possible, maybe with a command in the preamble? – Emilio Ferrucci Jan 4 at 19:50\sloppyportion of the answer gave the intended result (i.e. preventing the overfull box). I should have been more explicit about that. – Scott H. Jan 4 at 20:23