# 図形

組み込みの機能を使って、GitBook で直接、図やスケッチを作成できます [Excalidraw](https://excalidraw.com/) エディタ。その後、GitBook ページにそのまま追加できます。

図を作成するには、 `/` 空行で押して挿入パレットを開き、 **図形描画**を選択します。これにより Excalidraw のツールが入ったポップオーバーが開きます。終わったらポップオーバーを閉じるだけで、図は GitBook ページに表示されます。

GitBook は、スペース内の図を特別な SVG ファイルとして保存します。これらのファイルの拡張子は `drawing.svg`.

### 図形ブロックの例

<img src="/files/1c4fdb13c751103996a62e6c27a0cdd3765c58cd" alt="GitBook で描かれた図" class="gitbook-drawing">

### GitBook AI で描く

図形ブロックを使うときは、プロンプトを指定して GitBook AI にイラストの生成を依頼できます。プロンプトを入力して **生成**を押すか、表示されている提案プロンプトのいずれかを選んで始められます。

GitBook AI が描画を完了すると、ダブルクリックして完全な描画パレットを開き、好きなように編集できます。

図を編集するときは、 **AI を使って生成** ボタンをクリックすると、GitBook AI のプロンプトエディタが再び開き、新しい図を生成できます。

### Markdown での表現

```markdown
<img src="https://example.com/file.svg" alt="図の説明の例" class="gitbook-drawing">
```


---

# Agent Instructions: 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:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/creating-content/blocks/drawing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
