![在 Overleaf tex 檔案中加入 unicode 表情符號](https://rvso.com/image/405367/%E5%9C%A8%20Overleaf%20tex%20%E6%AA%94%E6%A1%88%E4%B8%AD%E5%8A%A0%E5%85%A5%20unicode%20%E8%A1%A8%E6%83%85%E7%AC%A6%E8%99%9F.png)
我正在嘗試找到一個允許我在 tex 檔案中包含以下句子的套件:
A really good initiative
答案1
最後,我使用了:
\usepackage{scalerel,graphicx,xparse}
\NewDocumentCommand\emojione{}{\scalerel*{\includegraphics{1F44F}}{X}}
\NewDocumentCommand\emojitwo{}{\scalerel*{\includegraphics{270C}}{X}}
其中 1F44F 和 270C 是我想要包含的以 pdf 檔案上傳的表情符號。
希望這對其他人也有幫助。
答案2
我找到了這個背頁項目有助於在 OverLeaf 中渲染彩色和單色表情符號。同樣的技巧也適用於 Overleaf 中的表情符號膚色修飾符,其中修飾符緊跟在表情符號 Unicode 之後。
\documentclass[12pt]{article}
\usepackage{parskip}
\usepackage{fontspec}
\newfontfamily{\NotoEmoji}
{NotoColorEmoji.ttf}[Renderer=Harfbuzz]
\newfontfamily{\SymbolaEmoji}{Symbola}
\begin{document}
{\Large
\NotoEmoji
% Waving Hand emoji
\symbol{"1F44B}%
% Waving Hand: Light Skin Tone
\symbol{"1F44B}\symbol{"1F3FB}
}
\end{document}
預期輸出