Tag Info

Hot answers tagged

17

For the circuitikz approach: You need to tell TikZ what to do with (myand1.out), (myxnor.in 1), and so on. At the moment, you just mention the nodes, but don't tell TikZ to actually connect them, because you ended the previous \draw command already with the ;. Also, to connect nodes with straight lines, you need to use --, not |. Here's your example in a ...


14

Here is an example using circuitikz: \documentclass{article} \usepackage{tikz} \usepackage{circuitikz} \begin{document} \tikzset{full Schottky diode/.append style={bipoles/length=.4cm}} \tikzset{american voltages} \tikzset{american inductors} \tikzset{european resistors} \begin{circuitikz} % TRANSISTORS \draw (0,2) node[nigfete] (t1) {} ...


13

Here's one possibility using the tikz-dsp (Digital Signal Processing) library; the library can be downloaded following the provided link from TeXample.net. I defined two new styles for the adder, to obtain the label position illustrated in the image from the original question: \documentclass{article} \usepackage{siunitx} \usepackage{tikz} ...


12

The circuits library is not really suited for this kind of diagram. This can easily be achieved with three nodes and a few edges. The shapes.geometric library provides the ellipse shape. The auto=right option positions all nodes along a path on the right side (the default is left). The swap option changes this for only one node to the other side. Code ...


12

You can use yscale=-1: \documentclass{article} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw (0,0) node[op amp] (opamp1) {} (opamp1.+) node[left ] {$v_+$} (opamp1.-) node[left ] {$v_-$}; \draw (3,0) node[op amp,yscale=-1] (opamp2) {} (opamp2.+) node[left ] {$v_+$} (opamp2.-) node[left ] {$v_-$}; \end{circuitikz} ...


12

This can be best done with cylinders but for the shading effects one can do some manual construction too. \begin{tikzpicture} \draw[fill=blue!50](0,0) circle (1 and 2); \draw[top color=blue!25,bottom color=black,middle color=blue!50] (-0.5,2) arc (90:270:1 and 2) -- ++(0.5,0) arc (-90:-270:1 and 2) -- cycle; \draw[top color=white,bottom color=black!70] ...


11

With PSTricks. Just for fun! \documentclass[preview,border={10pt 10pt 10pt 40pt}]{standalone} \usepackage{pst-node} \def\obj#1{\makebox[1cm]{\strut#1}} \begin{document} \offinterlineskip \begin{psmatrix}[colsep=1cm,rowsep=3cm,mnode=oval] [name=l]\obj{x} & & [name=r]\obj{y}\\ & [name=b]\obj{daervz} \\ \end{psmatrix} ...


11

Question 1 Instead of scaling the circuit, you can use x=<length>, y=<length>, so labels, for example, won't be affected. Question 2 You can simply use -- and rounded corners to easily produce the smooth cuved path. In the example below, instead of \draw[>=latex,->,color=magenta,text=black, thick] (0.6,1.9) ...


11

The diagram would be improved alot by using connecting wires that are only horizontal or vertical. There is a conveient syntax |- for a path that is first vertical then horizontal, and the corresponding -|. You can apply colours to the individual symbols and to the connecting wires by specifying color=red. Perhaps this is close to what you are after: ...


10

I was able to reproduce the error and to fix it. Let's start to examine a simple document with a plot and a resistor: \documentclass[a4paper,11pt]{article} \usepackage{circuitikz} \usepackage{pgfplots} \pgfplotsset{compat=1.7} \usetikzlibrary{external} \tikzexternalize \tikzset{external/force remake} \begin{document} \begin{tikzpicture} ...


10

The circuitkiz manual show that you can draw the entire graphic in one single \draw command which looking at the example seems failry simple but positioning can be a bit of an issue. Using the [short] nodes you can pretty much position the elements where you want time (after a bit of trial and error) I eventually got this code out: ...


10

In my eyes, a drawing like that looks like a good job for a matrix. And honestly, the positioning with the circuitikz package seems complicated as the other answers prove … The advantage of a TikZ matrix and its library is that all nodes in it are named automatically: (<matrix name>-<row>-<column>). We can use these names later to connect ...


10

I was in the same search several weeks earlier, only on the Mac platform. I finally settled down with the circtuitikz, and found it intuitive to work with. I abandoned previous choice Circuit_Macro simply because CircuitTiKz suit my workflow, that means I don't want to have too much compile work. My current workflow look likes this, although on Mac ...


10

Components in CircuiTikz are defined in the pgfcirc*poles.sty files via pretty much low-level pgf commands. You can either try looking at the *sty files, in particular pgfcirctripoles.sty there most ports are defined, and cut&paste your way to a new component. If you manage to code it, please send it to me so I can add it for everyone to use :) send ...


9

Addressing your specific questions, but in reverse order: Is there a simpler way without using coordinates? Yes. You can use positioning tikz library which allows you to specify the placement of a new node or coordinate relative to the position to another node, with a simple syntax: \node[below=1cm of 0], for example, asuming that (0) is the name of a ...


9

I too find the circuitikz documentation a bit lacking, but you learn a lot from inspecting the examples. A quick [circuitikz] search on the site will lead you to more examples. Moreover, a few additional circuitikz examples are available at texample.net. Regarding spacing, my main piece of advice (which applies to any vector-graphics package, really) is to ...


8

Following Mythio's suggestion, you can use "pure" TikZ code to locate the labels. Here is how it works: draw the AND port and remember to give it a name because in such a way later on you can access the inputs and output pins; for example: \draw (0,0) node[rotate=90,and port] () {}; the blue circle represents the exact coordinates of the inputs and ...


8

You have to load circuitikz with the siunitx option. Also, the correct syntax is |component| = |value|<|unit|>. The unit macro needs to be surrounded by < and >. The expression may not be put in math mode by surrounding it with $. Here's an example: \documentclass{article} \usepackage[siunitx]{circuitikz} \begin{document} \begin{circuitikz} ...


8

For a one-off addition, I think you'd be best adding this as a feature request to the tracker on SourceForge. As a package developer myself, I find it a lot easier to have things listed in the database so I don't forget about them, which does happen with e-mails. That does mean having an account on SourceForge: you can use OpenID, which should mean you can ...


8

You may have to play around with the label distances, but the following works: Placing the additional nodes for the labels after setting the circuit. \documentclass{article} \usepackage{circuitikz}% http://ctan.org/pkg/circuitikz \begin{document} \begin{center} \begin{circuitikz} \draw (0,0) node[and port] (myand){} (myand.in 1) ...


8

A work around: \documentclass{article} \usepackage{circuitikz,caption} \begin{document} \begin{center} \begin{circuitikz}[american] \draw (2,0)--(0,0) node[ground]{} to[sV, v=\textit{vi=4Vpp}] (0,2) to[R, l=\textit{r}$_0$\textit{=50$\Omega$}](2,2) to[open] (2,0)--(5.5,0); \draw (2,2) to[short, *-] (2,1.3) to[short] (2.75,1.3) to[short] (2.75,1.65) to[short, ...


7

If you can live without appyling the coordinate transformation to the nodes I can offer a patch. The author probably forgot to get the current trafo independent from the rotation. It is kind of tedious to protect all possible shapes inside the scopes etc. so I just turned off the trafo. \documentclass[12pt]{article} ...


7

With TiKz: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \draw (0,0)coordinate (O)--++(30:1)coordinate (A)--++(90:4)coordinate (B)--++(150:1)coordinate (C)--cycle; \draw ($(A)!0.5!(B)$)--++(0:1)node[right]{$F$}; \draw ($(O)!0.5!(A)$)--++(-90:1)--++(180:2)node[left]{$b$}; \draw ...


7

You can use an and gate from the circuits.logic.IEC library from TikZ: \documentclass{article} \usepackage{circuitikz,siunitx} \usetikzlibrary{circuits.logic.IEC} \begin{document} \begin{circuitikz}[circuit logic IEC] \draw (4,0) node[european and port] (euand) {}; \node[ and gate, inputs={nnnnnnnn}, and gate IEC symbol={}, text height=3cm, ...


7

The TikZ circuit library is inspired by circuitikz. From the TikZ manual (Chapter 29: Circuit Libraries): Written and documented by Till Tantau, and Mark Wibrow. Inspired by the work of Massimo Redaelli. Massimo Redaelli is the author of the circuitikz package. Apparently (see @CountZero's comment) the two are not compatible, However, as far as I know ...


7

The monopole ground has only center anchor. So you can not refer to its north. Also positioning library uses that anchor when you say put it below such and such, so we have to reanchor it to its center. Hence everytime you want to refer to it either should use the node name or node name.center syntax. I would go with the TikZ' own circuit library to avoid ...


7

Since circuitikz is built upon TikZ, you can use \draw to draw a circle: \documentclass{article} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw (0,0) node[npn] (npn) {} (npn.base) node[anchor=east] {B} (npn.collector) node[anchor=south] {C} (npn.emitter) node[anchor=north] {E}; \draw ($(npn)-(0.18,0)$) circle [radius=18pt]; ...


7

I could not understand your question properly, especially the free body diagram part. However, will this be useful? \documentclass{article} \usepackage{graphicx} % to add figure environment that comes with caption \usepackage{caption} %if you don't want to float your figure for using \captionof \usepackage{tikz} ...


7

To put a drawing into a block, I advise you to create some macros with your drawings and put them in the nodes as in the example below \documentclass[border=10]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \newcommand{\symbolA}{ \tikz \draw[red] (0,0)--(0,0.2)--(0.2,0.2)--(0.2,0.4)--(0.4,0.4); } \newcommand{\symbolB}{ \tikz[y={(0,-1)}] ...


7

Maybe in this case it's easier to use the circuits.ee.IEC library in TikZ instead of circuitikz: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{circuits.ee.IEC} \begin{document} % Define a command for drawing dipole symbols with a bit of wire on either end \newcommand\esymbol[1]{\tikz[circuit ee IEC] \draw (0,0) -- (.1,0) node ...



Only top voted, non community-wiki answers of a minimum length are eligible