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
    Jun 23 '16 at 12:23
  • The latest version features PZ or piezoelectric. I also notice a few other new symbols. Jun 23 '16 at 22:58
  • Could you provide me a link to find symbols in latest version. Thanks. Jul 8 '16 at 14:11
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] Jul 8 '16 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
    Jul 9 '16 at 5:43
  • I am using TexLive in Ubuntu. Does it matter? Do MikTex and TexLive have different packages? Jul 11 '16 at 20:05
  • It doesn't matter as long as it's latest! TeXLive latest updates are same!
    – Khaaba
    Jul 13 '16 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
    Jul 23 '16 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.