5

How do I use decimal based HTML characters such as these: ﭑﭒﭓﭔﭕﭖﭗﭘﭙ

with a special truetype font that assigns a different symbol for each of the above characters? For simplicity, let's say I want to apply Times New Roman font to obtain following:

ﭑﭒﭓﭔﭕﭖﭗﭘﭙ

Is it possible with LaTeX?

Werner
  • 603,163
Firdews
  • 51
  • 1
    Hi you might want to have a look at this post http://tex.stackexchange.com/questions/34604/entering-unicode-characters-in-latex – ArTourter May 07 '12 at 20:14
  • I believe that the ways how to do this are covered in the question linked by @ArTourter – yo' May 07 '12 at 20:38
  • I have actually studied it before the question. Although I am using XETEX, but decimal hmtl characters require something else. Hence the question. Many thanks. – Firdews May 07 '12 at 20:38
  • 5
    \char64337 (leave a trailing space) – egreg May 07 '12 at 20:44
  • @egreg: Do you want to turn your comment into an answer? (or have you reached rep cap today already?) – raphink May 25 '12 at 08:11

1 Answers1

4

One can always tell XeTeX to insert a glyph from the current font by its number:

\char64337

for instance. Leave a trailing space (that will be ignored). So your example is

\char64337 \char64338 \char64339 \char64340 \char64341
\char64342 \char64343 \char64344 \char64345

(an end-of-line is the same as a space). Actually the trailing space is really necessary only after the last one.

You can also define a macro for this:

\newcommand{\Ent}[1]{\char#1 }

so you can avoid spaces

\Ent{64337}\Ent{64338}\Ent{64339}\Ent{64340}\Ent{64341}%
\Ent{64342}\Ent{64343}\Ent{64344}\Ent{64345}

or even do it by giving a list of numbers:

\usepackage{xparse}
\NewDocumentCommand{\Entities}{>{\SplitList{,}}m}{\ProcessList{#1}{\Ent}}

\newcommand{\Ent}[1]{\char#1 }

and your input can be simply

\Entities{64337,64338,64339,64340,64341,64342,64343,64344,64345}
egreg
  • 1,121,712