Debian Codegraph @

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