What takes the place of \AMC@boxedchar

Added by David Dixon about 6 years ago

For a very long time I've used AMC to generate randomized-answer quiz slides similar to beamer. The answer letters (A,B,C,D,E) are in solid-colored boxes. This was done using the code below (which I picked up online a long time ago)

\makeatletter
\renewcommand\AMC@boxedchar[4]{\AMC@LR{\hspace{0pt}%
  {\ifx\@empty#2\@empty \def\AMC@boxcolor{black}\fi%
   \ifAMC@correc\def\AMC@boxcolor{black}\fi%
   \lower\AMC@boxeddown\hbox{\csname AMC@shape@\AMC@shapename\endcsname%
     {\AMC@boxcolor}%
     {\ifx\@empty#4\@empty red\else\AMC@boxcolor\fi}{#2}{#3}{\AMCchoiceLabelFormat{#1}}}}}%
}
\makeatother

AMC 2.3.0 now complains that \AMC@boxedchar is undefined. Any suggestions on how to modify this to work now gratefully accepted.


Replies (2)

RE: What takes the place of \AMC@boxedchar - Added by Alexis Bienvenüe about 6 years ago

AMC internals changed. Try to find white in the LaTeX style file to see where you should redefine something. With the current development version (1.4.0~beta1), this leads to something like

\makeatletter
\renewcommand\AMC@setcolors@[2]{%
  \def\AMC@boxcolor@{\AMC@boxcolor}%
  \ifx\@empty#1\@empty \def\AMC@boxcolor@{black}\fi%
  \ifAMC@correc\def\AMC@boxcolor@{black}\fi%
  \def\AMC@fillcolor@{\ifx #2\AMC@checkedbox%
    \AMC@boxcolor@\else red\fi}%
  \AMC@draw@crossfalse%
  \ifKV@AMCdim@cross\ifx #2\AMC@checkedbox%
    \AMC@draw@crosstrue\fi\fi%
}
\makeatother

RE: What takes the place of \AMC@boxedchar - Added by David Dixon about 6 years ago

Perfect - that solves the problem - thanks!

I have a snippet that formats beamer-like slides of AMC questions. I use it for quizzes so that the questions and answers are in a different order from section to section of the same term, and from term to term. I can make it available if you think anyone would be interested.

Thanks again!

(1-2/2)