Sujet : ucharclasses a besoin d'espace ?
De : vincent.belaiche (at) *nospam* gmail.com (Vincent Belaïche)
Groupes : fr.comp.text.texDate : 05. Nov 2021, 14:01:14
Autres entêtes
Organisation : Gegeweb News Server
Message-ID : <m2mtmi21ut.fsf@android-31f9dbf56457e8ef.localdomain>
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)
Bonjour,
Voici un ECM :
--------8<-----------8<-----------8<-----------8<-----------8<-------
\documentclass{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage[Emoticons]{ucharclasses}
\makeatletter
\newfontfamily\@@
emoji@font{OpenSansEmoji}%
\setTransitionTo{Emoticons}{\expandafter\let\expandafter
\@@currentfont\the\font\@@
emoji@font}%
\AtBeginDocument{\expandafter\let\expandafter\@@currentfont
\the\font}%
\setTransitionFrom{Emoticons}{\@@currentfont}%
\makeatother
\begin{document}
aaa 😀 bbbb.% :-) entre espaces
aaa😀bbbb.% :-) entre lettres
\end{document}
--------8<-----------8<-----------8<-----------8<-----------8<-------
En sortie ça fait un truc du genre :
aaa 😀 bbbb.
aaa bbbb.
Lorsque le bonhomme qui sourit U+1F600 n'est pas entre espaces, il
disparaît, c'est ça mon problème… Et je ne trouve pas où la doc
d'ucharclasses décrit ce comportement.
--