Hi, lets say in arabic i want to use CALT to replace alef-ar by alef-ar.001 only if lam-ar.init comes after it, but even if any glyph from the @tashkeel class (Diacritics) came between them…
The easy way is to write it in two lines: sub alef-ar' lam-ar.init by alef-ar.001; sub alef-ar' @tashkeel lam-ar.init by alef-ar.001;
But can i write it in just one line?
I tried: sub alef-ar' [lam-ar.init [@tashkeel lam-ar.init]] by alef-ar.001;
but it would not compile Is there a way for it to be in one line?
If you put stuff in square brackets [], it is a class, so it represents one glyph and the order does not matter. A contextual run over a different number of glyphs (in your case 1 vs. 2) must be two separate rules.
But in this particular case, the IgnoreMarks flag is a better idea, as Georg pointed out.