summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/paresse/paresse.dtx
blob: 0bf79afefe495a6b9ec5cea2c5332d36c1e03a2d (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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
% \iffalse meta-comment
%
%% File: paresse.dtx 
%% Copyright (C) 2020 Yvon Henel aka Le TeXnicien de surface
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
%% license or (at your option) any later version.  The latest version
%% of this license is in the file
%%
%%    http://www.latex-project.org/lppl.txt
%%
%
%<*driver|package|doc>
\RequirePackage{expl3}[2020/09/24]
\GetIdInfo$Id: paresse.dtx 5.0.1 2020-10-06 TdS $
  {}
%</driver|package|doc>
%<*driver>
\documentclass[full, english, draft]{l3doc}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[french,main=english]{babel}
\usepackage{xspace}

\usepackage{paresse}[2020-10-06]

\newcommand*\PS{\texttt{\S}\xspace}
\newcommand*\PSVerb[1]{\texttt{\S #1}}
\newcommand\BOP{\discretionary{}{}{}}
\newcommand\Option[1]{\textsc{#1}}

\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \title{^^A
%   The \pkg{paresse} package^^A
%   \thanks{This file describes v\ExplFileVersion, last revised \ExplFileDate.}^^A
% }
%
% \author{^^A
%  Yvon Henel\thanks^^A
%    {^^A
%      E-mail:
%        \href{mailto:le.texnicien.de.surface@yvon-henel.fr}
%          {le.texnicien.de.surface@yvon-henel.fr}^^A
%    }^^A
% }
%
% \date{Released \ExplFileDate}
%
% \maketitle
% 
% \changes{v0.0}{2004/02/07}{New name, some redefinitions, first public version}
% \changes{v1}{2004/04/17}{Documentation updated}
% \changes{v1a}{2005/03/01}{Correction of a bug in Infofile which prevented the
% loading of the package}
% \changes{v2}{2008/08/13}{A useless macro is deleted}
% \changes{v2}{2008/08/13}{Documentation reorganised}
% \changes{v2}{2008/08/13}{New wrapping to provide a tds.zip.}
% \changes{v2.1}{2008/08/16}{Correction of a bug in Infofile, once again}
% \changes{v3}{2010/03/19}{Option for Sylvio \textsc{Levi}'s encoding}
% \changes{v4}{2011/04/16}{Documentation of the code in English}
% \changes{v4}{2011/04/16}{paresse goes utf8}
% \changes{v4.1}{2013/02/16}{Using skeyval-bc instead of (moving forward) skeyval}
% \changes{v5.0}{2020/10/06}{Uses expl3 to replace skeyval.}
% \changes{v5.0}{2020/10/06}{Two sub-packages.}
% \changes{v5.0}{2020/10/06}{\cs{varsigma} is added as \PSVerb{j} to legacy encoding.}
% \changes{v5.0.1}{2020/10/10}{Bug correction: keys ttheta and ttau had disappeared.}
% \changes{v5.0.1}{2020/10/10}{Some changes in documentation.}
%
% \thispagestyle{empty}
% 
% \noindent\hrulefill
%
% \bgroup
% \begin{otherlanguage}{french}
% \begin{abstract}
%   Cette extension, reprenant un exemple de T.~\textsc{Lachand-Robert}
%   dans~\cite{tlachand}, fournit un moyen de taper des lettres grecques isolées
%   à l'aide du caractère \PS actif et redéfini. Au lieu de |\(\alpha\)| ou tape
%   \PSVerb{a} pour obtenir \(\alpha\).
%
%   \textbf{Important} : Il doit être chargé \textbf{après} \pkg{inputenc} si ce
%   dernier est utilisé. De plus, il faut que le signe \PS soit une lettre pour
%   \TeX.
% 
%   Depuis la version~4, on peut utiliser cette extension même dans un source
%   codé en utf-8 avec \hologo{LaTeX}, \hologo{LuaLaTeX} ou \hologo{XeLaTeX}.
% 
%   La documentation française pour l'utilisateur de l'extension \pkg{paresse}
%   est disponible sous le nom de \texttt{paresse-fra}.
% \end{abstract}
% \end{otherlanguage}
% \egroup
% 
% \noindent\hrulefill
%
% \begin{abstract}
%   This package implements an example from T.~\textsc{Lachand-Robert}
%   in~\cite{tlachand}. It provides a means of typing isolated greek letters
%   with the character \PS activated and redefined. Instead of |\(\alpha\)| one
%   types \PSVerb{a} to obtain \(\alpha\).
%
%   \textbf{Important}: You have to load it \textbf{after} the \pkg{inputenc}
%   package if the latter is used. Moreover the sign \PS must be a letter for
%   \TeX.
% 
%   Since version~4, one can use this package even with utf8-encoded source for
%   \hologo{LaTeX}, \hologo{LuaLaTeX}, or \hologo{XeLaTeX}.
% 
%   The English documentation for the final user of the package \pkg{paresse} is
%   available in the file \texttt{paresse-eng}.
% \end{abstract}
% 
% \noindent\hrulefill
% 
% \DisableDocumentation
% 
% \begin{documentation}
% \end{documentation}
%
% \iffalse
%<*doc> 
%<FRA>\documentclass[full, french]{l3doc}
%<ENG>\documentclass[full, english]{l3doc}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%<FRA>\usepackage[english,main=french]{babel}
%<ENG>\usepackage[french,main=english]{babel}
\usepackage{xparse}
\usepackage{xspace}

\usepackage[tame]{paresse}[2020-10-06]
            
\newcommand*\PS{\texttt{\S}\xspace}
\newcommand*\PSVerb[1]{\texttt{\S #1}}
\newcommand\BOP{\discretionary{}{}{}}
\newcommand\Option[1]{\textsc{#1}}
\newcommand{\TO}{\textemdash\ \ignorespaces}
\newcommand{\TF}{\unskip\ \textemdash\xspace}

\begin{document}
%<*FRA>
\title{Guide de l'utilisateur de \pkg{paresse}\thanks{Ce fichier décrit la
    version~\ExplFileVersion, dernière révision~\ExplFileDate. Édition
    \emph{Adieu à skeyval}.}}
%</FRA>
%<*ENG>
\title{\pkg{paresse} user guide\thanks{This file describes
    version~\ExplFileVersion, last revised~\ExplFileDate. \emph{Adieu to
      skeyval} edition.}}
%</ENG>
\author{Yvon Henel\thanks{E-mail:
    \href{mailto:le.texnicien.de.surface@yvon-henel.fr}
    {le.texnicien.de.surface@yvon-henel.fr}}}
\maketitle
\noindent\hrulefill

\begin{abstract}
%<*FRA> 
  Cette extension, reprenant un exemple de T.~\textsc{Lachand-Robert}
  dans~\cite{tlachand}, fournit un moyen de taper des lettres grecques isolées
  à l'aide du caractère \PS actif et redéfini. Au lieu de |\(\alpha\)| ou tape
  \PSVerb{a} pour obtenir \(\alpha\).

  \textbf{Important} : Il doit être chargé \textbf{après} \pkg{inputenc} si ce
  dernier est utilisé. De plus, il faut que le signe \PS soit une lettre pour
  \TeX.

  Depuis la version~4, on peut utiliser cette extension même dans un source
  codé en utf-8 avec \hologo{LaTeX}, \hologo{LuaLaTeX} ou \hologo{XeLaTeX}.
%</FRA>
%<*ENG>
  This package implements an example from T.~\textsc{Lachand-Robert}
  in~\cite{tlachand}. It provides a means of typing isolated greek letters
  with the character \PS activated and redefined. Instead of |\(\alpha\)| one
  types \PSVerb{a} to obtain \(\alpha\).

  \textbf{Important}: You have to load it \textbf{after} the \pkg{inputenc}
  package if the latter is used. Moreover the sign \PS must be a letter for
  \TeX.

  Since version~4, one can use this package even with utf8-encoded source for
  \hologo{LaTeX}, \hologo{LuaLaTeX}, or \hologo{XeLaTeX}.
%</ENG>
\end{abstract}

\noindent\hrulefill

%<FRA> \begin{otherlanguage}{english}
%<ENG> \begin{otherlanguage}{french}
\begin{abstract}
%<*FRA> 
The English documentation for the final user of the package
\pkg{paresse} is available in the file \texttt{paresse-eng}. 
%</FRA>
%<*ENG>
La documentation française pour l'utilisateur de l'extension
\pkg{paresse} est disponible sous le nom de \texttt{paresse-fra}. 
%</ENG>
\end{abstract}
\end{otherlanguage}

\noindent\hrulefill
\vspace{\baselineskip}

\tableofcontents{}

%<*FRA>
\section{Introduction}
\label{sec:introduction}

Cette extension ne fournit qu'un accès \og rapide et économique \fg aux lettres
grecques qui s'obtiennent à l'aide d'une macro comme \cs{alpha} ou
\cs{Omega}. Elle fournit un environnement et une commande qui permettent
d'utiliser § pour taper ces lettres. Un \cs{ensuremath} nous dispense de nous
placer explicitement \TO c'est-à-dire en tapant |$ $| ou bien |\( \)| ou encore
|\[ \]| ou tout autre chose ayant le même effet\TF en mode mathématique pour
obtenir une lettre grecque.
%</FRA>


%<*ENG> 
\section{Introduction}
\label{sec:introduction}

This package provides only a `quick and low-cost' access to greek letters
which one can obtain with a macro such as \cs{alpha} or \cs{Omega}. It
provides also an environment and a macro which make possible the use of §
to type in those letters. Because of an \cs{ensuremath} we are not bound to
explicitly enter ---i.e. by typing |$ $| or |\( \)| or else |\[ \]| or
anything whatsoever with the same effect--- mathematics mode to obtain a
greek letter.
%</ENG>

%<*FRA>
L'idée de la méthode est due à T.~\textsc{Lachand-Robert} et est
exposée dans~\cite{tlachand}. Je n'ai fait qu'ajouter le
\cs{ensuremath} bien agréable pour l'écriture de macros.
%</FRA>
%<*ENG>
The idea of the method is from T.~\textsc{Lachand-Robert} and described
in~\cite{tlachand}. I have just add the \cs{ensuremath} which is so
agreeable to write macros.
%</ENG>

%<*FRA>
Bien entendu, on \textbf{ne} dispose \textbf{pas} de macros pour la
minuscule omicron ni pour les majuscules alpha, beta\dots{} qui
s'obtiennent à l'aide des latines romaines de même
apparence\footnote{Je ne ferai aucune remarque sur les problèmes de
  codage que cela pose.}. Je ne me suis pas senti le courage ni la
force de fournir une solution qui permettent d'obtenir dans une
formule baignant dans un texte en italique gras un alpha majuscule
droit, romain, \&c.
%</FRA>
%<*ENG>
There is \emph{no} macros for the lowercase omicron nor for the
uppercase alpha, beta\dots{} that one can obtain with the latin roman
letters with the same look. I have not had the courage nor the
strength to build a solution which would provide a means of obtaining
an upright uppercase alpha in a math formula enbedded in an italic
boldfaced text.
%</ENG>

%<*FRA>
Pour finir cette introduction, glosons le nom de cette
extension. |paresse| vient de ce que le signe § indique un  \og
paragraphe \fg  en ayant une forme lointainement apparentée au
S et n'a donc aucun lien avec le \emph{défaut} si fréquent,
encore que, à bien y réfléchir\dots
%</FRA>
%<*ENG>
Even if the meaning of the French `paresse' is just `lazyness' I would
like to enphasize that the name of this package comes from the fact
that the sign § can be used to point at a paragraph and looks like an
S. So there is no connection between the name and the not unfrequent
sin of the same (French) name\dots{} or maybe\dots{}
%</ENG>

%<FRA>\subsection{Pourquoi une 5\ieme version?}
%<ENG>\subsection{Why a 5th Version?}

%<*FRA>
\emph{Sur mon brin de laurier, je dormais comme un loir} en utilisant
\pkg{paresse} presque quotidiennement quand il y a quelques jours, patatras!
Plus rien ne va, je me fais insulter rien qu'à charger l'extension. Je passe sur
les détails: la faute en revient à une modification du noyau qui vient perturber
le code acrobatique de \pkg{skeyval}. Comme la mise à jour de la dite extension
semble extrèmement improbable, j'ai décidé de réparer \pkg{paresse} en recourant
aux commandes de expl3.

Ce n'est donc que pour remettre en marche ce dont je me sers souvent que je
viens soulever le capot de cette extension vieille de plus de 7~ans.
%</FRA>
%<*ENG>
I was happily using \pkg{paresse} almost every day until when, some days ago,
all hell broke loose! I was insulted just by loading \pkg{paresse}. To put it in
a nutshell: the culprit is an improvement of the \LaTeXe{} kernel which wreaks
havoc in the highly unconventional code of \pkg{skeyval}. As it seems very
improbable that that package will be corrected any time soon, I've decided to
rewrite some parts of \pkg{paresse} with expl3.

So that is why I touch the more than seven-year-old code of this package.
%</ENG>

%<*FRA>
Avec cette 5\ieme version, apparaissent deux \emph{sous}-extensions:
\pkg{paresse-old} et \pkg{paresse-utf8} que l'on peut charger directement et qui
offrent les mêmes options et les mêmes commandes. De fait, \pkg{paresse} charge
l'une ou l'autre suivant la situation.
%</FRA>
%<*ENG>
With this 5th version come two \emph{sub}-packages: \pkg{paresse-old} and
\pkg{paresse-utf8} which are directly loadable. They have the same options and
commands as \pkg{paresse} itself. In fact \pkg{paresse} loads one of them
according to the situation. 
%</ENG>

%<*FRA>
On utilisera \pkg{paresse-utf8} uniquement si le source est codé en utf-8 et que
l'on compile avec \texttt{latex} c.-à-d. avec le moteur \TeX{} et le format
\LaTeX{}. Dans tous les autres cas de figure on utilisera \pkg{paresse-old}.
%</FRA>
%<*ENG>
One will use \pkg{paresse-utf8} if and only if the source is utf-8 encoded and
compiled with \texttt{latex} i.~e. with the \TeX-engine and the \LaTeX{}
format. In all other case, on will use \pkg{paresse-old}.
%</ENG>

%<*FRA>
La documentation de \pkg{paresse} couvre donc l'utilisation des trois
extensions. 
%</FRA>
%<*ENG>
The documentation of \pkg{paresse} covers the use of the three packages.
%</ENG>

%<FRA>\subsection{Pourquoi une 4\ieme version?}
%<ENG>\subsection{Why a 4th Version?}

%<*FRA>
Je ne sais plus bien à quelle occasion \TO l'age et les pannes de machine
avec \og crachage\fg de disque aidant\TF et encore moins quand \TO si ce
n'est que cela remonte à plus d'un an maintenant\footnote{J'ai écrit cette
  section à l'occasion de la sortie de la 4\ieme version, en 2013.}\TF
Christian \textsc{Tellechea} me faisait part de son désir d'utiliser
\pkg{paresse} avec des sources codées en utf-8 sous \hologo{LaTeX} \TO et
non \hologo{XeLaTeX} ou \hologo{LuaLaTeX}.

Une discussion s'engagea, Christian me fit parvenir du matériel en
ordre de marche. Il me fit même cadeau de deux versions, la deuxième
améliorant la reconnaissance du codage déclaré avec
\pkg{inputenc}. Toutefois, je procrastinais. Il se peut que ma vie
personnelle et mon travail aient interféré avec le développement de
cette extension.

Enfin, voici la chose.
%</FRA>
%<*ENG>
I don't remember exactly on what occasion \TO age, disk crash and computer
mishap aiding\TF and even less when \TO more than a year ago, I'm
afraid\footnote{I wrote this section in 2013 when the 4th version was
  published.}\TF Christian \textsc{Tellechea} wrote me that he would be
glad to use \pkg{paresse} in his utf-8 encoded sources with \hologo{LaTeX}
\TO not with \hologo{XeLaTeX} nor \hologo{LuaLaTeX}.

We exchanged emails, Christian sent me working material. He even made
me the gift of two versions, the second better for the identification
of the encoding passed, as an option, to \pkg{inputenc}. However I
procrastinated. My personal life and my job may have interfered with
the development of this package.

At last, here is the thing.
%</ENG>

%<*FRA>
Le plus nouveau devrait échapper à l'utilisateur de \hologo{LuaLaTeX}
ou \hologo{XeLaTeX} et même de \hologo{LaTeX} chargeant \pkg{inputenc}
avec une option comme \texttt{latin1} ou \texttt{latin9}. Cependant,
désormais, on peut utiliser cette extension avec \hologo{LaTeX} en
chargeant \pkg{inputenc} avec l'option \texttt{utf8}.
%</FRA>
%<*ENG>
The newest feature should escape the user of \hologo{LuaLaTeX}
or \hologo{XeLaTeX} and even of \hologo{LaTeX} loading \pkg{inputenc}
with an option such as \texttt{latin1} or \texttt{latin9}. However,
henceforth, one can use this package with \hologo{LaTeX} loading
\pkg{inputenc} with option \texttt{utf8}.
%</ENG>

%<*FRA>
J'ai profité de cette nouvelle version pour ajouter une macro en \PS:
\PSVerb{Z} qui produit \S, symbole déjà accessible par |\S|, ce qui
fait que je n'ose pas vraiment parler de \og raccourci\fg.
%</FRA>
%<*ENG>
I take advantage of this new version to add a \PS-macro:
\PSVerb{Z} which produces \S, symbol already available with
|\S|, so I don't dare to present it as a real ``shortcut''.
%</ENG>

%<FRA>\subsection{Pourquoi une 3\ieme version?}
%<ENG>\subsection{Why a 3rd Version?}

%<*FRA>
C'est par courriel que Claudio \textsc{Beccari} m'a signalé très
aimablement qu'il existait un codage de l'alphabet grec en lettres
latines près de 15~ans avant que je ne commette cette extension. Ce
codage était dû à Sylvio \textsc{Levi} qui l'avait mis au point, alors
qu'il dessinait les premières fontes grecques pour \TeX, en s'appuyant
sur la correspondance entre les claviers américain et grec.  Il me
faisait remarquer à juste titre que si quelqu'un avait pris l'habitude
du codage de Sylvio \textsc{Levi}, il préférerait conserver ses
habitudes pour \pkg{paresse}.
%</FRA>
%<*ENG>
With a mail Claudio \textsc{Beccari} kindly informed me that there was
an encoding of the greek alphabet with latin letters some 15~years
before I commited this extension. This encoding was devised by Sylvio
\textsc{Levi} who, at the time, was designing the first greek font for
\TeX, using the correspondance between greek and US keyboard. Claudio
wrote to me, and I can't but agree with him, that if one is used to
\textsc{Levi}'s encoding, one would rather keep one's habit in order
to use \pkg{paresse}.
%</ENG>

%<*FRA>
J'ai donc décidé de fournir un nouveau couple d'options exclusives
l'une de l'autre que j'ai nommées, pour l'une, \Option{legacy} ---
pour \og héritage\fg --- qui assure le codage originel de cette
extension et qui est active par défaut et, pour l'autre, \Option{Levi}
qui assure le codage de Sylvio \textsc{Levi}.
%</FRA>
%<*ENG>
I, then, decided to provide a new couple of mutually exclusive
options: the first one is \Option{legacy} with which one obtain the
original encoding of this extension and which is active by default,
the other one is \Option{Levi} which provides Sylvio \textsc{Levi}'s
encoding.
%</ENG>

%<*FRA>
J'en profite pour faire quelques changements cosmétiques: 
désormais toutes les macros internes \emph{secrètes}\footnote{À la mode
  \LaTeXe{}, pour la version~5.0 j'utilise en partie expl3 et, dans ce cas,
  le préfixe \texttt{paresse}.} ont un nom qui
commence par \cs{GA@};
le fichier |.dtx| est réorganisé pour faciliter la tache de
traduction de la documentation.
%</FRA>
%<*ENG>
I take advantage of this update to make some cosmetic changes: from now on
all inner \emph{secret} macros\footnote{Macros \emph{à la mode}
  \LaTeXe{}. As of version~5.0, partially \emph{translated} in expl3, when
  dealing with expl3 commands and variables I use the prefix
  \texttt{paresse}.} have a name which begins with \cs{GA@}; the |.dtx|
file is reorganised to facilitate the translation of the documentation.
%</ENG>

%<FRA>\section{Utilisation}
%<ENG>\section{Usage}

%<*FRA>
On charge cette extension avec |\usepackage{paresse}|. Quand on utilise
\hologo{LaTeX} avec un codage 8-bits (comme \texttt{latin9} par exemple),
on la charge \textbf{après} l'extension \pkg{inputenc} avec l'option
idoine. Avec un \hologo{LaTeX} moderne \TO post 2019\TF et un source codé
en utf-8, on n'a pas besoin de charger explicitement \pkg{inputenc}. Dans
ce cas, \pkg{paresse} suppose que le source est codé en utf-8.

Dans tous les cas il faut que le \og caractère \fg § soit reconnu par \TeX\
comme une lettre.

% On pourra, par exemple, utiliser l'option \texttt{latin1} de
% \pkg{inputenc} pour obtenir cela.

On obtiendra le même comportement, à l'exception \TO signalée dans le
paragraphe intitulé \textbf{restriction} page~\pageref{restriction}\TF
près, avec \pkg{inputenc} et l'option \texttt{utf8}.

Il n'y a pas ce genre de restriction quand on travaille avec
\hologo{LuaLaTeX} ou \hologo{XeLaTeX} sur un source codé en utf-8.
%</FRA>
%<*ENG>
One loads the package with |\usepackage{paresse}|.
When one uses \hologo{LaTeX} with an 8-bit encoded source
(e.g. \texttt{latin9}), one must load \pkg{paresse} \textbf{after} the
package \pkg{inputenc} whith the correct option.

In all cases the sign § must be recognised as a letter by \TeX.

% On can use for instance \pkg{inputenc} with option |latin1| for such a
% purpose.

One will obtain the same behaviour, but for the exception pointed out in
paragraph \textbf{restriction} on page~\pageref{restriction}, with
\pkg{inputenc} and option \texttt{utf8}.

There is no such restriction when one compiles with \hologo{LuaLaTeX}
or \hologo{XeLaTeX} a source encoded in utf-8.
%</ENG>

%<*FRA>
Par défaut, l'extension est chargée avec l'option |wild| ce qui
signifie que les macros de la forme |§a| sont disponibles. Si l'on
préfère, on peut passer à \pkg{paresse} l'option \Option{tame} avec
|\usepackage[tame]|\BOP|{paresse}|. Il faut alors utiliser la commande
\cs{ActiveLaParesse} ou l'environnement |ParesseActive| pour utiliser
les macros en~§.
%</FRA>
%<*ENG>
By default the package is loaded with option |wild| and so the macros
such as |§a| are immediately available. If one prefers one can choose
the option \Option{tame} by writing |\usepackage[tame]|\BOP|{paresse}|. One
must then use the command \cs{ActiveLaParesse} or the environment
|ParesseActive| to use the `§-macros'.
%</ENG>

%<*FRA>
Lorsque la \og paresse est active \fg, il suffit de taper |§a| pour
obtenir \(\alpha\). On a de même accès à toutes les lettres grecques
auxquelles sont consacrées une macro comme \cs{alpha},
voyez~\ref{codageorig} et~\ref{codagelevi}. On obtient, de même,
\(\alpha^{\beta}\) avec |\(§a^{§b}\)| lorsque § est active.
%</FRA>
%<*ENG>
When `paresse' is active, one has just to type |§a| in to obtain
\(\alpha\). One has access, by the same means, to all the other greek
letters to which a macro is devoted such as \cs{alpha}, see the
tables~\ref{codageorig} and~\ref{codagelevi}. One obtains
\(\alpha^{\beta}\) with |\(§a^{§b}\)| when § is active.
%</ENG>

\paragraph{Restriction}
%<*FRA>
On notera que les accolades sont optionelles et qu'on obtient un
résultat identique avec |\(§a^§b\)|, \textbf{à moins que} l'on utilise
un source codé en utf-8 avec \hologo{LaTeX}.\label{restriction}
%</FRA>
%<*ENG>
One will note that the curly braces are \emph{not} compulsory and that
one obtains the same result with just |\(§a^§b\)| \textbf{unless} one
uses a utf-8 encoded source with \hologo{LaTeX}.\label{restriction}
%</ENG>

%<*ENG>
\section{The Package Options}
\label{sec:keys}

In the margin the default options are in boldface.

%</ENG>

%<*FRA>
\section{Les options de l'extension}
\label{sec:clefs}

Dans la marge, les options par défaut sont données en gras.

%</FRA> 

\begin{itemize}
%<*FRA>
\item \Option{tame} \DescribeOption{tame / \textbf{wild}} s'oppose à
  \Option{wild} qui est l'option par défaut. Lorsque \Option{tame}
  règne, il \textbf{faut} un environnement |ParesseActive| ou une
  commande \cs{ActiveLaParesse} pour utiliser les macros à §.
%</FRA>
%<*ENG>
\item \Option{tame} \DescribeOption{tame / \textbf{wild}} is the contrary of
  \Option{wild} which is the option by default. When \Option{tame}
  reigns, one \textbf{must} use an environment |ParesseActive| or a
  command \cs{ActiveLaParesse} in order to use the §-macros.
%</ENG>


%<*FRA>
\item \Option{Levi} \DescribeOption{\textbf{legacy} / Levi} s'oppose à
  \Option{legacy} qui est l'option par défaut. Avec l'option
  \Option{legacy} on utilise le codage \og originel\fg de
  \pkg{paresse} tel que le donne la
  table~\ref{codageorig}. Sinon, le codage est celui défini par Sylvio
  \textsc{Levi}, cf. la table~\ref{codagelevi}.
%</FRA>
%<*ENG>
\item \Option{Levi} \DescribeOption{\textbf{legacy} / Levi} is the
  contrary of \Option{legacy} which is the default. With
  \Option{legacy} one uses the original encoding of
  \pkg{paresse} as it is given by the
  table~\ref{codageorig}. If the option \Option{Levi} is enforced, one
  uses the Sylvio \textsc{Levi} encoding, see the
  table~\ref{codagelevi}.
%</ENG>

%<*FRA>
\item \Option{ttau} \DescribeOption{ttau / \textbf{ttheta}} s'oppose à
  \Option{ttheta} qui est l'option par défaut. Lorsque \Option{ttheta}
  est active |§t| donne \(\theta\) dans le cas contraire |§t| donne
  \(\tau\). En tous cas, \(\theta\) est accessible par |§v| et
  \(\tau\) par |§y|.  Cette option est inopérante si l'option
  \Option{Levi} a été choisie.
%</FRA>
%<*ENG>
\item \Option{ttau} \DescribeOption{ttau / \textbf{ttheta}} is the contrary of
  \Option{ttheta} which is selected by default. When \Option{ttheta}
  is active |§t| gives \(\theta\) in the contrary |§t| gives
  \(\tau\). In all cases, \(\theta\) is given by |§v| and \(\tau\) by
  |§y|.  That option is ineffective when one has chosen
  \Option{Levi}.
%</ENG>

%<*FRA>
  \textbf{Remarque :}  quand l'option \Option{legacy} a été choisie,
  \(\Theta\) est obtenu par |§V| de manière \og régulière \fg et
  \emph{également} par |§T| quelle que soit l'option choisie. Dans
  le cas de l'option \Option{Levi}, |§V| ne correspond à aucune lettre
  grecque.
%</FRA>
%<*ENG>
\textbf{Remark:}  when one has chosen the option
\Option{legacy}, \(\Theta\) is `regularly' obtained with |§V| and
\emph{also} with |§T| whatever is the chosen option. In the case of
the option \Option{Levi}, |§V| doesn't correspond to any greek letter.
%</ENG>

%<*FRA>
\item \Option{epsilon} \DescribeOption{epsilon / \textbf{varepsilon}} s'oppose à
  \Option{varepsilon} qui est l'option par défaut. Avec
  \Option{epsilon}, |§e| donne \(\epsilon\) sinon |§e| donne
  \(\varepsilon\).
%</FRA>
%<*ENG>
\item \Option{epsilon} \DescribeOption{epsilon / \textbf{varepsilon}} is the
  contrary of \Option{varepsilon} which is selected by default. With
  \Option{epsilon}, |§e| gives \(\epsilon\) otherwise |§e| gives
  \(\varepsilon\).
%</ENG>

%<*FRA>
\item Se comportent comme le couple \Option{epsilon},
  \Option{varepsilon} les couples suivants \Option{theta} et
  \Option{vartheta} ; \Option{pi} et \Option{varpi} ; \Option{rho} et
  \Option{varrho} ; \Option{sigma} et \Option{varsigma} \og |§s| donne
  \(\varsigma\)\fg; \Option{phi} et \Option{varphi}.
%</FRA>
%<*ENG>
\item The following `couples' behave as \Option{epsilon},
  \Option{varepsilon}: \Option{theta} and \Option{vartheta};
  \Option{pi} and \Option{varpi}; \Option{rho} and \Option{varrho};
  \Option{sigma} and \Option{varsigma}; \Option{phi} and
  \Option{varphi}.
%</ENG>
\end{itemize}

%<*FRA>
Par défaut on a \Option{varepsilon}, \Option{theta}, \Option{pi},
\Option{rho}, \Option{sigma}, \Option{varphi}, \Option{wild} et
\Option{legacy}. Cela assure que cette version~3, se comporte,
par défaut, comme la précédente.
%</FRA>
%<*ENG>
The default options are \Option{varepsilon}, \Option{theta},
\Option{pi}, \Option{rho}, \Option{sigma}, \Option{varphi},
\Option{wild} and \Option{legacy}. That ensures that this 3rd
version behaves, by default, as the preceding one.
%</ENG>

%<FRA>\section{Commandes et environnement}
%<ENG>\section{Commands and Environment}

\DescribeMacro{\makeparesseletter}
%<*FRA>
Cette macro donne au \og caractère \fg § le catcode d'une
lettre. Après cela, on peut se servir de § dans un nom de macro, par
exemple. C'est le pendant de \cs{makeatletter}.
%</FRA>
%<*ENG>
This command gives the letter-catcode to the `character' §. After that
one can use § in the name of a macro, for instance. It corresponds to
the well-known |\makeatletter|.
%</ENG>

\DescribeMacro{\makeparesseother}
%<*FRA>
Cette macro donne au caractère § le catcode \emph{other}. C'est le \og
contraire \fg de la précédente. Cela équivaut au \cs{makeatother}.

Cette macro est inactive avec un codage utf-8 sous
\hologo{LaTeX}. Elle n'aurait d'ailleurs pas vraiment de sens. Son
utilisation produit un avertissement dans le fichier |.log|.
%</FRA>
%<*ENG>
This macro gives the catcode \emph{other} to the character §. It is
the `contrary' of the preceding one. It corresponds to |\makeatother|.

This macro is inactivated when one uses a utf-8 encoding with
\hologo{LaTeX}. In such a case it wouldn't have a clear meaning. When
used it issues a warning in the |.log| file.
%</ENG>

\DescribeMacro{\ActiveLaParesse}
%<*FRA>
Cette macro active le caractère § et permet ainsi d'accéder aux
macros dont le nom commence par § comme |§a|. Pour une liste de ces
macros et leurs significations, voyez les tableaux~\ref{codageorig}
et~\ref{codagelevi}.
%</FRA>
%<*ENG>
This macro makes § active and thus enable one to access the macros the
name of which begins with § such as |§a|. A list of these macros and
theirs meanings is given in the tables~\ref{codageorig}
and~\ref{codagelevi}.
%</ENG>

\DescribeEnv{ParesseActive}
%<*FRA>
Dans cet environnement le caractère § est actif ce qui permet
d'utiliser les macros en §.  On utilisera cet environnement si l'on
veut utiliser les macros quand on a chargé l'extension
\pkg{paresse} avec l'option \texttt{tame}.
%</FRA>
%<*ENG>
In this environment § is active and one can use the §-macros. One
could use this environment if one want to use the §-macros when the
package \texttt{paresse} is loaded whith the option \texttt{tame}.
%</ENG>

\newpage{}

%<FRA>\section{Tableaux des macros}
%<ENG>\section{Tables of the Macros}

%<FRA>\subsection{Codage originel de \pkg{paresse}}
%<ENG>\subsection{\pkg{paresse}'s Original Encoding}

%<*FRA>
C'est le codage actif lorsque l'on a choisit les options \Option{legacy} et
\Option{ttheta} qui sont des options par défaut.

Cette version~5.0 ajoute \(\varsigma\) obtenu avec \PSVerb{j}.
%</FRA>
%<*ENG>
This is the active encoding when one choses the options \Option{legacy} and
\Option{ttheta} which are the default.

This version~5.0 adds \(\varsigma\) obtained with \PSVerb{j}.
%</ENG>

\begin{center}\Large
\begin{ParesseActive} \label{codageorig}
\begin{tabular}{*4{||>{\ttfamily \S}c|c}||}\hline
a & §a & b & §b & g & §g & d & §d\\ \hline
e & §e & z & §z & h & §h & v & §v\\ \hline
i & §i & k & §k & l & §l & m & §m\\ \hline
n & §n & x & §x & p & §p & r & §r\\ \hline
s & §s & y & §y & u & §u & f & §f\\ \hline
c & §c & q & §q & w & §w & j & §j\\ \hline\hline
G & §G & D & §D & V & §V & L & §L\\ \hline
X & §X & P & §P & S & §S & U & §U\\ \hline
F & §F & Q & §Q & W & §W & Z & §Z\\ \hline
\end{tabular}
\end{ParesseActive}
\end{center}

\vspace{2\baselineskip}

\begin{center}\Large
\begin{ParesseActive} \label{codageorig}
\begin{tabular}{*7{||>{\ttfamily \S}c|c}||}\hline
a&§a&b&§b&c&§c&d&§d&e&§e&f&§f\\ \hline
g&§g&h&§h&i&§i&j&§j&k&§k&l&§l\\ \hline
m&§m&n&§n&o&  &p&§p&q&§q&r&§r\\ \hline
s&§s&t&§t&u&§u&v&§v&w&§w&x&§x\\ \hline
y&§y&z&§z&A&  &B&  &C&  &D&§D\\ \hline
E&  &F&§F&G&§G&H&  &I&  &J&  \\ \hline
K&  &L&§L&M&  &N&  &O&  &P&§P\\ \hline
Q&§Q&R&  &S&§S&T&§T&U&§U&V&§V\\ \hline
W&§W&X&§X&Y&  &Z&§Z&\multicolumn{4}{c||}{}\\ \hline
\end{tabular}
\end{ParesseActive}
\end{center}


%<*FRA>
\paragraph{Remarques : } à l'exception de {\ActiveLaParesse §v, §y, §q et §j}
les lettres utilisées dans les noms des macros sont chargées de vertu
mnémotechniques \texttt{:-)} et les capitales grecques, quand elles différent
des capitales latines, s'obtiennent à l'aide de la majuscule correspondante.
%</FRA>
%<*ENG>
\paragraph{Remarks : } all the latin letters used in the name of the
§-macros, but for {\ActiveLaParesse §v, §y, §q and §j}, are loaded with
reminiscences, I hope \texttt{:-)} and the greek uppercases are
obtained with the (latin) corresponding uppercases.
%</ENG>

\pagebreak[4]

%<FRA>\subsection{Codage de Sylvio \textsc{Levi}}
%<ENG>\subsection{Sylvio \textsc{Levi}'s Encoding}

%<*FRA>
On active ce codage avec l'option \Option{Levi}.
%</FRA>
%<*ENG>
One make this encoding active with the option \Option{Levi}.
%</ENG>

\begin{center}\Large
\begin{ParesseActive} \label{codagelevi}
\begin{tabular}{*4{||>{\ttfamily \S}c|c}||}\hline
a & §a & b & §b & g & §g & d & §d\\ \hline
e & §e & z & §z & h & §h & j & §v\\ \hline
i & §i & k & §k & l & §l & m & §m\\ \hline
n & §n & x & §x & p & §p & r & §r\\ \hline
s & §s & t & §y & u & §u & f & §f\\ \hline
q & §c & y & §q & w & §w & c & \(\varsigma\)\\ \hline\hline
G & §G & D & §D & J & §V & L & §L\\ \hline
X & §X & P & §P & S & §S & U & §U\\ \hline
F & §F & Y & §Q & W & §W & Z & §Z\\ \hline
\end{tabular}
\end{ParesseActive}
\end{center}

%<*FRA>
Le codage de Sylvio \textsc{Levi} donne accès directement à \cs{varsigma}
(\(\varsigma\)) avec |§c| et ne diffère du codage originel que pour
les lettres {\ActiveLaParesse §v, §y, §c et §q}. Voici un résumé de
ces différences: 
%</FRA>
%<*ENG>
Sylvio \textsc{Levi}'s encoding gives a direct acces to \cs{varsigma}
(\(\varsigma\)) with |§c| and is different from the original encoding
just for the letters {\ActiveLaParesse §v, §y, §c et §q}. Here is a
summary of theses differences:
%</ENG>

\begin{center}
\newcommand\CT[1]{\multicolumn{1}{c|}{\texttt{#1}}}
\begin{ParesseActive}
\begin{tabular}{|l|*{7}{c|}}\hline
%<FRA>lettres grecques
%<ENG>greek letters
& §v & §y & §c & §q & §V & §Q & \(\varsigma\)\\\hline
%<FRA>codage originel 
%<ENG>original encoding
&\CT{\S{}v/\S{}t}&\CT{\S{}y/\S{}t}&\CT{\S{}c}
&\CT{\S{}q}&\CT{\S{}V/\S{}T}&\CT{\S{}Q}& \CT{\S{}j} \\\hline
%<FRA>codage de S. \textsc{Levi}
%<ENG>S. \textsc{Levi}'s encoding
&\CT{\S{}j}&\CT{\S{}t}&\CT{\S{}q}&\CT{\S{}y}
&\CT{\S{}J}&\CT{\S{}Y} & \CT{\S{}c}\\\hline
\end{tabular}
\end{ParesseActive}
\end{center}


\vspace{\stretch{2}}

\begin{thebibliography}{99}
\addcontentsline{toc}{section}{Bibliographie}
\bibitem{tlachand} T.~\textsc{Lachand-Robert}.
\emph{La maîtrise de \TeX{} et \LaTeX{}}.
Masson, Paris, Milan, Barcelone, \oldstylenums{1995}. 
\textsc{isbn} : \texttt{2-225-84832-7}.
\end{thebibliography}

\vspace{\stretch{2}}

\noindent\hspace*{0.2\textwidth}\hrulefill\hspace*{0.2\textwidth}
\begin{center}
  \textsl{Le TeXnicien de Surface scripsit.}
\end{center}
\noindent\hspace*{0.2\textwidth}\hrulefill\hspace*{0.2\textwidth}

\vspace*{\stretch{2}}

\end{document}
%</doc> 
% \fi
% \begin{implementation}
%
% \section{\pkg{paresse} implementation}
% 
% Three packages are coded below: the main one \pkg{paresse} loads one of the
% other two \pkg{paresse-old} or \pkg{paresse-utf8} depending on the
% \TeX{}-engine used and the encoding of the source.
% 
% \iffalse
%<*package>
% \fi
% The prefix is \texttt{paresse} for the three packages.
%    \begin{macrocode}
%<@@=paresse>
%    \end{macrocode}
%
% \iffalse
%<*MAIN>
% \fi
% The main package \pkg{paresse} begins here.
%    \begin{macrocode}
\ProvidesExplPackage
  {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
%    \end{macrocode}
% \iffalse
%</MAIN>
% \fi
% \iffalse
%<*OLD>
% \fi
% Header of \pkg{paresse-old}: 
%    \begin{macrocode}
\ProvidesExplPackage
  {\ExplFileName-old}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
%    \end{macrocode}
% \iffalse
%</OLD>
% \fi
% \iffalse
%<*UTF>
% \fi
% Header of \pkg{paresse-utf8}: 
%    \begin{macrocode}
\ProvidesExplPackage
  {\ExplFileName-utf8}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
%    \end{macrocode}
% \iffalse
%</UTF>
% \fi
% 
% The three packages require \pkg{xparse} and \pkg{l3keys2}: 
%    \begin{macrocode}
\RequirePackage{xparse}
\RequirePackage{l3keys2e}
%    \end{macrocode}
% \iffalse
%<*MAIN>
% \fi
% but the main \pkg{paresse} alone requires \pkg{iftex} to proceed according to
% the \TeX-engine.
%    \begin{macrocode}
\RequirePackage{iftex}
%    \end{macrocode}
% \iffalse
%</MAIN>
% \fi
% 
% \iffalse
%<*!MAIN>
% \fi
%    \begin{macrocode}
\cs_if_exist:NF \@@_main_package_loaded: 
{
%    \end{macrocode}
% \iffalse
%</!MAIN>
% \fi
% 
%    \begin{macrocode}
\keys_define:nn {paresse}
{
  encoding_is_legacy .bool_set:N = \g_@@_encoding_is_legacy_bool, 
  encoding_is_levi .bool_set_inverse:N = 
    \g_@@_encoding_is_legacy_bool,
  legacy .meta:n = {
    encoding_is_legacy = #1
  },
  legacy .default:n = {true}, 
  legacy .initial:n = {true}, 
  levi .meta:n = {
    encoding_is_levi = #1
  },
  levi .default:n = {true}, 
  levi .initial:n = {false},

  mood_is_wild .bool_set:N = \g_@@_mood_is_wild_bool, 
  mood_is_tame .bool_set_inverse:N = 
    \g_@@_mood_is_wild_bool,
  wild .meta:n = {
    mood_is_wild = #1
  },
  wild .default:n = {true}, 
  wild .initial:n = {true}, 
  tame .meta:n = {
    mood_is_tame = #1
  },
  tame .default:n = {true}, 
  tame .initial:n = {false},

  letter_t_is_theta .bool_set:N = \g_@@_letter_t_is_theta_bool, 
  letter_t_is_tau .bool_set_inverse:N = 
    \g_@@_letter_t_is_theta_bool,
  ttheta .meta:n = {
    letter_t_is_theta = #1
  },
  ttheta .default:n = {true}, 
  ttheta .initial:n = {true}, 
  ttau .meta:n = {
    letter_t_is_tau = #1
  },
  ttau .default:n = {true}, 
  ttau .initial:n = {false}, 

  letter_theta_is_theta .bool_set:N = \g_@@_letter_theta_is_theta_bool,
  letter_theta_is_vartheta .bool_set_inverse:N = 
    \g_@@_letter_theta_is_theta_bool,
  theta .meta:n = {
    letter_theta_is_theta = #1
  },
  theta .default:n = {true}, 
  theta .initial:n = {true}, 
  vartheta .meta:n = {
    letter_theta_is_vartheta = #1
  },
  vartheta .default:n = {true}, 
  vartheta .initial:n = {false}, 

  letter_pi_is_pi .bool_set:N = \g_@@_letter_pi_is_pi_bool,
  letter_pi_is_varpi .bool_set_inverse:N = 
    \g_@@_letter_pi_is_pi_bool,
  pi .meta:n = {
    letter_pi_is_pi = #1
  },
  pi .default:n = {true}, 
  pi .initial:n = {true}, 
  varpi .meta:n = {
    letter_pi_is_varpi = #1
  },
  varpi .default:n = {true}, 
  varpi .initial:n = {false}, 

  letter_rho_is_rho .bool_set:N = \g_@@_letter_rho_is_rho_bool,
  letter_rho_is_varrho .bool_set_inverse:N = 
    \g_@@_letter_rho_is_rho_bool,
  rho .meta:n = {
    letter_rho_is_rho = #1
  },
  rho .default:n = {true}, 
  rho .initial:n = {true}, 
  varrho .meta:n = {
    letter_rho_is_varrho = #1
  },
  varrho .default:n = {true}, 
  varrho .initial:n = {false}, 

  letter_sigma_is_sigma .bool_set:N = \g_@@_letter_sigma_is_sigma_bool,
  letter_sigma_is_varsigma .bool_set_inverse:N = 
    \g_@@_letter_sigma_is_sigma_bool,
  sigma .meta:n = {
    letter_sigma_is_sigma = #1
  },
  sigma .default:n = {true}, 
  sigma .initial:n = {true}, 
  varsigma .meta:n = {
    letter_sigma_is_varsigma = #1
  },
  varsigma .default:n = {true}, 
  varsigma .initial:n = {false}, 

  letter_epsilon_is_epsilon .bool_set:N =
    \g_@@_letter_epsilon_is_epsilon_bool,
  letter_epsilon_is_varepsilon .bool_set_inverse:N = 
    \g_@@_letter_epsilon_is_epsilon_bool,
  epsilon .meta:n = {
    letter_epsilon_is_epsilon = #1
  },
  epsilon .default:n = {true}, 
  epsilon .initial:n = {false}, 
  varepsilon .meta:n = {
    letter_epsilon_is_varepsilon = #1
  },
  varepsilon .default:n = {true}, 
  varepsilon .initial:n = {true}, 

  letter_phi_is_phi .bool_set:N = \g_@@_letter_phi_is_phi_bool,
  letter_phi_is_varphi .bool_set_inverse:N = 
    \g_@@_letter_phi_is_phi_bool,
  phi .meta:n = {
    letter_phi_is_phi = #1
  },
  phi .default:n = {true}, 
  phi .initial:n = {false}, 
  varphi .meta:n = {
    letter_phi_is_varphi = #1
  },
  varphi .default:n = {true}, 
  varphi .initial:n = {true}, 
}
%    \end{macrocode}
% 
%    \begin{macrocode}
\ProcessKeysOptions {paresse}
%    \end{macrocode}
% 
%    \begin{macrocode}
\bool_if:nTF {\g_@@_letter_epsilon_is_epsilon_bool}
{\cs_new:Npn \@@_epsilon {\epsilon}}
{\cs_new:Npn \@@_epsilon {\varepsilon}}

\bool_if:nTF {\g_@@_letter_theta_is_theta_bool}
{\cs_new:Npn \@@_theta {\theta}}
{\cs_new:Npn \@@_theta {\vartheta}}

\bool_if:nTF {\g_@@_letter_pi_is_pi_bool}
{\cs_new:Npn \@@_pi {\pi}}
{\cs_new:Npn \@@_pi {\varpi}}

\bool_if:nTF {\g_@@_letter_rho_is_rho_bool}
{\cs_new:Npn \@@_rho {\rho}}
{\cs_new:Npn \@@_rho {\varrho}}

\bool_if:nTF {\g_@@_letter_sigma_is_sigma_bool}
{\cs_new:Npn \@@_sigma {\sigma}}
{\cs_new:Npn \@@_sigma {\varsigma}}

\bool_if:nTF {\g_@@_letter_phi_is_phi_bool}
{\cs_new:Npn \@@_phi {\phi}}
{\cs_new:Npn \@@_phi {\varphi}}

\bool_new:c {g__paresse_file_encoding_is_utf8_bool}
%    \end{macrocode}
% 
% \iffalse
%<*!MAIN>
% \fi
%    \begin{macrocode}
}
%    \end{macrocode}
% \iffalse
%</!MAIN>
% \fi
% \iffalse
%<*MAIN>
% \fi
%    \begin{macrocode}
\cs_new:Nn \__paresse_main_package_loaded: {}
%    \end{macrocode}
%
%    \begin{macrocode}
\ifluatex
%    \end{macrocode}
% luatex specific code 
%    \begin{macrocode}
\PackageInfo{paresse}{compiling~with~luatex}
\RequirePackageWithOptions{paresse-old}
\else
%    \end{macrocode}
% code for other engines
%    \begin{macrocode}
\ifxetex
%    \end{macrocode}
% xetex specific code
%    \begin{macrocode}
\PackageInfo{paresse}{compiling~with~xetex}
\RequirePackageWithOptions{paresse-old}
\else
%    \end{macrocode}
% nor luatex nor xetex
%    \begin{macrocode}

\PackageInfo{paresse}{compiling~with~tex}

\newcommand\default@encoding@message{
  \bool_gset_true:c {g__paresse_file_encoding_is_utf8_bool}
  \PackageWarningNoLine{paresse}{
    The~package~"paresse"~expects~a~"utf8"~encoded~file.~
    In~case~of~an~8~bits~encoding,~
    please~use~inputenc~with~the~correct~option}
}
  
\newcommand\find@encoding{
  \begingroup
  \def\utf@encoding{utf8}
  \def\temp@a{
    \bool_gset_false:c {g__paresse_file_encoding_is_utf8_bool}
    \PackageInfo{paresse}{8-bit~encoding~expected\@gobble}
  }
  \ifx\utf@encoding\inputencodingname
  \def\temp@a{
    \bool_gset_true:c {g__paresse_file_encoding_is_utf8_bool}
    \PackageInfo{paresse}{utf8~encoding~detected\@gobble}
  }
  \fi
  \expandafter\endgroup\temp@a}

\@ifpackageloaded{inputenc}
{
  \PackageInfo{paresse}{inputenc~loaded}
}
{
  \PackageInfo{paresse}{inputenc~not~loaded,~utf8~expected\@gobble}
}

\AtBeginDocument
{
  \@ifpackageloaded{inputenc} \find@encoding \default@encoding@message
  \ExplSyntaxOn
  \makeatletter
  \bool_if:nTF {\use:c{g__paresse_file_encoding_is_utf8_bool}}
  {
    \PackageInfo{paresse}{charge~utf8}
    \RequirePackageWithOptions{paresse-utf8}
  }
  {
    \PackageInfo{paresse}{charge~vieux}
    \RequirePackageWithOptions{paresse-old}
  }
  \makeatother
  \ExplSyntaxOff
}

\fi % END OF ifxetex
\fi % END OF ifluatex
%    \end{macrocode}
% \iffalse
%</MAIN>
% \fi
%
% \iffalse
%<*OLD>
% \fi
%    \begin{macrocode}
\count@=\catcode`\^^a7
\let\GA@LaVieilleParesse= ^^a7
\def\^^a7{\S}
\newcommand{\makeparesseletter}{\catcode `\^^a7=11\relax}
\newcommand{\makeparesseother}{\catcode `\^^a7=12\relax}
\newcommand{\GA@MakeParesseActive}{\catcode `\^^a7=\active}
\def\GA@ActiveLaParessexii{\catcode `\^^a7=\active}
\def\GA@ActiveLaParessexiii{\catcode `\^^a7=\active
  \def^^a7##1{\ensuremath{\csname \string^^a7##1\endcsname}}}
\ifnum\count@=12
  \let\GA@ActiveLaParesse \GA@ActiveLaParessexii
\else
  \let\GA@ActiveLaParesse \GA@ActiveLaParessexiii
\fi
\newcommand{\ActiveLaParesse}{\GA@ActiveLaParesse}
\newenvironment{ParesseActive}{\GA@ActiveLaParesse}{}

\makeparesseletter
\def\^^a7a {\alpha}
\def\^^a7b {\beta}
\def\^^a7g {\gamma}
\def\^^a7d {\delta}
\def\^^a7e {\__paresse_epsilon}
\def\^^a7z {\zeta}
\def\^^a7h {\eta}
\def\^^a7i {\iota}
\def\^^a7k {\kappa}
\def\^^a7l {\lambda}
\def\^^a7m {\mu}
\def\^^a7n {\nu}
\def\^^a7x {\xi}
\def\^^a7p {\__paresse_pi}
\def\^^a7r {\__paresse_rho}
\def\^^a7s {\__paresse_sigma}
\def\^^a7u {\upsilon}
\def\^^a7f {\__paresse_phi}
\def\^^a7w {\omega}

\bool_if:nTF {\g__paresse_encoding_is_legacy_bool}
{
  \def\^^a7j {\varsigma}
  \def\^^a7v {\__paresse_theta}
  \def\^^a7y {\tau}
  \def\^^a7c {\chi}
  \def\^^a7q {\psi}
  \bool_if:nTF {\g__paresse_letter_t_is_theta_bool}
  {
    \def\^^a7t {\__paresse_theta}
  }
  {
    \def\^^a7t {\tau}
  }
}
{
  \def\^^a7j {\__paresse_theta}
  \def\^^a7t {\tau}
  \def\^^a7q {\chi}
  \def\^^a7y {\psi}
  \def\^^a7c {\varsigma}
}
\def\^^a7G {\Gamma}
\def\^^a7D {\Delta}
\def\^^a7L {\Lambda}
\def\^^a7P {\Pi}
\def\^^a7S {\Sigma}
\def\^^a7U {\Upsilon}
\def\^^a7F {\Phi}
\def\^^a7X {\Xi}
\def\^^a7W {\Omega}
\bool_if:nTF {\g__paresse_encoding_is_legacy_bool}
{
  \def\^^a7V {\Theta}
  \def\^^a7T {\Theta}
  \def\^^a7Q {\Psi}
}
{
  \def\^^a7J {\Theta}
  \def\^^a7Y {\Psi}
}
\def\^^a7Z {\S}
\catcode `\^^a7=\active
\def^^a7#1{\ensuremath{\csname \string^^a7#1\endcsname}}

\bool_if:nF {\g__paresse_mood_is_wild_bool}
{
  \catcode`\^^a7=\count@
  \ifnum\count@=13 \let ^^a7=\GA@LaVieilleParesse \fi
}
%    \end{macrocode}
% \iffalse
%</OLD>
% \fi
% \iffalse
%<*UTF>
% \fi
%    \begin{macrocode}
\begingroup
\catcode`\"=12
\catcode`\<=12
\catcode`\.=12
\catcode`\,=12
\catcode`\;=12
\catcode`\!=12
\catcode`\~=13
\global\let\GA@parse@UTFviii@a=\parse@UTFviii@a
\global\let\GA@parse@UTFviii@b=\parse@UTFviii@b
\gdef\declareunicodecharacter#1#2{
   \count@"#1\relax
   \wlog{\space\space Redefining~Unicode~char~U+#1~(decimal~\the\count@)}
   \begingroup
    \GA@parse@XML@charref
    \def\UTFviii@two@octets##1##2{\csname u8:##1\string##2\endcsname}
    \def\UTFviii@three@octets##1##2##3{\csname u8:##1
      \string##2\string##3\endcsname}
    \def\UTFviii@four@octets##1##2##3##4{\csname u8:##1
      \string##2\string##3\string##4\endcsname}
    \expandafter\expandafter\expandafter
    \expandafter\expandafter\expandafter
    \expandafter
    \gdef\UTFviii@tmp{\IeC{#2}}
    \endgroup}
\gdef\GA@parse@XML@charref{
  \ifnum\count@<"A0\relax
     \PackageError{inputenc}{Cannot\space define\space Unicode\space
       char\space value\space <\space 00A0}\@eha
  \else\ifnum\count@<"800\relax
     \GA@parse@UTFviii@a,
     \GA@parse@UTFviii@b C\UTFviii@two@octets.,
  \else\ifnum\count@<"10000\relax
     \GA@parse@UTFviii@a;
     \GA@parse@UTFviii@a,
     \GA@parse@UTFviii@b E\UTFviii@three@octets.{,;}
   \else
     \GA@parse@UTFviii@a;
     \GA@parse@UTFviii@a,
     \GA@parse@UTFviii@a!
     \GA@parse@UTFviii@b F\UTFviii@four@octets.{!,;}
    \fi
  \fi
\fi}
\endgroup
\newcommand{\makeparesseletter}{\DeclareUnicodeCharacter{00A7}\S}
\newcommand{\makeparesseother}{
  \PackageWarning{paresse}{
    Command \string\makeparesseother disabled}{
    The command \string\makeparesseother would have been meaningless
    in the current context}}
\newcommand{\ActiveLaParesse}{\declareunicodecharacter{00A7}\@paresse}
\newenvironment{ParesseActive}{\ActiveLaParesse}{}
\ActiveLaParesse
\def\@paresse{\futurelet\@toks\@i@paresse}
\def\@i@paresse{
  \csname\ifcat a\@toks @ii@paresse\else S\fi\endcsname}
\def\@ii@paresse#1{
  \ifcsname @paresse@#1\endcsname
    \csname @paresse@#1\endcsname\expandafter\@gobble
  \else
    \expandafter\@firstofone
  \fi{\S#1}}
\def\define@paresse@car#1#2{
  \expandafter\def\csname @paresse@#1\endcsname{\ensuremath{#2}}}

\define@paresse@car Z\S
\define@paresse@car a\alpha
\define@paresse@car b\beta
\define@paresse@car g\gamma
\define@paresse@car d\delta
\define@paresse@car e\__paresse_epsilon
\define@paresse@car z\zeta
\define@paresse@car h\eta
\define@paresse@car i\iota
\define@paresse@car k\kappa
\define@paresse@car l\lambda
\define@paresse@car m\mu
\define@paresse@car n\nu
\define@paresse@car x\xi
\define@paresse@car p\__paresse_pi
\define@paresse@car r\__paresse_rho
\define@paresse@car s\__paresse_sigma
\define@paresse@car u\upsilon
\define@paresse@car f\__paresse_phi
\define@paresse@car w\omega

\bool_if:nTF {\g__paresse_encoding_is_legacy_bool}
{
  \define@paresse@car j\varsigma
  \define@paresse@car v\__paresse_theta
  \define@paresse@car y\tau
  \define@paresse@car c\chi
  \define@paresse@car q\psi

  \bool_if:nTF {\g__paresse_letter_t_is_theta_bool}
  {
    \define@paresse@car t\__paresse_theta
  }
  {
    \define@paresse@car t\tau
  }
}
{
  \define@paresse@car j\__paresse_theta
  \define@paresse@car t\tau
  \define@paresse@car q\chi
  \define@paresse@car y\psi
  \define@paresse@car c\varsigma
}
\define@paresse@car G\Gamma
\define@paresse@car D\Delta
\define@paresse@car L\Lambda
\define@paresse@car P\Pi
\define@paresse@car S\Sigma
\define@paresse@car U\Upsilon
\define@paresse@car F\Phi
\define@paresse@car X\Xi
\define@paresse@car W\Omega

\bool_if:nTF {\g__paresse_encoding_is_legacy_bool}
{
  \define@paresse@car V\Theta
  \define@paresse@car T\Theta
  \define@paresse@car Q\Psi
}
{
  \define@paresse@car J\Theta
  \define@paresse@car Y\Psi
}

\bool_if:nF {\g__paresse_mood_is_wild_bool}{\makeparesseletter}
%    \end{macrocode}
% \iffalse
%</UTF>
% \fi
%
% \iffalse
%</package>
% \fi
% 
% \end{implementation}
%
% \Finale
% \begin{thebibliography}{99}
% \addcontentsline{toc}{section}{Bibliographie}
% \bibitem{tlachand} T.~\textsc{Lachand-Robert}.
% \emph{La maîtrise de \TeX{} et \LaTeX{}}.
% Masson, Paris, Milan, Barcelone, \oldstylenums{1995}. 
% \textsc{isbn} : \texttt{2-225-84832-7}.
% \end{thebibliography}
% \PrintChanges\PrintIndex
% 
\endinput
%%% Local Variables: 
%%% mode: doctex
%%% coding: utf-8
%%% fill-column: 80
%%% TeX-master: t
%%% End: