> 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/latexer/09-file-xxx-not-found-on-input-line-xxx.md).

# 入力行XXXでファイルXXXが見つかりません

このエラーは、LaTeX で見つけられないファイルに関連しています。このエラーは通常、次のいずれかの場合に表示されます。

* ファイルパスに使用禁止の文字が含まれている
* ファイルをアップロードし忘れている
* ファイルパスの綴りが間違っている。

プロジェクトに画像を正しく含める方法の詳細は、こちらの [チュートリアル](/latex/ja/sononotopikku/27-inserting-images.md)をご覧ください。また、画像を含めるたびに、必ず **`graphicx`** パッケージをプリアンブルに次のように記述して含める必要があることにも注意してください。 **`\usepackage{graphicx}`**。上記のいずれかのミスをすると、次のようなエラーが表示されます。

main.tex, 5行目

LaTeX Error: File \`image3' not found.

説明については LaTeX のマニュアルまたは LaTeX Companion を参照してください。すぐにヘルプを得るには H を入力してください。... l.8 \includegraphics{image3} 次のいずれの拡張子でもファイルを見つけられませんでした: .png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2,.eps 続行するには入力してみてください。うまくいかない場合は、終了するために X と入力してください。

## よくあるエラーの原因

**ファイルパスに使用禁止の文字がある**

LaTeX では、ファイルパス内の特定の文字に問題が生じることがあり、避けるべきです。場合によっては、こうした文字を使うとファイルが見つからないエラーになります。避けるべき文字には次のものがあります。

* スペース ( )
* パーセント記号 (`%`)
* バックスラッシュ (`\`)
* アクティブ化される文字。既定ではチルダのみで、改行できないスペースに展開されます (`~`)

**ファイルのアップロードを忘れている:**

プロジェクトにファイルを含めたい場合は、LaTeX が見つけられるように、そのファイルをプロジェクトにアップロードする必要があります。これは、下に示すように「upload」ボタンをクリックして行います

![Uploadimage.PNG](/files/0b8efa9081ead60b537215c4715499f5c7cf9b5f)

その後、ファイルは左側のメニューに表示されるはずです。

**ファイルパスが正しくない:**

ファイルを含めるときは、常にファイルパスを記述しなければなりません *ルートディレクトリからの*。これは、コンパイルしているメイン文書がルートディレクトリそのものではなく、ルートディレクトリ内のフォルダに保存されている場合でも同じです。その例を以下に示します

![Imagefolder.PNG](/files/ca9164371b22e15877259c502eb9139339fcd929)

ここでは、使用したい画像である **`image.PNG`** は、 **`folder2`**&#x306E;中に保存されており、その folder2 自体は **`folder`**&#x306E;中に保存されています。したがって、LaTeX に画像の場所を伝えるには、パスを次のように記述します。 **`folder/folder2/image`**。これは以下のように示されます

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\begin{document}

\begin{figure}
    \centering
    \includegraphics{ {folder/folder2/image} }
    \caption{これがあなたの画像です}
    \label{fig:my_label}
\end{figure}
\end{document}
```

![Imageexample.PNG](/files/c328c05c3a4466063d69627371f6f08727c9f26f)

**\graphicspath{...} を `\graphicspath{...}` 誤って使用する:**

プリアンブルで LaTeX に画像の保存場所を指定して、毎回ファイルパスを書かなくて済むようにする場合は、ファイルパスの末尾にスラッシュを付け、さらにファイルパス全体を中かっこで囲むことを忘れないでください。下に示すように

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\graphicspath{ {folder/folder2/} } %ここに画像を保存しています

\begin{document}

\begin{figure}
    \centering
    \includegraphics{image}
    \caption{これがあなたの画像です}
    \label{fig:my_label}
\end{figure}
\end{document}
```

![Imageexample.PNG](/files/c328c05c3a4466063d69627371f6f08727c9f26f)


---

# 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/latexer/09-file-xxx-not-found-on-input-line-xxx.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.
