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.

I want to draw the circuits below, however, the code doesn't work. would someone help me?

enter image description here

\documentclass{article}

\usepackage{tikz}

\usetikzlibrary{circuits}
\usepackage{verbatim}


\begin{document}

\begin{tikzpicture}
    \sbEntree{E}
    \sbComp{a}{E}
    \sbBloc{b}{$H_1$}{a}
            \sbRelier[$E_1$]{E}{a}
    \sbBlocL{c}{$H_2$}{b}
            \sbRelier[$\epsilon$]{a}{b}
    \sbComph{d}{c}
            \sbRelier[u]{c}{d}
    \sbBlocL{e}{$H_3$}{d}
    \sbBlocL{f}{$H_4$}{e}
    \sbSortie[5]{S1}{f}
            \sbRelier{f}{S1}
            \sbNomLien[0.8]{S1}{$S_1$}
    \sbDecaleNoeudy[-4]{f}{u}
    \sbDecaleNoeudy{e}{v}
    \sbBlocr{r1}{$R_1$}{u}
    \sbBlocr{r2}{$R_2$}{v}
    \sbBlocrL{r3}{$R_3$}{r2}
    \sbRelieryx{f-S1}{r1}
    \sbRelierxy[n1]{r1}{d}
    \sbRelieryx{e-f}{r2}
    \sbRelierxy[n2]{r3}{a}
\end{tikzpicture}

\end{document}
share|improve this question
    
None of the \sb... commands is defined... –  Tom Bombadil Jul 29 '12 at 13:03

1 Answer 1

You need to include the schemabloc package1:

\documentclass{article}

\usepackage{schemabloc}

\usetikzlibrary{circuits}
\begin{document}

\begin{tikzpicture}
  ...
share|improve this answer
    
thanks,I tried it, however there is still error says "please type another file name",why? –  sweetyBaby Jul 29 '12 at 13:15
    
You probably need to download and install that package first. (The download link can be found on the referenced page on texample.net) –  knittl Jul 29 '12 at 13:23
3  
@sweetyBaby usually that error comes when you try to overwrite the pdf and in the meanwhile you visualize it with adobe reader. This reader doesn't allow to overwrite files while open, so close your file before compiling or use a viewer that allows that (SumatraPDF on Windows) –  Spike Jul 29 '12 at 13:35
    
@Spike in fact I don't use any viewer or visualize it when I compiling the file~~ –  sweetyBaby Jul 29 '12 at 16:08
    
@sweetyBaby And what happens if you just press ENTER when the compilation stops? Anyway, I think that you should edit the first post and report the useful part of the .log file –  Spike Jul 29 '12 at 16:32

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.