Text Formatting\partopsep vs \topsep

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
LaTexLearner
Posts: 139
Joined: Tue Mar 10, 2015 11:06 am

\partopsep vs \topsep

Post by LaTexLearner »

Quick question:

I'm making lists using enumitem. What is the difference between \partopsep and \topsep? I've been fiddling around with it on overleaf.com and don't quite get it...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

\partopsep vs \topsep

Post by cgnieder »

Both are list parameters.
  • \topsep the rubber space between the first item of a list and the preceding paragraph.
  • \partopsep an extra rubber space which is added to \topsep when the list environment starts a new paragraph.
A rubber space is a length which can contain shrinkable and stretchable parts.
site moderator & package author
LaTexLearner
Posts: 139
Joined: Tue Mar 10, 2015 11:06 am

Re: \partopsep vs \topsep

Post by LaTexLearner »

How would a list not start a new paragraph? Do you mean the kinds of lists that are inline with the rest of the text? (Not that I have much knowledge or experience with those.)
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

\partopsep vs \topsep

Post by cgnieder »

It depends if the list preceded with a blank line (or a \par) or not. Compare

Code: Select all

Here is some text
\begin{itemize}
  \item and a list \emph{not} starting a paragraph
with

Code: Select all

Here is some text

\begin{itemize}
  \item and a list starting a paragraph
site moderator & package author
Post Reply