# Create a two column static small box

how can I create a new command to make a static true and false as labels of the first and two columns. This columns are lanes of small boxes. This small boxes would depend on the questions created. If there are four questions created then the command will provide four rows with two small boxes.This is an example of what i am saying.

what I actually visualize in coding the .tex file for with the command

## Code

\question This is a sample short text. \twoboxes

i am still thinking if this can be right..

-
–  Werner Nov 28 '12 at 15:07

A poor man's solution using longtable:

\documentclass{article}
\usepackage{amssymb,graphicx}
\usepackage{array}
\usepackage{longtable}
\newcounter{rowno}
\setcounter{rowno}{0}
\renewcommand\arraystretch{2}
\newcommand{\mybox}{\resizebox{.5cm}{!}{\raisebox{-.5ex}{$\Box$}}}
\begin{document}
\begin{longtable}{>{\stepcounter{rowno}\therowno.}cp{.5\textwidth}@{\hspace{5\tabcolsep}}cc}
\multicolumn{1}{r}{}&  & \fbox{\parbox{.75cm}{True}} & \fbox{\parbox{.75cm}{False}}  \\
& This is a sample text. & \mybox  & \mybox  \\
& This is another sample short text. & \mybox  & \mybox  \\
& This is a long line containing text and wrapping into second line without hitting the boxes & \mybox  & \mybox
\end{longtable}

\end{document}


The boxes can be automatically included as in this code (Thanks to Gonzalo):

\documentclass{article}
\usepackage{amssymb,graphicx}
\usepackage{array}
\usepackage{longtable}
\newcounter{rowno}
\setcounter{rowno}{0}
\renewcommand\arraystretch{2}
\newcommand{\mybox}{\resizebox{.5cm}{!}{\raisebox{-.5ex}{$\Box$}}}
\begin{document}
\begin{longtable}{>{\stepcounter{rowno}\therowno.}cp{.5\textwidth}@{\hspace{5\tabcolsep}}
>{\mybox}c >{\mybox}c }
\multicolumn{1}{r}{}&  & \multicolumn{1}{c}{\fbox{\parbox{.75cm}{True}}} & \multicolumn{1}{c}{\fbox{\parbox{.75cm}{False}}} \\
& This is a sample text. &   &   \\
& This is another sample short text. &   &   \\
& This is a long line containing text and wrapping into second line without hitting the boxes &   &
\end{longtable}

\end{document}


# Update:

With a new environment truefalse

\documentclass{article}
\usepackage{amssymb,graphicx}
\usepackage{array}
\usepackage{longtable}
\newcounter{tfno}
\renewcommand\arraystretch{2}
\newcommand{\mybox}{\resizebox{.5cm}{!}{\raisebox{-.5ex}{$\Box$}}}
%
\newenvironment{truefalse}{%
\setcounter{tfno}{0}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}{>{\stepcounter{tfno}\thetfno.}cp{.5\textwidth}@{\extracolsep{\fill}}cc}
\multicolumn{1}{r}{}&  & \fbox{\parbox{.75cm}{True}} & \fbox{\parbox{.75cm}{False}}  \\
}{%
\end{longtable}
}
\newcommand\tfquestion[1]{ & #1 & \mybox  & \mybox  \\}
\begin{document}
\begin{truefalse}
\tfquestion{This is a sample text.}
\tfquestion{This is another sample short text.}
\tfquestion{This is a long line containing text and wrapping into second line without hitting the boxes}
\end{truefalse}
%
\begin{truefalse}
\tfquestion{This is a sample text.}
\tfquestion{This is another sample short text.}
\tfquestion{This is a long line containing text and wrapping into second line without hitting the boxes}
\end{truefalse}

\end{document}


-
can true false labels also become a command?so that i will no longer put \begin{longtable}{>{\stepcounter{rowno}\therowno.}cp{.5\textwidth}@{\hspace{5\t‌​abcolsep}} >{\mybox}c >{\mybox}c } \multicolumn{1}{r}{}& & \multicolumn{1}{c}{\fbox{\parbox{.75cm}{True}}} & \multicolumn{1}{c}{\fbox{\parbox{.75cm}{False}}} \ etc in my .tex file –  Kayla Nov 29 '12 at 14:30
@kayla: See the updated answer. –  Harish Kumar Nov 29 '12 at 14:45
I am planning to remove the automatic increment of number in \tfquestion because there is already \begin{questions} command in exam class instead when tfquestion command is used, every line of text will give the 2 small boxes. ex: \begin{questions} question \tfquestion \end{questions}`. I dont know what part of the solution you gave me is the part of automatic number increment. –  Kayla Feb 20 '13 at 2:38