4

I am trying to create a task list wherein I can mark if a task is done or not using check boxes. I am using CheckBox from Form for that.
Now I want to enumerate those tasks. Part of my Latex content is here -

\documentclass{minimal}
\usepackage[pdftex]{hyperref}
\begin{document}
\begin{Form}
\noindent
Tasks:\\               
\begin{enumerate}
\item \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex]{task1}\quad \\
\item \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex]{task2}\quad \\
\item \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex]{task3}\quad \\
\item \CheckBox[bordercolor={0 0 0},height=0.5ex,width=1.5ex]{task4}\quad \\
\end{enumerate} 
\end{Form}
\end{document}
\end

But it doesn't work! I don't why it doesn't put numbers before tasks.

1 Answers1

5

As explained in Why should the minimal class be avoided? the minimal class doesn't define the basic structures for typesetting a document: it just leaves almost everything undefined. No size changing command, no specific definition for \labelenumi and similar commands.

It's easy to see this with texdef:

$ texdef -t latex -c minimal labelenumi

\labelenumi:
undefined

The command is used to print the item number; the LaTeX run doesn't report an Undefined control sequence error, because \csname...\endcsname is used.

If you simply change minimal to article, you get what you want. If you don't want page numbers, add \pagestyle{empty}:

\documentclass{article}
\usepackage{hyperref}
\pagestyle{empty}
\begin{document}
\begin{Form}
\noindent
Tasks:\\
\begin{enumerate}
\item \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex]{task1}
\item \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex]{task2}
\item \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex]{task3}
\item \CheckBox[bordercolor={0 0 0},height=0.5ex,width=1.5ex]{task4}
\end{enumerate}
\end{Form}
\end{document}

enter image description here

egreg
  • 1,121,712
  • Thanks it worked! One more small thing - even with equal height and width, I don't see square check boxes. uneven check boxes are appearing. How can I get square check boxes? – Hussain Tamboli Feb 18 '14 at 09:24
  • @HussainTamboli They look square to me – egreg Feb 18 '14 at 09:27
  • Try some other items instead of task1, task2, task3, etc. For eg. one of my tasks is "Bring all templates in one place". and for that it looks like a rectangle with height > width – Hussain Tamboli Feb 18 '14 at 09:31
  • 1
    @HussainTamboli Sorry, but I don't understand. On the other hand this has nothing to do with the subject of your question; if you have other problems, please make a new question. – egreg Feb 18 '14 at 09:34