> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/formatting/inline.md).

# インラインコンテンツ

インラインパレットを使って、画像、リンク、数式と TeX などを追加できます

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FQcBDNerKxNvi1X3Jnk2R%2F26_01_22_inline-palette%402x.png?alt=media&amp;token=08b0298b-627f-4394-addf-dd5b49cf3501" alt="A GitBook screenshot showing inline content options"><figcaption><p>コンテンツにインライン要素を追加します。</p></figcaption></figure>

インラインパレットを使うと、キーボードから手を離さずにテキストブロックへ追加コンテンツをすばやく加えられます。 `/` 任意のテキストブロックで / を入力すると、インラインパレットが開きます。スラッシュは、挿入するコンテンツに置き換えられます。

## 注釈

注釈を使うと、読者の思考の流れを妨げることなく、単語に追加の文脈を加えられます。単語の意味を説明したり、追加情報を挿入したりできます。読者は注釈付きテキストにカーソルを合わせると、テキストの上に注釈を表示できます。

### 注釈を作成する

注釈を作成するには、注釈を付けたいテキストを選択し、 **注釈を付ける** コンテキストメニューのオプションをクリックします。注釈を書いたら、注釈の外側をクリックしてテキストブロックの編集を続けます。

### Markdownでの表記

コンテンツを [Markdown脚注](https://www.markdownguide.org/extended-syntax/#footnotes) として記述すると、GitBookでは注釈として追加されます。脚注の識別子は、注釈を付けたい単語の直後に表示する必要があります。句読点やその他の記号の後には配置しないでください。

```markdown
これはシンプルな脚注[^1]で、こちらは長い脚注[^bignote]です。

[^1]: これは最初の脚注です。

[^bignote]: これは複数の段落とコードを含む脚注です。

    段落をインデントして脚注に含めます。

    `{ my code }`

    好きなだけ段落を追加できます。
```

### レンダリング例

Markdownソースでは、参照されたテキストに注釈が作成されます。

```markdown
注釈は追加の文脈を提供します[^annotation-example]。

[^annotation-example]: 「追加の文脈」にカーソルを合わせると、この注釈を読めます。
```

次のようにレンダリングされます。注釈付きテキストにカーソルを合わせると、注釈をプレビューできます。

注釈は追加の文脈を提供します。[^1]

## 画像

インライン画像は、ページ上でテキストと並んで表示されます。

デフォルトでは、画像は元のサイズに設定され、最大幅は300pxです。画像をクリックして書式設定パレットを開き、次の3つのオプションのいずれかを選択するとサイズを変更できます。

1. **インラインサイズ:** 画像はフォントに比例したサイズになります。アイコンやバッジに最適です。
2. **元のサイズ:** 画像は元のサイズのままインライン表示され、最大幅は300ピクセルです。
3. **ブロックに変換:** これにより、インライン画像がコンテンツと同じ幅の画像ブロックに変換されます。

{% hint style="info" %}
画像ブロックには、より多くのサイズオプションやキャプションを追加する機能などがありますが、テキストとインラインで表示されません。
{% endhint %}

### Markdownでの表記

{% code overflow="wrap" %}

```markdown
インライン画像の例: <img src=".gitbook/assets/GitBook - Dark.jpg" alt="GitBookロゴのダークバージョン" data-size="line">
```

{% endcode %}

次のようにレンダリングされます: インライン画像の例: <img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FQcBDNerKxNvi1X3Jnk2R%2F26_01_22_inline-palette%402x.png?alt=media&amp;token=08b0298b-627f-4394-addf-dd5b49cf3501" alt="GitBook logo" data-size="line">

## 絵文字

絵文字を追加するには、 `/` を入力してインラインパレットを開きます。または、 `:` と入力すると、絵文字のリストがその場にポップアップ表示されます。絵文字の名前を入力し始めると、選択肢を絞り込めます。

### Markdownでの表記

{% code overflow="wrap" %}

```markdown
:house:
:smile:
:dog:
```

{% endcode %}

次のようにレンダリングされます: :house: :smile: :dog: &#x20;

## リンク

3種類のリンクを挿入できます:

* [相対リンク](#relative-links)
* [絶対リンク](#absolute-links)
* [メールアドレス `mailto` リンク](#email-address-mailto-links)

### 相対リンク

相対リンクは、セクション内にすでに存在するページへリンクして作成するリンクです。相対リンクを使用する利点は、ページのURL、名前、または場所が変更されても参照先が最新の状態に保たれるため、リンク切れが少なくなることです。

相対リンクを挿入する方法は次のとおりです:

1. リンクを挿入したい段落内の位置をクリックするか、テキストを選択します。
2. / を入力してインラインパレットを開き、「リンク」を選択するか、コンテキストメニューの **リンク** ボタンをクリックするか、 **⌘ + K**.
3. リンク先にしたいページのタイトルを入力し始めます。
4. ドロップダウンの検索結果からページを選択します。
5. 次を押します `Enter`.

### 絶対リンク

絶対リンクは、コンテンツにコピー＆ペーストできる外部リンクです。ドキュメント外のコンテンツにリンクしたい場合に便利です。

絶対リンクを挿入するには:

1. リンクを挿入したい段落内の位置をクリックするか、テキストを選択します。
2. / を入力してインラインパレットを開き、「リンク」を選択するか、コンテキストメニューの **リンク** ボタンをクリックするか、 **⌘ + K**.
3. リンク先のURLを貼り付けます。
4. 次を押します `Enter`.

{% hint style="info" %}
**外部リンクが新しいタブで開かれないのはなぜですか？**

ドキュメント内で外部サイトへのリンクを追加すると、同じタブで開きます。

GitBookは、 [W3C推奨の動作](https://www.w3.org/TR/WCAG20-TECHS/G200.html) に従い、 [アクセシビリティ](https://it.wisc.edu/learn/make-it-accessible/websites-and-web-applications/when-to-open-links-in-a-new-tab/) をサポートし、読者に一貫性のある包括的な体験を提供します。
{% endhint %}

### メールアドレスのmailtoリンク

メールアドレス `mailto` リンクは、訪問者がリンクをクリックするとデフォルトのメールクライアントが開き、】【t\_9b982e59】 `宛先` フィールドにリンクのメールアドレスが入力され、そのアドレスへメールを作成できるようにしたい場合に便利です。

メールアドレス `mailto` リンクを挿入する方法:

1. リンクを挿入したい段落内の位置をクリックするか、テキストを選択します。
2. / を入力してインラインパレットを開き、「リンク」を選択するか、コンテキストメニューの **リンク** ボタンをクリックするか、 **⌘ + K**.
3. 次を貼り付けるか入力します `mailto:something@address.com`。このとき、 `something@address.com` を使用したいメールアドレスに置き換えます。
4. 次を押します `Enter`.

### Markdownでの表記

```markdown
[これはこのセクション内の別ページへの相対リンクです](../content-structure/page.md)
[これは絶対リンクです](https://www.gitbook.com/blog)
[これはリンクです](mailto:support@gitbook.com) サポート用メールアドレスへの
```

次のようにレンダリングされます:

[これはこのセクション内の別ページへの相対リンクです](/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/content-structure.md)\
[これは絶対リンクです](https://www.gitbook.com/blog)\
[これはリンクです](mailto:support@gitbook.com) サポート用メールアドレスへの

## 数式とTeX

このオプションを使用すると、コンテンツ内にインライン数式を作成できます。数式のレンダリングには [KaTeX](https://katex.org/docs/supported.html) ライブラリを使用しています。

{% hint style="info" %}
空のブロックでコマンドパレットを開き、2番目の「数式とTeX」オプションを選択すると、ブロックレベルの数式も挿入できます。
{% endhint %}

### Markdownでの表記

```markdown
これはインライン数式です: $$f(x) = x * e^{2 pi i \xi x}$$
```

次のようにレンダリングされます: これはインライン数式です: $$f(x) = x \* e^{2 pi i \xi x}$$

## ボタン

ボタンは、行動喚起を目立たせたり、ドキュメントに検索バーやAIに質問バーを追加したりする優れた方法です。読者を別の場所へ誘導したり、回答を見つける手助けをしたりできます。

### ボタンのアクション

ボタンはURLへのリンク以外にも使用できます。ページから直接、ボタンを検索バーまたはGitBook Assistantに質問するバーに変えられます。これらのアクションは公開済みページでも機能します。以下の例で確認できます。

次のアクションを設定できます:

#### **リンクボタンを追加する**

読者を別のページまたは外部URLに移動させます:<a href="/docs/documentation/ja-gitbook-documentation/ai-for-your-readers/gitbook-ai-assistant.md" class="button primary" data-icon="gitbook-assistant">Assistantについて詳しく見る</a>

#### **検索バーを追加する**

任意の事前設定クエリで検索を開きます: <button type="button" class="button primary" data-action="search" data-icon="magnifying-glass">検索...</button>

#### **AIに質問/GitBook Assistantバーを追加する**

任意の事前設定プロンプトでGitBook Assistantを開きます: <button type="button" class="button primary" data-action="ask" data-icon="gitbook-assistant">質問する...</button>

#### **無効なボタンを追加する**

意図的に無効化されたボタンを表示します:<a class="button primary">無効なボタン</a>

### ボタンを作成して設定する

1. 次を入力します `/` を選択します **ボタン**.
2. ボタンをクリックして、 **ラベル** メニューを開きます。
3. アクションを選択し、ラベルとスタイルを設定します。
4. 任意: 事前設定の検索クエリまたはAssistantプロンプトを追加します。

### スタイル

リンクボタンと無効なボタンには、プライマリとセカンダリの両方のスタイルがあります。以下にいくつか例を示します:

<a href="https://app.gitbook.com/join" class="button primary">GitBookに登録</a> <a href="#annotations" class="button secondary">ページ上部へ移動</a>

### Markdownでの表記

```markdown
<a href="https://app.gitbook.com" class="button primary">GitBook</a>
```

次のようにレンダリングされます: <a href="https://app.gitbook.com" class="button primary">GitBook</a>

## アイコン

アイコンは、段落、カード、その他のコンテンツに視覚的な文脈を加えます。カスタマイズ設定で定義したビジュアルスタイルが使用されます。

次を使用します `<i>` 要素にアイコン名の両方の形式を指定します。Font Awesomeのクラスとトークンは一致する必要があります:

```markdown
<i class="fa-rocket">:rocket:</i>
```

アイコン名を次から選択します [Font Awesomeアイコンピッカー](https://fontawesome.com/search)。サポートされていない名前は、レンダリングされなかったり、Git Syncで保持されなかったりする場合があります。

<i class="fa-facebook">:facebook:</i> <i class="fa-github">:github:</i> <i class="fa-x-twitter">:x-twitter:</i> <i class="fa-instagram">:instagram:</i>

### Markdownでの表記

```markdown
<i class="fa-github">:github:</i>
```

次のようにレンダリングされます: <i class="fa-github">:github:</i>

## 式

式を使用すると、変数で定義されたコンテンツを動的に表示できます。式は次の場所から挿入できます: `/` メニュー。挿入後に式をクリックすると式エディターが表示され、変数を参照して [条件付きで書式設定](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_operator) できます。

### Markdownでの表記

```markdown
<code class="expression">page.vars.inlineExampleProduct</code>へようこそ。
```

次のようにレンダリングされます: ようこそ <code class="expression">page.vars.inlineExampleProduct</code>.

[^1]: これは注釈です。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/formatting/inline.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
