1

I want to make an test/exam with only true or false questions and I want to make a page where the students could mark only T or F, without the questions in it. And I want it to show the answers when I need.

Any help?

1
  • Generally, putting answers on separate sheets is done for automatic grading machines. If you intend to reuse the question sheet, be warned that people often write on them anyway. Mar 5, 2019 at 17:15

1 Answer 1

4

A tricky way: You set a command \status storing the status (answer sheet or answer key) of the document.

If you want to hide the answer keys, set it to white. Set it to black otherwise.

You are in the answer key:

\documentclass{article}
\usepackage{color}
\def\status{black}
\begin{document}
%\renewcommand{\status}{white}
\begin{enumerate}
    \item \underline{\quad\textcolor{\status}{T}\quad} Foo bar
    \item \underline{\quad\textcolor{\status}{F}\quad} Dummy text
    \item \underline{\quad\textcolor{\status}{F}\quad} Hello world
    \item \underline{\quad\textcolor{\status}{T}\quad} Loren lipsum
    \item \underline{\quad\textcolor{\status}{T}\quad} There is something in the sky.
\end{enumerate}
\end{document}

enter image description here

You are in the answer sheet:

\documentclass{article}
\usepackage{color}
\def\status{black}
\begin{document}
\renewcommand{\status}{white}
\begin{enumerate}
    \item \underline{\quad\textcolor{\status}{T}\quad} Foo bar
    \item \underline{\quad\textcolor{\status}{F}\quad} Dummy text
    \item \underline{\quad\textcolor{\status}{F}\quad} Hello world
    \item \underline{\quad\textcolor{\status}{T}\quad} Loren lipsum
    \item \underline{\quad\textcolor{\status}{T}\quad} There is something in the sky.
\end{enumerate}
\end{document}

enter image description here

One can define a new command based on \item to make this easier.

1
  • 1
    You could also use \pdfcomment[opacity=\status]{T/F} (pdfcomment package) in case the paper isn't white.. Mar 5, 2019 at 17:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .