How do I remove the extra space added before and after sub-bullets in a quarto PDF document? [Apparently I need more text before stackoverflow will allow me to post this question. But my question is pretty straight-forward. I just want to get rid of the ugly and confusing white space that's added into the middle of my list.]
---
title: "test list"
format: pdf
---
1. First
2. Second
+ sub 1
3. Third
How do I remove the extra space added before and after sub-bullets in a quarto PDF document? [Apparently I need more text before stackoverflow will allow me to post this question. But my question is pretty straight-forward. I just want to get rid of the ugly and confusing white space that's added into the middle of my list.]
---
title: "test list"
format: pdf
---
1. First
2. Second
+ sub 1
3. Third
Share
Improve this question
edited Jan 17 at 18:55
Jan
9,4886 gold badges20 silver badges33 bronze badges
asked Jan 17 at 15:39
filups21filups21
1,9271 gold badge23 silver badges29 bronze badges
1
|
1 Answer
Reset to default 4since you render your quarto with LaTeX to PDF, we can add a cutom header to overwrite the enumerate
(1.,2.,3.,...) and itemize
(bulletpoints) like this:
---
title: "test list"
format:
pdf:
include-in-header:
text: |
\usepackage{enumitem}
\setlist[itemize]{topsep=0pt,itemsep=0pt,partopsep=0pt,parsep=0pt}
\setlist[enumerate]{topsep=0pt,itemsep=0pt,partopsep=0pt,parsep=0pt}
---
1. First
2. Second
+ sub 1
3. Third
css
code chunk doesn't make any difference on the spacing:{css, echo = FALSE} <style> li > p:has(+ul) { margin-bottom: 0; } </style>
– filups21 Commented Jan 17 at 15:42