11

Is there a package to create Optical Mark Reader answer-sheets (aka bubble sheet)?

EDIT 1: No choice. I think I must use PSTricks and \multido to make it.

5
+50
%%\listfiles
\documentclass[10pt]{article}
\usepackage{array}
\pagestyle{empty}
\parindent=0pt
\baselineskip=6.35mm
\parskip=0pt
\makeatletter
\newcommand*{\InitToks}{\toks@={}}
\newcommand{\AddToks}[1]{\toks@=\expandafter{\the\toks@ #1}}
\newcommand*{\PrintToks}{\the\toks@}
\unitlength=1mm
\def\BOX{\framebox(3.55,2){}}
\newcount\rowNo
\newcommand*{\dynTable}[1]{%
  \begingroup
    \InitToks
    \AddToks{\tabcolsep=0pt\begin{tabular}{c*{11}{>{\centering}p{6.35mm}}}}%
    \AddToks{&&1&2&3&4&5&6&7&8&9&Inv\tabularnewline}
    \rowNo=0 %
    \loop\ifnum\rowNo<#1\relax
      \advance\rowNo by 1
      \AddToks{\strobe & }
      \expandafter\AddToks\expandafter{%
         \the\rowNo & 
         \BOX & \BOX & \BOX & \BOX & \BOX & \BOX & \BOX & \BOX & \BOX & \BOX%
        \tabularnewline}%
    \repeat
   \AddToks{\end{tabular}}%
    \PrintToks
  \endgroup}
\makeatother

\def\strobe{\rule{0pt}{4mm}\rule{3mm}{2.54mm}}

\begin{document}
\sffamily\small

PREFERENCE\par
\bigskip

\dynTable{28}

\end{document}

alt text

  • thanks for answering. What is the command to create an ovalbox instead of a framebox? – xport Jan 3 '11 at 13:19
  • 1
    @xport-is-sleeping: use \usepackage{pict2e} to allow all radii and then \def\BOX{\leavevmode\put(0,0.6){\oval(3.55,2)}} – user2478 Jan 3 '11 at 13:29
  • @Herbert could you take look to tex.stackexchange.com/questions/285074/… – Educ Dec 29 '15 at 14:06
9

Given good specifications how the sheet should look like (positions, sizes, extra markings, etc.) it shouldn't be too hard to create an answer sheet with TikZ.

As I lack these specification, I can only show you a simple proof of concept:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[font=\small]
    \foreach \line in {1,2,...,4} {
        \begin{scope}[yshift=-\line cm]
            \foreach \count/\desc in {1/A, 2/B, 3/C, 4/D, 5/E} { 
                \node at ({\count * 0.5}, 0.4) {\desc};
                \node at (0,0) {\normalsize\textbf{\line}};
                \node[draw,circle,inner sep=1pt] at ({\count * 0.5},0) {\count};
            }
        \end{scope}
    }
\end{tikzpicture}
\end{document}

example

2

Not a direct solution, but there were some people working on something called 'LOFT' a while back -

http://www.vialab.org/main/Publications/pdf/Stetten_ASEE_2010.pdf

  • Hi flip, thank you for the link. It is very interesting info. By the way, is it open source project? – xport Dec 5 '10 at 1:13
  • 1
    I believe so, but, I've never seen the code... I did a little searching around after I posted this and can't seem to find anything. This really does seem like something that would exist... – flip Dec 5 '10 at 3:30
  • 1
    perhaps wait a bit and then offer a bounty? – Yossi Farjoun Dec 5 '10 at 23:00
  • I have not offered a bounty because I don't know what it is. – xport Dec 6 '10 at 3:26
  • 2
    @xport: see “What if I don't get a good answer?” in the faq. (Questions need to be two days old before a bounty can be offered.) – Caramdir Dec 6 '10 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.