升级到 TeXLive 2015 后,tikzcircuit 样式无法识别?

升级到 TeXLive 2015 后,tikzcircuit 样式无法识别?

我有这么一小段:

\documentclass{standalone}
\usepackage{tikz}
\usepackage[siunitx]{circuitikz}
\listfiles
\begin{document}
    \begin{circuitikz}[
            american,
            opamp label/.style={xshift=-8mm, font=\small,right},
            buffer label/.style={xshift=-6mm, font=\small,right}
        ]
        \draw(0,0) node[op amp](oa1){} (oa1) node[opamp label]{OA1}; 
    \end{circuitikz}
\end{document}

一切都运行正常,直到昨天,我将系统更新到 Ubuntu 16.04,并将其更新到 TeXLive 2015。现在它给出了错误:

! Package pgfkeys Error: I do not know the key '/tikz/opamp label' and I am going to ignore it. Perhaps you misspelled it.

See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.12 ...node[op amp](oa1){} (oa1) node[opamp label]
                                                   {OA1};

这个问题的根源是什么?

更新

问题出在american键上。如果我最后使用它或移动(比如Torbjørn 的回答)它可以工作,但是:

\documentclass{standalone}
\usepackage{tikz}
\usepackage[siunitx]{circuitikz}
\tikzset{
  opamp label/.style={xshift=-8mm, font=\small,right},
  buffer label/.style={xshift=-6mm, font=\small,right}
}
\begin{document}
    \begin{circuitikz}[
            american,
        ]
        \draw(0,0) node[op amp](oa1){} (oa1) node[opamp label]{OA1}; 
            \path (3.5,0) node [draw, minimum size=2cm] (lpf) {}
            +(-0.8cm, -0.5cm) edge[gray, thin, ->] +(0.8cm,-0.5cm);
    \end{circuitikz}
\end{document}

给出了一个令人费解的错误:

! Package tikz Error: Giving up on this path. Did you forget a semicolon?.

See the tikz package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.14 ....5cm) edge[gray, thin, ->] +(0.8cm,-0.5cm)
                                                  ;

好像现在环境无法处理\path多行断线。

文件列表:

 *File List*
standalone.cls    2015/07/15 v1.2 Class to compile TeX sub-files standalone
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
standalone.cfg    2015/07/15 v1.2 Default configuration file for 'standalone' c
lass
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
    tikz.sty    2015/08/07 v3.0.1a (rcs-revision 1.151)
     pgf.sty    2015/08/07 v3.0.1a (rcs-revision 1.15)
  pgfrcs.sty    2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v3.0.1a (rcs-revision 1.7)
graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
  pgfsys.sty    2014/07/09 v3.0.1a (rcs-revision 1.48)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.1a (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.1a (rcs-revision 1.25)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
circuitikz.sty    2015/05/15 The CircuiTikz circuit drawing package version 0.4

 xstring.sty    2013/10/13  v1.7c  String manipulations (C Tellechea)
 siunitx.sty    2016/03/01 v2.6q A comprehensive (SI) units package
   expl3.sty    2016/01/19 v6377 L3 programming layer (loader) 
expl3-code.tex    2016/01/19 v6377 L3 programming layer 
l3pdfmode.def    2015/11/11 v6250 L3 Experimental driver: PDF mode
  xparse.sty    2016/01/19 v6377 L3 Experimental document command parser
 amstext.sty    2000/06/29 v2.01 AMS text
  amsgen.sty    1999/11/30 v2.0 generic functions
   array.sty    2014/10/28 v2.4c Tabular extension package (FMi)
l3keys2e.sty    2016/01/19 v6377 LaTeX2e option processing using LaTeX3 keys
translator.sty    2010/06/12 ver 1.10
translator-language-mappings.tex
supp-pdf.mkii
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
translator-basic-dictionary-English.dict    
siunitx-abbreviations.cfg    2016/03/01 v2.6q siunitx: Abbreviated units
 *

答案1

我不知道确切的原因,但大概是circuitikz处理添加到环境可选参数的键的方式发生了一些变化circuitikz。无论如何,一个简单的解决方案是在其他地方定义样式\tikzset,例如

\documentclass{standalone}
\usepackage{tikz}
\usepackage[siunitx]{circuitikz}
\tikzset{
  opamp label/.style={xshift=-8mm, font=\small,right},
  buffer label/.style={xshift=-6mm, font=\small,right}
}
\begin{document}
    \begin{circuitikz}[american]
        \draw(0,0) node[op amp](oa1){} (oa1) node[opamp label]{OA1}; 
    \end{circuitikz}
\end{document}

相关内容