How can one create a list with different types of items ?
I am using the package enumitem
, which is great for defining items and referring to them, but it seems to allow only one type of item. I have looked in the definition of \item
in latex.ltx
, but could not find any useful hint, and in enumitem.sty
neither.
More concretely I wish to have items like
1 ...
→ 2 ...
✓ 3 ...
and type
\normalitem ...
\arrowitem ...
\checkeditem ...
Currently, I use \item[\refstepcounter{xi}$\symbol$\arabic{thexi}]
Is there a better way to do it ?
Best Answer
Improved version:
The idea is still the same that I used in the first version (see below), but now the process is completely transparent for the final user; in particular, no extra packages are needed (
pifont
andtikz
were only loaded in my example to get fancy symbols) and new item types are now defined simply by usingwhere
<prefix>
is the alphabetic string that will be used to call the new item, and<symbol>
is the symbol that will be pre-pended to the label.This solution has an advantage and it is that it can be used on its own (without the
enumitem
package), but it is compatible with the use of this package, if one decides to use it, as the following example demonstrates:The first (preliminary) solution:
The idea is to create copies of the original
\item
and\@item
commands and then patch the copies to include the desired symbol.(I shamelesly borrowed azetina's
\myinfo
command from his answer).