How can I fine tune and reduce the vertical spacing of list items and nested lists so characters from lines above and below are almost pixel-touching each other?
Example:
UPDATE 1:
@egreg:
When I try:
\begin{enumerate}[label=\arabic*.,before*=\tighten,noitemsep]
\item List 1
\begin{enumerate}[label=\Alph*.,before*=\tighten,noitemsep]
\item Item Aabcg
\item Item Bagcb
\item Item Cabcg
\item Item Dagcb
\end{enumerate}
\end{enumerate}
there is a tall space between List 1
and Item Aabcg
Can you further modify your answer to fix this?
UPDATE 2:
@egreg:
Thanks but I still get:
1. List 1
A. Item Aabcg
B. Item Bagcb
C. Item Cabcg
D. Item Dagcb
Can you get rid of that space between List 1
and Item Aabcg
to get:
1. List 1
A. Item Aabcg
B. Item Bagcb
C. Item Cabcg
D. Item Dagcb
Best Answer
Based on the answer to this other question, here is a solution that preserves even distance between baselines.
Then the list can be input as
Minimal example:
Checking the output with
\showbox
proves that the spacing is the same: between the "List 1" line and the "Item A" line, TeX inserts 3.16669pt glue, exactly the same as the glue inserted between the "Item A" and the "Item B" lines (and the others as well), which is right, since those lines have no descenders. The height of the "Item A" line is 6.83331pt, which added to 3.16669pt gives 10pt.There might be a slight difference in a real document if
\topsep
in the inner list is not set to zero (thenolistsep
key sets it to0pt plus 0.1pt
), but not with the article class which does\raggedbottom
.