[XeTeX] asterism

Khaled Hosny khaledhosny at eglug.org
Sun Jan 17 06:45:29 CET 2010


On Sat, Jan 16, 2010 at 07:56:19PM -0500, Joel C. Salomon wrote:
> Seems to me that the custom asterism construction could also work, if
> there’s some way to tell the PDF reader, “here’s a couple of arbitrary
> glyphs, but treat them as a single U+2042 character for search &
> copy-paste purposes.”

AFAIK, PDF's /ActualText tag is what you are lokking for, though not
every PDF reader support it (Poppler-based reaaders don't for example).

\documentclass{article}

\usepackage{xltxtra}
\setromanfont{Adobe Garamond Pro}
\usepackage{accsupp}

\newcommand{\asterism}{%
        \BeginAccSupp{method=hex,unicode,ActualText=2042}%
                \raisebox{-.15em}{%
                        \setlength{\tabcolsep}{0.05em}%
                        \begin{tabular}{@{}cc@{}}%
                                \multicolumn2c*\\[-.75em]*&*%
                        \end{tabular}%
                }%
        \EndAccSupp{}%
}

\begin{document}

This \asterism\ is an asterism.

\end{document}


Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the XeTeX mailing list