Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Similar to the itemize or description environments I would like to have a check-list environment, with neat boxes on the right side, that I may check or uncheck. I guess I'm not the first having this idea, so I would be pleased if you could share your solutions.

Edit: Is there a way to make such a PDF interactive? So when viewing with a reader, the boxes might change from checked to unchecked and vice versa?

share|improve this question
    
Related for checkboxes: creating-boxed-check-mark –  percusse Jun 6 '12 at 9:37
    
Have a look at tex.stackexchange.com/questions/7472/… –  Yiannis Lazarides Jun 6 '12 at 12:30
1  
I would use the listliketab package. Also, if you are creating checklists to boost productivity, looking for ways to generate pretty checklists is counterproductive. :-D –  Matthew Leingang Jun 6 '12 at 12:55

3 Answers 3

up vote 10 down vote accepted
\documentclass[11pt]{article}

\usepackage{wasysym}     

\setlength{\marginparwidth}{1.2in}
\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft #1]%
{\raggedright #1}}    

\newenvironment{checklist}{%
  \begin{list}{}{}% whatever you want the list to be
  \let\olditem\item
  \renewcommand\item{\olditem -- \marginpar{$\Box$} }
  \newcommand\checkeditem{\olditem -- \marginpar{$\CheckedBox$} }
}{%
  \end{list}
}   

\begin{document}
\begin{checklist}
  \checkeditem   Open the \TeX book
  \checkeditem   Find the good page
  \item   Try to understand
\end{checklist}
\end{document}

preview

Of course the checked/non-checked property could be implemented as an option but then it would be more difficult to stay compatible with packages that extend \item themselves. If you don't like the look of \CheckedBox, there are plenty of \checkmarks in the Comprehensive LaTeX Symbol List so you can build your own checked box.

share|improve this answer
    
Yes, great, I just came back, as the checked/unchecked state was making me some headaches (as I've just finished a checkable item :D), thanks! –  math Jun 6 '12 at 12:08
    
The code block just before the definition for the checklist env was causing me some trouble in combination with todonotes package, as the margins have been changed. For my document it was not necessary. BTW: neat example. –  math Jun 6 '12 at 12:15
    
@math You can modify or suppress this part . Perhaps you can add an example with todonotes. –  Alain Matthes Jun 6 '12 at 13:49
    
Nesting of checklists does not work for me. pfdlatex hangs and has to be aborted. Generating simple checklists works fine though. –  Peter Pablo Oct 10 '13 at 8:34

Please see the Wikibooks article on customizing itemised lists.

You can use a regular \itemize environment, where “[…] you simply change the labels. It can be done manually for each entry with \item[new symbol], eg \item[$\star$].”

Or, you can change it globally with \renewcommand{\labelitemi}{$\star$}, where \labelitemi, \labelitemii, \labelitemiii, \labelitemiv describe the labels for the list depth levels.

In your case, you could use the \square symbol from the amsmath package.

For more information, please confer the Wikibooks article.

share|improve this answer
    
OP wants the boxes on the right side. –  percusse Jun 6 '12 at 9:51
    
As I want to have many check-lists, I would repeat my self often to put explicitly the Box symbol in each item. I also discovered \square symbol from amsmath, but as amsmath has many symbols which I might not need at all, I tend to use latexsymbol, hoping its way less to include. –  math Jun 6 '12 at 9:55

So far I've copied an answer from comp.text.tex which put boxes on the left side:

\usepackage{latexsym} % for squares for the check-list environment
...
\newenvironment{checklist}{%
  \begin{list}{}{}% whatever you want the list to be
  \let\olditem\item
  \renewcommand\item{\olditem[$\Box$] }
}{%
  \end{list}
}
...
\begin{checklist}
   \item Bla...
\end{checklist}

However I'm a bit unsure if its right to put the boxes on the left side. Of course its then easy to follow which tasks are done, and which are left open, on the other side I'm used to check boxes on the right...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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