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.

How do I do this in TikZ:

I want to draw a circular node with a cross in it to resemble a multiplier like in the diagram shown in the link below. I can draw a circle but I don't know how to put the cross inside.

share|improve this question
add comment

3 Answers 3

up vote 14 down vote accepted
\documentclass{scrartcl}
\usepackage{tikz} 

\begin{document}
\begin{tikzpicture}[cross/.style={path picture={ 
  \draw[black]
(path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east);
}}]

 \node [draw](A){start};
 \node [draw,circle,cross,minimum width=1 cm](B) at (3,0){}; 
  \node [draw](C) at( 5,0){end}; 
\draw[->] (A) -- (B) -- (C);

\end{tikzpicture}

\end{document} 

enter image description here

share|improve this answer
    
Awesome! Thanks. –  Mir Apr 6 '11 at 19:24
add comment

I full the previous answer with a solution made ​​with the package schemabloc

\documentclass{article}
\usepackage{tikz}
\usepackage{schemabloc}


\begin{document}
{\centering
\begin{tikzpicture}
\sbEntree{dspk}           
\sbBloc[5]{band}{Bandpass filter}{dspk}     
\sbRelier[\parbox{5em}{DSPK \\ signal}]{dspk}{band}
 \sbBlocL{logic}{Logic circuit}{band}  
 \sbSumb[3]{sum}{logic}  
 \sbRelier{logic}{sum}
 \sbDecaleNoeudy[5]{band}{delay}
 \sbBloc[8]{delay}{Delay}{delay}
\sbRelieryx{band-logic}{delay}
\sbRelierxy{delay}{sum}
 \sbBlocL{int}{\parbox{5em}{Integrate \& Dump} }{sum}  
  \sbBlocL{thres}{\parbox{5em}{Treshold \ Device} }{int}  
  \sbSortie[4]{S}{thres}                
\sbRelier[OP]{thres}{S}
\end{tikzpicture}

}

\end{document}

Please note the package requires version 2.1cvs of pgf

share|improve this answer
add comment

Below a solution with four parameters for putting labels in the 4 circle sections. It would be nice to place the args relatively to the shape width/height, but I don't know how it can be done.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,calc}

\tikzset{add/.style n args={4}{
    minimum width=6mm,
    path picture={
        \draw[black] 
            (path picture bounding box.south east) -- (path picture bounding box.north west)
            (path picture bounding box.south west) -- (path picture bounding box.north east);
        \node at ($(path picture bounding box.south)+(0,0.13)$)     {\tiny #1};
        \node at ($(path picture bounding box.west)+(0.13,0)$)      {\tiny #2};
        \node at ($(path picture bounding box.north)+(0,-0.13)$)        {\tiny #3};
        \node at ($(path picture bounding box.east)+(-0.13,0)$)     {\tiny #4};
        }
    }
}

\begin{document}

\begin{tikzpicture}
\node[draw,circle,add={1}{2}{3}{4}] {}; 
\end{tikzpicture}

\end{document}

enter image description here enter image description here

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.