There are several syntax problems:
\tikz
inside environment tikzpicture
. This probably causes the messed up bounding box.
- The
pic
is finished after {cube folding}
, but options follow as ordinary text (invisible because of \nullfont
) with \node
commands over printing, because they are all called at the same position (outside the folding pic).
numbered faces
or manual faces? The former is used in the simplified example at the end, the latter is used in the following example, it allows further modification of single faces.
cube
(6 faces) or dodecahedron
(12 faces)?
Example:
\documentclass[11pt]{article}
\usepackage{tikz}
%optional libraries
\usetikzlibrary{decorations,arrows,automata,positioning}
\usetikzlibrary{mindmap}
\usetikzlibrary{calc}
\usetikzlibrary{folding}
\usepackage[grapics,tightpage,active]{preview}
\setlength{\PreviewBorder}{2pt}
\PreviewEnvironment{tikzpicture}
\begin{document}
\begin{tikzpicture}
\path pic [
folding line length=10mm,
transform shape,
% numbered faces,
face 1 = {\node {1};},
face 2 = {\node {2};},
face 3 = {\node {3};},
face 4 = {\node {4};},
face 5 = {\node {5};},
face 6 = {\node {6};},
face 7 = {\node {7};},
face 8 = {\node {8};},
face 9 = {\node {9};},
face 10 = {\node {10};},
face 11 = {\node {11};},
face 12 = {\node {12};}
]
{dodecahedron folding};
\end{tikzpicture}
\end{document}

The example can be simplified to
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{folding}
\usepackage[tightpage,active]{preview}
\setlength{\PreviewBorder}{2pt}
\PreviewEnvironment{tikzpicture}
\begin{document}
\begin{tikzpicture}
\pic [
folding line length=10mm,
transform shape,
numbered faces,
]
{dodecahedron folding};
\end{tikzpicture}
\end{document}