newif to render correct answer in catalog or answers mode for open questions (Feature #156)
Description
I was wondering if one could use a LaTeX \ifXXX to check if a the catalog or answers option is set,
such that I can include the answers for open questions in the question source files.
This would be help full to not only to have the questions but the answers in the same file too.
I would use it something along the line
\ifAMCAnswers the answer (text, picture, table or whatever) \else the open space to be used by the student or a figure to be completed etc. \fi
History
Updated by Alexis Bienvenüe about 12 years ago
- Description changed from I was wondering if one could use a LaTeX \ifXXX to check if a the catalog ... to I was wondering if one could use a LaTeX \ifXXX to check if a the catalog ... More
Updated by Alexis Bienvenüe about 12 years ago
This is \AMC@correc
(mind the "@
" in the name). See /usr/share/doc/texmf/AMC/automultiplechoice.pdf.gz
for details.
Updated by Pieter Van den Hombergh about 12 years ago
Thank you for the quick answer.
I am using it as follows:\newtoggle{AMCAnswers}
\ifAMC
@correc\toggletrue{AMCAnswers}\else\togglefalse{AMCAnswers}\fi
in a style file, because of the @
character
and then use it as
@\iftoggle{AMCAnswers}{@ Answers }{ question box }@\toggle{AMCAnswers}@
which requires the
\usepackage{etoolbox}
which is ok for me.Updated by Alexis Bienvenüe about 12 years ago
in a style file, because of the @ character
Yes. You can also enclose this line between \makeatletter
and \makeatother
.
Updated by Pieter Van den Hombergh about 12 years ago
Alexis Bienvenüe wrote:
in a style file, because of the @ character
Yes. You can also enclose this line between
\makeatletter
and\makeatother
.
Created a small entry on the forum to that effect.[[http://project.auto-multiple-choice.net/boards/2/topics/1014]]
Updated by Alexis Bienvenüe almost 12 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed