[luatex] How to color unicode combinging characters.

Khaled Hosny khaledhosny at eglug.org
Fri Mar 18 04:16:20 CET 2011


On Fri, Mar 18, 2011 at 03:23:01AM +0100, Philipp Stephani wrote:
> Am 18.03.2011 02:39, schrieb Khaled Hosny:
> > On Thu, Mar 17, 2011 at 10:25:11PM +0200, Simo Ojala wrote:
> >>
> >> Hi,
> >>
> >> I am really just taking my first steps in TeX world, so forgive me
> >> my ignorance. However I already have this quite advanced coloring
> >> problem and I have read and been told that LuaTeX might be able to
> >> solve this kind of stuff. So thats why I try to ask this here,
> >> hopefully found the right place to post this kind of problem...
> >>
> >> I am trying to create some ancient hebrew inflection charts and the
> >> problem is to be able to paint vowels (and other diacritics) without
> >> changing color of the consonants they are combined with. (The vowels
> >> are unicode combining characters which are positioned according to
> >> and combined with consonants.) I already have got some suggestions
> >> that I could do some thing like this:
> >>
> >> \textcolor{red}{a}\textcolor{blue}{b} % where 'a' represents a
> >> consonant and 'b' a vowel
> >>
> >> However this leads to situation where the characters are not
> >> actually combined, but just placed separately to the document. That
> >> it turn leads to positioning problems and other bad stuff.
> > 
> > You don't provide any sample files, so one can only guess.
> 
> See the answer to the tex.sx question. I tried to provide an example,
> and the coloring itself does work, but the marks are positioned
> incorrectly and the text direction is wrong.

I did already, I just wanted a non colored version of the string but
striping the interwoven combining marks and braces was tricky (both vim
and gedit would treat the closing brace and the combining mark before as
one entity even in regex matching! I ended up passing the string through
sed), see my other reply for (semi)working tests.

Regards,
 Khaled


-- 
 Khaled Hosny
 Egyptian
 Arab


More information about the luatex mailing list