| 1 |
% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04 |
| 2 |
% Example 61 Sorting Lists with \DTLsortwordlist and UTF-8 and Localisation Support |
| 3 |
% Label: "ex:sortlistutf8locale" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[12pt]{article} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage[utf8]{inputenc} |
| 9 |
\usepackage[locales={en-GB}]{datatool-base} |
| 10 |
\newcommand{\mylist}{elk, Æthelstan, Arnulf, elf,résumé, Óslác, élan, Aeolus, resume, elephant, zygote, élite, Valkyrie, Zulu, elbow, Adelolf, rose} |
| 11 |
\begin{document} |
| 12 |
\DTLsortwordlist{\mylist}{\DTLsortlettercasehandler} |
| 13 |
Case-sensitive: \DTLformatlist{\mylist}. |
| 14 |
|
| 15 |
\DTLsortwordlist{\mylist}{\DTLsortletterhandler} |
| 16 |
Case-insensitive: \DTLformatlist{\mylist}. |
| 17 |
\end{document} |