Debian Codegraph @

texmf-dist/doc/latex/openmoji/openmoji-doc.tex

raw
1 % !TeX TXS-program:compile = txs:///arara
2 % arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
3 % arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
4
5 \documentclass{article}
6 \usepackage[margin=1in]{geometry}
7 \usepackage{openmoji}
8 \usepackage{longtable}
9 \usepackage{booktabs}
10 \usepackage{hyperref}
11 \usepackage{fancyvrb}
12 \usepackage{shortvrb}
13 \MakeShortVerb{\|}
14 \setlength{\parindent}{0pt}
15
16 \newenvironment{openmojicase}
17 {%
18 \begin{longtable}{cll}%icon + name + page
19 \cmidrule[\heavyrulewidth]{1-3}% \toprule
20 \bfseries Icon & \bfseries PDF page & \bfseries Name\\
21 \cmidrule{1-3}
22 \endhead
23 }%
24 {%
25 \cmidrule[\heavyrulewidth]{1-3}
26 \end{longtable}%
27 }
28
29 \NewDocumentCommand{\showcaseopenmojicolor}{mm}{%name + macro + page
30 \Large\openmoji{#1} & \sffamily #2 & \itshape #1 \\
31 }
32
33 \NewDocumentCommand{\showcaseopenmojiblack}{mm}{%name + macro + page
34 \Large\openmoji[black]{#1} & \sffamily #2 & \itshape #1 \\
35 }
36
37 \begin{document}
38
39 \title{The \textsf{openmoji} package (0.1.1) -- 26/12/2025}
40 \author{%
41 Cédric Pierquet\\%
42 \url{https://openmoji.org} (Source version 16.0)\\%
43 \url{https://github.com/cpierquet/latex-packages/tree/main/openmoji} (\LaTeX{} package)
44 }
45 \date{cpierquet -- at -- outlook . fr}\maketitle
46
47 This package provides \LaTeX{} support for the openmoji project (\url{https://openmoji.org}).
48
49 \medskip
50
51 \hspace*{5mm}\fbox{\begin{minipage}{0.75\linewidth}{\emph{A set of thousands CC-BY-SA-4.0 licensed high-quality SVG/PDF icons for you to use in your web projects.}}\end{minipage}}
52
53 \medskip
54
55 To use \textsf{openmoji} in your document, include the package with |\usepackage{openmoji}|.
56
57 An icon can be accessed using the icon name. A list of all included icons with their respective \textit{page} can be found at the end of this document.
58
59 \section{Example}
60
61 \begin{Verbatim}[frame=single]
62 ...
63 \usepackage{openmoji}
64 ...
65 \begin{document}
66 ...
67 Inline\openmoji{adhesive bandage}version
68 ...
69 \end{document}
70 \end{Verbatim}
71
72 Result: Inline\openmoji{adhesive bandage}version
73
74 \section{Usage}
75
76 \subsection{Generic macro}
77
78 \begin{Verbatim}[frame=single]
79 \openmoji[black=TF,height=...,(d)strut=...]<includegraphics options>{name}
80 \end{Verbatim}
81
82 The boolean \texttt{[black]} activate \textsf{black} version of icon (if available). And key \texttt{[height=...]} can be:
83
84 \begin{itemize}
85 \item \texttt{dauto} (by default): inline insertion with height/depth;
86 \item \texttt{auto}: inline insertion with height/nodepth;
87 \item \texttt{a length}: normal insertion with fixed height;
88 \item \texttt{manuel height/depth}: normal insertion with fixed height/depth.
89 \end{itemize}
90
91 The keys \texttt{[(d)strut=...]} can be used to set the \textit{reference} box for dimension calculations.
92
93 \medskip
94
95 By default, icons are given with a small border, so the given height is the height of the \textit{full} box, not the hight of the icons.
96
97 \medskip
98
99 Example: Inline{\setlength\fboxsep{0pt}\fbox{\openmoji{adhesive bandage}}}version or inline {\setlength\fboxsep{0pt}\fbox{\openmoji{adhesive bandage}}} version
100
101 \pagebreak
102
103 \subsection{Examples}
104
105 \begin{Verbatim}[frame=single]
106 %normal version: inline with automatic height/depth (from qX characters)
107 \openmoji[height=dauto]{adhesive bandage} %or \openmoji{adhesive bandage}
108 \end{Verbatim}
109
110 {\Huge q\openmoji{adhesive bandage}X}
111
112 \begin{Verbatim}[frame=single]
113 %normal version: inline with automatic height/depth (from specified characters)
114 (q\openmoji[height=dauto,dstrut=(qB)]{adhesive bandage}B)
115 \end{Verbatim}
116
117 {\Huge (q\openmoji[height=dauto,dstrut=(qB)]{adhesive bandage}B)}
118
119 \begin{Verbatim}[frame=single]
120 %normal version: inline with automatic height (from X character) default version
121 \openmoji[height=auto]{adhesive bandage}
122 \end{Verbatim}
123
124 {\Huge X\openmoji[height=auto]{adhesive bandage}X}
125
126 \begin{Verbatim}[frame=single]
127 %normal version: inline with manual height/depth
128 \openmoji[height={0.8em/-0.4em}]{adhesive bandage}
129 \end{Verbatim}
130
131 {\Huge qb\openmoji[height={0.8em/-0.4em}]{adhesive bandage}Xz}
132
133 \begin{Verbatim}[frame=single]
134 %fixed height
135 \openmoji[height=1.5in]{adhesive bandage}
136 \openmoji[black,height=1.5in]{adhesive bandage}
137 \end{Verbatim}
138
139 \openmoji[height=1.5in]{adhesive bandage}\openmoji[black,height=1.5in]{adhesive bandage}
140
141 \subsection{Used packages}
142
143 \texttt{ifthen}, \texttt{calc}, \texttt{graphicx}, \texttt{xstring} and \texttt{simplekv} are loaded and used by the package.
144
145 \subsection{Bugs}
146
147 For bug reports and feature requests, report on the GitHub repository \url{https://github.com/cpierquet/latex-packages/issues}.
148
149 \newpage
150
151 \section{List of icons}
152
153 \subsection{Color version (4292 icons)}
154
155 The \textsf{PDF} file is \texttt{openmoji-color-all.pdf}
156
157 Direct command is: {\ttfamily\textbackslash openmoji\{<Name>\}}.
158
159 \input{openmojicolorbindings}
160
161 \pagebreak
162
163 \subsection{Black version (4292 icons)}
164
165 The \textsf{PDF} file is \texttt{openmoji-black-all.pdf}
166
167 Direct command is: {\ttfamily\textbackslash openmoji[black]\{<Name>\}}.
168
169 \textit{Some are duplicates, due to the tints of the colored versions, or due to flags, it's not a bug\ldots}
170
171 \input{openmojiblackbindings}
172
173 \end{document}