Debian Codegraph @

texmf-dist/doc/latex/tablericons/tablericons-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{tablericons}
8 \usepackage{xcolor}
9 \usepackage{longtable}
10 \usepackage{booktabs}
11 \usepackage{hyperref}
12 \usepackage{fancyvrb}
13 \usepackage{shortvrb}
14 \MakeShortVerb{\|}
15 \setlength{\parindent}{0pt}
16
17 \newenvironment{tablericonscase}
18 {%
19 \begin{longtable}{cllr}%icon + name + macro + page
20 \cmidrule[\heavyrulewidth]{1-4}% \toprule
21 \bfseries Icon & \bfseries Name & \bfseries Direct command & \bfseries PDF page \\
22 \cmidrule{1-4}
23 \endhead
24 }%
25 {%
26 \cmidrule[\heavyrulewidth]{1-4}
27 \end{longtable}%
28 }
29
30 \NewDocumentCommand{\showcasetablericonoutline}{mm}{%name + macro + page
31 \Large\tablericon{#1} & \itshape #1 & \ttfamily \textbackslash tablericon\{#1\} & \sffamily #2 \\
32 }
33
34 \NewDocumentCommand{\showcasetablericonfilled}{mm}{%name + macro + page
35 \Large\tablericon[filled]{#1} & \itshape #1 & \ttfamily \textbackslash tablericon[filled]\{#1\} & \sffamily #2 \\
36 }
37
38 \begin{document}
39
40 \title{The \textsf{tablericons} package (0.1.3) -- 17/04/2026}
41 \author{%
42 Cédric Pierquet\\%
43 \url{https://tabler.io/icons} (Source version 3.36.0)\\%
44 \url{https://github.com/cpierquet/latex-packages/tree/main/tablericons} (\LaTeX{} package)
45 }
46 \date{cpierquet -- at -- outlook . fr}\maketitle
47
48 This package provides \LaTeX{} support for the tabler Icons project (\url{https://github.com/tabler/tabler-icons}).
49
50 \medskip
51
52 \hspace*{5mm}\fbox{\begin{minipage}{0.75\linewidth}{\emph{A set of 5984 free MIT-licensed high-quality SVG/PDF icons for you to use in your web projects. Each icon is designed on a 24x24 grid and a 2px stroke.}}\end{minipage}}
53
54 \medskip
55
56 To use \textsf{tablericons} in your document, include the package with |\usepackage{tablericons}|.
57
58 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.
59
60 \medskip
61
62 The individual icons are provided as pages of a PDF and are ultimately loaded using the |\includegraphics| command from the |graphicx| package.
63
64 \medskip
65
66 Thanks to \textsf{priiduonu} for the tip with stroke color !
67
68 \section{Example}
69
70 \begin{Verbatim}[frame=single]
71 ...
72 \usepackage{tablericons}
73 ...
74 \begin{document}
75 ...
76 Inline\tablericon{alarm-snooze}version,
77 and colored\textcolor{red}{\tablericon{alarm-snooze}}
78 ...
79 \end{document}
80 \end{Verbatim}
81
82 Result: Inline\tablericon{alarm-snooze}version, and colored\textcolor{red}{\tablericon{alarm-snooze}}
83
84 \pagebreak
85
86 \section{Usage}
87
88 \subsection{Generic macro}
89
90 \begin{Verbatim}[frame=single]
91 \tablericon[filled=TF,height=...,(d)strut=...]<includegraphics options>{name}
92 \end{Verbatim}
93
94 The boolean \texttt{[filled]} activate \textsf{filled} version of icon (if available). And key \texttt{[height=...]} can be:
95
96 \begin{itemize}
97 \item \texttt{dauto} (by default): inline insertion with height/depth;
98 \item \texttt{auto}: inline insertion with height/nodepth;
99 \item \texttt{a length}: normal insertion with fixed height;
100 \item \texttt{manuel height/depth}: normal insertion with fixed height/depth.
101 \end{itemize}
102
103 The keys \texttt{[(d)strut=...]} can be used to set the \textit{reference} box for dimension calculations.
104
105 \medskip
106
107 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.
108
109 \medskip
110
111 Example: Inline{\setlength\fboxsep{0pt}\fbox{\tablericon{alarm-snooze}}}version or inline {\setlength\fboxsep{0pt}\fbox{\tablericon{alarm-snooze}}} version
112
113 \pagebreak
114
115 \subsection{Examples}
116
117 \begin{Verbatim}[frame=single]
118 %normal version: inline with automatic height/depth (from qX characters)
119 \tablericon[height=dauto]{alarm-snooze} %or \tablericon{alarm-snooze}
120 \end{Verbatim}
121
122 {\Huge q\tablericon{alarm-snooze}X}
123
124 \begin{Verbatim}[frame=single]
125 %normal version: inline with automatic height/depth (from specified characters)
126 (q\tablericon[height=dauto,dstrut=(qB)]{alarm-snooze}B)
127 \end{Verbatim}
128
129 {\Huge (q\tablericon[height=dauto,dstrut=(qB)]{alarm-snooze}B)}
130
131 \begin{Verbatim}[frame=single]
132 %normal version: inline with automatic height (from X character) default version
133 \tablericon[height=auto]{alarm-snooze}
134 \end{Verbatim}
135
136 {\Huge X\tablericon[height=auto]{alarm-snooze}X}
137
138 \begin{Verbatim}[frame=single]
139 %normal version: inline with manual height/depth
140 \tablericon[height={0.8em/-0.4em}]{alarm-snooze}
141 \end{Verbatim}
142
143 {\Huge qb\tablericon[height={0.8em/-0.4em}]{alarm-snooze}Xz}
144
145 \begin{Verbatim}[frame=single]
146 %fixed height
147 \tablericon[height=2in]{alarm-snooze}
148 \end{Verbatim}
149
150 \tablericon[height=1.5in]{alarm-snooze}
151
152 \subsection{Used packages}
153
154 \texttt{ifthen}, \texttt{calc}, \texttt{graphicx}, \texttt{xstring} and \texttt{simplekv} are loaded and used by the package.
155
156 \subsection{Bugs}
157
158 For bug reports and feature requests, report on the GitHub repository \url{https://github.com/cpierquet/latex-packages/issues}.
159
160 \newpage
161
162 \section{List of icons}
163
164 \subsection{Outline version (4985 icons)}
165
166 The \textsf{PDF} file is \texttt{tablericons-outline-all.pdf}
167
168 \input{tablericonsoutlinebindings}
169
170 \subsection{Filled version (999 icons)}
171
172 The \textsf{PDF} file is \texttt{tablericons-filled-all.pdf}
173
174 \input{tablericonsfilledbindings}
175
176 \end{document}