Debian Codegraph @

texmf-dist/tex/latex/circularglyphs/circularglyphs.sty

raw
1 % Author : C. Pierquet
2 % licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
3
4 \NeedsTeXFormat{LaTeX2e}
5 \ProvidesPackage{circularglyphs}[2023/10/06 0.1.1 Circular glyphs Alphabet]
6
7 %====HISTORIQUE
8 % v 0.1.1 Compatibilité accrue avec le moteur pdflatex ^^ + clé [Color]
9 % v 0.1.0 Version initiale
10
11 %====BASE
12 \RequirePackage{tikz}
13 \RequirePackage{xstring}
14 \RequirePackage{calc}
15 \RequirePackage{simplekv}
16
17 %====LONGUEURS
18 \newlength{\tmp@circglyph@hauteur@totale}
19 \newlength{\tmp@circglyph@profondeur}
20 \def\tmp@circglyph@nivext{0.4}
21 \def\tmp@circglyph@nivint{0.225}
22 \def\tmp@circglyph@nivpt{0.25}
23
24 %====CLÉS
25 \defKV[circularglyph]{%
26 Color=\def\circularglyphcolor{#1}
27 }
28 \setKVdefault[circularglyph]{%
29 Ext=false,%
30 Inline=false,%
31 Color=black
32 }
33
34 %====STYLES
35 \tikzset{
36 CircGlyphA/.pic = {
37 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (-\tmp@circglyph@nivext,0) to[out=90,in=180]++ (\tmp@circglyph@nivext,\tmp@circglyph@nivext) ;
38 },
39 CircGlyphB/.pic = {
40 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,\tmp@circglyph@nivext) to[out=0,in=90]++ (\tmp@circglyph@nivext,-\tmp@circglyph@nivext) ;
41 },
42 CircGlyphC/.pic = {
43 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (\tmp@circglyph@nivext,0) to[out=-90,in=0]++ (-\tmp@circglyph@nivext,-\tmp@circglyph@nivext) ;
44 },
45 CircGlyphD/.pic = {
46 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,-\tmp@circglyph@nivext) to[out=180,in=-90]++ (-\tmp@circglyph@nivext,\tmp@circglyph@nivext) ;
47 },
48 CircGlyphE/.pic = {
49 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (-\tmp@circglyph@nivext,0) arc (180:0:\tmp@circglyph@nivext) ;
50 },
51 CircGlyphF/.pic = {
52 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,\tmp@circglyph@nivext) arc (90:-90:\tmp@circglyph@nivext) ;
53 },
54 CircGlyphG/.pic = {
55 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (\tmp@circglyph@nivext,0) arc (0:-180:\tmp@circglyph@nivext) ;
56 },
57 CircGlyphH/.pic = {
58 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,\tmp@circglyph@nivext) arc (90:270:\tmp@circglyph@nivext) ;
59 },
60 CircGlyphI/.pic = {
61 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (-\tmp@circglyph@nivext,0) arc (180:-90:\tmp@circglyph@nivext) ;
62 },
63 CircGlyphJ/.pic = {
64 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (-\tmp@circglyph@nivext,0) arc (-180:90:\tmp@circglyph@nivext) ;
65 },
66 CircGlyphK/.pic = {
67 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,\tmp@circglyph@nivext) arc (90:360:\tmp@circglyph@nivext) ;
68 },
69 CircGlyphL/.pic = {
70 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (\tmp@circglyph@nivext,0) arc (0:270:\tmp@circglyph@nivext) ;
71 },
72 CircGlyphM/.pic = {
73 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ;
74 },
75 CircGlyphN/.pic = {
76 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (0,\tmp@circglyph@nivint) arc (90:180:\tmp@circglyph@nivint) ;
77 },
78 CircGlyphO/.pic = {
79 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (\tmp@circglyph@nivint,0) arc (0:90:\tmp@circglyph@nivint) ;
80 },
81 CircGlyphP/.pic = {
82 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (\tmp@circglyph@nivint,0) arc (0:-90:\tmp@circglyph@nivint) ;
83 },
84 CircGlyphQ/.pic = {
85 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (-\tmp@circglyph@nivint,0) arc (180:270:\tmp@circglyph@nivint) ;
86 },
87 CircGlyphR/.pic = {
88 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (\tmp@circglyph@nivint,0) arc (0:180:\tmp@circglyph@nivint) ;
89 },
90 CircGlyphS/.pic = {
91 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (0,-\tmp@circglyph@nivint) arc (-90:90:\tmp@circglyph@nivint) ;
92 },
93 CircGlyphT/.pic = {
94 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (-\tmp@circglyph@nivint,0) arc (-180:0:\tmp@circglyph@nivint) ;
95 },
96 CircGlyphU/.pic = {
97 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (0,\tmp@circglyph@nivint) arc (90:270:\tmp@circglyph@nivint) ;
98 },
99 CircGlyphV/.pic = {
100 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (0,-\tmp@circglyph@nivint) arc (-90:180:\tmp@circglyph@nivint) ;
101 },
102 CircGlyphW/.pic = {
103 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (-\tmp@circglyph@nivint,0) arc (-180:90:\tmp@circglyph@nivint) ;
104 },
105 CircGlyphX/.pic = {
106 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (0,\tmp@circglyph@nivint) arc (90:360:\tmp@circglyph@nivint) ;
107 },
108 CircGlyphY/.pic = {
109 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (\tmp@circglyph@nivint,0) arc (0:270:\tmp@circglyph@nivint) ;
110 },
111 CircGlyphZ/.pic = {
112 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,0) circle[radius=\tmp@circglyph@nivext] ; \draw (0,0) circle[radius=\tmp@circglyph@nivint] ;
113 },
114 CircGlyphNull/.pic = {
115 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ;
116 },
117 CircGlyphZero/.pic = {
118 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (\tmp@circglyph@nivpt,\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] (-\tmp@circglyph@nivpt,-\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
119 },
120 CircGlyphUn/.pic = {
121 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (\tmp@circglyph@nivpt,\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
122 },
123 CircGlyphDeux/.pic = {
124 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (\tmp@circglyph@nivpt,-\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
125 },
126 CircGlyphTrois/.pic = {
127 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (-\tmp@circglyph@nivpt,-\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
128 },
129 CircGlyphQuatre/.pic = {
130 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (-\tmp@circglyph@nivpt,\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
131 },
132 CircGlyphCinq/.pic = {
133 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (-\tmp@circglyph@nivpt,\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] (\tmp@circglyph@nivpt,\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
134 },
135 CircGlyphSix/.pic = {
136 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (-\tmp@circglyph@nivpt,-\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] (\tmp@circglyph@nivpt,-\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
137 },
138 CircGlyphSept/.pic = {
139 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (-\tmp@circglyph@nivpt,\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] (-\tmp@circglyph@nivpt,-\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
140 },
141 CircGlyphHuit/.pic = {
142 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (\tmp@circglyph@nivpt,\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] (\tmp@circglyph@nivpt,-\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
143 },
144 CircGlyphNeuf/.pic = {
145 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \filldraw (\tmp@circglyph@nivpt,\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] (\tmp@circglyph@nivpt,-\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] (-\tmp@circglyph@nivpt,\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] (-\tmp@circglyph@nivpt,-\tmp@circglyph@nivpt) circle[radius={0.05\tmp@circglyph@hauteur@totale}] ;
146 },
147 CircGlyphVirg/.pic = {
148 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext) ;
149 },
150 CircGlyphPtVirg/.pic = {
151 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0) ;
152 },
153 CircGlyphPt/.pic = {
154 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (\tmp@circglyph@nivext,0)--(0,-\tmp@circglyph@nivext) ;
155 },
156 CircGlyphPtInterr/.pic = {
157 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0) ;
158 },
159 CircGlyphPtExcl/.pic = {
160 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0) ;
161 },
162 CircGlyphDeuxPts/.pic = {
163 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0)--(0,-\tmp@circglyph@nivext) ;
164 },
165 CircGlyphMoins/.pic = {
166 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (\tmp@circglyph@nivext,0)--(0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0) ;
167 },
168 CircGlyphApos/.pic = {
169 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext) ;
170 },
171 CircGlyphPlus/.pic = {
172 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0)--(0,-\tmp@circglyph@nivext) ;
173 },
174 CircGlyphStar/.pic = {
175 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0)--(0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0) ;
176 },
177 CircGlyphParG/.pic = {
178 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (\tmp@circglyph@nivext,0)--(0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext) ;
179 },
180 CircGlyphParD/.pic = {
181 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0) ;
182 },
183 CircGlyphEgal/.pic = {
184 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0)--cycle ;
185 },
186 CircGlyphSlash/.pic = {
187 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0)--cycle ; \draw (-\tmp@circglyph@nivint,0)--(0,\tmp@circglyph@nivint) ;
188 },
189 CircGlyphInf/.pic = {
190 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0)--cycle ; \draw (0,\tmp@circglyph@nivint)--(\tmp@circglyph@nivint,0) ;
191 },
192 CircGlyphSup/.pic = {
193 \draw (0,-0.5)--++(0,1) ; \draw (-0.5,0)--++(1,0) ; \draw (0,-\tmp@circglyph@nivext)--(-\tmp@circglyph@nivext,0)--(0,\tmp@circglyph@nivext)--(\tmp@circglyph@nivext,0)--cycle ; \draw (\tmp@circglyph@nivint,0)--(0,-\tmp@circglyph@nivint) ;
194 },
195 CircGlyph/.style={x=\tmp@circglyph@hauteur@totale,y=\tmp@circglyph@hauteur@totale,line width={0.066\tmp@circglyph@hauteur@totale}
196 }
197 }
198
199 %====MACROCRÉATION
200 %\ifpdftex
201 %gestion des caractères actifs
202 \NewDocumentCommand\GenereCircGlyp{ }{%
203 \begingroup
204 \catcode`\;=12
205 \catcode`\:=12
206 \catcode`\!=12
207 \catcode`\?=12
208 \GenereCircGlypAux
209 }
210 \NewDocumentCommand\GenereCircGlypAux{ m m }{%1=lettre,2=pictikz
211 \endgroup
212 \IfEq{\TmpCaract}{#1}%
213 {%
214 \raisebox{-\tmp@circglyph@profondeur}{%
215 \begin{tikzpicture}[CircGlyph,\circularglyphcolor]\clip (-0.5,-0.5) rectangle (0.5,0.5) ; \pic at (0,0) {#2} ;\end{tikzpicture}%
216 }%
217 }{}%
218 }
219
220 \NewDocumentCommand\CircGlyphChar{ }{%
221 \begingroup
222 \catcode`\;=12
223 \catcode`\:=12
224 \catcode`\!=12
225 \catcode`\?=12
226 \CircGlyphCharAux
227 }
228 \NewDocumentCommand\CircGlyphCharAux{ m }{%1=lettre avec taille gérée par une macro supérieure
229 \endgroup
230 %les caractères min/MAJ
231 \GenereCircGlyp{a}{CircGlyphA}%
232 \GenereCircGlyp{b}{CircGlyphB}%
233 \GenereCircGlyp{c}{CircGlyphC}%
234 \GenereCircGlyp{d}{CircGlyphD}%
235 \GenereCircGlyp{e}{CircGlyphE}%
236 \GenereCircGlyp{f}{CircGlyphF}%
237 \GenereCircGlyp{g}{CircGlyphG}%
238 \GenereCircGlyp{h}{CircGlyphH}%
239 \GenereCircGlyp{i}{CircGlyphI}%
240 \GenereCircGlyp{j}{CircGlyphJ}%
241 \GenereCircGlyp{k}{CircGlyphK}%
242 \GenereCircGlyp{l}{CircGlyphL}%
243 \GenereCircGlyp{m}{CircGlyphM}%
244 \GenereCircGlyp{n}{CircGlyphN}%
245 \GenereCircGlyp{o}{CircGlyphO}%
246 \GenereCircGlyp{p}{CircGlyphP}%
247 \GenereCircGlyp{q}{CircGlyphQ}%
248 \GenereCircGlyp{r}{CircGlyphR}%
249 \GenereCircGlyp{s}{CircGlyphS}%
250 \GenereCircGlyp{t}{CircGlyphT}%
251 \GenereCircGlyp{u}{CircGlyphU}%
252 \GenereCircGlyp{v}{CircGlyphV}%
253 \GenereCircGlyp{w}{CircGlyphW}%
254 \GenereCircGlyp{x}{CircGlyphX}%
255 \GenereCircGlyp{y}{CircGlyphY}%
256 \GenereCircGlyp{z}{CircGlyphZ}%
257 \GenereCircGlyp{A}{CircGlyphA}%
258 \GenereCircGlyp{B}{CircGlyphB}%
259 \GenereCircGlyp{C}{CircGlyphC}%
260 \GenereCircGlyp{D}{CircGlyphD}%
261 \GenereCircGlyp{E}{CircGlyphE}%
262 \GenereCircGlyp{F}{CircGlyphF}%
263 \GenereCircGlyp{G}{CircGlyphG}%
264 \GenereCircGlyp{H}{CircGlyphH}%
265 \GenereCircGlyp{I}{CircGlyphI}%
266 \GenereCircGlyp{J}{CircGlyphJ}%
267 \GenereCircGlyp{K}{CircGlyphK}%
268 \GenereCircGlyp{L}{CircGlyphL}%
269 \GenereCircGlyp{M}{CircGlyphM}%
270 \GenereCircGlyp{N}{CircGlyphN}%
271 \GenereCircGlyp{O}{CircGlyphO}%
272 \GenereCircGlyp{P}{CircGlyphP}%
273 \GenereCircGlyp{Q}{CircGlyphQ}%
274 \GenereCircGlyp{R}{CircGlyphR}%
275 \GenereCircGlyp{S}{CircGlyphS}%
276 \GenereCircGlyp{T}{CircGlyphT}%
277 \GenereCircGlyp{U}{CircGlyphU}%
278 \GenereCircGlyp{V}{CircGlyphV}%
279 \GenereCircGlyp{W}{CircGlyphW}%
280 \GenereCircGlyp{X}{CircGlyphX}%
281 \GenereCircGlyp{Y}{CircGlyphY}%
282 \GenereCircGlyp{Z}{CircGlyphZ}%
283 %les chiffres
284 \GenereCircGlyp{0}{CircGlyphZero}%
285 \GenereCircGlyp{1}{CircGlyphUn}%
286 \GenereCircGlyp{2}{CircGlyphDeux}%
287 \GenereCircGlyp{3}{CircGlyphTrois}%
288 \GenereCircGlyp{4}{CircGlyphQuatre}%
289 \GenereCircGlyp{5}{CircGlyphCinq}%
290 \GenereCircGlyp{6}{CircGlyphSix}%
291 \GenereCircGlyp{7}{CircGlyphSept}%
292 \GenereCircGlyp{8}{CircGlyphHuit}%
293 \GenereCircGlyp{9}{CircGlyphNeuf}%
294 \GenereCircGlyp{ }{CircGlyphNull}%
295 %la ponctuation en fonction de [Ext]
296 \ifboolKV[circularglyph]{Ext}%
297 {%
298 \GenereCircGlyp{,}{CircGlyphVirg}%
299 \GenereCircGlyp{;}{CircGlyphPtVirg}%
300 \GenereCircGlyp{.}{CircGlyphPt}%
301 \GenereCircGlyp{?}{CircGlyphPtInterr}%
302 \GenereCircGlyp{!}{CircGlyphPtExcl}%
303 \GenereCircGlyp{:}{CircGlyphDeuxPts}%
304 \GenereCircGlyp{-}{CircGlyphMoins}%
305 \GenereCircGlyp{'}{CircGlyphApos}%
306 \GenereCircGlyp{+}{CircGlyphPlus}%
307 \GenereCircGlyp{*}{CircGlyphStar}%
308 \GenereCircGlyp{(}{CircGlyphParG}%
309 \GenereCircGlyp{)}{CircGlyphParD}%
310 \GenereCircGlyp{=}{CircGlyphEgal}%
311 \GenereCircGlyp{/}{CircGlyphSlash}%
312 \GenereCircGlyp{<}{CircGlyphInf}%
313 \GenereCircGlyp{>}{CircGlyphSup}%
314 }%
315 {%
316 \GenereCircGlyp{'}{CircGlyphNull}%
317 \GenereCircGlyp{-}{CircGlyphNull}%
318 }%
319 }
320
321 \NewDocumentCommand\CircGlyph{ }{%
322 \begingroup
323 \catcode`\;=12
324 \catcode`\:=12
325 \catcode`\!=12
326 \catcode`\?=12
327 \CircGlyphAux
328 }
329 \NewDocumentCommand\CircGlyphAux{ O{} m }{%
330 \endgroup
331 \useKVdefault[circularglyph]%
332 \setKV[circularglyph]{#1}%
333 %gestion des caractères spéciaux
334 \def\tmpphrase{#2}%
335 \StrSubstitute{\tmpphrase}{À}{A}[\tmpphrase]%
336 \StrSubstitute{\tmpphrase}{à}{a}[\tmpphrase]%
337 \StrSubstitute{\tmpphrase}{Â}{A}[\tmpphrase]%
338 \StrSubstitute{\tmpphrase}{â}{a}[\tmpphrase]%
339 \StrSubstitute{\tmpphrase}{Ä}{A}[\tmpphrase]%
340 \StrSubstitute{\tmpphrase}{ä}{a}[\tmpphrase]%
341 \StrSubstitute{\tmpphrase}{é}{e}[\tmpphrase]%
342 \StrSubstitute{\tmpphrase}{É}{E}[\tmpphrase]%
343 \StrSubstitute{\tmpphrase}{è}{e}[\tmpphrase]%
344 \StrSubstitute{\tmpphrase}{Ê}{E}[\tmpphrase]%
345 \StrSubstitute{\tmpphrase}{ê}{e}[\tmpphrase]%
346 \StrSubstitute{\tmpphrase}{Ê}{E}[\tmpphrase]%
347 \StrSubstitute{\tmpphrase}{ë}{e}[\tmpphrase]%
348 \StrSubstitute{\tmpphrase}{Ë}{E}[\tmpphrase]%
349 \StrSubstitute{\tmpphrase}{ï}{i}[\tmpphrase]%
350 \StrSubstitute{\tmpphrase}{Ï}{I}[\tmpphrase]%
351 \StrSubstitute{\tmpphrase}{î}{i}[\tmpphrase]%
352 \StrSubstitute{\tmpphrase}{Î}{I}[\tmpphrase]%
353 \StrSubstitute{\tmpphrase}{ô}{o}[\tmpphrase]%
354 \StrSubstitute{\tmpphrase}{Ô}{O}[\tmpphrase]%
355 \StrSubstitute{\tmpphrase}{ö}{o}[\tmpphrase]%
356 \StrSubstitute{\tmpphrase}{Ö}{O}[\tmpphrase]%
357 \StrSubstitute{\tmpphrase}{ù}{u}[\tmpphrase]%
358 \StrSubstitute{\tmpphrase}{Ù}{U}[\tmpphrase]%
359 \StrSubstitute{\tmpphrase}{û}{u}[\tmpphrase]%
360 \StrSubstitute{\tmpphrase}{Û}{U}[\tmpphrase]%
361 \StrSubstitute{\tmpphrase}{ü}{u}[\tmpphrase]%
362 \StrSubstitute{\tmpphrase}{Ü}{U}[\tmpphrase]%
363 \StrSubstitute{\tmpphrase}{ÿ}{y}[\tmpphrase]%
364 \StrSubstitute{\tmpphrase}{Ÿ}{Y}[\tmpphrase]%
365 \StrSubstitute{\tmpphrase}{ç}{c}[\tmpphrase]%
366 \StrSubstitute{\tmpphrase}{Ç}{C}[\tmpphrase]%
367 \StrSubstitute{\tmpphrase}{œ}{oe}[\tmpphrase]%
368 \StrSubstitute{\tmpphrase}{Œ}{OE}[\tmpphrase]%
369 %dimensions
370 \settototalheight{\tmp@circglyph@hauteur@totale}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
371 \settodepth{\tmp@circglyph@profondeur}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
372 %créationdesglyphes
373 \StrLen{\tmpphrase}[\NbCaract]%
374 \ifboolKV[circularglyph]{Inline}%
375 {%
376 {\foreach \poslet in {1,...,\NbCaract}{{\StrChar{\tmpphrase}{\poslet}[\TmpCaract]\CircGlyphChar{\TmpCaract}}\hspace{0pt}}}%
377 }%
378 {%
379 {%
380 \offinterlineskip{\foreach \poslet in {1,...,\NbCaract}{{\StrChar{\tmpphrase}{\poslet}[\TmpCaract]\CircGlyphChar{\TmpCaract}}\hspace{0pt}}}\par%
381 }%
382 }%
383 %{\IfBooleanF{#1}{\offinterlineskip}\StrLen{\tmpphrase}[\NbCaract]{\foreach \poslet in {1,...,\NbCaract}{{\StrChar{\tmpphrase}{\poslet}[\TmpCaract]\CircGlyphChar{\TmpCaract}}\hspace{0pt}}}\IfBooleanF{#1}{\par}}%
384 }
385
386 \endinput