> 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/to-2/75-inserting-emojis-in-latex-documents-on-overleaf.md).

# OverleafのLaTeX文書に絵文字を挿入する

*注: この `[twemojis](https://www.ctan.org/pkg/twemojis)` パッケージは含まれていません* [*TeX Live*](/latex/ja/kurasufairu/02-overleaf-and-tex-live.md)*、そのためOverleafでは使用できません。*

## 絵文字文字とOverleafエディタ

Overleafは次を含むファイルを保存できません [NUL文字](https://en.wikipedia.org/wiki/Null_character) またはUnicodeの範囲外にある文字を含むファイルを編集することもできません [基本多言語面 (BMP)](https://en.wikipedia.org/wiki/Plane_\(Unicode\)).

Unicodeでは多くの絵文字文字が基本多言語面の外側のコードポイントに割り当てられており、これらは [第1面](https://en.wikibooks.org/wiki/Unicode/Character_reference/1F000-1FFFF)、つまりコードポイントは U+10000–U+1FFFF の範囲、具体的には U+1F000–U+1FFFF にあります。これは、Overleafエディタに絵文字文字をコピー＆ペーストしたい人にとって重要な結果をもたらします。現時点では、Overleafのテキストエディタは基本多言語面内の文字しか扱えませんが、将来のアップグレードで非BMP文字のサポートが追加されることを期待しています。

😀のような絵文字、またはその他の非BMP文字をOverleafエディタに貼り付けると、��という文字に変換されます。ただし、非BMPのUTF-8シーケンスを含むテキストファイルはアップロードできます。これらはOverleafエディタ内では編集できませんが、適切なLaTeXのファイル取り込みコマンドを使って文書内に挿入できます。

下の例に示すように、LaTeXパッケージが提供する適切なフォントとコマンドを使って絵文字を挿入できます。

## モノクロ絵文字

次の `\symbol` または `\char` コマンドを組み合わせて `fontspec`, [XƎLaTeX または LuaLaTeX](/latex/ja/narejjibsu/026-changing-compiler.md) と適切なフォントを使います。たとえば、次の [`emoji` パッケージ](https://ctan.org/pkg/emoji?lang=en)を使わなくても、Symbolaフォントでモノクロ絵文字を挿入できます:

```latex
落ち葉: {\fontspec{Symbola}\symbol{"1F343}}

または

落ち葉: {\fontspec{Symbola}\char"1F343}
```

&#x20;[Overleaf でこのモノクロ絵文字の例を開く](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Monochrome+emoji\&snip=%5Cdocumentclass%5B12pt%5D%7Barticle%7D%0A%5Cusepackage%7Bfontspec%7D%0A%5Cusepackage%7Bparskip%7D%0A%0A%5Cbegin%7Bdocument%7D%0AFalling+leaves%3A+%7B%5Cfontspec%7BSymbola%7D%5Csymbol%7B%221F343%7D%7D%0A%0Aor%0A%0AFalling+leaves%3A+%7B%5Cfontspec%7BSymbola%7D%5Cchar%221F343%7D%0A%5Cend%7Bdocument%7D)

すると、次の出力になります ![Symbola-falling-leaves.png](/files/c138c3ab941ec827c5cd37b72f6242b091963023)

絵文字のコードポイントは次の場所で確認できます [このウェブページ](https://unicode.org/emoji/charts/emoji-list.html).

## カラー絵文字

カラー絵文字を使いたい場合は、次の `[emoji](https://www.ctan.org/pkg/emoji)` パッケージをご覧ください。このパッケージは、LuaLaTeX + HarfBuzz のテキスト整形エンジンを使ってカラー絵文字フォントに正しくアクセスします。必要になるのは [プロジェクトのコンパイラを LuaLaTeX に変更することです](/latex/ja/narejjibsu/026-changing-compiler.md)。その後、次の `emoji` パッケージを読み込み、次のように記述します `\emoji{leaves}`.

```latex
\documentclass[12pt]{article}
\usepackage{emoji}

\begin{document}

これは \texttt{emoji} パッケージと LuaLaTeX を使ったカラー絵文字です:
\emoji{leaves}
\emoji{rose}

絵文字の修飾子を使えます:
\emoji{woman-health-worker-medium-skin-tone}
\emoji{family-man-woman-girl-boy}
\emoji{flag-malaysia}
\emoji{flag-united-kingdom}

\end{document}
```

&#x20;[Overleaf でこのライブ例を見る](https://www.overleaf.com/docs?engine=lualatex\&snip_name=colour+emojis+using+LuaLaTeX\&snip=%5Cdocumentclass%5B12pt%5D%7Barticle%7D%0A%5Cusepackage%7Bemoji%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%0AThese+are+colour+emojis+using+the+%5Ctexttt%7Bemoji%7D+package+and+LuaLaTeX%3A%0A%5Cemoji%7Bleaves%7D%0A%5Cemoji%7Brose%7D%0A%0AYou+can+use+emoji-modifiers%3A%0A%5Cemoji%7Bwoman-health-worker-medium-skin-tone%7D%0A%5Cemoji%7Bfamily-man-woman-girl-boy%7D%0A%5Cemoji%7Bflag-malaysia%7D%0A%5Cemoji%7Bflag-united-kingdom%7D%0A%0A%5Cend%7Bdocument%7D)

![NotoEmoji-demo.png](/files/221af00e9bd50b526fe6750c0a4f11106374223a)

Unicode CLDR（Common Locale Data Repository）の名称を調べられます [こちら](https://unicode.org/emoji/charts/emoji-list.html)、ただし名前のスペースはハイフンに置き換えるのを忘れないでください。代わりに、次の [その `emoji` パッケージドキュメントに記載されているオプションがあります](http://texdoc.net/pkg/emoji) それ自体

## 別の絵文字フォントを選ぶ

Overleaf では既定の絵文字フォントは Noto Color Emoji です。別の絵文字フォントを選択できます:

```latex
\setemojifont{TwemojiMozilla}
```

![TwemojiMozilla-demo.png](/files/d7e30ab0ee5f6d1ffcc1c1efaf453180d4526b36)

```latex
\documentclass[12pt]{article}
\usepackage{emoji}

\begin{document}
\setemojifont{TwemojiMozilla}
これは \texttt{emoji} パッケージと LuaLaTeX を使ったカラー絵文字です:
\emoji{leaves}
\emoji{rose}

絵文字の修飾子を使えます:
\emoji{woman-health-worker-medium-skin-tone}
\emoji{family-man-woman-girl-boy}
\emoji{flag-malaysia}
\emoji{flag-united-kingdom}

\end{document}
```

&#x20;[Overleaf でこの TwemojiMozilla の例を開く](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Colour+emojis+using+the+TwemojiMozilla+font+and+LuaLaTeX\&snip=%5Cdocumentclass%5B12pt%5D%7Barticle%7D%0A%5Cusepackage%7Bemoji%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Csetemojifont%7BTwemojiMozilla%7D%0AThese+are+colour+emojis+using+the+%5Ctexttt%7Bemoji%7D+package+and+LuaLaTeX%3A%0A%5Cemoji%7Bleaves%7D%0A%5Cemoji%7Brose%7D%0A%0AYou+can+use+emoji-modifiers%3A%0A%5Cemoji%7Bwoman-health-worker-medium-skin-tone%7D%0A%5Cemoji%7Bfamily-man-woman-girl-boy%7D%0A%5Cemoji%7Bflag-malaysia%7D%0A%5Cemoji%7Bflag-united-kingdom%7D%0A%0A%5Cend%7Bdocument%7D)

## 参考文献

* [その `emoji` パッケージ](https://www.ctan.org/pkg/emoji)
* [絵文字の CLDR 名とコードポイント一覧](https://unicode.org/emoji/charts/emoji-list.html)
* [Overleaf プロジェクトのコンパイラを変更する](/latex/ja/narejjibsu/026-changing-compiler.md)


---

# 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/to-2/75-inserting-emojis-in-latex-documents-on-overleaf.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.
