exsheets:如何使用 skip-below 自定义标题

exsheets:如何使用 skip-below 自定义标题

我用它exsheets来制作习题集和工作表。我制作了一个自定义标题,但现在skip-below键不起作用:

\documentclass{article}
\usepackage{exsheets}

\DeclareInstance{exsheets-heading}{runin-subtitle}{default}{
    runin=true,
    number-post-code = \PrintQuestionClassT{extension}{\ExtensionSymbol}%print superscript star after a question if extension key has nonempty value.
        \space,
    subtitle-pre-code  = (,
    subtitle-post-code = )\space,
    points-pre-code  = (,
    points-post-code = ),
    join = {
        main[r,vc]number[l,vc](-0.333em,0pt);
        main[r,B]subtitle[l,B](0em,0pt);
    },
    attach = {
        main[l,vc]points[l,vc](\linewidth+\marginparsep,0pt)
    }
}
\SetupExSheets{
    headings=runin-subtitle, %If I comment out my custom heading, skip-below works fine.
    skip-below=4em,
    }

\begin{document}

    \begin{question}
        Is this the first question?
    \end{question}

    \begin{question}
        Was that really the first question?
    \end{question}

    \begin{question}
        How many questions are there?
    \end{question}

    \begin{question}
        What is a question?
    \end{question}

    \begin{question}
        Why is there so little vertical space between all these questions?
    \end{question}


\end{document}

输出

在此处输入图片描述

如您所见,skip-below=4em没有任何效果。如果我删除自定义标题,skip-below则效果如预期。

我如何使用skip-below我的自定义标题?

答案1

skip-below并且标题skip-above被禁用runin。(这就是现状——不过,这可能会引起争议。改变当前行为可能有原因。)

使用问题post-body-hookpost-hook选项仍然可以添加\par\vspace{4em}

\SetupExSheets{
  headings  = runin-subtitle ,
  post-hook = \par\vspace{4em}
}

相关内容