2

enter image description hereI want to draw a crystal oscillator circuit diagram using circuitikz. How do add crystal? I used http://web.mit.edu/outland/share/texmf/doc/latex/circuit_macros/CMman.pdf

\begin{circuitikz}
    \draw (0,0) [xtal] (4,0);       
\end{circuitikz}

It does not recognize xtal. Please let me know what should I use?

I want to place "crystal" in the circuit.

3
  • 3
    Hello and welcome to TeX.SE! I suppose xtal is a Tikz style. Do you have a more complete code to share? I mean, including the preamble, because we have no way of knowing what that style is about.
    – Alenanno
    Commented Jun 23, 2016 at 12:23
  • The latest version features PZ or piezoelectric. I also notice a few other new symbols. Commented Jun 23, 2016 at 22:58
  • Could you provide me a link to find symbols in latest version. Thanks. Commented Jul 8, 2016 at 14:11

1 Answer 1

4

Here is a sample code in circuitikz which includes PZ as suggested by John Kormylo.

\documentclass{article}

\usepackage{tikz}
\usepackage{circuitikz}

\begin{document}

\begin{figure}[htp!]
    \begin{center}
    \begin{circuitikz}
    \draw (2,0)
        to [Tnpn,n=npn] (2,1.4)
        (npn.E) node[right=3mm, above=5mm]{$Q$}; % Label the transistor
    \draw (2,1) to (2,3) node[circ]{} 
        to [PZ,l=$X_1$] (0,3)
        to [R,l_=$1\Omega$] (0,0.7) node[circ]{}
        to (1.2,0.7);
    \end{circuitikz}
    \caption{My first circuit.}
    \end{center}
\end{figure}

\end{document}

and it gives the following output

enter image description here

10
  • I am getting error using PZ. Package pgfkeys Error: I do not know the key '/tikz/PZ' and I am going to ignore it. Perhaps you misspelled it. [PZ] Commented Jul 8, 2016 at 14:20
  • It works on my desktop[MikTeX latest version] as well as on my MBP[MacTex latest version] without a problem. You may need to update your packages I guess.
    – Khaaba
    Commented Jul 9, 2016 at 5:43
  • I am using TexLive in Ubuntu. Does it matter? Do MikTex and TexLive have different packages? Commented Jul 11, 2016 at 20:05
  • It doesn't matter as long as it's latest! TeXLive latest updates are same!
    – Khaaba
    Commented Jul 13, 2016 at 2:19
  • 1
    This is not a problem of circuitikz, moreover, the ubuntu packages are just too old. Please use a manual installation method for texlive, the the tlmgr-application will be installed(It is missing at the ubuntu-packages!). Use this to update you tex installation regularly, and each year in the summer do a reinstall of the new texlive installation.
    – sistlind
    Commented Jul 23, 2016 at 7:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .