3

I am using exsheets to create exercises. This package has the option to add a subtitle to a set of questions. My question is, I can't figure out how to put the subtitle on its own line. The screenshot shows the subtitle "Simplify etc" on the same line as the exercise title. I would like the subtitle on a separate line underneath the Practice Exercises title. I've looked through the manual but couldn't find anything obvious. I am currently using the following latex code:

 \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}

enter image description here

rhody
  • 1,020

1 Answers1

2

Add this code to your preamble:

\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)
    }
}

A

\documentclass{article}
\usepackage{exsheets}

\SetupExSheets{ headings = block-subtitle }

%*********************************** added <<<<<<<<<<<< \DeclareInstance{exsheets-heading}{block-subtitle}{default}{ join = { title[r,B]numberl,B ; title[l,b]subtitlel,t % join subtitle to title (x offset, y offset) } , attach = { main[l,vc]titlel,vc ; main[r,vc]pointsl,vc } } %***********************************

\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}

The title[l,b]subtitle[l,t](0pt,0pt) means join the left-bottom corner of the box title with the left-top corner of the box subtitle with an x-offset of 0pt and y-offset of 0pt.

Simon Dispa
  • 39,141