% This file is embedded in datatool-user.pdf version 3.4.4 2026-07-31
% Example 59 Sorting Lists with \dtlsortlist and UTF-8
% Label: "ex:sortlistutf8"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[utf8]{inputenc}
\usepackage{datatool-base}
\newcommand{\mylist}{elk, Æthelstan, Arnulf, elf,résumé, 
 Óslác, élan, Aeolus, resume, elephant, zygote, élite, Valkyrie, 
 Zulu, elbow, Adelolf, rose} 
\begin{document}
\dtlsortlist{\mylist}{\dtlcompare}
Case-sensitive: \DTLformatlist{\mylist}. 

\dtlsortlist{\mylist}{\dtlicompare}
Case-insensitive: \DTLformatlist{\mylist}. 
\end{document}
