summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/emotion/doc/emotion-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/unicodetex/latex/emotion/doc/emotion-doc.tex')
-rw-r--r--macros/unicodetex/latex/emotion/doc/emotion-doc.tex105
1 files changed, 105 insertions, 0 deletions
diff --git a/macros/unicodetex/latex/emotion/doc/emotion-doc.tex b/macros/unicodetex/latex/emotion/doc/emotion-doc.tex
new file mode 100644
index 0000000000..6c4fae83c5
--- /dev/null
+++ b/macros/unicodetex/latex/emotion/doc/emotion-doc.tex
@@ -0,0 +1,105 @@
+\documentclass{l3doc}
+\usepackage{
+ float,
+ booktabs,
+ emotion,
+ fontspec,
+ geometry,
+ graphicx,
+ longtable,
+ xcolor,
+ listings
+}
+\setmainfont{KpMath Light}
+
+\geometry{
+ a4paper,
+ top=25.4mm, bottom=25.4mm,
+ left=20mm, right=20mm,
+ headheight=2.17cm,
+ headsep=4mm,
+ footskip=12mm
+}
+
+\definecolor{mymagenta}{HTML}{EB2F96}
+\definecolor{mywinered}{rgb}{0.5,0,0}
+
+\emotionsetup{Twemoji Mozilla}
+
+\begin{document}
+
+\title{\emotion{😄} Emotion}
+\author{\href{https://github.com/ourfor}{\textcolor{mywinered}{zengxuwang}}}
+\date{Spring 2024}
+
+\maketitle
+
+There are many emojis with long names, and we cannot remember them all.
+At the same time, when we type an emoji, we want to see what it
+looks like in text editor. Now, you do not need to remember the emoji name,
+just select it from the keyboard and wrap it with \textbackslash{}emotion.
+Unlike other emoji packages, you can use emojis more easily and flexibility.
+
+\section{Usage}
+
+\subsection{Setup emoji font}
+You can use your favorite emoji font.
+command \textcolor{mymagenta}{\textbackslash emotionsetup}
+accept one parameter(font name), which you have installed in your
+computer
+
+\emotionsetup{Twemoji Mozilla}
+\begin{lstlisting}{language=latex}
+\emotionsetup{Twemoji Mozilla}
+\end{lstlisting}
+
+\subsection{Use emoji symbol}
+
+Command \textcolor{mymagenta}{\textbackslash emotion} accept one parameter.
+the parameter can be emoji symbol or the defined emoji id
+
+\begin{table}[H]
+\begin{tabular}{cc}
+\textbackslash emotion\{\emotion{☃}\} & \emotion{☃} \\
+\textbackslash emotion\{\emotion{☘}\} & \emotion{☘} \\
+\textbackslash emotion\{\emotion{☝}\} & \emotion{☝} \\
+\textbackslash emotion\{\emotion{☠}\} & \emotion{☠} \\
+\textbackslash emotion\{\emotion{🥵}\} & \emotion{🥵} \\
+\textbackslash emotion\{\emotion{✌🏾}\} & \emotion{✌🏾} \\
+\textbackslash emotion\{\emotion{🇱🇷}\} & \emotion{🇱🇷} \\
+\textbackslash emotion\{\emotion{♀}\} & \emotion{♀} \\
+\end{tabular}
+\end{table}
+
+\subsection{Custom emoji alias}
+
+Sometimes, typing a emoji symbol is not easy. Therefore, we also provide a command to simplify
+the process. The command \textcolor{mymagenta}{\textbackslash emotiondef} requires two parameters:
+one is the emoji id, and the other is emoji value(either the emoji symbol or its unicode value).
+
+\emotiondef{apple}{🍎}
+\emotiondef{tea}{🍵}
+\emotiondef{!}{❗️}
+\emotiondef{A}{^^^^^^01f1e6}
+
+\begin{table}[H]
+\begin{tabular}{l}
+\textbackslash emotiondef\{apple\}\{\emotion{🍎}\} \\
+\textbackslash emotiondef\{tea\}\{\emotion{🍵}\} \\
+\textbackslash emotiondef\{A\}\{\^{}\^{}\^{}\^{}\^{}\^{}01f1e6\} \\
+\textbackslash emotiondef\{!\}\{\emotion{❗️️}\} \\
+\end{tabular}
+\end{table}
+
+\begin{table}[H]
+\begin{tabular}{ll}
+\textbackslash emotion\{apple\} & \emotion{apple} \\
+\textbackslash emotion\{tea\} & \emotion{tea} \\
+\textbackslash emotion\{A\} & \emotion{A} \\
+\textbackslash emotion\{!\} & \emotion{!} \\
+\end{tabular}
+\end{table}
+
+
+\end{document}
+ \ No newline at end of file