texlive[66909] Master/texmf-dist: emo (21apr23)
commits+karl at tug.org
commits+karl at tug.org
Fri Apr 21 23:15:13 CEST 2023
Revision: 66909
http://tug.org/svn/texlive?view=revision&revision=66909
Author: karl
Date: 2023-04-21 23:15:13 +0200 (Fri, 21 Apr 2023)
Log Message:
-----------
emo (21apr23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/emo/README.md
trunk/Master/texmf-dist/doc/latex/emo/config/emo.py
trunk/Master/texmf-dist/doc/latex/emo/emo.pdf
trunk/Master/texmf-dist/source/latex/emo/emo.dtx
trunk/Master/texmf-dist/tex/latex/emo/emo.def
trunk/Master/texmf-dist/tex/latex/emo/emo.sty
trunk/Master/texmf-dist/tex/latex/emo/emo.sty.ltxml
Added Paths:
-----------
trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-chart-increasing.pdf
trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-japanese-bargain-button.pdf
trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-person-facepalming.pdf
trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-plus.pdf
Modified: trunk/Master/texmf-dist/doc/latex/emo/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/emo/README.md 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/doc/latex/emo/README.md 2023-04-21 21:15:13 UTC (rev 66909)
@@ -9,8 +9,10 @@
[ACM](https://www.acm.org), cough).
Emo's source repository is <https://github.com/apparebit/emo>. It also is
-available [through CTAN](https://ctan.org/pkg/emo). Emo supports conversion
-to HTML [with LaTeXML](https://github.com/brucemiller/LaTeXML).
+available [through CTAN](https://ctan.org/pkg/emo). Emo supports conversion to
+HTML with [LaTeXML](https://github.com/brucemiller/LaTeXML) or
+[TeX4ht](https://tug.org/tex4ht/). When using the latter tool, please be sure to
+use |make4ht -l| as invocation.
## Package Options
@@ -44,13 +46,15 @@
By default, emo supports only a few emoji:
-1️⃣ ☣️ ⚖️ ✔️ 🇪🇺 🌁 🌍 🏛️ 🏝️ 🏟️ 🏳️🌈 🏷️ 👁️ 👥 💥 💱 💾 📐 📟 🔍 🕵️ 🗑️ 😡 🛑 🤖 🤝 🤯 🦜 🧑⚖️ 🧻 🧾
+1️⃣ ☣️ ⚖️ ✔️ ➕ 🇪🇺 🉐 🌁 🌍 🏛️ 🏝️ 🏟️ 🏳️🌈 🏷️ 👁️ 👥 💥 💱 💾 📈 📐 📟 🔍
+🕵️ 🗑️ 😡 🛑 🤖 🤝 🤦 🤯 🦜 🧑⚖️ 🧻 🧾
-Their names are keycap-one, biohazard, balance-scale, check-mark, eu, foggy,
-globe-africa-europe, classical-building, desert-island, stadium, rainbow-flag,
-label, eye, busts, collision, currency-exchange, floppy-disk, triangular-ruler,
-pager, loupe-left, detective, wastebasket, enraged-face, stop-sign, robot,
-handshake, exploding-head, parrot, judge, roll-of-paper, and receipt.
+Their names are keycap-one, biohazard, balance-scale, check-mark, plus, eu,
+japanese-bargain-button, foggy, globe-africa-europe, classical-building,
+desert-island, stadium, rainbow-flag, label, eye, busts, collision,
+currency-exchange, floppy-disk, chart-increasing, triangular-ruler, pager,
+loupe-left, detective, wastebasket, enraged-face, stop-sign, robot, handshake,
+person-facepalming, exploding-head, parrot, judge, roll-of-paper, and receipt.
The [package's documentation](emo.pdf) explains the underlying naming scheme and
also how to reconfigure which emoji are supported. The [emo.py](config/emo.py)
Modified: trunk/Master/texmf-dist/doc/latex/emo/config/emo.py
===================================================================
--- trunk/Master/texmf-dist/doc/latex/emo/config/emo.py 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/doc/latex/emo/config/emo.py 2023-04-21 21:15:13 UTC (rev 66909)
@@ -1029,17 +1029,18 @@
SPECIAL_FILES = ('emo-lingchi.pdf', 'emo-YHWH.pdf')
def create_inventory(registry: Registry, options: Any) -> List[Emoji]:
+ specials = list(SPECIAL_FILES)
inventory: List[Emoji] = []
if options.graphics.exists() and options.graphics.is_dir():
for entry in options.graphics.iterdir():
- if (
- not entry.is_file()
- or not entry.match('emo-*.pdf')
- or entry.name in SPECIAL_FILES
- ):
+ if not entry.is_file() or not entry.match('emo-*.pdf'):
continue
+ if entry.name in SPECIAL_FILES:
+ specials.remove(entry.name)
+ continue
+
emoji = registry.lookup(entry.stem[4:])
if emoji is not None:
inventory.append(emoji)
@@ -1046,6 +1047,14 @@
elif options.verbose:
logger.warning(f'"{entry.name}" does not depict an emoji')
+ if len(specials) == 1:
+ raise FileNotFoundError(f'PDF graphic "emo-graphics/{specials[0]}" is missing!')
+ elif len(specials) == 2:
+ raise FileNotFoundError(
+ f'PDF graphics "{specials[0]}" and "{specials[1]}" '
+ 'in "emo-graphics" are missing!'
+ )
+
return inventory
# --------------------------------------------------------------------------------------
@@ -1065,6 +1074,12 @@
for emoji in all_emoji:
file.write(emoji.latex_table_entry)
file.write('\n')
+ file.write("""
+\\ifemo at extra
+\\def\\emo at emoji@lingchi{凌遲}
+\\def\\emo at emoji@YHWH{\\begingroup\\textdir TRT יהוה\\endgroup}
+\\fi
+""")
tmp_table.replace(options.latex_table)
return all_emoji
Modified: trunk/Master/texmf-dist/doc/latex/emo/emo.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/emo/emo.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/emo/emo.dtx 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/source/latex/emo/emo.dtx 2023-04-21 21:15:13 UTC (rev 66909)
@@ -24,8 +24,10 @@
[ACM](https://www.acm.org), cough).
Emo's source repository is <https://github.com/apparebit/emo>. It also is
-available [through CTAN](https://ctan.org/pkg/emo). Emo supports conversion
-to HTML [with LaTeXML](https://github.com/brucemiller/LaTeXML).
+available [through CTAN](https://ctan.org/pkg/emo). Emo supports conversion to
+HTML with [LaTeXML](https://github.com/brucemiller/LaTeXML) or
+[TeX4ht](https://tug.org/tex4ht/). When using the latter tool, please be sure to
+use |make4ht -l| as invocation.
## Package Options
@@ -62,13 +64,15 @@
By default, emo supports only a few emoji:
-1️⃣ ☣️ ⚖️ ✔️ 🇪🇺 🌁 🌍 🏛️ 🏝️ 🏟️ 🏳️🌈 🏷️ 👁️ 👥 💥 💱 💾 📐 📟 🔍 🕵️ 🗑️ 😡 🛑 🤖 🤝 🤯 🦜 🧑⚖️ 🧻 🧾
+1️⃣ ☣️ ⚖️ ✔️ ➕ 🇪🇺 🉐 🌁 🌍 🏛️ 🏝️ 🏟️ 🏳️🌈 🏷️ 👁️ 👥 💥 💱 💾 📈 📐 📟 🔍
+🕵️ 🗑️ 😡 🛑 🤖 🤝 🤦 🤯 🦜 🧑⚖️ 🧻 🧾
-Their names are keycap-one, biohazard, balance-scale, check-mark, eu, foggy,
-globe-africa-europe, classical-building, desert-island, stadium, rainbow-flag,
-label, eye, busts, collision, currency-exchange, floppy-disk, triangular-ruler,
-pager, loupe-left, detective, wastebasket, enraged-face, stop-sign, robot,
-handshake, exploding-head, parrot, judge, roll-of-paper, and receipt.
+Their names are keycap-one, biohazard, balance-scale, check-mark, plus, eu,
+japanese-bargain-button, foggy, globe-africa-europe, classical-building,
+desert-island, stadium, rainbow-flag, label, eye, busts, collision,
+currency-exchange, floppy-disk, chart-increasing, triangular-ruler, pager,
+loupe-left, detective, wastebasket, enraged-face, stop-sign, robot, handshake,
+person-facepalming, exploding-head, parrot, judge, roll-of-paper, and receipt.
The [package's documentation](emo.pdf) explains the underlying naming scheme and
also how to reconfigure which emoji are supported. The [emo.py](config/emo.py)
@@ -161,7 +165,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{emo}
%<*scaffold,package>
- [2023/04/01 v0.2 emo•ji for all (LaTeX engines)]
+ [2023/04/21 v0.3 emo•ji for all (LaTeX engines)]
%</scaffold,package>
% ======================================================================================
%<*driver>
@@ -198,6 +202,8 @@
% \changes{0.1}{}{Initial release}
% \changes{0.2}{}{Prefix PDF and font files with ``emo-''}
% \changes{0.2}{}{Support pdftex for extracting emo.dtx}
+% \changes{0.3}{}{Refactor implementation to simplify public macros}
+% \changes{0.3}{}{Support conversion to HTML with TeX4ht}
%
% \GetFileInfo{\jobname.dtx}
%
@@ -230,7 +236,8 @@
% color emoji such as |\emo{desert-island}| for \emo{desert-island} or
% |\emo{parrot}| for \emo{parrot} in your documents independent of LaTeX engine.
% The implementation uses the Noto color emoji font if the engine supports it
-% and includes PDF graphics otherwise. The latter are automatically derived from
+% and includes PDF graphics otherwise. It also supports conversion to HTML with
+% either LaTeXML or TeX4ht. Next, PDF graphics are automatically derived from
% Noto's SVG sources, so the visual appearance is very similar. The source
% repository is at \url{https://github.com/apparebit/emo}. Emo may come in
% particularly handy when dealing with academic publishers that provide only
@@ -311,7 +318,7 @@
% options:
% \begin{description}
% \item[extra] Also define the |\lingchi| and |\YHWH| macros, which produce
-% \lingchi and \YHWH, respectively, and are documented below.
+% \lingchi and \YHWH.
% \item[index] Create an emoji index tagged |emo| with the |.edx| extension for
% the raw index and the |.end| extension for the processed index. This
% option relies on the |index| package, generates the raw |.edx| file,
@@ -318,6 +325,9 @@
% but does not build or use the processed index.
% \end{description}
%
+%
+% ^^A ----------------------------------------------------------------------------------
+% \subsection{One Main Macro}
% \DescribeMacro{\emo}
% An |\emo|\marg{emoji-name} invocation expands to the named emoji. For
% LuaLaTeX, it uses the Noto color emoji font. For all other engines, it uses
@@ -331,7 +341,7 @@
%
%
% ^^A ----------------------------------------------------------------------------------
-% \subsection{Emoji Names}
+% \subsubsection{Emoji Names}
%
% With some exceptions, emo's names for emoji are automatically derived from
% their Unicode names, with letters converted to lowercase, punctuation such as
@@ -401,9 +411,9 @@
% \end{table}
%
% Emo's |emo.def| contains the names and codepoints of all currently supported
-% emoji. Its distribution also includes the |emoji-test.txt| file, which is part
-% of \href{https://unicode.org/reports/tr51/}{Unicode TR-51} and contains the
-% names and codepoints of all \emph{potentially} supported emoji, i.e., all
+% emoji. Emo's distribution also includes the |emoji-test.txt| file, which is
+% part of \href{https://unicode.org/reports/tr51/}{Unicode TR-51} and contains
+% the names and codepoints of all \emph{potentially} supported emoji, i.e., all
% emoji. It further organizes emoji into groups and subgroups, with the current
% (sub)group being the one named on the closest line above the emoji that starts
% with |# |(|sub|)|group:|. As described in the next section, the group and
@@ -412,22 +422,34 @@
%
%
% ^^A ----------------------------------------------------------------------------------
-% \subsection{Extras}
+% \subsection{Two Extra Macros}
%
% \DescribeMacro{\lingchi}
% \DescribeMacro{\YHWH}
% The |\lingchi| and |\YHWH| macros take no arguments and produce \lingchi and
-% \YHWH, respectively. They are only available if emo is used with the
-% \textsf{extra} option. The former renders the Chinese term for ``death by a
-% thousand cuts.'' While originally an execution method, the term applies to
-% surprisingly many software systems as well. The latter produces the
-% Tetragrammaton, the Hebrew name for God. Observant Jews never utter what's
-% written, not even in their thoughts, substituting Adonai (``My Lord''), Elohim
-% (``God''), or HaShem (``The Name'') instead. In my mind, that nicely mirrors
-% the very incomprehensibility of \YHWH. Both macros preserve a subsequent space
-% as space, no backslash needed.
+% \YHWH. They are only available if emo is used with the \textsf{extra} option.
+% The former renders the Chinese term for ``death by a thousand cuts.'' While
+% originally an execution method, the term applies to surprisingly many software
+% systems as well. The latter produces the Tetragrammaton, the Hebrew name for
+% God. Observant Jews never utter what's written, not even in their thoughts,
+% substituting Adonai (``My Lord''), Elohim (``God''), or HaShem (``The Name'')
+% instead. In my mind, that nicely mirrors the very incomprehensibility of
+% \YHWH. Both macros preserve a subsequent space as space, no backslash needed.
%
%
+% ^^A ----------------------------------------------------------------------------------
+% \subsection{Conversion to HTML}
+%
+% Emo supports conversion to HTML with either
+% \href{https://github.com/brucemiller/LaTeXML}{LaTeXML} or
+% \href{https://tug.org/tex4ht/}{TeX4ht}. LaTeXML support is implemented by a
+% separate ``binding'' against LaTeXML's Perl API. I chronicled my exploration
+% of suitable options leading to that less than ideal choice in a
+% \href{https://github.com/brucemiller/LaTeXML/issues/2063}{GitHub issue}.
+% TeX4ht support is implemented by the emo package itself. It requires
+% processing with LuaLaTeX e.g., by passing |-l| to the |make4ht| tool.
+%
+%
% ^^A ==================================================================================
% \section{Configuration}
% \label{sec:config}
@@ -567,34 +589,57 @@
\RequirePackage[utf8]{inputenc}
% \end{macrocode}
%
-% \begin{macro}{\ifemo at usefont}
-% Define a third conditional for selecting the backend. Originally, I didn't
-% bother with this, simply required |iftex|, and used |\ifluatex| throughout the
-% package. But that unnecessarily complicates support for other LaTeX-like
-% engines.
-% \changes{0.2}{}{Abstract over backend selection}
+% \begin{macro}{\emo at use@unicode}
+% \begin{macro}{\emo at use@font}
+% \begin{macro}{\emo at use@pdf}
+% \begin{macro}{\emo at backend}
+% Emo currently supports three different backends for actually rendering emoji,
+% namely the backend named |\emo at use@unicode| emits Unicode codepoints in a
+% group, the one named |\emo at use@font| emits font selection before those same
+% Unicode codepoints in the group, and the one named |\emo at use@pdf| emits PDF
+% graphics. Once we know to name the backends, we can set |\emo at backend| to the
+% currently active backend, determined by interrogating the runtime environment.
+% Alas, we still need to implement the three backends; but |\emo at content| is
+% defined closer to the end of the package implementation.
+% \changes{0.3}{}{Generalize backend selection}
% \begin{macrocode}
-\newif\ifemo at usefont\emo at usefontfalse
+\def\emo at use@unicode{backend:unicode}
+\def\emo at use@font{backend:font+unicode}
+\def\emo at use@pdf{backend:pdf}
\RequirePackage{iftex}
-\ifluatex\emo at usefonttrue\fi
+\ifdefined\HCode
+ \let\emo at backend=\emo at use@unicode
+\else
+\ifluatex
+ \let\emo at backend=\emo at use@font
+\else
+ \let\emo at backend=\emo at use@pdf
+\fi
+\fi
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
-% By now |\ifemo at usefont| should be correctly set up. So we use it for loading
-% the right emoji-emitting backend, |fontspec| or |graphicx|:
+% With the backend selected, we can now require backend-specific packages,
+% namely |fontspec| for selecting fonts in the |\emo at use@font| backend and
+% |graphicx| for including PDF graphics in the |\emo at use@pdf| backend. The
+% |\emo at use@unicode| backend has no similar requirements.
% \begin{macrocode}
-\ifemo at usefont
-\RequirePackage{fontspec}
-\else
-\RequirePackage{graphicx}
+\ifx\emo at backend\emo at use@font
+ \RequirePackage{fontspec}
\fi
+\ifx\emo at backend\emo at use@pdf
+ \RequirePackage{graphicx}
+\fi
% \end{macrocode}
%
-% Emo requires |xcolor| for formatting highly visible error messages within the
-% text. Always including another package that is only used when there are errors
-% is not ideal. But when I tried calling |\RequirePackage| for |xcolor| from
-% inside the error macro, it didn't work. Alternatively, I could make in-text
-% errors optional.
+% Next, emo requires |xcolor| for formatting highly visible error messages
+% within the text. Always including another package that is only used when there
+% are errors is not ideal. But when I tried calling |\RequirePackage| for
+% |xcolor| from inside the error macro, it didn't work. Alternatively, I could
+% make in-text errors optional.
% \begin{macrocode}
\RequirePackage{xcolor}
% \end{macrocode}
@@ -603,10 +648,10 @@
% the |xspace| package and \textsf{index} requiring the |index| package:
% \begin{macrocode}
\ifemo at extra
-\RequirePackage{xspace}
+ \RequirePackage{xspace}
\fi
\ifemo at indexing
-\RequirePackage{index}
+ \RequirePackage{index}
\fi
% \end{macrocode}
%
@@ -615,15 +660,17 @@
% \subsection{The Emoji Table}
%
% \begin{macro}{\emo at emoji@<name>}
-% For each emoji with a PDF graphic in the |emo-graphics| directory, a macro
-% named |\emo at emoji@|\meta{emoji-name} expands to its Unicode sequence. With
+% For each emoji with a PDF graphic in the |emo-graphics| directory and, if
+% enabled, the two extra macros, the corresponding
+% |\emo at emoji@|\meta{emoji-name} macro expands to its Unicode sequence. With
% over 3,000 distinct emoji in Unicode 15, emo relies on a Python script for
% populating the graphics directory and writing the table to the
% \texttt{\jobname.def} file. Since the package code does not change after
-% installation but the emoji table may very well change, they are kept separate
-% for now. Alternatively, we could use DocStrip to assemble the package file
-% from three parts, the code from the previous sections, then the contents of
-% the emoji table in |emo.def|, and then all subsequent code.
+% installation but the emoji table may very well change, they are kept separate.
+% Alternatively, we could use DocStrip to assemble the package file from three
+% parts, the code from the previous sections, then the contents of the emoji
+% table in |emo.def|, and then all subsequent code. Alas, that seems a bit much
+% for turning two files into one.
% \begin{macrocode}
\input{emo.def}
% \end{macrocode}
@@ -673,87 +720,83 @@
% If indexing is enabled, record the use of an emoji. Otherwise, do nothing.
% \begin{macrocode}
\ifemo at indexing
-\newindex{emo}{edx}{end}{Emoji Index}
-\def\emo at index#1{\index[emo]{#1}}
+ \newindex{emo}{edx}{end}{Emoji Index}
+ \def\emo at index#1{\index[emo]{#1}}
\else
-\def\emo at index#1{}
+ \def\emo at index#1{}
\fi
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\emo at content}
+% Render the emoji content. This macro interfaces with the backend and thus
+% needs to be defined as many times as there are backends: The Unicode backend
+% just expands the entry from the emoji table. The font backend does the same,
+% but sets the font to Noto Color Emoji first. The PDF backend instead includes
+% the corresponding PDF graphic.
+% \begin{macrocode}
+\ifx\emo at backend\emo at use@unicode
+ \def\emo at content#1{\begingroup\csname emo at emoji@#1\endcsname\endgroup}
+\else
+\ifx\emo at backend\emo at use@font
+ \newfontface\emo at font[Renderer=Harfbuzz]{NotoColorEmoji.ttf}
+ \def\emo at content#1{\begingroup\emo at font\csname emo at emoji@#1\endcsname\endgroup}
+\else
+ \def\emo at content#1{%
+ \raisebox{-0.2ex}{%
+ \includegraphics[height=1em]{emo-graphics/emo-#1}}
+ }
+\fi
+\fi
+% \end{macrocode}
+% \end{macro}
%
+%
% ^^A ----------------------------------------------------------------------------------
% \subsection{User Macros}
%
% \begin{macro}{\emo}
-% Emit the named color emoji. Both the font-based version for LuaTeX and the
-% graphics-based fallback validate the emoji name and then invoke the
-% |\emo at index| macro. But they differ in how they actually display the emoji.
-% The LuaTeX version turns the emoji name into its Unicode sequence and wraps
-% that in a group that also uses the previously declared Noto color emoji font.
-% The fallback version instead includes a suitably sized PDF graphic.
+% Thanks to the just introduced internal macros, the main |\emo| macro is really
+% simple: If the emoji name is defined, possibly emit an index entry for that
+% emoji and, critically, render the emoji content.
% \begin{macrocode}
-\ifemo at usefont
-\newfontface\emo at font[Renderer=Harfbuzz]{NotoColorEmoji.ttf}
\newcommand\emo[1]{%
\emo at ifdef{#1}{%
\emo at index{#1}%
- {\emo at font\csname emo at emoji@#1\endcsname}%
+ \emo at content{#1}%
}%
}
-\else
-\newcommand\emo[1]{%
- \emo at ifdef{#1}{%
- \emo at index{#1}%
- \raisebox{-0.2ex}{%
- \includegraphics[height=1em]{emo-graphics/emo-#1}}%
- }%
-}
-\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\lingchi}
% \begin{macro}{\YHWH}
-% The definitions for the optional |\lingchi| and |\YHWH| macros follow from
-% that of |\emo|, except that
-% \begin{inlinenum}
-% \item there are no arguments to validate and hence no equivalent to
-% |\emo at ifdef|;
-% \item Hebrew is written right-to-left and hence |\YHWH| requires a
-% |\textdir TRT|;
-% \item subsequent space should be preserved and hence both macros end
-% with |\xspace|.
-% \end{inlinenum}
-% While it would be nice to use Unicode inside the groups for font-using
-% versions, this version is more robust given TeX pre-Unicode heritage.
+% With such a simple yet generally useful definition for |\emo|, the default
+% implementations for |\lingchi| and |\YHWH| can just delegate to |\emo|
+% followed by |\xspace|. That's possible because, just like emoji, both macros
+% render either as Unicode characters or PDF graphics. Alas, that cannot work
+% for the font backend because |\emo| uses Noto Color Emoji whereas |\lingchi|
+% uses Traditional Chinese and |\YHWH| Hebrew. Since these two macros are the
+% two only font exceptions, we simply define alternate versions for the font
+% backend that use the correct fonts. Of course, all this happens only when the
+% \textsf{extra} option is enabled.
+% \changes{0.3}{}{Implement in terms of |\emo|}
% \begin{macrocode}
\ifemo at extra
-\ifemo at usefont
-\newfontface\emo at chinese{emo-lingchi.ttf}
-\newfontface\emo at hebrew{LinLibertine_R.otf}
-\newcommand\lingchi{%
- \emo at index{lingchi}%
- \begingroup\emo at chinese \char"51CC\char"9072\endgroup%
- \xspace}
-\newcommand\YHWH{%
- \emo at index{YHWH}%
- \begingroup%
- \textdir TRT%
- \emo at hebrew \char"5D9\char"5D4\char"5D5\char"5D4%
- \endgroup%
- \xspace}
+\ifx\emo at backend\emo at use@font
+ \newfontface\emo at chinese{emo-lingchi.ttf}
+ \newfontface\emo at hebrew{LinLibertine_R.otf}
+ \newcommand\lingchi{%
+ \emo at index{lingchi}%
+ \begingroup\emo at chinese\emo at emoji@lingchi\endgroup%
+ \xspace}
+ \newcommand\YHWH{%
+ \emo at index{YHWH}%
+ \begingroup\emo at hebrew\emo at emoji@YHWH\endgroup%
+ \xspace}
\else
-\newcommand\lingchi{%
- \emo at index{lingchi}%
- \raisebox{-0.2ex}{%
- \includegraphics[height=1em]{emo-graphics/emo-lingchi}}%
- \xspace}
-\newcommand\YHWH{%
- \emo at index{YHWH}%
- \raisebox{-0.2ex}{%
- \includegraphics[height=1em]{emo-graphics/emo-YHWH}}%
- \xspace}
+ \newcommand\lingchi{\emo{lingchi}\xspace}
+ \newcommand\YHWH{\emo{YHWH}\xspace}
\fi
\fi
% \end{macrocode}
@@ -785,11 +828,11 @@
% burden on package authors. Yet, right after announcing emo, the question of
% LaTeXML support came up. LaTeXML includes the |latexml.sty| package, which
% defines |\iflatexml|. I would have used that command to make the three-line
-% change to |emo.sty| necessary for LaTeX support, except |latexml.sty| contains
-% lots of other stuff that isn't needed. Always loading that only to detect
-% LaTeXML seems like a bad idea. Since reimplementing |\iflatexml| would require
-% a binding anyways, I just wrote a minimal binding. As I said, LaTeXML's
-% approach is broken.
+% change to |emo.sty| necessary to support LaTeXML, except |latexml.sty|
+% contains lots of other stuff that isn't needed. Always loading lots of macros
+% only to detect LaTeXML slows down compilation and wastes memory. Since
+% reimplementing |\iflatexml| would require a binding anyways, I just wrote a
+% minimal binding. As I said, LaTeXML's approach is broken.
%
% With that out of the way, let's get started:
% \begin{macrocode}
@@ -815,7 +858,7 @@
% \begin{macrocode}
RawTeX(<<'EOTeX');
\ProvidesPackage{emo}
- [2023/03/21 v0.2a1 emo•ji for all (LaTeX engines)]
+ [2023/04/21 v0.3 emo•ji for all (LaTeX engines)]
\newif\ifemo at extra\emo at extrafalse
EOTeX
% \end{macrocode}
Added: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-chart-increasing.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-chart-increasing.pdf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-chart-increasing.pdf 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-chart-increasing.pdf 2023-04-21 21:15:13 UTC (rev 66909)
Property changes on: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-chart-increasing.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-japanese-bargain-button.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-japanese-bargain-button.pdf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-japanese-bargain-button.pdf 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-japanese-bargain-button.pdf 2023-04-21 21:15:13 UTC (rev 66909)
Property changes on: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-japanese-bargain-button.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-person-facepalming.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-person-facepalming.pdf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-person-facepalming.pdf 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-person-facepalming.pdf 2023-04-21 21:15:13 UTC (rev 66909)
Property changes on: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-person-facepalming.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-plus.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-plus.pdf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-plus.pdf 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-plus.pdf 2023-04-21 21:15:13 UTC (rev 66909)
Property changes on: trunk/Master/texmf-dist/tex/latex/emo/emo-graphics/emo-plus.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/emo/emo.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/emo/emo.def 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/tex/latex/emo/emo.def 2023-04-21 21:15:13 UTC (rev 66909)
@@ -1,9 +1,11 @@
-\ProvidesFile{emo.def}[2023-04-01]
+\ProvidesFile{emo.def}[2023-04-19]
\expandafter\def\csname emo at emoji@keycap-one\endcsname{1️⃣}
\def\emo at emoji@biohazard{☣️}
\expandafter\def\csname emo at emoji@balance-scale\endcsname{⚖️}
\expandafter\def\csname emo at emoji@check-mark\endcsname{✔️}
+\def\emo at emoji@plus{➕}
\def\emo at emoji@eu{🇪🇺}
+\expandafter\def\csname emo at emoji@japanese-bargain-button\endcsname{🉐}
\def\emo at emoji@foggy{🌁}
\expandafter\def\csname emo at emoji@globe-africa-europe\endcsname{🌍}
\expandafter\def\csname emo at emoji@classical-building\endcsname{🏛️}
@@ -16,6 +18,7 @@
\def\emo at emoji@collision{💥}
\expandafter\def\csname emo at emoji@currency-exchange\endcsname{💱}
\expandafter\def\csname emo at emoji@floppy-disk\endcsname{💾}
+\expandafter\def\csname emo at emoji@chart-increasing\endcsname{📈}
\expandafter\def\csname emo at emoji@triangular-ruler\endcsname{📐}
\def\emo at emoji@pager{📟}
\expandafter\def\csname emo at emoji@loupe-left\endcsname{🔍}
@@ -25,8 +28,14 @@
\expandafter\def\csname emo at emoji@stop-sign\endcsname{🛑}
\def\emo at emoji@robot{🤖}
\def\emo at emoji@handshake{🤝}
+\expandafter\def\csname emo at emoji@person-facepalming\endcsname{🤦}
\expandafter\def\csname emo at emoji@exploding-head\endcsname{🤯}
\def\emo at emoji@parrot{🦜}
\def\emo at emoji@judge{🧑⚖️}
\expandafter\def\csname emo at emoji@roll-of-paper\endcsname{🧻}
\def\emo at emoji@receipt{🧾}
+
+\ifemo at extra
+\def\emo at emoji@lingchi{凌遲}
+\def\emo at emoji@YHWH{\begingroup\textdir TRT יהוה\endgroup}
+\fi
Modified: trunk/Master/texmf-dist/tex/latex/emo/emo.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/emo/emo.sty 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/tex/latex/emo/emo.sty 2023-04-21 21:15:13 UTC (rev 66909)
@@ -13,7 +13,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{emo}
- [2023/04/01 v0.2 emo•ji for all (LaTeX engines)]
+ [2023/04/21 v0.3 emo•ji for all (LaTeX engines)]
\newif\ifemo at extra\emo at extrafalse
\DeclareOption{extra}{\emo at extratrue}
\newif\ifemo at indexing\emo at indexingfalse
@@ -20,20 +20,31 @@
\DeclareOption{index}{\emo at indexingtrue}
\ProcessOptions\relax
\RequirePackage[utf8]{inputenc}
-\newif\ifemo at usefont\emo at usefontfalse
+\def\emo at use@unicode{backend:unicode}
+\def\emo at use@font{backend:font+unicode}
+\def\emo at use@pdf{backend:pdf}
\RequirePackage{iftex}
-\ifluatex\emo at usefonttrue\fi
-\ifemo at usefont
-\RequirePackage{fontspec}
+\ifdefined\HCode
+ \let\emo at backend=\emo at use@unicode
\else
-\RequirePackage{graphicx}
+\ifluatex
+ \let\emo at backend=\emo at use@font
+\else
+ \let\emo at backend=\emo at use@pdf
\fi
+\fi
+\ifx\emo at backend\emo at use@font
+ \RequirePackage{fontspec}
+\fi
+\ifx\emo at backend\emo at use@pdf
+ \RequirePackage{graphicx}
+\fi
\RequirePackage{xcolor}
\ifemo at extra
-\RequirePackage{xspace}
+ \RequirePackage{xspace}
\fi
\ifemo at indexing
-\RequirePackage{index}
+ \RequirePackage{index}
\fi
\input{emo.def}
\definecolor{emo at error@fg}{rgb}{1,1,1}
@@ -52,54 +63,45 @@
\fi%
}
\ifemo at indexing
-\newindex{emo}{edx}{end}{Emoji Index}
-\def\emo at index#1{\index[emo]{#1}}
+ \newindex{emo}{edx}{end}{Emoji Index}
+ \def\emo at index#1{\index[emo]{#1}}
\else
-\def\emo at index#1{}
+ \def\emo at index#1{}
\fi
-\ifemo at usefont
-\newfontface\emo at font[Renderer=Harfbuzz]{NotoColorEmoji.ttf}
-\newcommand\emo[1]{%
- \emo at ifdef{#1}{%
- \emo at index{#1}%
- {\emo at font\csname emo at emoji@#1\endcsname}%
- }%
-}
+\ifx\emo at backend\emo at use@unicode
+ \def\emo at content#1{\begingroup\csname emo at emoji@#1\endcsname\endgroup}
\else
+\ifx\emo at backend\emo at use@font
+ \newfontface\emo at font[Renderer=Harfbuzz]{NotoColorEmoji.ttf}
+ \def\emo at content#1{\begingroup\emo at font\csname emo at emoji@#1\endcsname\endgroup}
+\else
+ \def\emo at content#1{%
+ \raisebox{-0.2ex}{%
+ \includegraphics[height=1em]{emo-graphics/emo-#1}}
+ }
+\fi
+\fi
\newcommand\emo[1]{%
\emo at ifdef{#1}{%
\emo at index{#1}%
- \raisebox{-0.2ex}{%
- \includegraphics[height=1em]{emo-graphics/emo-#1}}%
+ \emo at content{#1}%
}%
}
-\fi
\ifemo at extra
-\ifemo at usefont
-\newfontface\emo at chinese{emo-lingchi.ttf}
-\newfontface\emo at hebrew{LinLibertine_R.otf}
-\newcommand\lingchi{%
- \emo at index{lingchi}%
- \begingroup\emo at chinese \char"51CC\char"9072\endgroup%
- \xspace}
-\newcommand\YHWH{%
- \emo at index{YHWH}%
- \begingroup%
- \textdir TRT%
- \emo at hebrew \char"5D9\char"5D4\char"5D5\char"5D4%
- \endgroup%
- \xspace}
+\ifx\emo at backend\emo at use@font
+ \newfontface\emo at chinese{emo-lingchi.ttf}
+ \newfontface\emo at hebrew{LinLibertine_R.otf}
+ \newcommand\lingchi{%
+ \emo at index{lingchi}%
+ \begingroup\emo at chinese\emo at emoji@lingchi\endgroup%
+ \xspace}
+ \newcommand\YHWH{%
+ \emo at index{YHWH}%
+ \begingroup\emo at hebrew\emo at emoji@YHWH\endgroup%
+ \xspace}
\else
-\newcommand\lingchi{%
- \emo at index{lingchi}%
- \raisebox{-0.2ex}{%
- \includegraphics[height=1em]{emo-graphics/emo-lingchi}}%
- \xspace}
-\newcommand\YHWH{%
- \emo at index{YHWH}%
- \raisebox{-0.2ex}{%
- \includegraphics[height=1em]{emo-graphics/emo-YHWH}}%
- \xspace}
+ \newcommand\lingchi{\emo{lingchi}\xspace}
+ \newcommand\YHWH{\emo{YHWH}\xspace}
\fi
\fi
\endinput
Modified: trunk/Master/texmf-dist/tex/latex/emo/emo.sty.ltxml
===================================================================
--- trunk/Master/texmf-dist/tex/latex/emo/emo.sty.ltxml 2023-04-21 05:40:43 UTC (rev 66908)
+++ trunk/Master/texmf-dist/tex/latex/emo/emo.sty.ltxml 2023-04-21 21:15:13 UTC (rev 66909)
@@ -6,7 +6,7 @@
use LaTeXML::Package;
RawTeX(<<'EOTeX');
\ProvidesPackage{emo}
- [2023/03/21 v0.2a1 emo•ji for all (LaTeX engines)]
+ [2023/04/21 v0.3 emo•ji for all (LaTeX engines)]
\newif\ifemo at extra\emo at extrafalse
EOTeX
DeclareOption('extra', '\emo at extratrue');
More information about the tex-live-commits
mailing list.