LaTeX Error: Command \c@abspage already defined.
Closed this issue · 6 comments
Martinits commented
直接make -C latex_src,输出如下:
make: Entering directory '/home/martinit/my/tmp/awk/latex_src'
latexmk -pdf -pdflatex="xelatex" -use-make awk.tex
Rc files read:
NONE
Latexmk: This is Latexmk, John Collins, 17 Mar. 2022. Version 4.77, version: 4.77.
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
Changed files, or newly in use since previous run(s):
awk.tex
Rule 'pdflatex': The following rules & subrules became out-of-date:
pdflatex
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'xelatex -recorder "awk.tex"'
------------
This is XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022/Arch Linux) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./awk.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-04-10> (./preamble.tex
(/usr/share/texmf-dist/tex/latex/ctex/ctexbook.cls
(/usr/share/texmf-dist/tex/latex/ctex/config/ctexbackend.cfg)
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def))
Document Class: ctexbook 2021/12/12 v2.5.8 Chinese adapter for class book (CTEX
)
(/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/share/texmf-dist/tex/latex/ctex/ctexhook.sty)
(/usr/share/texmf-dist/tex/latex/ctex/ctexpatch.sty)
(/usr/share/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/share/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texmf-dist/tex/latex/ctex/config/ctexopts.cfg)
Package ctex Warning: Option `nofonts' is deprecated.
(ctex) Option `fontset=none' is set.
Package ctex Warning: Option `fancyhdr' is deprecated.
(ctex) `fancyhdr' package is loaded.
(/usr/share/texmf-dist/tex/latex/base/book.cls
Document Class: book 2021/10/04 v1.4n Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/bk10.clo))
(/usr/share/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def
(/usr/share/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
(/usr/share/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty)
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/share/texmf-dist/tex/latex/base/fontenc.sty)
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/share/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg)))
(/usr/share/texmf-dist/tex/latex/zhnumber/zhnumber.sty
(/usr/share/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg))
(/usr/share/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def
(/usr/share/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg))
(/usr/share/texmf-dist/tex/latex/ctex/ctex-c5size.clo))
(/usr/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/share/texmf-dist/tex/latex/ctex/config/ctex.cfg)
(/usr/share/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-dist/tex/generic/iftex/ifvtex.sty
(/usr/share/texmf-dist/tex/generic/iftex/iftex.sty)))
(/usr/share/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/share/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty
(/usr/share/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex))
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def)
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/pgf.revision.tex)))
(/usr/share/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texmf-dist/tex/latex/graphics-def/xetex.def)))
(/usr/share/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex))
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg)
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def))))
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex))
(/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texmf-dist/tex/latex/graphics-cfg/color.cfg))
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code
.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.te
x) (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics
.code.tex))) (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex)
) (/usr/share/texmf-dist/tex/generic/pgf/math/pgfint.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.t
ex) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.te
x) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex))
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex)))
(/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex)
(/usr/share/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty)
(/usr/share/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty))
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgffor.sty
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex))
(/usr/share/texmf-dist/tex/latex/pgf/math/pgfmath.sty
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex))
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)))
(/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.te
x) (/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary
topaths.code.tex))) (/usr/share/texmf-dist/tex/latex/varwidth/varwidth.sty)
(/usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
(/usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
(/usr/share/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty)
(/usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
(/usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty)
(/usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
(/usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty)
(/usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty)
(/usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty)
(/usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty)
(/usr/share/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/share/texmf-dist/tex/latex/url/url.sty)
(/usr/share/texmf-dist/tex/generic/bitset/bitset.sty
(/usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
(/usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty))
(/usr/share/texmf-dist/tex/latex/hyperref/hxetex.def
(/usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty)
(/usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
(/usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty)
(/usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty)))
(/usr/share/texmf-dist/tex/latex/tools/verbatim.sty)
(/usr/share/texmf-dist/tex/latex/caption/caption.sty
(/usr/share/texmf-dist/tex/latex/caption/caption3.sty))
(/usr/share/texmf-dist/tex/latex/tools/theorem.sty
(/usr/share/texmf-dist/tex/latex/tools/thp.sty))
(/usr/share/texmf-dist/tex/latex/tocloft/tocloft.sty)
(/usr/share/texmf-dist/tex/latex/psnfss/pifont.sty
(/usr/share/texmf-dist/tex/latex/psnfss/upzd.fd)
(/usr/share/texmf-dist/tex/latex/psnfss/upsy.fd))
(/usr/share/texmf-dist/tex/latex/footmisc/footmisc.sty
(/usr/share/texmf-dist/tex/latex/bigfoot/perpage.sty))
(/usr/share/texmf-dist/tex/latex/mdframed/mdframed.sty
(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texmf-dist/tex/latex/zref/zref-abspage.sty
(/usr/share/texmf-dist/tex/latex/zref/zref-base.sty)
! LaTeX Error: Command \c@abspage already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.59 \newcounter{abspage}
%
?
! Emergency stop.
...
l.59 \newcounter{abspage}
%
No pages of output.
Transcript written on awk.log.
Latexmk: Getting log file 'awk.log'
Latexmk: Examining 'awk.fls'
Latexmk: Examining 'awk.log'
Latexmk: Log file says no output from latex
Latexmk: For rule 'pdflatex', no output was made
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 1
Refer to 'awk.log' for details
Latexmk: If appropriate, the -f option can be used to get latexmk
to try to force complete processing.
make: *** [Makefile:5: awk.pdf] Error 12
make: Leaving directory '/home/martinit/my/tmp/awk/latex_src'
不太懂latex,请问这是什么问题?
wuzhouhui commented
我也不太懂 latex, 我用的编译环境是 texlive2016, 操作系统是 ubuntu14.04, 我只能建议你用 texlive2016 试试.
wuzhouhui commented
关闭不活跃的问题
bubifengyun commented
这个解决了没,我发现2022texlive还是存在这些问题。
Martinits commented
没
bubifengyun commented
非常感谢你的回答,我是在其他地方遇到的同样的问题,解决方法如下。
在自己源码里查找'\c@abspage',没有找到。就到texlive安装地址查找,找到好几个包,怀疑是zref-abspage
这个包的问题,最后在我的源码最上方加了
\RequirePackage{zref-abspage}
再次编译就成功了。源码在:https://github.com/bubifengyun/deepin-bible
GreenTeaHua commented
\usepackage{zref-abspage}
添加到靠前的位置。