summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex
blob: 557c0642c36edce8b694d343e4180b6694bb60fd (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
% !TeX encoding = UTF-8
% !TeX spellcheck = en_US
% !TEX TS-program = lualatex
\documentclass{article}
\usepackage[nostamp]{moodle}
\ifPDFTeX % FOR LATEX and PDFLATEX
	\usepackage[utf8]{inputenc} % necessary
	\usepackage[T1]{fontenc} % necessary
\else % assuming XELATEX or LUALATEX
	\usepackage{fontspec}
\fi
\usepackage{libertine} % includes the "großes Eszett" ß

\def\UTFdiacriticLC{å à â ã é è ë ê î ï ñ õ ô ö ù ü û ç }
\def\UTFdiacriticUC{Å À Â Ã É È Ë Ê Î Ï Ñ Õ Ô Ö Ù Ü Û Ç }
\def\UTFligaturesLC{}
\def\UTFligaturesUC{}
\def\UTFotherLC{}
\def\UTFotherUC{}
\def\UFTextend{
  \newcommand\addtomacro[2]{\expandafter\def\expandafter##1\expandafter{##1##2}}%
  \addtomacro{\UTFdiacriticLC}{ş ţ ő ű ÿ ă ĕ ğ ĭ ŏ ŭ č ď ě ľ ň ř š ť ž }%
  \addtomacro{\UTFdiacriticUC}{Ş Ţ Ő Ű Ÿ Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť Ž }%
  \addtomacro{\UTFligaturesLC}{œ æ ß }%
  \addtomacro{\UTFligaturesUC}{Œ Æ ẞ }%
  \addtomacro{\UTFotherLC}{« ø ł » ¿ ¡ }%
  \addtomacro{\UTFotherUC}{Ø Ł }%
}
\ifTUTeX % xetex and luatex compile fine the following in the XML
  \UFTextend
\fi
\def\LaTeXdiacriticLC
{\aa\ \`a \^a \~a \'e \`e \"e \^e \^i \"i \~n \~o \"o \^o \`u \"u \^u \c{c}
\c{s} \c{t} \H{o} \H{u} \"y \u{a} \u{e} \u{g} \u{i} \u{\i} \u{o} \u{u} \v{c} 
\v{d} \v{e} \v{l} \v{n} \v{r} \v{s} \v{t} \v{z} }
\def\LaTeXdiacriticUC
{\AA\ \`A \^A \~A \'E \`E \"E \^E \^I \"I \~N \~O \"O \^O \`U \"U \^U \c{C}
\c{S} \c{T} \H{O} \H{U} \"Y \u{A} \u{E} \u{G} \u{I} \u{O} \u{U} \v{C} \v{D} 
\v{E} \v{L} \v{N} \v{R} \v{S} \v{T} \v{Z} }
\def\LaTeXligaturesLC{\oe\ \ae\ \ss\ }
\def\LaTeXligaturesUC{\OE\ \AE\ \SS\ }
\def\LaTeXotherLC{\guillemotleft\ \o\ \l\ \guillemotright\ \textquestiondown\ %
\textexclamdown\ }
\def\LaTeXotherUC{\O\ \L\ }

\htmlregister{\UTFdiacriticLC}
\htmlregister{\UTFdiacriticUC}
\htmlregister{\LaTeXdiacriticLC}
\htmlregister{\LaTeXdiacriticUC}
\htmlregister{\UTFligaturesLC}
\htmlregister{\UTFligaturesUC}
\htmlregister{\LaTeXligaturesLC}
\htmlregister{\LaTeXligaturesUC}
\htmlregister{\UTFotherLC}
\htmlregister{\UTFotherUC}
\htmlregister{\LaTeXotherLC}
\htmlregister{\LaTeXotherUC}

\begin{document}

\section*{Introduction}

This document is intended to check the support of diacritical marks (accents) 
and ligatures found in different languages written with the latin alphabet.

For most of them, two ways of encoding are tested: UTF8 et \LaTeX{} syntax.

\begin{quiz}[points=1]{Diacritical marks and ligatures}

\begin{multi}{\UTFdiacriticUC}
\UTFdiacriticLC\\
\UTFdiacriticUC\\
\UTFligaturesLC \UTFligaturesUC \UTFotherUC \UTFotherLC
\item[feedback={\UTFdiacriticUC}] \UTFdiacriticLC
\item[feedback={\UTFdiacriticLC}]* \UTFdiacriticUC
\end{multi}

\begin{multi}{\LaTeXdiacriticUC}
\LaTeXdiacriticLC\\
\LaTeXdiacriticUC\\
\LaTeXligaturesLC \LaTeXligaturesUC \LaTeXotherUC \LaTeXotherLC
\item[feedback={\LaTeXdiacriticUC}] \LaTeXdiacriticLC 
\item[feedback={\LaTeXdiacriticLC}]* \LaTeXdiacriticUC
\end{multi}

\end{quiz}

\end{document}