Consider the following MWE, compiled with xelatex
\documentclass{article}
\usepackage{fontspec}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikzset{boite/.style={draw,text width=14em,text badly centered}};
\tikzset{liaison/.style={
->,thick,>=latex
}};
\node[boite]{foo};
\end{tikzpicture}
\end{document}
If I read this answer https://tex.stackexchange.com/a/326089/7712 we always need a semicolon after a tikzcommands;
BUT in my case I get Missing character: There is no ; ("3B) in font nullfont!
in the log. It if delete the semicolons after tikzset, I don't get anymore.
Where is the bug ? In my code? In fontspec? In tikz? In the answer ?
path
.;
. (This includes for example\node
because it's just a shortcut to\path node
.) You don't need a;
after everything else, certainly not after\tikzset{…}
. Various packages/libraries may define additional macros/constructs that also expect a;
at the end (e.g.\calendar
from thecalendar
library). This may also true for external additions to TikZ.\tikzset
to be a "TikZ command" as such, because it does not draw anything. In most situations you would also put\tikzset
outside of\begin{tikzpicture}\end{tikzpicture}
(that would also be advisable in your example code here), reinforcing the notion that it is not part of the drawing and therefore does not need semicolons. However I agree that the linked answer as it is should be clarified as it currently is somewhat misleading.