0

I'd like to ask you about the tikzpicture below. I was trying to draw the title page of the manual but I can't figure out why I'm receiving this error:

Undefined control sequence.

\nodeshadowed ...bove,#1]{ \global \setbox \mybox =\hbox {#2} \copy \mybox }... l.46 {\Huge Ti\textcolor{orange}{\emph{k}}Z};

Similar problem was reported here. I'm using an Overleaf.

\documentclass{article}
\usepackage{tikz}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usetikzlibrary{%
   decorations.fractals%
  ,decorations.pathmorphing%
  ,shadows%
}
\begin{document}

\begin{tikzpicture}
\coordinate (front) at (0,0);
\coordinate (horizon) at (0,.31\paperheight);
\coordinate (bottom) at (0,-.6\paperheight);
\coordinate (sky) at (0,.57\paperheight);
\coordinate (left) at (-.51\paperwidth,0);
\coordinate (right) at (.51\paperwidth,0);
\shade [bottom color=white,
top color=blue!30!black!50]
([yshift=-5mm]horizon -| left)
rectangle (sky -| right);
\shade [bottom color=black!70!green!25,
top color=black!70!green!10]
(front -| left) -- (horizon -| left)
decorate [decoration=random steps] {
-- (horizon -| right) }
-- (front -| right) -- cycle;
\shade [top color=black!70!green!25,
bottom color=black!25]
([yshift=-5mm-1pt]front -| left)
rectangle ([yshift=1pt]front -| right);
\fill [black!25]
(bottom -| left)
rectangle ([yshift=-5mm]front -| right);
\def\nodeshadowed[#1]#2;{
\node[scale=2,above,#1]{
\global\setbox\mybox=\hbox{#2}
\copy\mybox};
\node[scale=2,above,#1,yscale=-1,
scope fading=south,opacity=0.4]{\box\mybox};
}
\nodeshadowed [at={(-5,8 )},yslant=0.05]
{\Huge Ti\textcolor{orange}{\emph{k}}Z};
\nodeshadowed [at={( 0,8.3)}]
{\huge \textcolor{green!50!black!50}{\&}};
\nodeshadowed [at={( 5,8 )},yslant=-0.05]
{\Huge \textsc{PGF}};
\nodeshadowed [at={( 0,5 )}]
{Manual for Version \pgftypesetversion};
\foreach \where in {-9cm,9cm} {
\nodeshadowed [at={(\where,5cm)}] { \tikz
\draw [green!20!black, rotate=90,
l-system={rule set={F -> FF-[-F+F]+[+F-F]},
axiom=F, order=4,step=2pt,
randomize step percent=50, angle=30,
randomize angle percent=5}] l-system; }}
\foreach \i in {0.5,0.6,...,2}
\fill
[white,opacity=\i/2,
decoration=Koch snowflake,
shift=(horizon),shift={(rand∗11,rnd∗7)},
scale=\i,double copy shadow={
opacity=0.2,shadow xshift=0pt,
shadow yshift=3∗\i pt,fill=white,draw=none}]
decorate {
decorate {
decorate {
(0,0)- ++(60:1) -- ++(-60:1) -- cycle
} } };
\node (left text) ...
\node (right text) ...
\fill [decorate,decoration={footprints,foot of=gnome},
opacity=.5,brown] (rand∗8,-rnd∗10)
to [out=rand∗180,in=rand∗180] (rand∗8,-rnd∗10);
\end{tikzpicture}

\end{document}
  • Well, the code seems to have multiple problems. E.g. 2 redundant } in l-system; }}. Then \node (left text) ... is not a command. You are missing the xcolor package. – Augustin Nov 1 '15 at 20:21
  • @Augustin, thank you. I was trying to work with the "light version" created by Pouya: tex.stackexchange.com/a/183255/90887 – belford Nov 1 '15 at 20:24
4

I made it once again: pgfmanual-en-main.tex file on github was very useful.

