IEEEaccess 範本中 siunitx 套件的問題

IEEEaccess 範本中 siunitx 套件的問題

\usepackage{siunitx}每當我在範本文件中插入命令時IEEEaccess,都會出現遺失錯誤\begin{document}

siunitx如果無法辨識我如何在文章中定義單位?

我的 MWE(從評論中複製):

\documentclass{ieeeaccess} 
\usepackage{graphicx}
\usepackage{cite} 
\usepackage{amsmath,amssymb,amsfonts} 
\usepackage{algorithmic} 
\usepackage{textcomp} 
\usepackage{siunitx} 

\usepackage{lipsum}
\begin{document} 
\lipsum[1-2]
\EOD 
\end{document}

這是我的日誌檔:

Missing number, treated as zero.

<to be read again> 
                   \gdef 
l.7598 ...onst:Nn \c_sys_year_int  { \tex_year:D }
                                                  
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.)

Missing = inserted for \ifnum.

<to be read again> 
                   \gdef 
l.7598 ...onst:Nn \c_sys_year_int  { \tex_year:D }
                                                  
I was expecting to see `<', `=', or `>'. Didn't.
You can't use `\numexpr' in vertical mode.

\int_compare:nNnTF ...nt_eval:w #1#2\__int_eval:w 
                                                  #3\__int_eval_end: \exp_af...
l.7598 ...onst:Nn \c_sys_year_int  { \tex_year:D }
                                                  
Sorry, but I'm not programmed to handle this case;
I'll just pretend that you didn't ask for it.
If you're in the wrong mode, you might be able to
return to the right one by typing `I}' or `I$' or `I\par'.

LaTeX Error: Missing \begin{document}.

No \begin{document} command was found. Make sure you have included \begin{document} in your preamble, and that your main document is set correctly.

Was this hint helpful?Yes / No
See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.7598 ...onst:Nn \c_sys_year_int  { \tex_year:D }
                                                  
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

答案1

該問題是由於ieeeaccess的含義發生變化而引起的\year。在較新版本中expl3,這已在內部涵蓋。對於較舊的設置,您可以使用

\let\oldyear\year
\def\year{%
  \ifdefined\pdfprimitive
    \expandafter\pdfprimitive
  \else
    \expandafter\primitive
  \fi
  \year}
\usepackage{expl3}
\let\year\oldyear

相關內容