0

I am using the exsheet package and want the solutions to appear directly after the question, without a title or a number.

\usepackage{exsheets}
\newcommand{\newquestion}[3]{
    \begin{question}[name=Question, subtitle=#1]
        #2
    \end{question}
    \begin{solution}[name=, print=true]
        #3
    \end{solution}
}

However, this prints out a number for each solution. For instance, the output of \newquestion{My question}{Is this a question?}{Yes} looks like

Question 1: My question
  Is this a question?
1:
  Yes

whereas I would like something like

Question 1: My question
  Is this a question?

  Yes

I looked at the options in the documentation, but haven't found how to do this.

1
  • 4
    BTW: exsheets is not developped any more. The successor package is xsim
    – cgnieder
    Feb 8, 2020 at 12:11

1 Answer 1

4

Use the empty headings instance for solutions:

\documentclass{article}
\usepackage{exsheets}

\SetupExSheets{
  solution/print = true ,
  question/name = Question ,
  headings = block-subtitle ,
  solution/headings = empty
}

\begin{document}

\begin{question}[subtitle=topic]
  My question
\end{question}
\begin{solution}
  The solution
\end{solution}

\end{document}

enter image description here

1
  • In the solution environment, the headings option can be added: \begin{solution}[print=true, headings=empty] #3 \end{solution}
    – usernumber
    Feb 8, 2020 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.