| 1 |
\documentclass{l3doc} |
| 2 |
\usepackage{ |
| 3 |
float, |
| 4 |
booktabs, |
| 5 |
emotion, |
| 6 |
fontspec, |
| 7 |
geometry, |
| 8 |
graphicx, |
| 9 |
longtable, |
| 10 |
xcolor, |
| 11 |
listings |
| 12 |
} |
| 13 |
|
| 14 |
\setmainfont{KpMath} |
| 15 |
|
| 16 |
\geometry{ |
| 17 |
a4paper, |
| 18 |
top=25.4mm, bottom=25.4mm, |
| 19 |
left=20mm, right=20mm, |
| 20 |
headheight=2.17cm, |
| 21 |
headsep=4mm, |
| 22 |
footskip=12mm |
| 23 |
} |
| 24 |
|
| 25 |
\definecolor{mymagenta}{HTML}{EB2F96} |
| 26 |
\definecolor{mywinered}{rgb}{0.5,0,0} |
| 27 |
|
| 28 |
\emotionsetup{Twemoji Mozilla} |
| 29 |
|
| 30 |
\begin{document} |
| 31 |
|
| 32 |
\title{\emotion{😄} Emotion} |
| 33 |
\author{\href{https://github.com/ourfor}{\textcolor{mywinered}{zengxuwang}}} |
| 34 |
\date{Spring 2024} |
| 35 |
|
| 36 |
\maketitle |
| 37 |
|
| 38 |
There are many emojis with long names, and we cannot remember them all. |
| 39 |
At the same time, when we type an emoji, we want to see what it |
| 40 |
looks like in text editor. Now, you do not need to remember the emoji name, |
| 41 |
just select it from the keyboard and wrap it with \textbackslash{}emotion. |
| 42 |
Unlike other emoji packages, you can use emojis more easily and flexibility. |
| 43 |
|
| 44 |
\section{Usage} |
| 45 |
|
| 46 |
\subsection{Setup emoji font} |
| 47 |
You can use your favorite emoji font. |
| 48 |
command \textcolor{mymagenta}{\textbackslash emotionsetup} |
| 49 |
accept one parameter(font name), which you have installed in your |
| 50 |
computer |
| 51 |
|
| 52 |
\emotionsetup{Twemoji Mozilla} |
| 53 |
\begin{lstlisting}{language=latex} |
| 54 |
\emotionsetup{Twemoji Mozilla} |
| 55 |
\end{lstlisting} |
| 56 |
|
| 57 |
\subsection{Use emoji symbol} |
| 58 |
|
| 59 |
Command \textcolor{mymagenta}{\textbackslash emotion} accept one parameter. |
| 60 |
the parameter can be emoji symbol or the defined emoji id |
| 61 |
|
| 62 |
\begin{table}[H] |
| 63 |
\begin{tabular}{cc} |
| 64 |
\textbackslash emotion\{\emotion{☃}\} & \emotion{☃} \\ |
| 65 |
\textbackslash emotion\{\emotion{☘}\} & \emotion{☘} \\ |
| 66 |
\textbackslash emotion\{\emotion{☝}\} & \emotion{☝} \\ |
| 67 |
\textbackslash emotion\{\emotion{☠}\} & \emotion{☠} \\ |
| 68 |
\textbackslash emotion\{\emotion{🥵}\} & \emotion{🥵} \\ |
| 69 |
\textbackslash emotion\{\emotion{✌🏾}\} & \emotion{✌🏾} \\ |
| 70 |
\textbackslash emotion\{\emotion{🇱🇷}\} & \emotion{🇱🇷} \\ |
| 71 |
\textbackslash emotion\{\emotion{♀}\} & \emotion{♀} \\ |
| 72 |
\end{tabular} |
| 73 |
\end{table} |
| 74 |
|
| 75 |
\subsection{Custom emoji alias} |
| 76 |
|
| 77 |
Sometimes, typing a emoji symbol is not easy. Therefore, we also provide a command to simplify |
| 78 |
the process. The command \textcolor{mymagenta}{\textbackslash emotiondef} requires two parameters: |
| 79 |
one is the emoji id, and the other is emoji value(either the emoji symbol or its unicode value). |
| 80 |
|
| 81 |
\emotiondef{apple}{🍎} |
| 82 |
\emotiondef{tea}{🍵} |
| 83 |
\emotiondef{!}{❗️} |
| 84 |
\emotiondef{A}{^^^^^^01f1e6} |
| 85 |
|
| 86 |
\begin{table}[H] |
| 87 |
\begin{tabular}{l} |
| 88 |
\textbackslash emotiondef\{apple\}\{\emotion{🍎}\} \\ |
| 89 |
\textbackslash emotiondef\{tea\}\{\emotion{🍵}\} \\ |
| 90 |
\textbackslash emotiondef\{A\}\{\^{}\^{}\^{}\^{}\^{}\^{}01f1e6\} \\ |
| 91 |
\textbackslash emotiondef\{!\}\{\emotion{❗️️}\} \\ |
| 92 |
\end{tabular} |
| 93 |
\end{table} |
| 94 |
|
| 95 |
\begin{table}[H] |
| 96 |
\begin{tabular}{ll} |
| 97 |
\textbackslash emotion\{apple\} & \emotion{apple} \\ |
| 98 |
\textbackslash emotion\{tea\} & \emotion{tea} \\ |
| 99 |
\textbackslash emotion\{A\} & \emotion{A} \\ |
| 100 |
\textbackslash emotion\{!\} & \emotion{!} \\ |
| 101 |
\end{tabular} |
| 102 |
\end{table} |
| 103 |
|
| 104 |
|
| 105 |
\end{document} |
| 106 |
|