> 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/ja/fen-ye-bie/07-circuitikz-package.md).

# CircuiTikZパッケージ

## はじめに

この記事では、の基本的な使い方を説明します [CircuiTikz パッケージ](https://ctan.org/pkg/circuitikz?lang=en) これは、電気回路や電子回路の図を組版するためのマクロ群を提供します。このパッケージを使うには、次のように書いて読み込む必要があります

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

LaTeX 文書のプリアンブルに記述します。環境 `circuitikz` は、その後 TikZ の構文を使って図を組版するために使用できます。CircuiTikz にはいくつかの *ノード* が含まれており、標準の TikZ 構文で使用できます。次の例では、 `variable cute inductor`:

```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}
```

[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)

この例では次の出力が生成されます:

![OLV2circuitikz1.png](/files/e00737fd281b23e3a514ad66deaa0510bf7787a0)

## 動作する例

前述のとおり、電気回路図を描くには、次のより複雑な例に示すように標準の TikZ 構文を使います:

```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}
```

[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)

この例では次の出力が生成されます:

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

ノード `short`, `V`, `R` や `L` をここに示しますが、ほかにもたくさんあります—いくつかは次の節に挙げられています。

## いくつかのノード型の一覧

CircuiTikz が提供する要素のいくつかを以下に示します。あわせて、Overleaf で直接開いて表を作成できるリンクもあります。については [この **circuitikz** パッケージのドキュメント](http://mirrors.ctan.org/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf) 追加のノード型を参照してください。

### モノポール

![OVL2monopoles.png](/files/a317f0e696e0ce61cb43920b868456445eb864e3)

[この `circuitikz` **モノポール** ノードの表を 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)

### バイポール

![OVL2bipoles.png](/files/a713a78375c5e88e5df5ac80a8f165e94e726884)

[この `circuitikz` **バイポール** ノードの表を 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)

### ダイオード

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

[この `circuitikz` **ダイオード** ノードの表を 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)

### 動的バイポール

![OVL2dynamicalbipoles.png](/files/81e5b4ae3f10220a0198b383763b333eb8a69185)

[この `circuitikz` **動的バイポール** ノードの表を 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)

## さらに読む

詳しくは以下を参照してください：

* [TikZ ガイド](/latex/ja/to/05-tikz-package.md)
* [画像の挿入](/latex/ja/sononotopikku/27-inserting-images.md)
* [画像と表の配置](/latex/ja/to/02-positioning-images-and-tables.md)
* [表と図の一覧](/latex/ja/to/03-lists-of-tables-and-figures.md)
* [LaTeXで色を使う](/latex/ja/shu-shi-she-ding/13-using-colors-in-latex.md)
* [LaTeX における長さ](/latex/ja/shu-shi-she-ding/01-lengths-in-latex.md)
* [この **circuitikz** パッケージのドキュメント](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/ja/fen-ye-bie/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.
