| 1 |
% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04 |
| 2 |
% Example 56 Sorting Lists with \dtlsortlist (Letter vs Word) |
| 3 |
% Label: "ex:sortlistwordletter" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[12pt]{article} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage{datatool-base} |
| 9 |
\newcommand{\mylist}{sea, sea lion, Sealyham, seal, sealant, sealing wax} |
| 10 |
\begin{document} |
| 11 |
\dtlsortlist{\mylist}{\dtlletterindexcompare} |
| 12 |
Letter: \DTLformatlist{\mylist}. |
| 13 |
|
| 14 |
\dtlsortlist{\mylist}{\dtlwordindexcompare} |
| 15 |
Word: \DTLformatlist{\mylist}. |
| 16 |
\end{document} |