% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04
% Example 48 Name or Phrase Initials
% Label: "ex:initials"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage{datatool-base} 
\begin{document}
Marie\space Élise del~Rosario:
\DTLinitials{Marie\space Élise del~Rosario} 

Élouise-Mary de Vere: \DTLinitials{Élouise-Mary de Vere} 

Mary-Jane d'Arcy: \DTLinitials{Mary-Jane d'Arcy} 

Mary-Jane d'Arcy-Lancaster: \DTLinitials{Mary-Jane d'Arcy-Lancaster} 

Mary-Jane d'Arcy FitzGerald: \DTLinitials{Mary-Jane d'Arcy FitzGerald} 

Niall O'Brien: \DTLinitials{Niall O'Brien} 

De'Ondre Andros: \DTLinitials{De'Ondre Andros} 

Dickie `Quack' von Duck:
\DTLinitials{Dickie `Quack' von Duck} 

@aardvark +12x,y fo'c's'le *zebra?:
\DTLinitials{@aardvark +12x,y fo'c's'le *zebra?} 

Skip `d', `de', `del', and `von':
\renewcommand{\DTLStoreInitialGetLetter}[2]{% 
 \DTLifinlist{#1}{d,de,del,von}{\def#2{}}
 {\DTLGetInitialLetter{#1}{#2}}% 
 } 

Marie\space Élise del~Rosario:
\DTLinitials{Marie\space Élise del~Rosario} 

Élouise-Mary de Vere: \DTLinitials{Élouise-Mary de Vere} 

Mary-Jane d'Arcy: \DTLinitials{Mary-Jane d'Arcy} 

Mary-Jane d'Arcy-Lancaster: \DTLinitials{Mary-Jane d'Arcy-Lancaster} 

Mary-Jane d'Arcy FitzGerald: \DTLinitials{Mary-Jane d'Arcy FitzGerald} 

Niall O'Brien: \DTLinitials{Niall O'Brien} 

De'Ondre Andros: \DTLinitials{De'Ondre Andros} 

Dickie `Quack' von Duck:
\DTLinitials{Dickie `Quack' von Duck} 

@aardvark +12x,y fo'c's'le *zebra?:
\DTLinitials{@aardvark +12x,y fo'c's'le *zebra?} 
\end{document}
