summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/emotion/doc/emotion-doc.tex
blob: 6c4fae83c59adef2476a14fa20f4f857c4f7ac32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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}