14

Compiling the following code with pdflatex:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[remember picture, overlay]

    \draw (current page.center) node {
        \begin{itemize}
            \item test
        \end{itemize}
    };

\end{tikzpicture}
\end{document}

... throws the compiling error:

! LaTeX Error: Something's wrong--perhaps a missing \item.

The pdflatex version I use (Debian Wheezy) is the following:

pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
kpathsea version 6.1.0
Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.2.49; using libpng 1.2.49
Compiled with zlib 1.2.7; using zlib 1.2.7
Compiled with poppler version 0.18.4

What can I be doing wrong?

1 Answer 1

31

By default a node is an \mbox so does not accept display material such as a list. If you give it a width then it uses minipage so does accept display material:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[remember picture, overlay]

    \draw (current page.center) node[text width=3cm] {
        \begin{itemize}
            \item test
        \end{itemize}
    };

\end{tikzpicture}
\end{document}

Of course the same applies when other lists are used, such as enumerate and description or, in any case, when a paragraph is needed.

1
  • 2
    You beat me to the punch.
    – A.Ellett
    Nov 24, 2014 at 0:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .