为什么独立版无法工作

为什么独立版无法工作

我使用独立版,但有时它对我有用,有时则无效,为什么它在下面的代码中不起作用。

\documentclass[tikz,circuitikz]{standalone}
\usepackage{xcolor}
\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
\definecolor{myblue}{rgb}{0.0, 0.30, 0.60}
\usepackage{tikz-3dplot} 
\usetikzlibrary{angles, arrows.meta,}  
\usepackage[siunitx,cuteinductors,americanvoltages,americancurrents]{circuitikz}  
   \begin{document}     
        \begin{circuitikz}
        \draw (0,6) 
         to[V,name=V,o-o,i={$\mathbf{I}$},thick] (0,0)(0,6)
        to[R, l=$R_1$,name=R1,o-o] (3,6)
        to[C, l=$C_1$,name=C1,o-o] (6,6)
         (6,6)
         to[generic, l_=$\mathbf{Z}_b$,i={$\mathbf{I}$},name=R2,o-o]  (6,0)
        to[short,o-o] (0,0); 
         \node[below, xshift=43pt, yshift=10pt]  at (C1.n) {$v_b(t)$};             
         \node[below, xshift=2pt, yshift=-14pt] at (R1.n) {$30$  $\Omega$};
         \node[below,rotate=90] at (R2.n) {$74.1614 - j6.7508 \Omega$};
         \node[below, xshift=2pt, yshift=-24pt] at (C1.n) {$ - j106.1033 \, \Omega$};
         \node[below, xshift=60pt, yshift=8pt] at (V.n) {$v_s(t)=200 $ V };      
        \end{circuitikz}
        \end{document}
    

答案1

总的来说,因为其中有不必要的代码。具体来说,因为tikz,circuitikz应该删除文档选项,并 首先tikz-3dplot加载不必要的内容tikz(使用\usepackage\RequirePackage)。

姆韦

\documentclass
%[tikz,circuitikz]
[border=3mm]{standalone}
%\usepackage{xcolor}
%\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
%\definecolor{myblue}{rgb}{0.0, 0.30, 0.60}
%\usepackage{tikz-3dplot} 
%\usetikzlibrary{angles, arrows.meta,}  
\usepackage[siunitx,cuteinductors,americanvoltages,americancurrents]{circuitikz}  
   \begin{document}     
        \begin{circuitikz}
        \draw (0,6) 
         to[V,name=V,o-o,i={$\mathbf{I}$},thick] (0,0)(0,6)
        to[R, l=$R_1$,name=R1,o-o] (3,6)
        to[C, l=$C_1$,name=C1,o-o] (6,6)
         (6,6)
         to[generic, l_=$\mathbf{Z}_b$,i={$\mathbf{I}$},name=R2,o-o]  (6,0)
        to[short,o-o] (0,0); 
         \node[below, xshift=43pt, yshift=10pt]  at (C1.n) {$v_b(t)$};             
         \node[below, xshift=2pt, yshift=-14pt] at (R1.n) {$30$  $\Omega$};
         \node[below,rotate=90] at (R2.n) {$74.1614 - j6.7508 \Omega$};
         \node[below, xshift=2pt, yshift=-24pt] at (C1.n) {$ - j106.1033 \, \Omega$};
         \node[below, xshift=60pt, yshift=8pt] at (V.n) {$v_s(t)=200 $ V };      
        \end{circuitikz}
        \end{document}

相关内容