setup.sty 13.2 KB
Newer Older
Benoit Viguier's avatar
Benoit Viguier committed
1
2
3
4
5
6
7
8
9
10
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[pdf]{pstricks}
\usepackage{multido}

\usepackage{amsfonts,amsmath,amscd,amscd,amssymb,array}
\usepackage{type1cm}
\newcommand{\lstsize}{\fontsize{8.5pt}{8.5pt}\selectfont}
\usepackage{algorithm, algorithmic}
Benoit Viguier's avatar
forward    
Benoit Viguier committed
11
\usepackage{amsmath}
Benoit Viguier's avatar
Benoit Viguier committed
12
13
14
15
16
\usepackage{xspace}
\usepackage{listings}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{ntheorem}
Benoit Viguier's avatar
Benoit Viguier committed
17
\usepackage{textcomp}
Benoit Viguier's avatar
Benoit Viguier committed
18
\usepackage{bussproofs}
Benoit Viguier's avatar
Benoit Viguier committed
19
\usepackage{xcolor}
Benoit Viguier's avatar
Benoit Viguier committed
20
21
22
23
24

\definecolor{linkcolor}{rgb}{0.65,0,0}
\definecolor{citecolor}{rgb}{0,0.45,0}
\definecolor{urlcolor}{rgb}{0,0,0.65}
\usepackage[colorlinks=true, backref=page, linkcolor=linkcolor, urlcolor=urlcolor, citecolor=citecolor]{hyperref}
Benoit Viguier's avatar
Benoit Viguier committed
25
\usepackage{tikz}
26
\usetikzlibrary{arrows}
Benoit Viguier's avatar
Benoit Viguier committed
27

Benoit Viguier's avatar
Benoit Viguier committed
28
29
30
\renewcommand{\algorithmicrequire}{\textbf{Input:\ }}
\renewcommand{\algorithmicensure}{\textbf{Output:\ }}

Benoit Viguier's avatar
Benoit Viguier committed
31
32
33
34
35
\usepackage{cite}
\usepackage{dsfont}
\usepackage{xspace}
\usepackage{float}

