summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-cliparts.tex
blob: 4e85f747346cf68bd37827e81313c5a43277f35f (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
% proflycee-tools-cliparts.tex
% Copyright 2024  Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
% logos from CC0 opencliparts (users Firkin & Juhele & qubodup & TzeenieWheenie & jetxee)

%====DIMENSIONS
\newlength{\tmpcharacterheightinline}
\newlength{\tmpcharacterdepthinline}

%====MACRO PRINCIPALE
\NewDocumentCommand\InsererClipart{ s O{} m }{%
	\IfBooleanTF{#1}%
		{%
			\IfFileExists{pfl-#3.pdf}{\includegraphics[#2]{pfl-#3.pdf}}{}%
		}%
		{%
			\settototalheight{\tmpcharacterheightinline}{\hbox{AZERTYUIOPQSDFGHJKLMWXCVBNazertyuiopqsdfghjklmwxcvbn}}%
			\settodepth{\tmpcharacterdepthinline}{\hbox{AZERTYUIOPQSDFGHJKLMWXCVBNazertyuiopqsdfghjklmwxcvbn}}%
			\IfFileExists{pfl-#3.pdf}{\raisebox{-\tmpcharacterdepthinline}{\includegraphics[height=\tmpcharacterheightinline]{pfl-#3.pdf}}}{}%
		}%
}

%====ALIASES
\NewDocumentCommand\pflimgcoupeb{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{bronze-cup}}%
		{\InsererClipart{bronze-cup}}%
}

\NewDocumentCommand\pflimgmedb{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{bronze-medal}}%
		{\InsererClipart{bronze-medal}}%
}

\NewDocumentCommand\pflimgmedbp{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{bronze-medal-flat}}%
		{\InsererClipart{bronze-medal-flat}}%
}

\NewDocumentCommand\pflimgverif{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{checked}}%
		{\InsererClipart{checked}}%
}

\NewDocumentCommand\pflimgnonverif{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{crossed}}%
		{\InsererClipart{crossed}}%
}

\NewDocumentCommand\pflimgcoupeo{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{gold-cup}}%
		{\InsererClipart{gold-cup}}%
}

\NewDocumentCommand\pflimgmedo{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{gold-medal}}%
		{\InsererClipart{gold-medal}}%
}

\NewDocumentCommand\pflimgmedop{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{gold-medal-flat}}%
		{\InsererClipart{gold-medal-flat}}%
}

\NewDocumentCommand\pflimgsouris{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{mouse}}%
		{\InsererClipart{mouse}}%
}

\NewDocumentCommand\pflimgsourisg{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{mouse-left}}%
		{\InsererClipart{mouse-left}}%
}

\NewDocumentCommand\pflimgsourisc{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{mouse-center}}%
		{\InsererClipart{mouse-center}}%
}

\NewDocumentCommand\pflimgsourisd{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{mouse-right}}%
		{\InsererClipart{mouse-right}}%
}

\NewDocumentCommand\pflimgko{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{notok}}%
		{\InsererClipart{notok}}%
}

\NewDocumentCommand\pflimgok{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{ok}}%
		{\InsererClipart{ok}}%
}

\NewDocumentCommand\pflimgcoupea{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{silver-cup}}%
		{\InsererClipart{silver-cup}}%
}

\NewDocumentCommand\pflimgmeda{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{silver-medal}}%
		{\InsererClipart{silver-medal}}%
}

\NewDocumentCommand\pflimgmedap{ s O{} }{%
	\IfBooleanTF{#1}%
		{\InsererClipart*[#2]{silver-medal-flat}}%
		{\InsererClipart{silver-medal-flat}}%
}

%====NOCALC
\newlength{\tmptotalheightcurrenttxt}
\setlength{\tmptotalheightcurrenttxt}{1em}
\newlength{\tmptotaldepthcurrenttxt}
\setlength{\tmptotaldepthcurrenttxt}{0.1em}

\NewDocumentCommand\pflnocalc{ s O{black} }{%
	\settototalheight{\tmptotalheightcurrenttxt}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
	\settodepth{\tmptotaldepthcurrenttxt}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
	\IfBooleanTF{#1}{}{\hspace*{-0.05\tmptotalheightcurrenttxt}}%
	\raisebox{-\tmptotaldepthcurrenttxt}{%
		{\begin{tikzpicture}[line width={0.1\tmptotalheightcurrenttxt}]
				\node[#2,inner sep=0pt,scale=0.8,outer sep=0pt] (TMPPP) at (0,0) {\faCalculator} ;
				\draw[#2,line cap=round] (TMPPP.north east)--(TMPPP.south west) ;
		\end{tikzpicture}}%
	}%
	\IfBooleanTF{#1}{}{\hspace*{-0.05\tmptotalheightcurrenttxt}}%
}

\endinput