1

I am learning LaTeX, and i was trying to follow some examples, and i came across this one from CircuiTikZ enter image description here

\begin{circuitikz}[]
\draw (0,2) node[npn, tr circle](Q1){};
\ctikzset{transistor circle/relative thickness=2}
\draw (2,2) node[npn, tr circle](Q1){};
\ctikzset{transistor circle/color=red}
\draw (0,0) node[npn, tr circle](Q1){};
\ctikzset{transistor circle/color=default}
\ctikzset{transistor circle/dash={{4pt}{4pt}{1pt}{4pt}}}
\draw[color=blue] (2,0) node[npn, tr circle](Q1){};
\end{circuitikz}

I am using OverLeaf

enter image description here

As you can see, there is no cirle arround the transistors and this error shows up I do not know the key '/tikz/tr circle' and I am going to ignore it. Perhaps you misspelled it.

I have read the documentation and searched online and cant find anything. Do you have any idea why this is not working?

Here is the total code

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}

\usepackage{graphicx} \usepackage{placeins} \usepackage{pgfplots} \usepackage{pgfkeys}

\usepackage{tikz}

\usepackage{circuitikz}

\usetikzlibrary{shapes,arrows} \usetikzlibrary{matrix,shapes,arrows,positioning,chains}

\usetikzlibrary{intersections}

\begin{document}

\begin{circuitikz}[] \draw (0,2) nodenpn, tr circle{}; \ctikzset{transistor circle/relative thickness=2} \draw (2,2) nodenpn, tr circle{}; \ctikzset{transistor circle/color=red} \draw (0,0) nodenpn, tr circle{}; \ctikzset{transistor circle/color=default} \ctikzset{transistor circle/dash={{4pt}{4pt}{1pt}{4pt}}} \draw[color=blue] (2,0) nodenpn, tr circle{}; \end{circuitikz}

\end{document}

  • tr circle is very new --- probably overleaf has an older release. You can check this: https://tex.stackexchange.com/questions/524328/i-need-to-use-a-different-version-of-circuitikz-how-can-i-do-that – Rmano Feb 23 '21 at 13:15
  • tr circle has been added in version 1.2.6 (2020-12-16), so it's highly improbable that overleaf has it. – Rmano Feb 23 '21 at 13:18
  • https://tex.stackexchange.com/help/someone-answers – Rmano Mar 07 '21 at 10:11

1 Answers1

2

This is the situation at overleaf as of today:

If you check at https://circuitikz.github.io/circuitikz/circuitikzmanualgit.pdf (Changelog and Release Notes, near the end) you'll see that the tr circle was introduced in 1.2.6.

You can follow the instruction at https://tex.stackexchange.com/a/524329/38080 to use a newer version of circuitikz on overleaf.

BTW the above figure was generated with:

\documentclass[border=5pt]{standalone}
\usepackage{circuitikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}

\today{}: \begin{tabular}{lll} Tikz:& \pgfversion & \pgfversiondate\ Pgfplots:& \pgfplotsversion & \pgfplotsversiondate \ Circuitikz:& \pgfcircversion & \pgfcircversiondate\ \end{tabular}

\end{document}

Rmano
  • 40,848
  • 3
  • 64
  • 125