# Boxes as in True or False mode

Basically what I want to achieve is something like this.

Well i want to enumerate my questions but I want to have two boxes one for true and one for false also. So I need a third column next to the existing one for False. Also, I want the boxes to be a little smaller.(I don't think that this would be a problem to minimize the boxes). The problem is that I don't know how to achieve such a result. I have searched through TeX Stack Exchange and I have not come up with something similar and I want such a result for a book I am writing.

Any help is appreciated.

• surely you don't need tikz, just something like \hfill\fbox{ } \fbox{ } ? – David Carlisle Dec 15 '15 at 12:20

## 2 Answers

One could also use tabular or tabularx.

\documentclass{article}
\usepackage{tabularx}
\newcounter{abc}
\renewcommand{\theabc}{\stepcounter{abc}\alph{abc}}
\newcommand{\answerbox}{\fbox{\phantom{M}}}
\begin{document}
\def\arraystretch{2}% increase vertical spacing
\noindent\begin{tabularx}{\textwidth}{cXcc}
& & T & F\\
(\theabc) & Fungi depend on plants and animals for food & \answerbox & \answerbox\\
(\theabc) & Ferns and mold are fungi because the reproduce from spores & \answerbox & \answerbox\\
(\theabc) & Bacteria are harmful to our body & \answerbox & \answerbox\\
(\theabc) & Yeast is a tiny living thing & \answerbox & \answerbox
\end{tabularx}
\end{document}


At this point you might consider a further simplification of the form

\newcommand{\tfq}[1]% #1 = question
{\stepcounter{abc}(\alph{abc}) & #1 & \answerbox & \answerbox}

• I am accepting this as it is simpler than the above.Thank you! – Tolaso Dec 15 '15 at 20:06
• @Tolaso: Simpler is relative -- in this solution you have to add the answer boxes manually each time ;-) – user31729 Dec 16 '15 at 5:07
• Yes, I know that, but for the purpose I want it (in the book that I write) I will have to do it manually anyway. But I upvoted your answer as well. :) – Tolaso Dec 17 '15 at 9:56

An automated approach:

Add all questions to expl3 seq variable and show them afterwards using \seq_map_inline, filling with the boxes.

\documentclass[a4paper]{article}

\usepackage{enumitem}
\usepackage{xparse}

\ExplSyntaxOn
\seq_new:N \l_tolaso_question_seq
\NewDocumentCommand{\AddQuestions}{m}{%
\seq_set_split:Nnn \l_tolaso_question_seq {,} {#1}%
}

\NewDocumentCommand{\ShowQuestions}{}{%
\begin{enumerate}[label={(\alph*)}]
\seq_map_inline:Nn \l_tolaso_question_seq { \item ##1 \hfill \fbox{ }\hskip20pt \fbox{ }}
\end{enumerate}
}
\ExplSyntaxOff

\begin{document}

\AddQuestions{Fungi,Other Fungi are,Bacteria are harmful to our body, Virus, Brontosaurs were large}

\ShowQuestions

\end{document}