Long answer text in catalog mode for open questions

Added by Agustin Martin over 2 years ago

[Liquid Syntax Error] Tag '{%' was not properly terminated with regexp: /\%\}/
Hi, I am interested in the possibility of having a printed answer for open questions only in catalog mode, that could be easily preserved when new questions are added or old filled catalog lost. I am aware of the answer key, but it seems to be for more than the catalog mode, and is not the most comfortable way, need to play with boxes for every use. Looking at how answer key is used, I defined a function that sets the value answer key sets, but only in catalog mode, (AMD stand for my initials, to avoid messing with real AMC stuff, rename as appropriate if found interesting) <pre> \makeatletter \def\AMDSetCatalogOpenAnswer#1{ \ifx\CatalogExterne\undefined\else \def\AMCopen@answer{% \parbox[b]{0.98\linewidth}{#1} } \fi } \makeatother </pre> It seems to be working reasonably, filling answer box of open questions from bottom. It allows text, displaymath and friends, although does not allow blank lines (I would have expected parbox to allow that). Allowed space should be enough, it is the space we allow the students to use. ¿Someone knows of a better way? I may have looked too quickly, but seems I did not find it in manuals.

Replies (1)

RE: Long answer text in catalog mode for open questions - Added by Agustin Martin over 2 years ago

Modified to make \def \long\def to allow multiple paragraphs and use \AMCopen@Width


\makeatletter 
\long\def\AMDSetCatalogOpenAnswer#1{
  \ifx\CatalogExterne\undefined\else
  \def\AMCopen@answer{\parbox[b]{\AMCopen@Width}{#1}}
  \fi
}
\makeatother

(1-1/1)