11

I tried to use IEEEaccess class (found from https://raw.githubusercontent.com/beatrizgoa/latex/master/ieeeaccess.cls) together with TikZ version 3.1.5b

\documentclass{IEEEaccess}
\usepackage{tikz}

\begin{document}

test

\EOD{}

\end{document}

but I get this error:

(/usr/local/texlive/2019/texmf-dist/tex/generic/pgf/math/pgfmathfunctio
ns.random.code.tex
! Missing number, treated as zero.
<to be read again> 
                   \gdef 
l.33 \ifnum
           \c@pgfmath@counta=0
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! Extra \fi.
l.35 \fi

I'm ignoring this; it doesn't match any \if.

)

How to solve this?

1

1 Answer 1

16

That's a bug in IEEEaccess. It redefines TeX's \year primitive to set the year of the publication (so that you can type \year{2020}). That breaks TikZ (and several other packages) that rely on \year having its primitive meaning.

You can work around that issue by tepmorarily saving \year as \TeXyear before loading IEEEaccess, and then restoring it after the class is loaded. To be able to set the year in your publication you can also save IEEEaccess's \year as, say, \setyear:

\let\TeXyear\year
\documentclass{IEEEaccess}
\let\setyear\year
\let\year\TeXyear

\usepackage{tikz}

% \year{2020}
\setyear{2020}

\begin{document}

test

\EOD{}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .