- 为什么当我创建一个新的长度并将其设置为时
\parskip
,它会变成 0?(参见 MWE 的前面部分)
- 我希望列表显示在文本正下方,并在其后开始一个段落。这样做时,如果列表后出现一个部分,则间距太大;我相信是因为我
after=\vspace{...}
在 itemize 定义中使用了它。
- 有没有办法设置某种软垂直跳过?或者也许模糊是正确的词。如果后面除了节之外还有别的内容,请使用
\parskip
,如果后面有节,请尊重它想要的跳过?
- 如果列表出现在某个部分之后,我需要使用它
before=\hfill
来确保列表具有适当的间距,为什么?我不是在空白行上使用 \hfill 吗?也许这会将 LaTeX 更改为水平模式?否则列表会告诉它进入垂直模式吗?
\documentclass[parskip=full]{scrartcl}
\usepackage{printlen}
\newlength{\ParSkipAmount}
\setlength{\ParSkipAmount}{13.6pt plus 1.36 pt} % determined by baseline skip
%\setlength{\ParSkipAmount}{\parskip} % why does this go to 0 if I uncomment it??
\usepackage{enumitem} %
\setlist{nosep} %
\setlist[itemize]{
topsep=-\ParSkipAmount,% removes parskip,
before=\hfill, % makes top of list appear in correct spot after section
after=\\}% this cancels topsep
\newcommand{\examplelist}{%
\begin{itemize}
\item One
\item Two
\end{itemize}
}
\begin{document}
\uselengthunit{pt}\printlength{\parskip}, parskip \newline
\uselengthunit{pt}\printlength{\ParSkipAmount}, ParSkipAmount. \newline
Why is it that if I set ParSkipAmount equal to parskip, it becomes 0?
\subsection{This section demonstrates the spacing I want}
First paragraph.
I like the list to appear right below text (via topsep)
\examplelist
And the next part to be a new paragraph (via after).
\subsection{See how the spacing below this header and the following list is the same as the space for the previous section's header and ''First Paragraph''? It was smaller if I did not use before=hfill... why?}
\examplelist
\subsection{And also see how the space above this header is larger than that of the space before the previous section header? How do I get rid of the vspace on the after if there is a following section/subsection (by using setlist or patching)?}
\end{document}