| 1 |
%% |
| 2 |
%% This is file `canary.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% emo.dtx (with options: `canary') |
| 8 |
%% |
| 9 |
%% emo•ji for all (LaTeX engines) |
| 10 |
%% (C) Copyright 2023 by Robert Grimm |
| 11 |
%% Released under LPPL v1.3c or later |
| 12 |
%% <https://github.com/apparebit/emo> |
| 13 |
%% |
| 14 |
\documentclass[border=10pt]{standalone} |
| 15 |
\usepackage[extra]{emo} |
| 16 |
\usepackage{iftex} |
| 17 |
\usepackage{xcolor} |
| 18 |
\usepackage{varwidth} |
| 19 |
|
| 20 |
\iftutex |
| 21 |
\usepackage{fontspec} |
| 22 |
\usepackage{libertinus} |
| 23 |
\setmonofont{inconsolata} |
| 24 |
\else |
| 25 |
\usepackage{libertinus} |
| 26 |
\usepackage{inconsolata} |
| 27 |
\fi |
| 28 |
\ifxetex |
| 29 |
\def\enginename{XeTeX} |
| 30 |
\else |
| 31 |
\ifluatex |
| 32 |
\def\enginename{LuaTeX} |
| 33 |
\else |
| 34 |
\ifpdftex |
| 35 |
\def\enginename{pdfTeX} |
| 36 |
\else |
| 37 |
\def\enginename{unknown engine} |
| 38 |
\fi |
| 39 |
\fi |
| 40 |
\fi |
| 41 |
\definecolor{wordboxframe}{HTML}{636366} |
| 42 |
\definecolor{lineboxframe}{HTML}{48484A} |
| 43 |
\definecolor{lineboxbg}{HTML}{E5E5EA} |
| 44 |
|
| 45 |
\setlength{\fboxrule}{0.5pt} |
| 46 |
\setlength{\fboxsep}{0pt} |
| 47 |
|
| 48 |
\newcommand\nobx[1]{#1} |
| 49 |
\newcommand\wbx[1]{\fcolorbox{wordboxframe}{white}{#1}} |
| 50 |
\newcommand\lbx[1]{\fcolorbox{lineboxframe}{lineboxbg}{#1}} |
| 51 |
\makeatletter |
| 52 |
\def\@boundedtext#1{% |
| 53 |
\lbx{% |
| 54 |
#1{It's} #1{\lingchi}: |
| 55 |
#1{Please}, #1{\YHWH}, #1{have} #1{mercy} |
| 56 |
#1{\emo{pleading-face}}!% |
| 57 |
}% |
| 58 |
} |
| 59 |
\newcommand*\boundedtext{% |
| 60 |
\@ifstar{\@boundedtext{\wbx}}{\@boundedtext{\nobx}}% |
| 61 |
} |
| 62 |
\makeatother |
| 63 |
\newsavebox{\actual} |
| 64 |
\newsavebox{\expected} |
| 65 |
|
| 66 |
\newcommand\checkwidth[5]{% |
| 67 |
\sbox\actual{#2.}% |
| 68 |
\ifluatex% |
| 69 |
\sbox\expected{% |
| 70 |
\begingroup\csname#3\endcsname #4\endgroup.}% |
| 71 |
\else% |
| 72 |
\sbox\expected{% |
| 73 |
\raisebox{-0.2ex}{% |
| 74 |
\includegraphics[height=1em]{emo-graphics/emo-#5}}.}% |
| 75 |
\fi% |
| 76 |
\def\macroname{\texttt{\char`\\#1}}% |
| 77 |
\ifdim\wd\actual=\wd\expected% |
| 78 |
\mbox{\macroname{} \emo{check-mark-button}}% |
| 79 |
\else% |
| 80 |
\edef\actualwidth{\the\wd\actual}% |
| 81 |
\edef\expectedwidth{\the\wd\expected}% |
| 82 |
\mbox{\macroname{} \emo{cross-mark} \actualwidth{} \expectedwidth}% |
| 83 |
\fi% |
| 84 |
} |
| 85 |
\begin{document} |
| 86 |
\begin{varwidth}{6in} |
| 87 |
\Huge |
| 88 |
|
| 89 |
\noindent\enginename: |
| 90 |
\Large Width of |
| 91 |
\checkwidth{emo}{\emo{robot}}{emo@font}{\char"1F916}{robot}, |
| 92 |
\checkwidth{lingchi}{\lingchi}{emo@chinese}{\char"51CC\char"9072}{lingchi}, |
| 93 |
\checkwidth{YHWH}{\YHWH}{emo@hebrew}{\char"5D9\char"5D4\char"5D5\char"5D4}{YHWH} |
| 94 |
\vspace{1ex}\Huge |
| 95 |
|
| 96 |
\boundedtext*{} |
| 97 |
\vspace{1ex}\newline |
| 98 |
\boundedtext{} |
| 99 |
|
| 100 |
\end{varwidth} |
| 101 |
\end{document} |
| 102 |
\endinput |
| 103 |
%% |
| 104 |
%% End of file `canary.tex'. |