Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
    
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Heiko Oberdiek Apr 17 at 12:32
add comment

1 Answer 1

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?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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