Comment 3 for bug 152315

Revision history for this message
Stefan Kottwitz (stefan.k) wrote :

I can confirm the problem for pgf in texlive 2007-13, using Ubuntu 8.04 hardy.
I examined tikz.code.tex, where \tikz@plot@samples@recalc is defined:

\def\tikz@plot@samples@recalc#1:#2\relax{%
  \pgfmathparse{#1}%
  \let\tikz@temp@start=\pgfmathresult%
  \pgfmathparse{#2}%
  \let\tikz@temp@end=\pgfmathresult%
  \pgfmathparse{\tikz@temp@start+(\tikz@temp@end-\tikz@temp@start)/\tikz@plot@samples}%
  \edef\tikz@plot@samplesat{\tikz@temp@start,\pgfmathresult,...,\tikz@temp@end}%
}

The colon used in this definition is used by babel as shorthand, see frenchb.ldf. You could disable this shorthand temporarily. I modified the example above to get it compilable:

\documentclass[10pt]{article}
\usepackage[frenchb]{babel}
\usepackage{tikz}
\begin{document}
\shorthandoff{:}
\begin{tikzpicture}
\draw plot[domain=-2:2] function{x};
\end{tikzpicture}
\shorthandon{:}
\end{document}