如何在问题和下面的行之间添加垂直空间

如何在问题和下面的行之间添加垂直空间

抱歉,问题措辞不当。

我希望问题 (\task Multiply 0.5 by 10.) 和其下方的行 ($0.5 \times 10 &= \rule{4cm}{0.1mm}$) 之间有更多空间。我尝试使用 \vspace{},但它不会在两行之间添加垂直空间。

我通常使用 \questions 环境和 paracols 来避免此类问题。但是,我正在使用另一个文档类,不确定如何在没有 exam 类的情况下使用 questions 环境。

感谢您的帮助。

    \documentclass[
  a5paper,
  % pagesize,11pt,% both are default and therefore not needed
  bibliography=totoc,% bibtotoc is deprecated and therefore replaced according
                     % to the warning message
  numbers=noenddot,% pointlessnumbers is deprecated and therefore replaced
                   % according to the warning message
  headings=normal,% normalheadings is deprecated and therefore replaced
                  % according to the warning message
  DIV=9,twoside=false,
  headsepline,footsepline,footinclude=false,% see the KOMA-Script manual
headheight=87pt,% not used, to not lower the header, but this results in a warning
footheight=52pt, % no longer needed, because the lines are not part of the footer
]{scrbook}

\KOMAoptions{DIV=last}

\usepackage{trajan}

\usepackage{setspace}

\linespread{1.05}

\KOMAoptions{DIV=last}% moved according to the KOMA-Script manual, because it
                      % makes no sense before changing font an linespread.

\usepackage{graphicx}

\usepackage[%
  autoenlargeheadfoot=false,% only warn but don't change height reserved for header or footer  
  manualmark,% or maybe automark, this is not clear due to missing information
             % in the question.
  plainheadsepline,plainfootsepline,% See the KOMA-Script manual for more information
  ]{scrlayer-scrpage}

\usepackage{geometry}
 \geometry{
 a5paper,
 total={100mm,200mm}, %not sue what this line is either.
 left=15mm,
 right=15mm,
 top=30mm,
 bottom=35mm,
 headsep=2mm,
 }

\usepackage{multicol,amsmath,amsfonts}
\usepackage{enumitem}
\usepackage{tasks}

 \begin{document}

 \begin{enumerate}
     \item Fill in the blanks.
            \begin{tasks}[label=\alph*), label-width=1.5em, after-item-skip=10pt](1)
                \task Multiply 0.5 by 10.
                    
                    $0.5 \times 10 &= \rule{4cm}{0.1mm}$
                
                \task Multiply 0.11 by 10.
    
                    $0.11 \times 10 &= \rule{4cm}{0.1mm}$
                    
            \end{tasks}
\end{enumerate}
 \end{document}

答案1

您可以使用不可见的垂直规则(0pt宽度规则)局部强制行高。例如,1cm为了确保答案,请尝试

\rule{0pt}{1cm}\rule{4cm}{0.1mm}

由于答案行数较多,最好定义一个专用的宏

\newcommand*{\answerline}{\rule{0pt}{1cm}\rule{4cm}{0.1mm}

更好的是,如果本地需要更大的答案行,则添加一个可选参数

\newcommand*{\answerline}[1][4cm]{\rule{0pt}{1cm}\rule{#1}{0.1mm}}

完整代码

\documentclass[
  a5paper,
  % pagesize,11pt,% both are default and therefore not needed
  bibliography=totoc,% bibtotoc is deprecated and therefore replaced according
                     % to the warning message
  numbers=noenddot,% pointlessnumbers is deprecated and therefore replaced
                   % according to the warning message
  headings=normal,% normalheadings is deprecated and therefore replaced
                  % according to the warning message
  DIV=9,twoside=false,
  headsepline,footsepline,footinclude=false,% see the KOMA-Script manual
headheight=87pt,% not used, to not lower the header, but this results in a warning
footheight=52pt, % no longer needed, because the lines are not part of the footer
]{scrbook}

\KOMAoptions{DIV=last}

\usepackage{trajan}

\usepackage{setspace}

\linespread{1.05}

\KOMAoptions{DIV=last}% moved according to the KOMA-Script manual, because it
                      % makes no sense before changing font an linespread.

\usepackage{graphicx}

\usepackage[%
  autoenlargeheadfoot=false,% only warn but don't change height reserved for header or footer
  manualmark,% or maybe automark, this is not clear due to missing information
             % in the question.
  plainheadsepline,plainfootsepline,% See the KOMA-Script manual for more information
  ]{scrlayer-scrpage}

\usepackage{geometry}
 \geometry{
 a5paper,
 total={100mm,200mm}, %not sue what this line is either.
 left=15mm,
 right=15mm,
 top=30mm,
 bottom=35mm,
 headsep=2mm,
 }

\usepackage{multicol,amsmath,amsfonts}
\usepackage{enumitem}
\usepackage{tasks}

\newcommand*{\answerline}[1][4cm]{\rule{0pt}{1cm}\rule{#1}{0.1mm}}

\begin{document}

 \begin{enumerate}
     \item Fill in the blanks.
            \begin{tasks}[label=\alph*), label-width=1.5em,
              after-item-skip=10pt](1)

                \task Multiply 0.5 by 10.

                    $0.5 \times 10 = \answerline$

                \task Multiply 0.11 by 10.

                    $0.11 \times 10 = \answerline[6cm]$
            \end{tasks}
\end{enumerate}

 \end{document}

答案线宏

相关内容