\begin{figure}
\begin{circuitikz}
\draw (0,0)
to[V,v=$U_q$] (0,2) % The voltage source
to[short] (2,2)
to[R=$R_1$] (2,0) % The resistor
to[short] (0,0);
\end{circuitikz}
\caption{My first circuit.}
\end{figure}
and it creates the following circuit diagram:
All that is required are the circuitikz and siunitx packages which can be easily downloaded using tlmgr (the Tex-Live manager). On Ubuntu this can be done by running:
tlmgr install circuitikz
tlmgr install siunitx
I learned about using circuitikz from the following this tutorial which also contains a link to the circuitikz manual which came in handy.
All of the components in the circuit diagram on top are provided by the circuitikz package with the exception of the 7805 IC which I created by using primitive pgf directives I learned from this second tutorial. This was surprisingly easier than it sounds. And the output is very elegant.
(Note: The LaTeX commands generate pdf which I converted to a png using imagemagick before inserting it in to this blog)
No comments:
Post a Comment