Hi,
I have mathematical expressions (eg. a < b < c) in sentences. I use $expression$ form. Sometimes, I get the entire expression in one line and at other times it breaks-off between two consecutive lines. Sometimes, the expression fits within the page margin in one line and at other times the entire expression sits in one line but a portion of it falls outside the margin. Sometimes, only comma or full-stop falls on the next line. Is there a smarter way to have automatic and sensible adjustment of such expressions or do I have to track such expressions every time and adjust length manually (say by using \mbox or \hspace)?
Thank you,
Omkar
General ⇒ Issue with adjusting equations in a line
NEW: TikZ book now 40% off at Amazon.com for a short time.

equation margin
Hello,
How do I control a mathematical portion of a statement (written as $*****$) from going out of the page margin? I did not see any pattern in it going out of margin at one place and being written on two consecutive lines by cutting the expression in between. Please find the attached document to see what I am talking about.
Thank you,
Omkar
How do I control a mathematical portion of a statement (written as $*****$) from going out of the page margin? I did not see any pattern in it going out of margin at one place and being written on two consecutive lines by cutting the expression in between. Please find the attached document to see what I am talking about.
Thank you,
Omkar
- Attachments
-
- margin issue.JPG (24.42 KiB) Viewed 3239 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Issue with adjusting equations in a line
I'm not aware of any automatism to get a line break as desired. Perhaps you can change some internal parameters to influence this behaviour.omkardpd wrote:[...] Is there a smarter way to have automatic and sensible adjustment of such expressions or do I have to track such expressions every time and adjust length manually (say by using \mbox or \hspace)? [...]
Code: Select all
\emergencystretch2em
\tolerance2000
Remark: Next time if you got no answer to a request, please use the old topic and bump it up by renewing your request with an additional post.
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Issue with adjusting equations in a line
Hi Thorsten,
Thank you for the prompt reply. Your suggestion has solved my problem. Sorry for putting up a separate request message with the same content.
Thank you once again.
Omkar
Thank you for the prompt reply. Your suggestion has solved my problem. Sorry for putting up a separate request message with the same content.
Thank you once again.
Omkar
Issue with adjusting equations in a line
TeX can break inline math expressions after relational (<, >, …) and binary (+, −, …) operators. Your first example contains such an operator, your second doesn't. You should see the warning "overfull \hbox" during compilation.omkardpd wrote:I did not see any pattern in it going out of margin at one place and being written on two consecutive lines by cutting the expression in between.
Changing the hyphenation parameters is possible, but can lead to unpleasant line breaks. Sometimes it is better to convert longer inline formulas to displayed equations.