我正在使用 exsheets 创建练习。此包有为一系列问题添加副标题的选项。我的问题是,我不知道如何将副标题放在单独的行上。屏幕截图显示副标题“简化等”与练习标题在同一行。我希望副标题在练习标题下方的单独一行上。我查看了手册,但没有找到任何明显的内容。我目前正在使用以下 latex 代码:
\SetupExSheets{
headings = block-subtitle
}
\begin{question}[subtitle=Simplify the following expressions,subtitle-format=\normalsize]
\begin{tasks}(4)
\task $3x^2 + 2x^2$
\task $x^2 x^3$
\task $p^5 p^3$
\task $7 a^3 3 a$
\task $10 n^2 2 m^5$
\task $u^0 v^5$
\task $x^0 x^4$
\task $a^6/a^2$
\end{tasks}
\end{question}
答案1
将此代码添加到您的序言中:
\DeclareInstance{exsheets-heading}{block-subtitle}{default}{
join = {
title[r,B]number[l,B](.333em,0pt) ;
title[l,b]subtitle[l,t](0pt,0pt) % join subtitle to title (x offset, y offset)
} ,
attach = {
main[l,vc]title[l,vc](0pt,0pt) ;
main[r,vc]points[l,vc](\marginparsep,0pt)
}
}
\documentclass{article}
\usepackage{exsheets}
\SetupExSheets{
headings = block-subtitle
}
%*********************************** added <<<<<<<<<<<<
\DeclareInstance{exsheets-heading}{block-subtitle}{default}{
join = {
title[r,B]number[l,B](.333em,0pt) ;
title[l,b]subtitle[l,t](0pt,0pt) % join subtitle to title (x offset, y offset)
} ,
attach = {
main[l,vc]title[l,vc](0pt,0pt) ;
main[r,vc]points[l,vc](\marginparsep,0pt)
}
}
%***********************************
\begin{document}
\begin{question}[subtitle=Simplify the following expressions:,subtitle-format=\normalsize]
\begin{tasks}(4)
\task $3x^2 + 2x^2$
\task $x^2 x^3$
\task $p^5 p^3$
\task $7 a^3 3 a$
\task $10 n^2 2 m^5$
\task $u^0 v^5$
\task $x^0 x^4$
\task $a^6/a^2$
\end{tasks}
\end{question}
\end{document}
该 title[l,b]subtitle[l,t](0pt,0pt)
方法是将框的左下角title
与框的左上角 连接起来subtitle
,x 偏移量为 0pt,y 偏移量为 0pt。