4

This must be a simple question to solve, but I'm stuck on it. According to CircuiTikZ Manual a simple push button is a to[push button] element in a circuit. But, in my case, it doesn't work!

Show the circuit code as I developed (When a ospst is shown, a push button should go):

\begin{circuitikz}[american voltages]
\draw 
  (-1,2) node[left] {$V_{PIN}$} to[short,o-] (0,2) %de -1,2 un nodo a través de una linea a 0,2
  to[R=$10K{\Omega}$] (0,0) node[ground] {} %y de ahí a R al ground
  (0,2) to[ospst,-o] (0,4) node[left=1mm] {$5V$} % y del 0,2 al 0,4 se dibuja el pulsador       
;
\end {circuitikz}

I'm using LYX in Ubuntu 12.10 and loaded the packages in Preamble:

\usepackage{tikz}
\usepackage[siunitx]{circuitikz}

The package circuitikz is part of the package texlive-pictures, version 2012.2012611-4.

Thanks a lot for your help

7

The following code:

\documentclass[border=10pt]{standalone}

\usepackage[siunitx]{circuitikz}

\begin{document}

\begin{circuitikz}[american voltages]
\draw 
  (-1,2) node[left] {$V_{\textrm{PIN}}$} to[short,o-] (0,2) %de -1,2 un nodo a través de una linea a 0,2
  to[R=10<\kilo \ohm>] (0,0) node[ground] {} %y de ahí a R al ground
  (0,2) to[push button,-o] (0,4) node[left=1mm] {\SI{5}{\volt}} % y del 0,2 al 0,4 se dibuja el pulsador       
;
\end {circuitikz}

\end{document}

provides me:

enter image description here

with an updated version of TeXLive.

I suspect the problem comes from the fact that push button has been introduced in the newer version of circuitikz, but you do not have them installed. Traditionally, Ubuntu 12.10 packages for LaTeX were providing an old release (2009 if I'm correct). My personal recommendation, is to always install a complete version, i.e see How to install "vanilla" TeXLive on Debian or Ubuntu?

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.