GeneralTikz vs. eso-pic conflict

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
erodola
Posts: 5
Joined: Tue Mar 14, 2017 11:06 pm

Tikz vs. eso-pic conflict

Post by erodola »

Hi all,

Sorry in advance for the possible lack of details. I'm not experienced and I don't know what could help you to make an educated guess; feel free to ask for details and I'll be more than happy to provide them.

I have an issue that has been bugging me for several months, and I can't find a working solution. Straight to the point, whenever I try to use TikZ/PGF with pdflatex in conjunction with iccv.sty, I get the following error:
  • ! Illegal unit of measure (pt inserted).
    <to be read again>
    \kern
Here is an example file that generates the error:

Code: Select all

\documentclass[10pt,twocolumn,letterpaper]{article}

\usepackage{iccv}
\usepackage{pgfplots}
\usepackage{pgf,tikz}

% Include other packages here, before hyperref.

% If you comment hyperref and then uncomment it, you should delete
% egpaper.aux before re-running latex
\usepackage[pagebackref=true,breaklinks=true,letterpaper=true,colorlinks,bookmarks=false]{hyperref}

% \iccvfinalcopy % *** Uncomment this line for the final submission

\def\iccvPaperID{1111} % *** Enter the ICCV Paper ID here
\def\httilde{\mbox{\tt\raisebox{-.5ex}{\symbol{126}}}}

% Pages are numbered in submission mode, and unnumbered in camera-ready
\ificcvfinal\pagestyle{empty}\fi
\begin{document}

\title{test}
\author{First Author}

\maketitle

test

\end{document}
To be clear, the .sty file mentioned above is part of the author kit of a popular computer vision conference (ICCV); several of my colleagues have the same issue, which leads me to believe that there are hundreds if not thousands of researchers out there who give up on using TikZ in their papers out of frustration. The same happens for other vision conferences that use the same .sty file.

Some people do not experience this problem. I tried by changing distribution (Miktex, Texlive) and using online services (Overleaf, ShareLatex). Out of the four options, and using the exact same source files, only ShareLatex is able to recover from the error and produce the correct pdf.

I tried looking at the full log of ShareLatex, and even though it DOES give the error above, for some reason it bypasses it and is able to compile correctly. It would be great if I could reproduce this behavior, and I'm sure many other researchers will find it super helpful.

Please help! And please bear with my ignorance, I'll do my best to give the necessary details.

Thank you very much!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Tikz vs. eso-pic conflict

Post by rais »

Hi there,
could you post a link to this iccv.sty you're using?
The one I found here throws the same error even without using pgf/tikz. Then again, it's from 2005 and may not be the `current' one...

KR
Rainer
erodola
Posts: 5
Joined: Tue Mar 14, 2017 11:06 pm

Tikz vs. eso-pic conflict

Post by erodola »

Hi,

Thanks for your reply!
Here is a link to the newest version: http://iccv2017.thecvf.com/files/iccv2017AuthorKit.zip

Please note that I am not using the eso-pic.sty included in the archive; I am using the eso-pic.sty from my latex distribution, as suggested elsewhere.
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Tikz vs. eso-pic conflict

Post by rais »

Thanks for the link.
I'm not quite sure what to make of it, though:
there's a modified version of eso-pic included, but it's based on a---by now---15 year old version of it.
Using this modified (outdated) version, I get

Code: Select all

! LaTeX Error: Command \@EveryShipout@Hook already defined.
               Or name \end... illegal, see p.192 of the manual.
using my own version (from 2015), I don't have any trouble compiling the stuff you posted.
However, neither method shows the problem you posted...
What version of eso-pic do you use? (prepend `\listfiles' to your document preamble and check out your .log file (close to its end)
( eso-pic.sty 2015/07/21 v2.0g eso-pic (RN) in my case)

KR
Rainer
erodola
Posts: 5
Joined: Tue Mar 14, 2017 11:06 pm

Tikz vs. eso-pic conflict

Post by erodola »

Thanks for looking into this!
I am using the same version of eso-pic as yours (eso-pic.sty 2015/07/21 v2.0g eso-pic (RN)). Using the old eso-pic included in the author kit also gives me that error.
It seems like you are among the lucky ones that can compile that snippet! What else could make the difference between our systems? Overleaf also does not compile, while ShareLatex does. Could it be some option in the latex compiler? Or other incompatible versions of packages?

Thanks a lot for the help!
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Tikz vs. eso-pic conflict

Post by rais »

possibly...here's my complete list:

Code: Select all

*File List*
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
    iccv.sty    
 eso-pic.sty    2015/07/21 v2.0g eso-pic (RN)
atbegshi.sty    2016/06/09 v1.18 At begin shipout hook (HO)
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
   ifpdf.sty    2016/05/14 v3.1 Provides the ifpdf switch
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
  pdftex.def    2016/07/10 v0.06j Graphics/color for pdfTeX
  xspace.sty    2014/10/28 v1.13 Space after command names (DPC,MH)
pgfplots.sty    2016/08/10 v1.14 Data Visualization (1.14)
graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2016/07/10 v1.0t 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
    tikz.sty    2015/08/07 v3.0.1a (rcs-revision 1.151)
     pgf.sty    2015/08/07 v3.0.1a (rcs-revision 1.15)
  pgfrcs.sty    2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v3.0.1a (rcs-revision 1.7)
  pgfsys.sty    2014/07/09 v3.0.1a (rcs-revision 1.48)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.1a (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.1a (rcs-revision 1.25)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
hyperref.sty    2016/06/24 v6.83q Hypertext links for LaTeX
hobsub-hyperref.sty    2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2016/05/16 v1.14 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2016/05/16 v1.14 Construct package bundles (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
  ifvtex.sty    2016/05/16 v1.6 Detect VTeX and its facilities (HO)
 intcalc.sty    2016/05/16 v1.2 Expandable calculations with integers (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
pdftexcmds.sty    2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2016/05/16 v1.14 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2016/05/16 v1.4 Expandable calculations on big integers (HO)
  bitset.sty    2016/05/16 v1.2 Handle bit-vector datatype (HO)
uniquecounter.sty    2016/05/16 v1.3 Provide unlimited unique counter (HO)
letltxmacro.sty    2016/05/16 v1.5 Let assignment for LaTeX macros (HO)
 hopatch.sty    2016/05/16 v1.3 Wrapper for package hooks (HO)
xcolor-patch.sty    2016/05/16 xcolor patch
atveryend.sty    2016/05/16 v1.9 Hooks at the very end of document (HO)
refcount.sty    2016/05/16 v3.5 Data extraction from label references (HO)
 hycolor.sty    2016/05/16 v1.8 Color options for hyperref/bookmark (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 auxhook.sty    2016/05/16 v1.4 Hooks for auxiliary files (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
  pd1enc.def    2016/06/24 v6.83q Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
 backref.sty    2016/05/21 v1.39 Bibliographical back referencing
rerunfilecheck.sty    2016/05/16 v1.8 Rerun checks for auxiliary files (HO)
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
 hpdftex.def    2016/06/24 v6.83q Hyperref driver for pdfTeX
supp-pdf.mkii
epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf
  grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
 nameref.sty    2016/05/21 v2.44 Cross-referencing by name of section
gettitlestring.sty    2016/05/16 v1.5 Cleanup title references (HO)
 ***********
Compare away;-)

If you don't see any difference at all, please post the first 5 lines of your log file, as well as the file list block.

KR
Rainer
erodola
Posts: 5
Joined: Tue Mar 14, 2017 11:06 pm

Tikz vs. eso-pic conflict

Post by erodola »

Thank you!
I spotted three differences:

You:
  • pdftex.def 2016/07/10 v0.06j Graphics/color for pdfTeX
Me:
  • pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
You:
  • graphics.sty 2016/07/10 v1.0t Standard LaTeX Graphics (DPC,SPQR)
Me:
  • graphics.sty 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
You:
  • epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
Me:
  • -none-
I downloaded and installed your versions of graphics.sty and pdftex.def from the CTAN archives:

https://ctanmirror.speedata.de/2016-08- ... d/graphics
https://ctanmirror.speedata.de/2016-08- ... aphics-def

But I still get the error.
Could there be a difference in the pdflatex version? Here are the first few lines from mylog:

Code: Select all

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/W32TeX) (preloaded format=pdflatex 2017.3.14)  16 MAR 2017 10:24
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Tikz vs. eso-pic conflict

Post by rais »

nope, looks the same to me:

Code: Select all

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2017.3.16)  16 MAR 2017 22:52
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
it does say two, three lines later

Code: Select all

LaTeX2e <2017/01/01> patch level 3
I just ran a full upgrade (tlmgr upgrade -all), so now it also says graphics v1.0u on my machine...

Say, if this problem's bugging you for months already, mayhap iccv itself got changed in the meantime (it doesn't give version info in the file list), did you try downloading it again (from the link you posted earlier)?

Or, before you do, try looking for "kern" in it (this version of iccv.sty doesn't contain any). On my machine

Code: Select all

grep kern iccv.sty
on yours probably

Code: Select all

find "kern" iccv.sty
assuming you're in the right directory.

KR
Rainer
erodola
Posts: 5
Joined: Tue Mar 14, 2017 11:06 pm

Tikz vs. eso-pic conflict

Post by erodola »

Thank you so much!! Indeed, they changed iccv.sty in the meantime (like, in the span of a few days) and the new version does not have any "kern" in it. Now it works perfectly. I am running a diff on the two versions to see what exactly changed, but in the meantime thank you very much!

Surprisingly this has been going on for at least two years from what I recall. I had the same exact problem with cvpr.sty and they never changed it.

ps. should I mark the topic as [solved]?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Tikz vs. eso-pic conflict

Post by Stefan Kottwitz »

Hi!
erodola wrote:Indeed, they changed iccv.sty in the meantime
A .cls or .sty file should never be changed by a user. From this moment on, it's incompatible to all future versions.

Instead, redefine what you need, using \renewcommand for example.
erodola wrote:ps. should I mark the topic as [solved]?
There's a checkmark button at the right of posts, to mark an answer as the solution. So I do it. :-) It gets a green tick then.

Stefan
LaTeX.org admin
Post Reply