2

Example from TikZ manual v 3.0.1a (which is the version I'm using), p118: enter image description here

My minimal example code (a straight copy and paste from the manual, except that I inserted \usetikzlibrary{angles} in the document, without which angle radius couldn't be recognised:

\documentclass[11pt,a4paper]{article}
\usepackage{tikz}
\begin{document}
\usetikzlibrary{angles}

\begin{tikzpicture}[angle radius=.75cm]
\node (A) at (-2,0) [red,left] {$A$};
\node (B) at ( 3,.5) [red,right] {$B$};
\node (C) at (-2,2) [blue,left] {$C$};
\node (D) at ( 3,2.5) [blue,right] {$D$};
\node (E) at (60:-5mm) [below] {$E$};
\node (F) at (60:3.5cm) [above] {$F$};
\coordinate (X) at (intersection cs:first line={(A)--(B)}, second line={(E)--(F)});
\coordinate (Y) at (intersection cs:first line={(C)--(D)}, second line={(E)--(F)});
\path
(A) edge [red, thick] (B)
(C) edge [blue, thick] (D)
(E) edge [thick] (F)
pic ["$\alpha$", draw, fill=yellow] {angle = F--X--A}
pic ["$\beta$", draw, fill=green!30] {angle = B--X--F}
pic ["$\gamma$", draw, fill=yellow] {angle = E--Y--D}
pic ["$\delta$", draw, fill=green!30] {angle = C--Y--E};
\node at ($ (D)!.5!(B) $) [right=1cm,text width=6cm,rounded corners,fill=red!20,inner sep=1ex]
{
When we assume that $\color{red}AB$ and $\color{blue}CD$ are
parallel, i.\,e., ${\color{red}AB} \mathbin{\|} \color{blue}CD$,
then $\alpha = \delta$ and $\beta = \gamma$.
};
\end{tikzpicture}

\end{document}

And the complete error log:

This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/W32TeX) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./just4fun.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(e:/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(e:/texlive/2016/texmf-dist/tex/latex/base/size11.clo))
(e:/texlive/2016/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty
(e:/texlive/2016/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
(e:/texlive/2016/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
(e:/texlive/2016/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex)
) (e:/texlive/2016/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
(e:/texlive/2016/texmf-dist/tex/latex/ms/everyshi.sty))
(e:/texlive/2016/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex))
(e:/texlive/2016/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
(e:/texlive/2016/texmf-dist/tex/latex/graphics/graphicx.sty
(e:/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty)
(e:/texlive/2016/texmf-dist/tex/latex/graphics/graphics.sty
(e:/texlive/2016/texmf-dist/tex/latex/graphics/trig.sty)
(e:/texlive/2016/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(e:/texlive/2016/texmf-dist/tex/latex/graphics-def/xetex.def)))
(e:/texlive/2016/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
(e:/texlive/2016/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex)
) (e:/texlive/2016/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def
(e:/texlive/2016/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def
(e:/texlive/2016/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def))
))
(e:/texlive/2016/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
)) (e:/texlive/2016/texmf-dist/tex/latex/xcolor/xcolor.sty
(e:/texlive/2016/texmf-dist/tex/latex/graphics-cfg/color.cfg))
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.te
x)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric
.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.t
ex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.co
de.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex
)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.te
x)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex
)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithm
etics.code.tex)))
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex))
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.cod
e.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.te
x)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code
.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.c
ode.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex)

(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.co
de.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
))
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code
.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
)))
(e:/texlive/2016/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex)
(e:/texlive/2016/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.st
y)
(e:/texlive/2016/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.st
y)) (e:/texlive/2016/texmf-dist/tex/latex/pgf/utilities/pgffor.sty
(e:/texlive/2016/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(e:/texlive/2016/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex))
(e:/texlive/2016/texmf-dist/tex/latex/pgf/math/pgfmath.sty
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex))
(e:/texlive/2016/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)))
(e:/texlive/2016/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
(e:/texlive/2016/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.co
de.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex)
(e:/texlive/2016/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
brarytopaths.code.tex))) (./just4fun.aux)
ABD: EveryShipout initializing macros
(e:/texlive/2016/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
braryangles.code.tex)
! Missing \endcsname inserted.
<to be read again> 
                   \alpha 
l.33 pic ["$\alpha$", draw, fill=yellow]
                                         {angle = F--X--A}
? 

I don't know where \endcsname should be inserted. Could anybody help? Thanks!

  • Also, for what it's worth, encoding is utf-8. – Vim Nov 26 '17 at 13:53
  • The engine used is irrelevant: I get the same error with pdflatex and lualatex. – egreg Nov 26 '17 at 13:57
  • you need to add quotes and calc libraries too – percusse Nov 26 '17 at 13:58
  • 2
    Most of the examples given in Tikz manual will not work if they are taken directly from the manual; you need to use some additional libraries as in this case. Also, if you have copied from the manual directly, sometimes it does not do a proper copy-and-paste and some characters are not correctly pasted (such as ", `, '). You may want to check those as well. – berkus Nov 26 '17 at 14:03
  • 1
    Note also that TikZ libraries should in general be loaded in the preamble. (There have been a couple of questions here where a problem was caused by having \usetikzlibrary after \begin{document}, so keep them in the preamble.) – Torbjørn T. Nov 26 '17 at 16:43

Your Answer

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

Browse other questions tagged or ask your own question.