我尝试使用以下代码这个帖子由 TeXstudio 中的 @AlainMatthes 编写,但我收到了此错误:
Package pgfkeys Error: I do not know the key '/tkzcircle/radius' and I am going to ignore it. Perhaps you misspelled it. \tkzDefCircle[radius](O_2,C_1)
然后将 MikTex 和 TeXstudio 都更新到最新版本,但仍然出现相同的错误。
然后我在 Overleaf 上测试了它,它在那里运行良好。为什么它在 TeXstudio 上不起作用?
错误的日志文件部分:
File: epstopdf-sys.cfg 2021/03/18 v2.0 Configuration of epstopdf for MiKTeX
))
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 24.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 24.
Missing character: There is no c in font nullfont!
Missing character: There is no m in font nullfont!
! Package pgfkeys Error: I do not know the key '/tkzcircle/radius' and I am goi
ng to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help.
...
l.61 \tkzDefCircle[radius](O_2,C_1)
This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.
Missing character: There is no c in font nullfont!
Missing character: There is no m in font nullfont!
! Extra }, or forgotten \endgroup.
\endpgfpicture ...globally \endgroup \hss \egroup
\pgf@restore@layerlist@fro...
l.77 \end{tikzpicture}
使用 TeXstudio 的日志文件部分\listfiles
(出现错误的部分):
***********
LaTeX2e <2023-06-01> patch level 1
L3 programming layer <2020/03/25>
***********
*File List*
standalone.cls 2022/10/10 v1.3b Class to compile TeX sub-files standalone
shellesc.sty 2023/04/15 v1.0d unified shell escape interface for LaTeX
ifluatex.sty 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
iftex.sty 2022/02/03 v1.0f TeX engine tests
xkeyval.sty 2022/06/16 v2.9 package option processing (HA)
xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
standalone.cfg 2022/10/10 v1.3b Default configuration file for 'standalone'
class
article.cls 2023/05/17 v1.4n Standard LaTeX document class
size10.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
tkz-euclide.sty 2023/10/20 5.03c for pure Euclidean Geometry
tikz.sty 2023-01-15 v3.1.10 (3.1.10)
pgf.sty 2023-01-15 v3.1.10 (3.1.10)
pgfrcs.sty 2023-01-15 v3.1.10 (3.1.10)
pgfrcs.code.tex
pgfcore.sty 2023-01-15 v3.1.10 (3.1.10)
graphicx.sty 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2021/08/11 v1.11 sin cos tan (DPC)
graphics.cfg 2016/06/04 v1.11 sample graphics configuration
pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex
pgfsys.sty 2023-01-15 v3.1.10 (3.1.10)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2023-01-15 v3.1.10 (3.1.10)
pgfsysprotocol.code.tex 2023-01-15 v3.1.10 (3.1.10)
xcolor.sty 2022/06/12 v2.14 LaTeX color extensions (UK)
color.cfg 2016/01/02 v1.6 sample color configuration
mathcolor.ltx
pgfcore.code.tex
pgfcomp-version-0-65.sty 2023-01-15 v3.1.10 (3.1.10)
pgfcomp-version-1-18.sty 2023-01-15 v3.1.10 (3.1.10)
pgffor.sty 2023-01-15 v3.1.10 (3.1.10)
pgfkeys.sty
pgfkeys.code.tex
pgfmath.sty
pgfmath.code.tex
pgffor.code.tex
tikz.code.tex
xfp.sty 2023-10-10 L3 Floating point unit
expl3.sty 2023-10-23 L3 programming layer (loader)
l3backend-pdftex.def 2023-10-23 L3 backend support: PDF output (pdfTeX)
xpatch.sty 2020/03/25 v0.3a Extending etoolbox patching commands
xparse.sty 2023-10-10 L3 Experimental document command parser
etoolbox.sty 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
tkz-euclide.cfg
tkz-tools-eu-base.tex
tkz-tools-eu-utilities.tex
tkz-tools-eu-BB.tex
tkz-obj-eu-grids.tex
tkz-lib-eu-marks.tex
tkz-tools-eu-text.tex
tkz-lib-eu-shape.tex
tkz-obj-eu-axesmin.tex
tkz-tools-eu-colors.tex
tkz-obj-eu-points.tex
tkz-draw-eu-points.tex
tkz-obj-eu-points.tex
tkz-obj-eu-points-by.tex
tkz-tools-eu-math.tex
tkz-tools-eu-intersections.tex
tkz-obj-eu-points-with.tex
tkz-obj-eu-points-spc.tex
tkz-tools-eu-angles.tex
tkz-obj-eu-circles.tex
tkz-obj-eu-circles-by.tex
tkz-obj-eu-points-rnd.tex
tkz-obj-eu-lines.tex
tkz-obj-eu-polygons.tex
tkz-obj-eu-triangles.tex
tkz-draw-eu-lines.tex
tkz-draw-eu-circles.tex
tkz-draw-eu-ellipses.tex
tkz-draw-eu-polygons.tex
tkz-draw-eu-angles.tex
tkz-draw-eu-sectors.tex
tkz-draw-eu-compass.tex
tkz-draw-eu-show.tex
tkz-draw-eu-protractor.tex
supp-pdf.mkii
epstopdf-base.sty 2020-01-24 v2.11 Base part for package epstopdf
epstopdf-sys.cfg 2021/03/18 v2.0 Configuration of epstopdf for MiKTeX
***********
使用 Overleaf 的日志文件部分\listfiles
(无错误):
{/usr/local/texlive/2022/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./output.aux)
*File List*
standalone.cls 2018/03/26 v1.3a Class to compile TeX sub-files standalone
shellesc.sty 2019/11/08 v1.0c unified shell escape interface for LaTeX
ifluatex.sty 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
iftex.sty 2022/02/03 v1.0f TeX engine tests
xkeyval.sty 2020/11/20 v2.8 package option processing (HA)
xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
standalone.cfg 2018/03/26 v1.3a Default configuration file for 'standalone' class
article.cls 2021/10/04 v1.4n Standard LaTeX document class
size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
tkz-euclide.sty 2022/02/25 4.051b for pure Euclidean Geometry
tikz.sty 2021/05/15 v3.1.9a (3.1.9a)
pgf.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfrcs.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfrcs.code.tex
pgfcore.sty 2021/05/15 v3.1.9a (3.1.9a)
graphicx.sty 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2021/08/11 v1.11 sin cos tan (DPC)
graphics.cfg 2016/06/04 v1.11 sample graphics configuration
pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex
pgfsys.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2021/05/15 v3.1.9a (3.1.9a)
pgfsysprotocol.code.tex 2021/05/15 v3.1.9a (3.1.9a)
xcolor.sty 2022/06/12 v2.14 LaTeX color extensions (UK)
color.cfg 2016/01/02 v1.6 sample color configuration
mathcolor.ltx
pgfcore.code.tex
pgfcomp-version-0-65.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfcomp-version-1-18.sty 2021/05/15 v3.1.9a (3.1.9a)
pgffor.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfkeys.sty
pgfkeys.code.tex
pgfmath.sty
pgfmath.code.tex
pgffor.code.tex
tikz.code.tex
xfp.sty 2022-06-22 L3 Floating point unit
expl3.sty 2022-08-05 L3 programming layer (loader)
l3backend-pdftex.def 2022-08-05 L3 backend support: PDF output (pdfTeX)
tkz-euclide.cfg
tkz-tools-eu-base.tex
tkz-tools-eu-utilities.tex
tkz-tools-eu-BB.tex
tkz-obj-eu-grids.tex
tkz-lib-eu-marks.tex
tkz-tools-eu-text.tex
tkz-lib-eu-shape.tex
tkz-obj-eu-axesmin.tex
tkz-tools-eu-colors.tex
tkz-obj-eu-points.tex
tkz-tools-eu-math.tex
tkz-tools-eu-intersections.tex
tkz-tools-eu-angles.tex
tkz-obj-eu-compass.tex
tkz-obj-eu-circles.tex
tkz-obj-eu-circles-by.tex
tkz-obj-eu-draw-angles.tex
tkz-obj-eu-draw-circles.tex
tkz-obj-eu-draw-lines.tex
tkz-obj-eu-draw-polygons.tex
tkz-obj-eu-draw-triangles.tex
tkz-obj-eu-lines.tex
tkz-obj-eu-points-by.tex
tkz-obj-eu-points-rnd.tex
tkz-obj-eu-points-spc.tex
tkz-obj-eu-points-with.tex
tkz-obj-eu-polygons.tex
tkz-obj-eu-protractor.tex
tkz-obj-eu-sectors.tex
tkz-obj-eu-show.tex
tkz-obj-eu-triangles.tex
supp-pdf.mkii
epstopdf-base.sty 2020-01-24 v2.11 Base part for package epstopdf
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
***********
答案1
这是版本问题。我猜想 Overleaf 上的 tkz-euclide 版本不够新,所以没有出现错误。
在新版本中,该radius
选项不再存在。圆由其中心和一个点定义,因此只需注释掉此行即可
% \tkzDefCircle[radius](O_2,C_1)