Suite au billet sur l’utilisation des variantes stylistiques, j’ai réfléchi aux limitations  des commandes proposées, et trouvé une solution. Le code final du billet précédent proposait de procéder à des substitutions automatiques de caractère. Une première limitation était l’impossibilité de mettre des commandes (de mise en forme par exemple) à l’intérieur de la chaîne à transformer. \documentclass[11pt]{article} \usepackage{fontspec} \usepackage{polyglossia} \setmainfont{Brill} \setotherlanguage[variant=ancient]{greek} \usepackage{xstring} \newcommand{\varphon}{\addfontfeature{StylisticSet=20}} \newcommand{\mysub}[1]{\expandafter\StrSubstitute\expandafter{\myipastring}{#1}{{\varphon #1}}[\myipastring]} \newcommand{\ipa}[1]{% \def\myipastring{#1}% \noexpandarg% \mysub{β}% \mysub{θ}% \mysub{χ}% \expandafter\myipastring% } \begin{document} aɑæœfgɡ \textit{aɑæœfgɡ}\\ βθχ \textit{βθχ} \textgreek{βθχ \textit{βθχ}}\\ \textit{\ipa{aɑæœfgɡ}} \ipa{βθχ} \textit{\ipa{βθχ}} \end{document} L’autre limitation est que, si […]

See also: Original Source by Thomas Pellard

Note: The copyright belongs to the blog author and the blog. For the license, please see the linked original source blog.