4

I have been trying for a while to load the tikz package to the IEEE ACCESS template. Whenever I use the command \usepackage{tikz}, I am getting the error

/usr/local/texlive/2017/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex, line 33
Missing number, treated as zero.

It was working fine with the IEEEtran template and I was able to draw my circuit diagrams in that.

Anyone has any idea how to solve this issue?

5

Here is what I had to do to get tikz working with the IEEE Access template:

  1. in ieeeaccess.cls change \def\year to \def\Year

  2. in ieeeaccess.cls comment \RequirePackage{color}

  3. in ieeeaccess.cls change \RequirePackage{spotcolor} to \RequirePackage{xspotcolor}

  4. in main file add \RequirePackage{tikz} before \documentclass{ieeeaccess}

  5. get xspotcolor.dtx from How to use the PANTONE color (SPOT color) in LaTeX2e version and compile with pdflatex xspotcolor.dtx and copy the resulting xspotcolor.sty to directory with tex files

  6. copy spotcolor.sty from Tex installation to directory with tex files and comment \RequirePackage[pdftex]{graphics}

It might be an ugly workaround, but it works...

2

Same thing as in Conflict between TikZ and university thesis class file In line 359 of ieeeaccess.cls you'll find

\def\year#1{\gdef\theyear{#1}}

Change it to

\def\Year#1{\gdef\theyear{#1}}

What the class uses the \year macro for, is to set the year of publishing (as I understand it). So with the change suggested above, you'll need to use \Year{2018} instead of \year{2018}. That year is printed in the footer.

  • HI Torbjon T., I have updated like you have mentioned in the comment and the previous error is gone and now new warning messages is popping up. package xcolor warning: Incompatible color definition on input line 43 58 64 and so on. The compilation is also not giving proper output, and the blue color got disappeared from the section and subsection headings Thanks Messi – MESSI Jul 16 '18 at 4:10
  • @MESSI I'd normally suggest you post a new question about that, since it's a different problem altogether. Do you have colour definitions on those lines in your .tex file? If so, what are they? I didn't get that error when I tested, and I have no way of guessing an answer. – Torbjørn T. Jul 16 '18 at 6:51
  • I have made a solution. it works fine. but the first page disappears. – Mohamed Apr 12 at 21:17
  • @Mohamed I can't guess what would cause that, so I suggest you ask a new question where you include a minimal example so that others can reproduce it. – Torbjørn T. Apr 13 at 5:48
2

My fix for the current IEEE Access Latex template archive is as follows (see this year workaround):

% FIX ieeeaccess
% - rename files *logo.png to *Logo.png
% - use workaround with oldyear and setyear
\let\oldyear\year
\documentclass{ieeeaccess}
\let\setyear\year
\let\year\oldyear

When I try to include tikz (via \usepackage{tikz}) all colored text (e.g., title, section headings) disappears.

tikz does not work because of spotcolor's incompatibility with xcolor used by tikz (see definition of accessblue with spotcolor PANTONE in ieeeaccess.cls).

Using \RequirePackage{tikz} gives me an option clash error. My workaround for tikz is to generate pdf-figures from the tikz-tex files and then use \includegraphics.

2

I had the same problem and here are my steps to fix it:

  • In ieeeaccess.cls change \def\year to \def\Year
  • Remove all \usepackage{xcolor} in the .tex file
  • To fix the missing title color, add the following code AFTER \usepackage{tikz} in the .tex file
  \NewSpotColorSpace{PANTONE}
  \AddSpotColor{PANTONE} {PANTONE3015C} {PANTONE\SpotSpace 3015\SpotSpace C} {1 0.3 0 0.2}
  \SetPageColorSpace{PANTONE}%

Note: above code is copied from the ieeeaccess.cls file line 127 ~ 129.

Hope this help.

  • Probably not the most elegant, but seemed to be the simplest solution without having to alter .cls file – Laurens Meeus May 17 at 10:04

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.