使用安装的最新版本的 pgfplots

使用安装的最新版本的 pgfplots

我想使用最新的 pgfplots,在本例中是 v1.18,但显然,从日志文件来看,只使用了 v1.15

) (pgfplots.sty (pgfplots.revision.tex)
Package: pgfplots 2017/06/05 v1.15 Data Visualization (1.15)

参照这个帖子,我尝试编辑一个/usr/local/texlive/2023/texmf.cnf语句

TEXMFHOME = ~/Library/texmf, /Users/(my name)/Downloads/pgfplots 
% ^ /Users/... has been added, which is where pgfplots 1.18 exists at the moment. 

但是日志文件仍然是一样的。我也尝试过

$ sudo tlmgr update pgfplots
Password:
tlmgr: package repository https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/systems/texlive/tlnet (verified)
tlmgr: saving backups to /usr/local/texlive/2023/tlpkg/backups
tlmgr: no updates available

正如消息所暗示的那样,这并没有什么区别。

我该怎么做才能使用 v1.18?一种可能性是 v1.18 没有正确安装,但我不知道该怎么做。

我的环境是

$ latex --version
pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023)
kpathsea version 6.3.5
Copyright 2023 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.39; using libpng 1.6.39
Compiled with zlib 1.2.13; using zlib 1.2.13
Compiled with xpdf version 4.04

更新 1

我使用的是 Mac OS,在评论中我得到了以下输出。我知道这些是 v1.15 的目录,而不是 v1.18 的目录。

$ kpsewhich pgfplots.sty
/usr/local/texlive/2023/texmf-dist/tex/latex/pgfplots/pgfplots.sty
$ kpsewhich pgfplots.revision.tex
/usr/local/texlive/2023/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex

pgfplots.sty 存在于两个目录中。

更新 2

我得到的日志\documentclass{article} \usepackage{pgfplots} \begin{document} \end{document}如下。

This is TexpadTeX (based on TeX Version 3.14159265 with e-TeX extensions) running in extended mode embedded in Texpad 760 (preloaded format=latex 2021.3.29)  2 JUN 2023 16:28
**
(root.tex
LaTeX2e <2017-04-15>
Babel <3.16> and hyphenation patterns for 84 language(s) loaded.
(article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (pgfplots.sty (pgfplots.revision.tex)
Package: pgfplots 2017/06/05 v1.15 Data Visualization (1.15)
(graphicx.sty
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
(keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
) (graphics.sty
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
(trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
) (graphics.cfg
File: graphics.cfg 2018/05/3 Graphics configuration of TexpadTeX
)
Package graphics Info: Driver file: texpadtex.def on input line 99.
(texpadtex.def
File: texpadtex.def 2017/10/21 v2.0
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
) (tikz.sty (pgf.sty (pgfrcs.sty (pgfutil-common.tex
\pgfutil@everybye=\toks15
\pgfutil@tempdima=\dimen105
\pgfutil@tempdimb=\dimen106
(pgfutil-common-lists.tex)) (pgfutil-latex.def
\pgfutil@abb=\box26
(everyshi.sty
Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
)) (pgfrcs.code.tex
Package: pgfrcs 2015/08/07 v3.0.1a (rcs-revision 1.31)
))
Package: pgf 2015/08/07 v3.0.1a (rcs-revision 1.15)
(pgfcore.sty (pgfsys.sty (pgfsys.code.tex
Package: pgfsys 2014/07/09 v3.0.1a (rcs-revision 1.48)
(pgfkeys.code.tex
\pgfkeys@pathtoks=\toks16
\pgfkeys@temptoks=\toks17
(pgfkeysfiltered.code.tex
\pgfkeys@tmptoks=\toks18
))
\pgf@x=\dimen107
\pgf@y=\dimen108
\pgf@xa=\dimen109
\pgf@ya=\dimen110
\pgf@xb=\dimen111
\pgf@yb=\dimen112
\pgf@xc=\dimen113
\pgf@yc=\dimen114
\w@pgf@writea=\write3
\r@pgf@reada=\read1
\c@pgf@counta=\count87
\c@pgf@countb=\count88
\c@pgf@countc=\count89
\c@pgf@countd=\count90
\t@pgf@toka=\toks19
\t@pgf@tokb=\toks20
\t@pgf@tokc=\toks21
(pgf.cfg
File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
)
Driver file for pgf: pgfsys-texpadtex.def
(pgfsys-texpadtex.def)) (pgfsyssoftpath.code.tex
File: pgfsyssoftpath.code.tex 2013/09/09  (rcs-revision 1.9)
\pgfsyssoftpath@smallbuffer@items=\count91
\pgfsyssoftpath@bigbuffer@items=\count92
) (pgfsysprotocol.code.tex
File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
)) (xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(color.cfg
File: color.cfg 2018/05/3 Graphics configuration of TexpadTeX
)
Package xcolor Info: Driver file: texpadtex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
) (pgfcore.code.tex
Package: pgfcore 2010/04/11 v3.0.1a (rcs-revision 1.7)
(pgfmath.code.tex (pgfmathcalc.code.tex (pgfmathutil.code.tex) (pgfmathparser.code.tex
\pgfmath@dimen=\dimen115
\pgfmath@count=\count93
\pgfmath@box=\box27
\pgfmath@toks=\toks22
\pgfmath@stack@operand=\toks23
\pgfmath@stack@operation=\toks24
) (pgfmathfunctions.code.tex (pgfmathfunctions.basic.code.tex) (pgfmathfunctions.trigonometric.code.tex) (pgfmathfunctions.random.code.tex) (pgfmathfunctions.comparison.code.tex) (pgfmathfunctions.base.code.tex) (pgfmathfunctions.round.code.tex) (pgfmathfunctions.misc.code.tex) (pgfmathfunctions.integerarithmetics.code.tex))) (pgfmathfloat.code.tex
\c@pgfmathroundto@lastzeros=\count94
)) (pgfcorepoints.code.tex
File: pgfcorepoints.code.tex 2013/10/07  (rcs-revision 1.27)
\pgf@picminx=\dimen116
\pgf@picmaxx=\dimen117
\pgf@picminy=\dimen118
\pgf@picmaxy=\dimen119
\pgf@pathminx=\dimen120
\pgf@pathmaxx=\dimen121
\pgf@pathminy=\dimen122
\pgf@pathmaxy=\dimen123
\pgf@xx=\dimen124
\pgf@xy=\dimen125
\pgf@yx=\dimen126
\pgf@yy=\dimen127
\pgf@zx=\dimen128
\pgf@zy=\dimen129
) (pgfcorepathconstruct.code.tex
File: pgfcorepathconstruct.code.tex 2013/10/07  (rcs-revision 1.29)
\pgf@path@lastx=\dimen130
\pgf@path@lasty=\dimen131
) (pgfcorepathusage.code.tex
File: pgfcorepathusage.code.tex 2014/11/02  (rcs-revision 1.24)
\pgf@shorten@end@additional=\dimen132
\pgf@shorten@start@additional=\dimen133
) (pgfcorescopes.code.tex
File: pgfcorescopes.code.tex 2015/05/08  (rcs-revision 1.46)
\pgfpic=\box28
\pgf@hbox=\box29
\pgf@layerbox@main=\box30
\pgf@picture@serial@count=\count95
) (pgfcoregraphicstate.code.tex
File: pgfcoregraphicstate.code.tex 2014/11/02  (rcs-revision 1.12)
\pgflinewidth=\dimen134
) (pgfcoretransformations.code.tex
File: pgfcoretransformations.code.tex 2015/08/07  (rcs-revision 1.20)
\pgf@pt@x=\dimen135
\pgf@pt@y=\dimen136
\pgf@pt@temp=\dimen137
) (pgfcorequick.code.tex
File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
) (pgfcoreobjects.code.tex
File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
) (pgfcorepathprocessing.code.tex
File: pgfcorepathprocessing.code.tex 2013/09/09  (rcs-revision 1.9)
) (pgfcorearrows.code.tex
File: pgfcorearrows.code.tex 2015/05/14  (rcs-revision 1.43)
\pgfarrowsep=\dimen138
) (pgfcoreshade.code.tex
File: pgfcoreshade.code.tex 2013/07/15  (rcs-revision 1.15)
\pgf@max=\dimen139
\pgf@sys@shading@range@num=\count96
) (pgfcoreimage.code.tex
File: pgfcoreimage.code.tex 2013/07/15  (rcs-revision 1.18)
(pgfcoreexternal.code.tex
File: pgfcoreexternal.code.tex 2014/07/09  (rcs-revision 1.21)
\pgfexternal@startupbox=\box31
)) (pgfcorelayers.code.tex
File: pgfcorelayers.code.tex 2013/07/18  (rcs-revision 1.7)
) (pgfcoretransparency.code.tex
File: pgfcoretransparency.code.tex 2013/09/30  (rcs-revision 1.5)
) (pgfcorepatterns.code.tex
File: pgfcorepatterns.code.tex 2013/11/07  (rcs-revision 1.5)
))) (pgfmoduleshapes.code.tex
File: pgfmoduleshapes.code.tex 2014/03/21  (rcs-revision 1.35)
\pgfnodeparttextbox=\box32
) (pgfmoduleplot.code.tex
File: pgfmoduleplot.code.tex 2015/08/03  (rcs-revision 1.13)
) (pgfcomp-version-0-65.sty
Package: pgfcomp-version-0-65 2007/07/03 v3.0.1a (rcs-revision 1.7)
\pgf@nodesepstart=\dimen140
\pgf@nodesepend=\dimen141
) (pgfcomp-version-1-18.sty
Package: pgfcomp-version-1-18 2007/07/23 v3.0.1a (rcs-revision 1.1)
)) (pgffor.sty (pgfkeys.sty (pgfkeys.code.tex)) (pgfmath.sty (pgfmath.code.tex)) (pgffor.code.tex
Package: pgffor 2013/12/13 v3.0.1a (rcs-revision 1.25)
(pgfmath.code.tex)
\pgffor@iter=\dimen142
\pgffor@skip=\dimen143
\pgffor@stack=\toks25
\pgffor@toks=\toks26
)) (tikz.code.tex
Package: tikz 2015/08/07 v3.0.1a (rcs-revision 1.151)
(pgflibraryplothandlers.code.tex
File: pgflibraryplothandlers.code.tex 2013/08/31 v3.0.1a (rcs-revision 1.20)
\pgf@plot@mark@count=\count97
\pgfplotmarksize=\dimen144
)
\tikz@lastx=\dimen145
\tikz@lasty=\dimen146
\tikz@lastxsaved=\dimen147
\tikz@lastysaved=\dimen148
\tikzleveldistance=\dimen149
\tikzsiblingdistance=\dimen150
\tikz@figbox=\box33
\tikz@figbox@bg=\box34
\tikz@tempbox=\box35
\tikz@tempbox@bg=\box36
\tikztreelevel=\count98
\tikznumberofchildren=\count99
\tikznumberofcurrentchild=\count100
\tikz@fig@count=\count101
(pgfmodulematrix.code.tex
File: pgfmodulematrix.code.tex 2013/09/17  (rcs-revision 1.8)
\pgfmatrixcurrentrow=\count102
\pgfmatrixcurrentcolumn=\count103
\pgf@matrix@numberofcolumns=\count104
)
\tikz@expandcount=\count105
(tikzlibrarytopaths.code.tex
File: tikzlibrarytopaths.code.tex 2008/06/17 v3.0.1a (rcs-revision 1.2)
))) (pgfplots.code.tex (pgfplotscore.code.tex
\t@pgfplots@toka=\toks27
\t@pgfplots@tokb=\toks28
\t@pgfplots@tokc=\toks29
\pgfplots@tmpa=\dimen151
\c@pgfplots@coordindex=\count106
\c@pgfplots@scanlineindex=\count107
(pgfplotssysgeneric.code.tex)) (pgfplotslibrary.code.tex) (pgfplotsoldpgfsupp_loader.code.tex (pgflibraryfpu.code.tex)
Package pgfplots: loading complementary arithmetics for your pgf version...
(pgfplotsoldpgfsupp_pgflibraryfpu.code.tex) (pgfplotsoldpgfsupp_pgfmathfloat.code.tex
\c@pgfmathroundto@lastzeros=\count108
)) (pgfplotsutil.code.tex (pgfplotsliststructure.code.tex) (pgfplotsliststructureext.code.tex) (pgfplotsarray.code.tex
\c@pgfplotsarray@tmp=\count109
) (pgfplotsmatrix.code.tex) (pgfplotstableshared.code.tex
\c@pgfplotstable@counta=\count110
\t@pgfplotstable@a=\toks30
) (pgfplotsdeque.code.tex) (pgfplotsbinary.code.tex (pgfplotsbinary.data.code.tex)) (pgfplotsutil.verb.code.tex) (pgflibrarypgfplots.surfshading.code.tex
\c@pgfplotslibrarysurf@no=\count111
)) (pgfplotscolormap.code.tex (pgfplotscolor.code.tex)) (pgfplotsstackedplots.code.tex) (pgfplotsplothandlers.code.tex (pgfplotsmeshplothandler.code.tex (pgfplotsmeshplotimage.code.tex))) (pgfplots.scaling.code.tex) (pgfplotscoordprocessing.code.tex) (pgfplots.errorbars.code.tex) (pgfplots.markers.code.tex) (pgfplotsticks.code.tex) (pgfplots.paths.code.tex) (tikzlibrarydecorations.code.tex (pgfmoduledecorations.code.tex
\pgfdecoratedcompleteddistance=\dimen152
\pgfdecoratedremainingdistance=\dimen153
\pgfdecoratedinputsegmentcompleteddistance=\dimen154
\pgfdecoratedinputsegmentremainingdistance=\dimen155
\pgf@decorate@distancetomove=\dimen156
\pgf@decorate@repeatstate=\count112
\pgfdecorationsegmentamplitude=\dimen157
\pgfdecorationsegmentlength=\dimen158
)
\tikz@lib@dec@box=\box37
) (tikzlibrarydecorations.pathmorphing.code.tex (pgflibrarydecorations.pathmorphing.code.tex)) (tikzlibrarydecorations.pathreplacing.code.tex (pgflibrarydecorations.pathreplacing.code.tex))
\pgfplots@numplots=\count113
\pgfplots@xmin@reg=\dimen159
\pgfplots@xmax@reg=\dimen160
\pgfplots@ymin@reg=\dimen161
\pgfplots@ymax@reg=\dimen162
\pgfplots@zmin@reg=\dimen163
\pgfplots@zmax@reg=\dimen164
) (tikzlibraryplotmarks.code.tex
File: tikzlibraryplotmarks.code.tex 2008/01/09 v3.0.1a (rcs-revision 1.1)
(pgflibraryplotmarks.code.tex
File: pgflibraryplotmarks.code.tex 2015/08/03 v3.0.1a (rcs-revision 1.14)
))) (root.aux)
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 1.
LaTeX Font Info:    ... okay on input line 1.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 1.
LaTeX Font Info:    ... okay on input line 1.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 1.
LaTeX Font Info:    ... okay on input line 1.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 1.
LaTeX Font Info:    ... okay on input line 1.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 1.
LaTeX Font Info:    ... okay on input line 1.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 1.
LaTeX Font Info:    ... okay on input line 1.
ABD: EveryShipout initializing macros

Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing \pgfplotsset{compat=1.15} into your preamble.
 on input line 1.

(root.aux) )
No pages of output.

答案1

你的日志应该显示

(/usr/local/texlive/2023/texmf-dist/tex/latex/pgfplots/pgfplots.sty
(/usr/local/texlive/2023/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex)
Package: pgfplots 2021/05/15 v1.18.1 Data Visualization (1.18.1)

从 texlive 获取 1.18.1。

你展示

) (pgfplots.sty (pgfplots.revision.tex)
Package: pgfplots 2017/06/05 v1.15 Data Visualization (1.15)

因此,您在当前目录中有一个旧副本,您应该删除它以允许 tex 找到更新的安装副本。


实际上,在问题中添加完整日志后,日志中未显示完整路径的原因是您没有使用已安装的 texlive 2023 系统。

你使用的是 6 年前的 latex,它LaTeX2e <2017-04-15>TexpadTeXtex 的实现不同

相关内容