36
37
38
39
\newcommand{\todo}[1]{
{\color{red} \bf TODO: #1}
}

Benoit Viguier's avatar
Benoit Viguier committed
40
41
42
43
44
45
46
47
\floatstyle{ruled}
\newfloat{Listing}{htb}{lst}
\floatstyle{plain}
\newfloat{Protocol}{htb}{proto}
\newcounter{subListing}
\newcounter{subListing@save}
\renewcommand{\thesubListing}{\alph{subListing}}

Benoit Viguier's avatar
Benoit Viguier committed
48
49
50
51
52
53
\usepackage[framemethod=tikz]{mdframed}
\mdfsetup{leftmargin=0cm,skipabove=0.1cm,hidealllines=true,%
  innerleftmargin=0.05cm,innerrightmargin=0.05cm,
  innertopmargin=-0.10cm,innerbottommargin=-0.20cm,
  skipbelow=-0.2cm}

Benoit Viguier's avatar
Benoit Viguier committed
54
55
56
57
58
59
60
61
62
63
64
65
\renewcommand{\tabcolsep}{4pt}

\def\subheading#1{\medskip\noindent{\boldmath\textbf{#1}}~\ignorespaces}

\newcommand{\crd}[1]{\textcolor{red}{#1}}
\newcommand{\cbl}[1]{\textcolor{blue}{#1}}

\definecolor{doc@lstidentifier}{HTML}{000000}   % black
\definecolor{doc@lstcomment}{HTML}{CC3300}      % dark orange
\definecolor{doc@lstfunctions}{HTML}{006600}    % dark green
\definecolor{doc@lststring}{HTML}{FF5500}       % orange
\definecolor{doc@lstkeyword}{HTML}{0000CC}      % deep blue
Benoit Viguier's avatar
Benoit Viguier committed
66
\definecolor{doc@lstkeyword2}{rgb}{0.127,0.427,0.514}
Benoit Viguier's avatar
Benoit Viguier committed
67
68
69
70
\definecolor{doc@lstdirective}{HTML}{881000}    % dark red
\definecolor{doc@lstconstants}{HTML}{0033AA}    % dark blue
\definecolor{doc@lstidentifiers2}{HTML}{FF0033} % purple-red
\definecolor{doc@lstnumbers}{HTML}{AA00AA}      % purple
Benoit Viguier's avatar
Benoit Viguier committed
71
\definecolor{doc@lstbackground}{HTML}{FFF8DC}   % white
Benoit Viguier's avatar
Benoit Viguier committed
72
73
74
75
76
\definecolor{doc@lstframe}{HTML}{FFFFFF}        % white

\lstloadlanguages{% check documentation for other languages...
  C
}
Benoit Viguier's avatar
Benoit Viguier committed
77
78
\def\-{\raisebox{.75pt}{-}}

79
80
81
82

%
%   DEFINITION OF VST SYNTAX COLORING
%
Benoit Viguier's avatar
Benoit Viguier committed
83
84
85
86
\lstdefinelanguage{CoqVST}{%
  morekeywords=[1]{PROP, SEP, POST, PRE, LOCAL, DECLARE, WITH, Definition},
  morekeywords=[2]{val, list, Z, tuchar, uch32, lg16, share, tint},
  morekeywords=[3]{fun, tptr, mVI, mVI64, Vint, OF},
Benoit Viguier's avatar
Benoit Viguier committed
87
  morekeywords=[4]{Forall, temp, Zlength, writable_share, readable_share, gvar},
Benoit Viguier's avatar
Benoit Viguier committed
88
  morekeywords=[5]{ 0, 2^8, 16, 32},
Benoit Viguier's avatar
Benoit Viguier committed
89
  sensitive=true,
90
  mathescape=true,
Benoit Viguier's avatar
Benoit Viguier committed
91
  alsoletter   = {0123456789^} ,
Benoit Viguier's avatar
Benoit Viguier committed
92
93
94
  morestring=[b]",
  morecomment=[l]{//},
  identifierstyle=\color[rgb]{0,0,0},
Benoit Viguier's avatar
Benoit Viguier committed
95
  delim=[s][\color{doc@lstdirective}]{(*}{*)},
Benoit Viguier's avatar
Benoit Viguier committed
96
  % backgroundcolor=\color{doc@lstbackground}, % set the background color
Benoit Viguier's avatar
Benoit Viguier committed
97
98
99
100
  literate=
      {=>}{{$\mapsto$}}1
      {<}{{$\!<\!$}}1
      {<=}{{$\!\leq\!$}}1
101
102
      {[\{}{$\!\!\![\!\!\{\!\!$}1
      {\}]}{$\!\!\}\!\!]\!\!\!$}1
Benoit Viguier's avatar
Benoit Viguier committed
103
104
      {<<(}{$\leftarrow$\!\!(}1
      {)--}{)\!\!$-$}1
Benoit Viguier's avatar
Benoit Viguier committed
105
106
      {fun}{{\color{doc@lstkeyword2}{$\lambda\!\!$}}}1
      {2^8}{{\color{doc@lstnumbers}{$2^8$}}}1
Benoit Viguier's avatar
Benoit Viguier committed
107
      {2^62}{{\color{doc@lstnumbers}{$2^{62}$}}}1
Benoit Viguier's avatar
Benoit Viguier committed
108
}
109
110
111
\def\VSTe{\lstinline[language=CoqVST, basicstyle=\ttfamily\normalsize]}
\def\VSTes{\lstinline[language=CoqVST, basicstyle=\scriptsize]}

Benoit Viguier's avatar
Benoit Viguier committed
112
\lstnewenvironment{CoqVST}{
Benoit Viguier's avatar
Benoit Viguier committed
113
% \mdframed[backgroundcolor=doc@lstbackground]%
Benoit Viguier's avatar
Benoit Viguier committed
114
\lstset{language=CoqVST}}{
Benoit Viguier's avatar
Benoit Viguier committed
115
% \endmdframed
Benoit Viguier's avatar
Benoit Viguier committed
116
117
}

118
119
120
121
122


%
%   DEFINITION OF COQ SYNTAX COLORING
%
123
124
125
126
127
128
129
130
131
132
133
134
135
\lstdefinelanguage{Coq}{
%
% Anything betweeen $ becomes LaTeX math mode
mathescape=true,
%
% Comments may or not include Latex commands
texcl=false,
%
% Vernacular commands
morekeywords=[1]{Section, Module, End, Require, Import, Export,
  Variable, Variables, Parameter, Parameters, Axiom, Hypothesis,
  Hypotheses, Notation, Local, Tactic, Reserved, Scope, Open, Close,
  Bind, Delimit, Definition, Let, Ltac, Fixpoint, CoFixpoint, Add,
Benoit Viguier's avatar
Benoit Viguier committed
136
  Morphism, Relation, Implicit, Arguments, Unset, Contextual, Function,
137
138
139
140
141
142
143
144
145
146
  Strict, Prenex, Implicits, Inductive, CoInductive, Record,
  Structure, Canonical, Coercion, Context, Class, Global, Instance,
  Program, Infix, Theorem, Lemma, Corollary, Proposition, Fact,
  Remark, Example, Proof, Goal, Save, Qed, Defined, Hint, Resolve,
  Rewrite, View, Search, Show, Print, Printing, All, Eval, Check,
  Projections, inside, outside, Def},
%
% Gallina
morekeywords=[2]{forall, exists, exists2, fun, fix, cofix, struct,
  match, with, end, as, in, return, let, if, is, then, else, for, of,
Benoit Viguier's avatar
Benoit Viguier committed
147
  nosimpl, when, measure},
148
149
%
% Sorts
Benoit Viguier's avatar
Benoit Viguier committed
150
morekeywords=[3]{Type, Prop, Set, true, false, option, bool, list, Z, nat, T, T', positive},
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
%
% Various tactics, some are std Coq subsumed by ssr, for the manual purpose
morekeywords=[4]{pose, set, move, case, elim, apply, clear, hnf,
  intro, intros, generalize, rename, pattern, after, destruct,
  induction, using, refine, inversion, injection, rewrite, congr,
  unlock, compute, ring, field, fourier, replace, fold, unfold,
  change, cutrewrite, simpl, have, suff, wlog, suffices, without,
  loss, nat_norm, assert, cut, trivial, revert, bool_congr, nat_congr,
  symmetry, transitivity, auto, split, left, right, autorewrite},
%
% Terminators
morekeywords=[5]{by, done, exact, reflexivity, tauto, romega, omega,
  assumption, solve, contradiction, discriminate},
%
% Control
morekeywords=[6]{do, last, first, try, idtac, repeat},
%
Benoit Viguier's avatar
Benoit Viguier committed
168
169
170
% Control
morekeywords=[7]{Forall, ZofList, Zlength, length},
%
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
% Comments delimiters, we do turn this off for the manual
morecomment=[s]{(*}{*)},
%
% Spaces are not displayed as a special character
showstringspaces=false,
%
% String delimiters
morestring=[b]",
morestring=[d]’,
%
% Size of tabulations
tabsize=3,
%
% Enables ASCII chars 128 to 255
extendedchars=false,
%
% Case sensitivity
sensitive=true,
%
% Automatic breaking of long lines
breaklines=false,
%
% Default style fors listings
% basicstyle=\small,
%
% Position of captions is bottom
captionpos=b,
%
% flexible columns
columns=[l]flexible,
%
% Style for (listings') identifiers
% identifierstyle={\ttfamily\color{black}},
% Style for declaration keywords
% keywordstyle=[1]{\ttfamily\color{dkviolet}},
% Style for gallina keywords
% keywordstyle=[2]{\ttfamily\color{dkgreen}},
% Style for sorts keywords
% keywordstyle=[3]{\ttfamily\color{ltblue}},
% Style for tactics keywords
% keywordstyle=[4]{\ttfamily\color{dkblue}},
% Style for terminators keywords
% keywordstyle=[5]{\ttfamily\color{dkred}},
%Style for iterators
%keywordstyle=[6]{\ttfamily\color{dkpink}},
% Style for strings
% stringstyle=\ttfamily,
% Style for comments
% commentstyle={\ttfamily\color{dkgreen}},
%
%moredelim=**[is][\ttfamily\color{red}]{/&}{&/},
literate=
    % {\\forall}{{\color{dkgreen}{$\forall\;$}}}1
    % {\\exists}{{$\exists\;$}}1
    {<-}{{$\leftarrow\;$}}1
    {=>}{{$\Rightarrow\;$}}1
Benoit Viguier's avatar
Benoit Viguier committed
227
228
    {==>}{{\texttt{==>}\;}}1
%    {:>}{{\texttt{:>}\;}}1
229
230
    {->}{{$\rightarrow\;$}}1
    {<->}{{$\leftrightarrow\;$}}1
Benoit Viguier's avatar
Benoit Viguier committed
231
232
    {<=}{{$\leq\;$}}1
    {==}{{\texttt{==}\;}}1
Benoit Viguier's avatar
Benoit Viguier committed
233
    % {\#}{{$^\star$}}1
234
    {\\o}{{$\circ\;$}}1
Benoit Viguier's avatar
Benoit Viguier committed
235
    % {\@}{{$\cdot$}}1
236
237
    {\/\\}{{$\wedge\;$}}1
    {\\\/}{{$\vee\;$}}1
Benoit Viguier's avatar
Benoit Viguier committed
238
239
240
241
    {<<}{{$\!<\!$}}1
    {<>}{{$\neq$}}1
    {!=}{{$\neq$}}1
    {++}{{\texttt{++}}}1
242
    {~}{{\ }}1
Benoit Viguier's avatar
Benoit Viguier committed
243
244
    % {\@\@}{{$@$}}1
    {:GF}{{\color{doc@lstfunctions}{:$GF$}}}1
Benoit Viguier's avatar
Benoit Viguier committed
245
246
    % {0}{{\color{doc@lstnumbers}{$0$}}}1
    {32}{{\color{doc@lstnumbers}{$32$}}}1
Benoit Viguier's avatar
Benoit Viguier committed
247
248
249
250
251
252
253
254
    {2^8}{{\color{doc@lstnumbers}{$2^8$}}}1
    {2^16}{{\color{doc@lstnumbers}{$2^{16}$}}}1
    {2^26}{{\color{doc@lstnumbers}{$2^{26}$}}}1
    {2^62}{{\color{doc@lstnumbers}{$2^{62}$}}}1
    {2^256}{{\color{doc@lstnumbers}{$2^{256}$}}}1
    {2^255-19}{{\color{doc@lstnumbers}{$2^{255}-19$}}}1
    {2^255-21}{{\color{doc@lstnumbers}{$2^{255}-21$}}}1
    {fun}{{\color{doc@lstkeyword2}{$\lambda\!\!$}}}1
255
    {\\hline}{{\rule{\linewidth}{0.5pt}}}1
Benoit Viguier's avatar
Benoit Viguier committed
256
257
258
259
260
    {Z16.lst}{{\color{doc@lstfunctions}{$\mathbb{Z}$16.lst}}}1
    {\\N}{{$\mathbb{N}$}}1
    {\\Z}{{$\mathbb{Z}$}}1
    {\\K}{{$\mathbb{K}$}}1
    {^n}{{$^n$}}1
Benoit Viguier's avatar
Benoit Viguier committed
261
    {^+n}{{$^n$}}1
Benoit Viguier's avatar
Benoit Viguier committed
262
263
    {^m}{{$^m$}}1
    {^2}{{$^2$}}1
Benoit Viguier's avatar
Benoit Viguier committed
264
    {^+2}{{$^2$}}1
Benoit Viguier's avatar
Benoit Viguier committed
265
    {^3}{{$^3$}}1
Benoit Viguier's avatar
Benoit Viguier committed
266
    {^+3}{{$^3$}}1
Benoit Viguier's avatar
Benoit Viguier committed
267
268
269
270
    {^nd}{{$^{nd}$}}1
    {^rd}{{$^{rd}$}}1
    {^th}{{$^{th}$}}1
    {^255}{{$^{255}$}}1
Benoit Viguier's avatar
Benoit Viguier committed
271
272
    {^-1}{{$^{-1}$}}1
    {\%:R}{{}}1
Benoit Viguier's avatar
Benoit Viguier committed
273
274
275
276
    {p1}{{p$_1$}}1
    {p2}{{p$_2$}}1
    {x1}{{x$_1$}}1
    {x2}{{x$_2$}}1
Benoit Viguier's avatar
Benoit Viguier committed
277
    {x3}{{x$_3$}}1
Benoit Viguier's avatar
Benoit Viguier committed
278
279
280
    {x_1}{{x$_1$}}1
    {x_2}{{x$_2$}}1
    {x_3}{{x$_3$}}1
Benoit Viguier's avatar
Benoit Viguier committed
281
    {x4}{{x$_4$}}1
Benoit Viguier's avatar
Benoit Viguier committed
282
283
    {y1}{{y$_1$}}1
    {y2}{{y$_2$}}1
Benoit Viguier's avatar
Benoit Viguier committed
284
285
286
287
288
289
    {y3}{{y$_3$}}1
    {y4}{{y$_4$}}1
    {z1}{{z$_1$}}1
    {z2}{{z$_2$}}1
    {z3}{{z$_3$}}1
    {z4}{{z$_4$}}1
Benoit Viguier's avatar
Benoit Viguier committed
290
291
    {z_2}{{z$_2$}}1
    {z_3}{{z$_3$}}1
Benoit Viguier's avatar
Benoit Viguier committed
292
    {xs}{{x$_s$}}1
Benoit Viguier's avatar
Benoit Viguier committed
293
294
    {\\-}{{$-$}}1
    {\\+}{{$+$}}1
Benoit Viguier's avatar
Benoit Viguier committed
295
296
297
298
    {\\boxplus}{{$\boxplus$}}1
    {\\circ}{{$\circ$}}1
    {\\GF}{{$\mathbb{F}_{2^{255}-19}$}}1
    {\\infty}{{$\infty$}}1
Benoit Viguier's avatar
Benoit Viguier committed
299
300
    {(M\#a)}{{$a$}}1
    {(M\#b)}{{$b$}}1
Benoit Viguier's avatar
Benoit Viguier committed
301
    {---}{{\textemdash}}1
302
303
304
305
%
}[keywords,comments,strings]

\lstnewenvironment{coq}{\lstset{language=Coq}}{}
Benoit Viguier's avatar
Benoit Viguier committed
306
\lstnewenvironment{Coq}{\lstset{language=Coq}}{}
307

Benoit Viguier's avatar
Benoit Viguier committed
308
% inline in text
309
\def\coqe{\lstinline[language=Coq, basicstyle=\ttfamily\normalsize]}
Benoit Viguier's avatar
Benoit Viguier committed
310
\def\Coqe{\lstinline[language=Coq, basicstyle=\ttfamily\normalsize]}
Benoit Viguier's avatar
Benoit Viguier committed
311
% inline in table / displaymath...
312
313
\def\coqes{\lstinline[language=Coq, basicstyle=\normalsize]}
\def\Coqes{\lstinline[language=Coq, basicstyle=\normalsize]}
314
315
316
317
318





Benoit Viguier's avatar
Benoit Viguier committed
319
320
\lstdefinelanguage{Ctweetnacl}{%
  morekeywords=[1]{FOR,for, return},
Benoit Viguier's avatar
Benoit Viguier committed
321
  morekeywords=[2]{sv, int, i64, gf, unsigned, char, long, u8},
Benoit Viguier's avatar
Benoit Viguier committed
322
323
  morekeywords=[3]{const, typedef},
  morekeywords=[4]{A, Z, M, S, car25519, pack25519, inv25519,
324
325
  crypto_scalarmult, unpack25519, sel25519, set25519},
  morekeywords=[5]{ 0, 1, 1LL, 2, 3, 4, 7, 8, 14, 15, 16, 31, 32, 37, 38, 127, 64,
326
  248, 253, 254, _121665, 0x7fff, 0xffed, 0xffff, 0xff },
Benoit Viguier's avatar
Benoit Viguier committed
327
  sensitive=true,
Benoit Viguier's avatar
Benoit Viguier committed
328
  alsoletter   = {0123456789^'} ,
329
  % morekeywords = [1]{1,2,3,40} ,
Benoit Viguier's avatar
Benoit Viguier committed
330
331
332
333
  % otherkeywords={<, >, \\=, |, &, ^},
  %
  morestring=[b]",
  %
Benoit Viguier's avatar
Benoit Viguier committed
334
  morecomment=[l]{//},
Benoit Viguier's avatar
Benoit Viguier committed
335
336
337
338
339
340
  %
  identifierstyle=\color[rgb]{0,0,0},
  delim=[l][\color{doc@lstdirective}]{\#},
  literate=
}

341
342
343
\def\TNaCle{\lstinline[language=Ctweetnacl, basicstyle=\ttfamily\normalsize]}
\def\TNaCles{\lstinline[language=Ctweetnacl, basicstyle=\scriptsize]}

344
345
346
347
348
349
350
351
352


% \newcommand{\lstbg}[3][0pt]{{\fboxsep#1\colorbox{#2}{\strut #3}}}
\lstdefinelanguage{diff}{
  basicstyle=\ttfamily\small,
  % morecomment=[f][\lstbg{red!20}]<,
  % morecomment=[f][\lstbg{green!20}]>,
  morecomment=[f][\color{doc@lstidentifiers2}]<,
  morecomment=[f][\color{doc@lstfunctions}]>,
Benoit Viguier's avatar
Benoit Viguier committed
353
  morecomment=[f][\color{gray}\textit]{@@},
354
355
356
357
  %morecomment=[f][\textit]{---},
  %morecomment=[f][\textit]{+++},
}

Benoit Viguier's avatar
Benoit Viguier committed
358
359
360
\lstset{%
  lineskip=-0.1em,
  %
Benoit Viguier's avatar
Benoit Viguier committed
361
362
363
  % basicstyle=\ttfamily\scriptsize, % font that is used for the code
  % basicstyle=\ttfamily\small, % font that is used for the code
  basicstyle=\ttfamily\footnotesize, % font that is used for the code
Benoit Viguier's avatar
Benoit Viguier committed
364
365
366
367
  identifierstyle=\color{doc@lstidentifier},
  commentstyle=\color{doc@lstcomment}\itshape,
  stringstyle=\color{doc@lststring},
  keywordstyle=\color{doc@lstkeyword},
368
369
370
371
372
  keywordstyle=[1]\color{doc@lstidentifiers2},
  keywordstyle=[2]\color{doc@lstconstants},
  keywordstyle=[3]\color{doc@lstkeyword2},
  keywordstyle=[4]\color{doc@lstfunctions},
  keywordstyle=[5]\color{doc@lstnumbers},
Benoit Viguier's avatar
Benoit Viguier committed
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
  %
  extendedchars=true,
  inputencoding=utf8,
  upquote=true, %
  tabsize=2, % set default tabsize to 4 spaces
  showtabs=false, % show tabs within strings adding particular underscores
  %  tab=$\to$,
  showspaces=false, % show spaces adding particular underscores
  showstringspaces=false, % underline spaces within strings
  %
  numbers=left, % where to put the line numbers
  stepnumber=0, % step between two line numbers
  numberstyle=\small, % line number font size
  %
  captionpos=b, % set the caption position to `bottom'
  %
Benoit Viguier's avatar
Benoit Viguier committed
389
390
  xleftmargin=0.2em, % text to the right
  xrightmargin=0.2em, % text to the left
Benoit Viguier's avatar
Benoit Viguier committed
391
392
393
394
395
  breaklines=false, % don't break long lines of code
  %
  frame=single, % add a frame around the code
  framexleftmargin=0pt, % frame back to the left
  framexrightmargin=0pt, % frame back to the right
Benoit Viguier's avatar
Benoit Viguier committed
396
  backgroundcolor=\color{white}, % set the background color
Benoit Viguier's avatar
Benoit Viguier committed
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
  rulecolor=\color{doc@lstframe}, % frame color
  %
  columns=flexible, % try not to ruin the spacing intended by the font designer
  keepspaces=true, % don't drop spaces to fix column alignment
  directivestyle={\color{doc@lstdirective}},
  %
  % mathescape, % allow escaping to (La)TeX mode within $..$
  escapechar=², % allow escaping to (La)TeX mode within ²..²
  % The backquote was NOT judicious: in some code (comments), I wrap vars
  % between such a backquote (`var')
  %
  % conversion of UTF-8 chars to latin1
  literate=
  { }{{~}}1
  {á}{{\'a}}1
  {à}{{\`a}}1
  {â}{{\^a}}1
  {ä}{{\"a}}1
  {ç}{{\c{c}}}1
  {é}{{\'e}}1
  {è}{{\`e}}1
  {ê}{{\^e}}1
  {ë}{{\"e}}1
  {í}{{\'i}}1
  {ì}{{\`i}}1
  {î}{{\^i}}1
  {ï}{{\"i}}1
  {ó}{{\'o}}1
  {ò}{{\`o}}1
  {ô}{{\^o}}1
  {ö}{{\"o}}1
  {ú}{{\'u}}1
  {ù}{{\`u}}1
  {û}{{\^u}}1
  {ü}{{\"u}}1
  {Á}{{\'A}}1
  {À}{{\`A}}1
  {Â}{{\^A}}1
  {Ä}{{\"A}}1
  {Ç}{{\c{C}}}1
  {É}{{\'E}}1
  {È}{{\`E}}1
  {Ê}{{\^E}}1
  {Ë}{{\"E}}1
  {Í}{{\'I}}1
  {Ì}{{\`I}}1
  {Î}{{\^I}}1
  {Ï}{{\"I}}1
  {Ó}{{\'O}}1
  {Ò}{{\`O}}1
  {Ô}{{\^O}}1
  {Ö}{{\"O}}1
  {Ú}{{\'U}}1
  {Ù}{{\`U}}1
  {Û}{{\^U}}1
  {Ü}{{\"U}}1
}