zr-tex8r / bxcoloremoji Goto Github PK
View Code? Open in Web Editor NEWLaTeX: To use color emoji
License: MIT License
LaTeX: To use color emoji
License: MIT License
\documentclass{article}
\usepackage{bxcoloremoji}
\begin{document}
\end{document}
をlatex
または platex
またはuplatex
でコンパイルすると表題のエラーが出て怒られます。pdflatex
, xelatex
,lualatex
では怒られませんでした。自分でgraphicx.styを読むことにして \usepackage{graphicx}
をbxcoloremojiの前に置くと今度は
LaTeX Error: Cannot determine size of graphic in emoji_images/twemoji-pdf/A9.pdf
と怒られて、\usepackage[dvipdfmx]{graphicx}
とすると怒られなくなりました
次の公式リリースが迫っているかもしれないし迫っていないのかもしませんが、SPDXというのが最近OSF業界で流行っているという情報をキャッチしたのでいちおう情報を貼ります。著作権表示をSPDXにするのが流行りになりそうな感じです
What is the SPDX Specification?
The SPDX organization does not and can not make it a requirement for anyone to use the SPDX specification. However, we do encourage the use of SPDX as a way to streamline the processes needed to analyze software for open source licenses. However, there may be companies or organizations that DO require use of the SPDX specification and the creation of SPDX files as part of contracts with their supply chain partners. For example, a mobile handset vendor might require, as part of a contract, that its supplier provide an SPDX file along with any software.
参考
https://spdx.org/frequently-asked-questions-faq-0
lxc/lxc@cc73685
% Made from https://unicode.org/Public/emoji/12.1/emoji-test.txt
\documentclass{article}
\usepackage{longtable}
\usepackage{bxcoloremoji}
\newcounter{myline}
\newcommand{\mylinecount}{\arabic{myline}\stepcounter{myline}}
\begin{document}
\noindent
\begin{longtable}[c]{rp{7eM}llllll}
&&&&&&&\\
\endfirsthead
&&&&&&&\\
\endhead
\mylinecount&1F600&fully-qualified&\coloremoji{😀}&&&&E2.0 grinning face\\
\mylinecount&1F603&fully-qualified&\coloremoji{😃}&&&&E2.0 grinning face with big eyes\\
\mylinecount&1F604&fully-qualified&\coloremoji{😄}&&&&E2.0 grinning face with smiling eyes\\
\mylinecount&1F601&fully-qualified&\coloremoji{😁}&&&&E2.0 beaming face with smiling eyes\\
\end{longtable}
\end{document}
をpdflatexでコンパイルすると添付のbxtest4-pdftex.pdf
のように何も絵文字がでなくて悲しいです。lualatexでコンパイルすると添付のbxtest4-luatex.pdf
のように期待通りの絵文字が出ました。bxcoloremojiバージョンは0.9です
bxtest4-luatex.pdf
bxtest4-pdftex.pdf
以下のファイルをlualatexでコンパイルするとbxc2.pdfという期待通りのPDFができますが
\documentclass{minimal}
\usepackage{bxcoloremoji}
\font\fontA={[./TwemojiMozilla.ttf]:+colr;+ccmp;+dist;}
\font\fontB={name:Segoe UI Emoji:+colr;+ccmp;+dist;}
\begin{document}
{\fontA ☃}{\fontB ☃}\\
{\fontA 😀}{\fontB 😀}\\
\end{document}
\coloremojiコマンドを使って
\documentclass{minimal}
\usepackage{bxcoloremoji}
\font\fontA={[./TwemojiMozilla.ttf]:+colr;+ccmp;+dist;}
\font\fontB={name:Segoe UI Emoji:+colr;+ccmp;+dist;}
\begin{document}
{\coloremoji{☃}} {\fontA ☃}{\fontB ☃}\\
{\coloremoji{😀}} {\fontA 😀}{\fontB 😀}\\
\end{document}
というファイルをコンパイルするとbxc1.pdfというファイルができて、一部の絵文字が消えてしまう現象が観察されたので報告いたします。bxcoloremojiはリリースの欄にある0.9です。他の関連パッケージはTeXLive最新のはずです
bxc1.pdf
bxc2.pdf
kcatcodeで欧文化されていることによる問題とのことですが、sty側で対応できるならそのほうがよいのでは?という @abenori さんのご意見をいただいてこちらに報告いたします。
luatexでは問題ない、ucsコード指定マクロのほうならupLaTeXでも問題ない、自前でkcatcodeを変えることでも対応できる、という状況なので困窮しているというほどではありません。
Twitter Emoji自体はスキントーン単体の絵文字データを配布していますが、bxcoloremoji.styだと
\documentclass{minimal}
\usepackage{bxcoloremoji}
\begin{document}
\coloremoji*{🏻}\\
\coloremoji*{🏼}\\
\coloremoji{🏽}\\
\coloremoji{🏾}\\
\coloremoji{🏿}
\end{document}
というファイルで Package bxcoloremoji Warning: Lone combining character found
と言って絵文字を出してくれません。他の絵文字フォントだとだいたい出してくれます。また https://github.com/twitter/twemoji/blob/master/src/test/preview-svg.html にある絵文字シーケンスを latex に変換したファイルを https://github.com/emojifreak/All-Emoji-by-HarfTeX-and-LuaTeX-ja/blob/master/really-full-emoji-by-harftex.tex に作ったのでテストなどに使えるようなら使って下さい。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.