Poner soluciones junto a las opciones T/F

Poner soluciones junto a las opciones T/F

Configuración

Tengo el siguiente MWE:

  \documentclass[addpoints,12pt]{exam}

  \usepackage{color}
  \usepackage{amsmath}
  \usepackage{amssymb}

  \checkboxchar{$\Box$}
  \checkedchar{$\blacksquare$}

  \bracketedpoints
  \shadedsolutions
  \renewcommand{\solutiontitle}{\noindent\textbf{Solution:}\par\noindent}


  \begin{document}

  \textbf{\textsc{True/False:}  [1pt each]}
  \vspace{0.1in}
   \begin{questions}

   \question Every normal distribution has a bell-shaped graph.

   \begin{oneparcheckboxes}
   \correctchoice T
   \choice F
   \end{oneparcheckboxes}

   \question If $X$ is a binomial random variable, then $X$ is approx. normal.

  \begin{oneparcheckboxes}
  \choice T
  \correctchoice F
  \end{oneparcheckboxes}

  \question Why did the chicken cross the road?
  \begin{solution}[1.0in]
  To get to the other side!
  \end{solution}

  \end{questions}
  \end{document}

Lo que produce un examen perfectamente bueno (corto). Ahora, si agrego la answersopción, es decir, cambio la primera línea a \documentclass[addpoints,12pt,answers]{exam}, aparecerán las opciones T/F correctas y una solución para la pregunta de respuesta corta.

Pregunta

Lo que también me gustaría hacer es agregar una solución breve de una línea junto a cada pregunta V/F, con algún razonamiento. Esta solución:

  • tener fondo sombreado
  • estar en la misma línea que las opciones T y F
  • sólo estar presente cuando answersse da la opción

¿Hay una forma fácil de hacer esto?

Respuesta1

Creé \explanation, para agregarlo al final del oneparcheckboxesentorno T/F.

  \documentclass[addpoints,12pt,answers]{exam}

  \usepackage{color}
  \usepackage{amsmath}
  \usepackage{amssymb}

  \checkboxchar{$\Box$}
  \checkedchar{$\blacksquare$}

  \bracketedpoints
  \shadedsolutions
  \renewcommand{\solutiontitle}{\noindent\textbf{Solution:}\par\noindent}
  \definecolor{SolutionColor}{gray}{0.8}
  \def\explanation#1{%
    \ifprintanswers\mdseries\colorbox{SolutionColor}{\strut #1}\fi}

  \begin{document}

  \textbf{\textsc{True/False:}  [1pt each]}
  \vspace{0.1in}
   \begin{questions}

   \question Every normal distribution has a bell-shaped graph.

   \begin{oneparcheckboxes}
   \correctchoice T 
   \choice F
   \explanation{Explanation goes here}
   \end{oneparcheckboxes}

   \question If $X$ is a binomial random variable, then $X$ is approx. normal.

  \begin{oneparcheckboxes}
  \choice T
  \correctchoice F
   \explanation{Another explanation goes here}
  \end{oneparcheckboxes}

  \question Why did the chicken cross the road?
  \begin{solution}[1.0in]
  To get to the other side!
  \end{solution}

  \end{questions}
  \end{document}

ingrese la descripción de la imagen aquí

información relacionada