General ⇒ displaymath and top margin
displaymath and top margin
when I use the displaymath environment, there's a pretty large space between the text. Although I'd like a certain space there, the default one is much to big for me.
Does anyone know how to change it?
Sebastian
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: displaymath and top margin
Another possibility for a casual use is the command \useshortskip from the nncmath package. Also, one reason for a too large space might be the default \flushbottom for the layout of your document. Try to see what's happening if you set \raggedbottom in your preamble.
B.A.
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
displaymath and top margin
additionaly, just in case: do not let empty lines (paragraph breaks) before or after displaymath expressions.
balf already mentioned the lengths before and after math expressions, you can read it in even more detail in this math mode document 11.5 Vertical whitespace.
Stefan
displaymath and top margin
thanks for your answers.
That was my problem. Removing all line breaks solved it.additionaly, just in case: do not let empty lines (paragraph breaks) before or after displaymath expressions.
However, I'd really like to make a line break there in my .tex file, as otherwise, the tex-file becomes very messed up. Text and \begin{xyz} directly behind, \end{xyz} and text again. That's not very convenient to read.
Any ideas?
Sebastian
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
displaymath and top margin
[1] CQF.info :: View topic - displaymath and topmargin
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
displaymath and top margin
Just begin the otherwise empty line with a % symbol.seson wrote:Any ideas?
Stefan
displaymath and top margin
Thorsten: Sorry for that, but you didn't really engage in a race as you didn't even give an answer. Also, there was no "solution given in another forum", it was rather a link to this thread [1].
[1] LaTeX Community • View topic - displaymath and top margin
Sebastian