Tikz bugs when computing functions

Bug #152315 reported by Alexis ROBERT
6
Affects Status Importance Assigned to Milestone
pgf (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: pgf

I've Ubuntu Gutsy, and I discovered a few days ago this strange bug : when computing a function (with gnuplot), tikz outputs a strange bug.

Runaway argument?
0:6\relax \relax \XKV@srstate {}{@\romannumeral \XKV@depth }\expandafter \ETC.
! Paragraph ended before \tikz@plot@samples@recalc was complete.
<to be read again>
                   \par
l.116

?

In fact, the same code compiled before, and it compiles on TeXlive 2007 on OSX. That's why I post this bug here.

Attached, a LaTeX example which produces the bug. The "babel" package and the "domain" parameters makes it faulty, if you remove one of the two, the code builds without any error (but gnuplot is never launched, but it's an other thing).

Revision history for this message
Alexis ROBERT (alexis.robert) wrote :
Revision history for this message
VBoucher (boucher-vincent) wrote :

Hi,

I've exactly the same problem... It seems to be specific to gutsy, because the code compiles on my laptop with 7.04...
Any code that doesn't have the babel package works fine... strange.

If you find something, please let me know.
By the way, to launch gnuplot, you have to add the option --shell-replace while compiling the code. That way, it should work fine.

Vincent

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}

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

Confirmed for texlive 2007-13 on Ubuntu 8.04 hardy, a workaround was suggested.

Changed in pgf:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.