loopspace / tikzmark

The dread tikzmark arrives on github
14 stars 3 forks source link

! Package pgf Error: No shape named a is known #9

Closed pablgonz closed 5 years ago

pablgonz commented 5 years ago

Hi, I have a little problem using tikzmark in the first compilation of the document. This is my example file (taken directly from the package documentation):

% arara: pdflatex : {draft : yes}
% arara: pdflatex 
% !arara: clean : { extensions : [ aux, log] }
\listfiles
\documentclass[10pt]{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
Putting a node around \tikzmarknode{txt}{some text}
means we can connect text together, includingin
maths :
\[
 \tikzmarknode{a}{\sum_{k=1}^n} k^{\tikzmarknode{b}{2}}
\]
\begin{tikzpicture}[remember picture , overlay ]
\draw[->] (txt) -- (a);
\draw[->] (a.south) to [ out=-90, in=-45] (b.south east) ;
\end{tikzpicture}
\end{document}

When I compile the first time I get the following error:

! Package pgf Error: No shape named a is known.

See the pgf package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.14 \draw[->] (txt) -- (a)
                           ;
? 

This is the list of files available in my version of TexLive 2019 (fedora 30, updated)

 *File List*
 article.cls    2018/09/03 v1.4i Standard LaTeX document class
  size10.clo    2018/09/03 v1.4i Standard LaTeX file (size option)
    tikz.sty    2019/05/09 v3.1.3 (3.1.3)
     pgf.sty    2019/05/09 v3.1.3 (3.1.3)
  pgfrcs.sty    2019/05/09 v3.1.3 (3.1.3)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2019/05/09 v3.1.3 (3.1.3)
graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
  pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex
  pgfsys.sty    2019/05/09 v3.1.3 (3.1.3)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2019/05/09 v3.1.3 (3.1.3)
pgfsysprotocol.code.tex    2019/05/09 v3.1.3 (3.1.3)
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2019/05/09 v3.1.3 (3.1.3)
pgfcomp-version-1-18.sty    2019/05/09 v3.1.3 (3.1.3)
  pgffor.sty    2019/05/09 v3.1.3 (3.1.3)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
   expl3.sty    2019-05-28 L3 programming layer (loader) 
expl3-code.tex    2019-05-28 L3 programming layer 
l3pdfmode.def    2019-04-06 v L3 Experimental driver: PDF mode
l3keys2e.sty    2019-05-28 LaTeX2e option processing using LaTeX3 keys
  xparse.sty    2019-05-28 L3 Experimental document command parser
supp-pdf.mkii
epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
  grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
pdftexcmds.sty    2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)
   ifpdf.sty    2018/09/07 v3.3 Provides the ifpdf switch
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
 ***********

When compiling a second time the document is generated without errors, but as it fails in the first compilation I can not use arara. I don't know if the problem is with my files or the package....Any idea how to solve it? Saludos

loopspace commented 5 years ago

This sounds like the issue that I fixed in 05e58d010b324ad3f371b4c645f95828c0081524 (well, almost - the fix then needed fixing in 86f4bd718573cf08ddbc9297a113e7bc9278d79c ...)

Try downloading the latest version: https://github.com/loopspace/tikzmark/blob/master/tikzmark.dtx , run tex tikzmark.dtx to generate the files. If this fixes it, please let me know.

(I'll push this to CTAN soon.)

pablgonz commented 5 years ago

Great, now it works perfectly, the error message is completely gone...