Skip to content

Commit

Permalink
Merge pull request #446 from pep-dortmund/circuitikz
Browse files Browse the repository at this point in the history
Add CircuiTikZ slides
  • Loading branch information
aknierim authored Oct 2, 2024
2 parents 8bb9793 + 7f5b8f2 commit 1426e93
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 1 deletion.
6 changes: 6 additions & 0 deletions common/packages.tex
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@
shapes,
}

\usepackage[
europeanresistors, % follow DIN EN 60617-4
americaninductors, % follow DIN EN 60617-4
siunitx
]{circuitikz}

\usegdlibrary{trees}
\usepackage[compat=1.1.0]{tikz-feynman}

Expand Down
82 changes: 81 additions & 1 deletion latex/content/tikz.tex
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,87 @@ \section{Zeichnen mit TikZ}
\end{CodeExample}
\end{frame}

\begin{frame}[fragile]{Tikz-Feynman}
%% CircuiTikZ
\begin{frame}[fragile]{%
CircuiTi\textit{k}Z
\hfill
\doc{http://mirrors.ctan.org/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf}{circuitikz}
}
\begin{Packages}
\begin{minted}{latex}
\usepackage[
europeanresistors, % DIN EN 60617-4 folgen
americaninductors, % DIN EN 60617-4 folgen
siunitx
]{circuitikz}
\end{minted}
\end{Packages}
\begin{CodeExample}{0.65}[Einfacher Schaltkreis]
\begin{minted}{latex}
\begin{circuitikz}
\draw (0,0) -- (0, 1.3)
to[open, o-o, l=$U$] (0, 1.8)
-- (0,3)
-- (2,3)
to[R] (2,0)
-- (0,0);
\end{circuitikz}
\end{minted}
\CodeResult
\begin{circuitikz}
\draw (0,0) -- (0, 1.3)
to[open, o-o, l=$U$] (0, 1.8)
-- (0,3) -- (2,3)
to[R=$R$] (2,0)
-- (0,0);
\end{circuitikz}
\end{CodeExample}
\end{frame}

\begin{frame}[fragile]{CircuiTi\textit{k}Z}
\begin{CodeExample}{0.68}[Komplexerer Schwingkreis]
\begin{minted}{latex}
\begin{circuitikz}
\ctikzset{bipoles/cuteswitch/thickness=0.5}
\draw (0, 0) -- (0, 3)
to[R, l=$R$, a=\qty{14.0}{\ohm}] (2, 3)
to[battery2, v^<=\qty{34.0}{\volt}] (3, 3)
-- (4, 3);
\draw (0, 1.5) -- (2, 1.5)
to[C=\qty{6.20}{\micro\farad}] (3, 1.5)
-- (3.35, 1.5) node[right, cute spdt mid] (S) {};
\draw (4, 3) -- (S.out 1) node[right] {$a$};
\draw (0, 0) -- (1.8, 0)
to[L=\qty{54.0}{\milli\henry}] (3.2, 0)
-- (4, 0)
-- (S.out 2) node[right] {$b$};
\end{circuitikz}
\end{minted}
\CodeResult
\begin{circuitikz}
\ctikzset{bipoles/cuteswitch/thickness=0.5}
\draw (0, 0) -- (0, 3)
to[R, l=$R$, a=\qty{14.0}{\ohm}] (2, 3)
to[battery2, v^<=\qty{34.0}{\volt}] (3, 3)
-- (4, 3);
\draw (0, 1.5) -- (2, 1.5)
to[C=\qty{6.20}{\micro\farad}] (3, 1.5)
-- (3.35, 1.5) node[right, cute spdt mid] (S) {};
\draw (4, 3) -- (S.out 1) node[right] {$a$};
\draw (0, 0) -- (1.8, 0)
to[L=\qty{54.0}{\milli\henry}] (3.2, 0)
-- (4, 0)
-- (S.out 2) node[right] {$b$};
\end{circuitikz}
\end{CodeExample}
\end{frame}

%% Tikz-Feynman
\begin{frame}[fragile]{%
Tikz-Feynman
\hfill
\doc{http://mirrors.ctan.org/graphics/pgf/contrib/tikz-feynman/tikz-feynman.pdf}{tikz-feynman}
}
\begin{Packages}
\mintinline{latex}+\usepackage{tikz-feynman}+
\end{Packages}
Expand Down

0 comments on commit 1426e93

Please sign in to comment.