\documentclass{article}
\usepackage[version=latest]{pgf}
\usepackage{calc,tikz}

\usetikzlibrary{
  arrows,
  shadings,
  decorations.fractals,
  decorations.pathmorphing,
  shadows,
  lindenmayersystems,
}

\usepackage{xxcolor}
\usepackage[latin1]{inputenc}

\begin{document}

\newbox\mybox
{
  \parindent0pt
  \null
  \colorlet{mintgreen}{green!50!black!50}

  \thispagestyle{empty}
  \vskip3cm
  \vfill
  \hfil
  \begin{tikzpicture}[overlay]
    \coordinate (front) at (0,0);
    \coordinate (horizon) at (0,.31\paperheight);
    \coordinate (bottom) at (0,-.6\paperheight);
    \coordinate (sky) at (0,\paperheight);
    \coordinate (left) at (-.51\paperwidth,0);
    \coordinate (right) at (.51\paperwidth,0);

    \shade [bottom color=blue!30!black!10,top color=blue!30!black!50]
      ([yshift=-5mm]horizon -|  left) rectangle (sky -| right);
    \shade [bottom color=black!70!green!25,top color=black!70!green!10]
      (front -| left) -- (horizon -| left)
      decorate [decoration=random steps] { -- (horizon -| right) }
      -- (front -| right) -- cycle;
    \shade [top color=black!70!green!25,bottom color=black!25]
      ([yshift=-5mm-1pt]front -| left) rectangle ([yshift=1pt]front -| right);
    \fill [black!25] (bottom -| left) rectangle ([yshift=-5mm]front -| right);

    \def\nodeshadowed[#1]#2;{\node[scale=2,above,#1]{\global\setbox\mybox=\hbox{#2}\copy\mybox};
      \node[scale=2,above,#1,yscale=-1,scope fading=south,opacity=0.4]{\box\mybox};}

    \nodeshadowed [at={(-5,5  )},yslant=0.05] {\Huge Ti\textcolor{orange}{\emph{k}}Z};
    \nodeshadowed [at={( 0,5.3)}] {\huge \textcolor{mintgreen}{\&}};
    \nodeshadowed [at={( 5,5  )},yslant=-0.05] {\Huge \textsc{PGF}};
    \nodeshadowed [at={( 0,2  )}] {Manual for Version \pgftypesetversion};

    \foreach \where in {-9cm,9cm}
    {\nodeshadowed [at={(\where,5cm)}] {
    \tikz \draw [green!20!black, rotate=90]
    [l-system={rule set={F -> FF-[-F+F]+[+F-F]}, axiom=F, order=4,
      step=2pt, randomize step percent=50, angle=30, randomize angle percent=5}]
    lindenmayer system;};}

    \foreach \i in {0.5,0.6,...,2}
      \fill [white,decoration=Koch snowflake,opacity=.9]
            [shift=(horizon),shift={(rand*11,rnd*7)},scale=\i]
            [double copy shadow={opacity=0.2,shadow xshift=0pt,shadow
              yshift=3*\i pt,fill=white,draw=none}]
        decorate {
          decorate {
            decorate {
              (0,0) -- ++(60:1) -- ++(-60:1) -- cycle
            }
          }
        };

  \node (left text) [text width=.5\paperwidth-2cm,below right,at={(-.5\paperwidth+1cm,-1.5cm)}]
  {
    \fontfamily{pcr}
    \def\textbraceleft{\char`\{}
    \def\textbraceright{\char`\}}
    \def\textbackslash{\char`\\}

};

  \node (right text) [text width=.5\paperwidth-2cm,below right,at={(1cm,-1.5cm)}]
  {
    \fontfamily{pcr}
    \def\textbraceleft{\char`\{}
    \def\textbraceright{\char`\}}
    \def\textbackslash{\char`\\}

  };
\end{tikzpicture}
\end{document}

Result: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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