2

I need to draw a couple of lines in TikZ and some of those lines need to be closed. But My code compiles in one machine but gives an error in the other, and the only difference is the version of LaTeX.

MWE

\documentclass{article}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}
        \draw (0,0) to[out=90,in=135]
              (0,1) to[out=315,in=120]
              (1,1) to[out=315,in=270]
              (0,0);
        %\draw (0,0) to[out=90,in=135]
        %      (0,1) to[out=315,in=120]
        %      (1,1) to[out=315,in=270]
        %      cycle;
    \end{tikzpicture}
\end{document}

That version works on both computers, however, if I comment the first \draw and uncomment the second, I get an error in the computer with the older version of texlive.

Runaway argument?
\tikz@@to@collect cycle; \end {tikzpicture}
! Paragraph ended before \tikz@collect@coordinate@onpath was complete.

I cannot upgrade that machine (work computer), so I'm leaving out the cycle option, using the explicit coordinate instead, for compatibility reasons. I'm just wondering if anybody knows what's the cause of this behaviour?

BTW, the cycle option works fine for straight lines

\draw (0,0) -- (0,1) -- (1,1) cycle;

Old machine

$ latex --version
pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.1; using libpng 1.6.1
Compiled with zlib 1.2.7; using zlib 1.2.7
Compiled with xpdf version 3.03

up-to date machine

$ latex --version
pdfTeX 3.1415926-2.6-1.40.16 (TeX Live 2015)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with xpdf version 3.04

Thanks

EDIT: in the not-updated system, using \pgfversion in the document prints 2.10, the version of the PGF package. And calling \listfiles in the preamble prints in the log

*File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
    tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)
     pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)
  pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
  pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)
  pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)
 pgfkeys.sty    
 pgfkeys.code.tex
  pgffor.code.tex
    tikz.code.tex
supp-pdf.mkii
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
  • 1
    I can't confirm the bug. I run the exact same latex version as on your outdated machine (whereas with libpng 1.2.49, and poppel instead of xpdf). I guess anyway this information are useless and more accurate would be tikz version. I'm running pgf 3.0.0 – Vser Jan 20 '16 at 21:35
  • You're right. \pdfversion produces 2.10. And putting \listfiles in the preamble gives me tikz.sty 2010/10/13 v2.10 (rcs-revision 1.76) – phollox Jan 20 '16 at 21:58
  • 2
    There is a lot of difference between TikZ in TL 2013 and TikZ in TL 2015. – cfr Jan 20 '16 at 22:03
  • Reading the changelog of the pgf package, I saw that. In particular: 2013-06-18 Till Tantau <tantau@users.sourceforge.net>: - Fixed bug #236 "Scaled closed paths, start/end points dont exactly match": "cycle" can now be used with all path operations where it makes sense, not only with --. In particular, things like ".. cycle" or "to [bend right] cycle" are now allowed. – phollox Jan 20 '16 at 22:30
1

Based on the comments, I checked the Changelog documentation of the pgf package, and saw many changes after the version I was using, including the following

2013-06-18 Till Tantau <tantau@users.sourceforge.net>

    - Fixed bug #236 "Scaled closed paths, start/end points dont exactly match":
      "cycle" can now be used with all path operations where it
      makes sense, not only with --. In particular, things like
      ".. cycle" or "to [bend right] cycle" are now allowed.

Hence, I'm just seeing an old bug in an old version of the package.

Thanks!

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.