summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/clefval/example-utf8.tex
blob: 7e39691afc45767ba555d924f4e3a5b781d3b853 (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
% Time-stamp: <2020-07-29 12:47:56 administrateur>
% Création : 2020-07-28T12:21:18+0200
%% =========================================================================
%% Part of the `clefval' package.
%% Ce fichier fait partie de l'extension « clefval »
%%
%% 2020-07-27; v0.1
%% 
%% Copyright (C) 2004, 2020 by Yvon Henel Le TeXnicien de surface
%% <le.texnicien.de.surface@yvon-henel.fr>
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% ========================================================================
\documentclass{article}
\usepackage{clefval}
\usepackage{iftex}
\usepackage[french,main=english]{babel}

\ifpdftex
\else
\usepackage{fontspec}
\setmainfont{DejaVu Serif}
\setsansfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}
\fi

\TheKey{j}{Joe}
\TheKey{éçà@§}{bizarre}
\TheKey{Разбрах}{in bulgarian: Благодаря за помощта}

\begin{document}
\bgroup
\setlength{\parindent}{0pt}
\noindent\hrulefill
\vspace{0.5\baselineskip}

\textbf{English}

Cast a glance to the source to see some examples of \textbf{clefval}
usage.

This file can be processed with \texttt{pdflatex}, \texttt{lualatex}
or \texttt{xelatex}.

\vspace{0.5\baselineskip}
\noindent\hrulefill
\vspace{0.5\baselineskip}

\begin{otherlanguage}{french}
  \textbf{Français}
  
  Jetez un œil sur le source pour voir quelques exemples d'utilisation
  de \textbf{clefval}.

  On peut compiler ce document avec \texttt{pdflatex}, \texttt{lualatex}
  ou \texttt{xelatex}.
\end{otherlanguage}

\vspace{0.5\baselineskip}
\noindent\hrulefill
\egroup

\vspace{\baselineskip}

\(\ast\)\TheKey{}{void key}%
% without the `%' character there's a spurious blank
% sans le caractère « % » un espace superflu apparait
\TheKey{Chip and Dale}{two anthropomorphic \emph{chipmunk} brothers}\(\ast\)

\TheValue{j}

\TheValue{k}

\TheValue{éçà@§}

\ifpdftex \else \TheValue{Разбрах} \fi
% pdflatex doesn't know what to do with that key ;)
% pdflatex ne sait pas quoi faire de cette clé ;)

\TheValue{}

\TheValue{Chip and Dale}

\TheKey{$2+3=5$}{interresting equality \(2+3=5\)}
\TheValue{$2+3=5$}
% we can use $...$ but not \(...\) as a key
% on peut utiliser $...$ mais pas \(...\) comme clé

\end{document}

%%% Local Variables:
%%% coding: utf-8
%%% TeX-engine: default
%%% mode: latex
%%% TeX-master: t
%%% End: