> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/no/fagspesifikt/07-circuitikz-package.md).

# CircuiTikz-pakken

## Innledning

Denne artikkelen forklarer grunnleggende bruk av [CircuiTikz-pakken](https://ctan.org/pkg/circuitikz?lang=en) som tilbyr et sett med makroer for satsing av elektriske og elektroniske nettverk. For å bruke denne pakken må den importeres ved å skrive

```latex
\usepackage{circuitikz}
```

i LaTeX-dokumentets preamble. Miljøet `circuitikz` kan deretter brukes til å sette opp diagrammer ved hjelp av TikZ-syntaks. CircuiTikz inneholder flere *noder* som kan brukes med standard TikZ-syntaks; følgende eksempel bruker en node kalt `variabel pen induktor`:

```latex
\documentclass{article}
\usepackage{circuitikz}
\begin{document}
\begin{center}
\begin{circuitikz}
\draw (0,0) to[ variable cute inductor ] (2,0);
\end{circuitikz}
\end{center}
\end{document}
```

[Åpne dette eksemplet i Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=First+example+using+circuitikz\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bcircuitikz%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Bcenter%7D%0A%5Cbegin%7Bcircuitikz%7D%0A%5Cdraw+%280%2C0%29+to%5B+variable+cute+inductor+%5D+%282%2C0%29%3B+%0A%5Cend%7Bcircuitikz%7D%0A%5Cend%7Bcenter%7D%0A%5Cend%7Bdocument%7D)

Dette eksemplet gir følgende resultat:

![OLV2circuitikz1.png](/files/8111098b764a09830120e83f912a33325c13e67c)

## Et fungerende eksempel

Som nevnt bruker du standard TikZ-syntaks for å tegne elektriske nettverksdiagrammer, som demonstrert i det følgende, mer komplekse eksempelet:

```latex
\documentclass{article}
\usepackage{circuitikz}
\begin{document}
\begin{center}
\begin{circuitikz}[american voltages]
\draw
  (0,0) to [short, *-] (6,0)
  to [V, l_=$\mathrm{j}{\omega}_m \underline{\psi}^s_R$] (6,2)
  to [R, l_=$R_R$] (6,4)
  to [short, i_=$\underline{i}^s_R$] (5,4)
  (0,0) to [open, v^>=$\underline{u}^s_s$] (0,4)
  to [short, *- ,i=$\underline{i}^s_s$] (1,4)
  to [R, l=$R_s$] (3,4)
  to [L, l=$L_{\sigma}$] (5,4)
  to [short, i_=$\underline{i}^s_M$] (5,3)
  to [L, l_=$L_M$] (5,0);
\end{circuitikz}
\end{center}
\end{document}
```

[Åpne dette eksemplet i Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=More+advanced+example+using+circuitikz\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bcircuitikz%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Bcenter%7D%0A%5Cbegin%7Bcircuitikz%7D%5Bamerican+voltages%5D%0A%5Cdraw%0A++%280%2C0%29+to+%5Bshort%2C+%2A-%5D+%286%2C0%29%0A++to+%5BV%2C+l_%3D%24%5Cmathrm%7Bj%7D%7B%5Comega%7D_m+%5Cunderline%7B%5Cpsi%7D%5Es_R%24%5D+%286%2C2%29+%0A++to+%5BR%2C+l_%3D%24R_R%24%5D+%286%2C4%29+%0A++to+%5Bshort%2C+i_%3D%24%5Cunderline%7Bi%7D%5Es_R%24%5D+%285%2C4%29+%0A++%280%2C0%29+to+%5Bopen%2C+v%5E%3E%3D%24%5Cunderline%7Bu%7D%5Es_s%24%5D+%280%2C4%29+%0A++to+%5Bshort%2C+%2A-+%2Ci%3D%24%5Cunderline%7Bi%7D%5Es_s%24%5D+%281%2C4%29+%0A++to+%5BR%2C+l%3D%24R_s%24%5D+%283%2C4%29%0A++to+%5BL%2C+l%3D%24L_%7B%5Csigma%7D%24%5D+%285%2C4%29+%0A++to+%5Bshort%2C+i_%3D%24%5Cunderline%7Bi%7D%5Es_M%24%5D+%285%2C3%29+%0A++to+%5BL%2C+l_%3D%24L_M%24%5D+%285%2C0%29%3B+%0A%5Cend%7Bcircuitikz%7D%0A%5Cend%7Bcenter%7D%0A%5Cend%7Bdocument%7D)

Dette eksemplet gir følgende resultat:

![OLV2circuitikz2.png](/files/f84b8ff5961472eba989f8da2560d5554b74d1d6)

Nodene `short`, `V`, `R` og `V` presenteres her, men det finnes mange flere—noen er listet i neste seksjon.

## Liste over noen nodetyper

Noen av elementene som tilbys av CircuiTikz er listet nedenfor, sammen med lenker du kan åpne direkte i Overleaf for å lage tabellene. Se [Den **circuitikz** pakkedokumentasjon](http://mirrors.ctan.org/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf) for flere nodetyper.

### Enpoler

![OVL2monopoles.png](/files/140434bdbbd365504f954c9d976a90743fe4aa7a)

[Åpne denne tabellen over `circuitikz` **enpolet** noder i Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Monopole+nodes+for+circuitikz\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bgeometry%7D%0A%5Cgeometry%7Blandscape%2C+textwidth%3D27cm%7D%0A%5Cusepackage%7Bcircuitikz%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cnewcommand%7B%5Cthiscirc%7D%5B1%5D%7B%25%0A%5Ctexttt%7B%231%7D%5Ckern5pt%5Chfill%0A%5Cbegin%7Bcircuitikz%7D%25%0A%5Cdraw+%280%2C0%29+node%5B+%231+%5D+%7B%7D%3B%25%282%2C0%29%3B+%0A%5Cend%7Bcircuitikz%7D%25%0A%7B%5Chspace%7B5mm%7D%7D%25%0A%7D%0A%0A%5Crenewcommand%7B%5Carraystretch%7D%7B2%7D%0A%5Cbegin%7Bcenter%7D%0A%5Cbegin%7Btabular%7D%7Blll%7D+%0A%5Cthiscirc%7Bground%7D+%26+%5Cthiscirc%7Bsground%7D+%26+%5Cthiscirc%7Bnground%7D%5C%5C%0A%5Cthiscirc%7Brground%7D+%26+%5Cthiscirc%7Bpground%7D+%26+%5Cthiscirc%7Bcground%7D%5C%5C%0A%5Cthiscirc%7Btlinestub%7D+%26+%5Cthiscirc%7Bantenna%7D+%26+%5Cthiscirc%7Brxantenna%7D%5C%5C%0A%5Cend%7Btabular%7D%0A%5Cend%7Bcenter%7D%0A%0A%5Cend%7Bdocument%7D)

### Bipoler

![OVL2bipoles.png](/files/65f783e759bdca3f58753082e979dde09e3550d5)

[Åpne denne tabellen over `circuitikz` **bipol** noder i Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Bipole+nodes+for+circuitikz\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bgeometry%7D%0A%5Cgeometry%7Blandscape%2C+textwidth%3D27cm%7D%0A%5Cusepackage%7Bcircuitikz%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cnewcommand%7B%5Cbipole%7D%5B1%5D%7B%25%0A%5Ctexttt%7B%231%7D%5Ckern5pt+%5Chfill%0A%5Cbegin%7Bcircuitikz%7D%25%0A%5Cdraw+%280%2C0%29+to%5B+%231+%5D+%282%2C0%29%3B+%0A%5Cend%7Bcircuitikz%7D%25%0A%5Chspace%7B5mm%7D%25%0A%7D%0A%0A%5Crenewcommand%7B%5Carraystretch%7D%7B3%7D%0A%5Cbegin%7Bcenter%7D%0A%5Cbegin%7Btabular%7D%7Blll%7D+%0A%5Cbipole%7Bammeter%7D+%26+%5Cbipole%7Bvoltmeter%7D+%26+%5Cbipole%7Bshort%7D%5C%5C%0A%5Cbipole%7Bopen%7D+%26+%5Cbipole%7Blamp%7D+%26+%5Cbipole%7Bgeneric%7D%5C%5C%0A%5Cbipole%7Btgeneric%7D+%26+%5Cbipole%7Bageneric%7D+%26+%5Cbipole%7Bfullgeneric%7D%5C%5C%0A%5Cbipole%7Btfullgeneric%7D+%26+%5Cbipole%7Bmemristor%7D+%26+%5Cbipole%7Bamerican+resistor%7D%5C%5C%0A%5Cbipole%7BvR%7D+%26+%5Cbipole%7Bamerican+potentiometer%7D+%26+%5Cbipole%7Beuropean+resistor%7D%5C%5C%0A%5Cbipole%7Beuropean+resistor%7D+%26+%5Cbipole%7Beuropean+potentiometer%7D+%26+%5Cbipole%7Bvaristor%7D%5C%5C%0A%5Cbipole%7Bphotoresistor%7D+%26+%5Cbipole%7Bthermocouple%7D+%26+%5Cbipole%7Bthermistor%7D%5C%5C%0A%5Cbipole%7Bthermistor+ntc%7D+%26+%5Cbipole%7Bfuse%7D+%26+%5Cbipole%7Bafuse%7D%5C%5C%0A%5Cbipole%7Bbattery%7D+%26+%5Cbipole%7Bbattery1%7D+%26+%5Cbipole%7Beuropean+voltage+source%7D%5C%5C%0A%5Cbipole%7Bamerican+voltage+source%7D+%26+%5Cbipole%7Beuropean+current+source%7D+%26+%5Cbipole%7Bamerican+current+source%7D%5C%5C%0A%5Cend%7Btabular%7D%0A%5Cend%7Bcenter%7D%0A%0A%5Cend%7Bdocument%7D)

### Dioder

![OVL2diodes.png](/files/cfb41f238ceb68367b207dd0fface3d6b1d869cf)

[Åpne denne tabellen over `circuitikz` **diode** noder i Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Diode+nodes+for+circuitikz\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bgeometry%7D%0A%5Cgeometry%7Blandscape%2C+textwidth%3D27cm%7D%0A%5Cusepackage%7Bcircuitikz%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cnewcommand%7B%5Cbipole%7D%5B1%5D%7B%25%0A%5Ctexttt%7B%231%7D%5Ckern5pt+%5Chfill%0A%5Cbegin%7Bcircuitikz%7D%25%0A%5Cdraw+%280%2C0%29+to%5B+%231+%5D+%282%2C0%29%3B+%0A%5Cend%7Bcircuitikz%7D%25%0A%5Chspace%7B5mm%7D%25%0A%7D%0A%0A%5Crenewcommand%7B%5Carraystretch%7D%7B3%7D%0A%5Cbegin%7Bcenter%7D%0A%5Cbegin%7Btabular%7D%7Blll%7D+%0A%5Cbipole%7Bempty+diode%7D+%26+%5Cbipole%7Bempty+Schottky+diode%7D+%26+%5Cbipole%7Bempty+Zener+diode%7D%5C%5C%0A%5Cbipole%7Bempty+tunnel+diode%7D+%26+%5Cbipole%7Bphotodiode%7D+%26+%5Cbipole%7Bempty+diode%7D%5C%5C%0A%5Cbipole%7Bempty+varcap%7D+%26+%5Cbipole%7Bfull+diode%7D+%26+%5Cbipole%7Bfull+Schottky+diode%7D%5C%5C%0A%5Cbipole%7Bfull+Zener+diode%7D+%26+%5Cbipole%7Bfull+tunnel+diode%7D+%26+%5Cbipole%7Bfull+photodiode%7D%5C%5C%0A%5Cbipole%7Bfull+led%7D+%26+%5Cbipole%7Bfull+varcap%7D+%26+%5Cbipole%7Bsquid%7D%5C%5C%0A%5Cbipole%7Bbarrier%7D+%26+%26+%5C%5C%0A%5Cend%7Btabular%7D%0A%5Cend%7Bcenter%7D%0A%0A%5Cend%7Bdocument%7D)

### Dynamiske bipoler

![OVL2dynamicalbipoles.png](/files/fccfa472dd02ca73625c651d38895c72a1249292)

[Åpne denne tabellen over `circuitikz` **dynamisk bipol** noder i Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Dynamical+bipole+nodes+for+circuitikz\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bgeometry%7D%0A%5Cgeometry%7Blandscape%2C+textwidth%3D27cm%7D%0A%5Cusepackage%7Bcircuitikz%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cnewcommand%7B%5Cbipole%7D%5B1%5D%7B%25%0A%5Ctexttt%7B%231%7D%5Ckern5pt+%5Chfill%0A%5Cbegin%7Bcircuitikz%7D%25%0A%5Cdraw+%280%2C0%29+to%5B+%231+%5D+%282%2C0%29%3B+%0A%5Cend%7Bcircuitikz%7D%25%0A%5Chspace%7B5mm%7D%25%0A%7D%0A%0A%5Crenewcommand%7B%5Carraystretch%7D%7B3%7D%0A%5Cbegin%7Bcenter%7D%0A%5Cbegin%7Btabular%7D%7Blll%7D+%0A%5Cbipole%7Bcapacitor%7D+%26+%5Cbipole%7Bpolar+capacitor%7D+%26+%5Cbipole%7Bvariable+capacitor%7D%5C%5C%0A%5Cbipole%7Bcute+inductor%7D+%26+%5Cbipole%7Bvariable+cute+inductor%7D+%26+%5Cbipole%7Bamerican+inductor%7D%5C%5C%0A%5Cbipole%7Bvariable+american+inductor%7D+%26+%5Cbipole%7Beuropean+inductor%7D+%26+%5Cbipole%7Bvariable+european+inductor%7D%5C%5C%0A%5Cbipole%7Btransmission+line%7D+%26+%5Cbipole%7Bvsourcesin%7D+%26+%5Cbipole%7Bisourcesin%7D%5C%5C%0A%5Cbipole%7Bclosing+switch%7D+%26+%5Cbipole%7Bopening+switch%7D+%26+%5Cbipole%7Bpush+button%7D%5C%5C%0A%5Cend%7Btabular%7D%0A%5Cend%7Bcenter%7D%0A%0A%5Cend%7Bdocument%7D)

## Videre lesning

For mer informasjon, se:

* [TikZ-guiden](/latex/no/figurer-og-tabeller/05-tikz-package.md)
* [Sette inn bilder](/latex/no/flere-emner/27-inserting-images.md)
* [Plassering av bilder og tabeller](/latex/no/figurer-og-tabeller/02-positioning-images-and-tables.md)
* [Lister over tabeller og figurer](/latex/no/figurer-og-tabeller/03-lists-of-tables-and-figures.md)
* [Bruke farger i LaTeX](/latex/no/formatering/13-using-colors-in-latex.md)
* [Lengder i LaTeX](/latex/no/formatering/01-lengths-in-latex.md)
* [Den **circuitikz** pakkedokumentasjon](http://mirrors.ctan.org/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/no/fagspesifikt/07-circuitikz-package.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
