@Zdenek, the point is that other characters inside `\textit` should be real italics. I at least have tried it using a macro around the "culprit" characters and I think it looks better than fake italics throughout, which looks really bad (shades of low-budget publications from the early eighties! :-). Anyway I'm working on a solution in my head which I'll try when I get back to my desktop. I think I'll try to use a boolean which I set/unset at the start/end of my "`\mytextit` and a single macro for the active characters which checks this boolean. I have no idea yet if it will work, but it seems the semantically cleanest way to do it to my mind.
/bpj ons 5 dec. 2018 kl. 10:53 skrev Zdenek Wagner <zdenek.wag...@gmail.com>: > Hi, > > I am afraid that I do not understand why to make only 4 FakeSlant > characters instead of a FakeSlant font. Does it mean that other > characters will remain upright inside \textit? > > Anyway, making a few characters active for \textit is quite simple. > Let's suppose that A and B should be active. You then define: > > \def\mytextit{\begingroup \catcode`\A=13 \catcode`\B=13 \dotextit} > \def\dotextit#1{\textit{#1}\endgroup} > > You will then call \mytextit{Test of A and B} > > Zdeněk Wagner > http://ttsm.icpf.cas.cz/team/wagner.shtml > http://icebearsoft.euweb.cz > > st 5. 12. 2018 v 5:51 odesílatel Alan Munn <am...@gmx.com> napsal: > > > > Can you provide a bit more detail? Maybe a small example document? > > > > Alan > > > > > > Benct Philip Jonsson wrote: > > > I have a somewhat unusual problem. In a document produced using > > > XeLaTeX I need to use four Unicode letters with scarce font support in > > > italicized words and passages but the font which I have to use > > > supports these characters only in roman. The obvious solution is to > > > use the FakeSlant feature of fontspec but I don’t want to enclose > > > these characters in a command argument, in the hope that a future > > > version of the document can use an italic font which supports these > > > characters, but neither do I (perhaps needless to say) want to use > > > fake italics except for these four characters. In other words I would > > > like to perform some kind of “keyhole surgery” in the preamble and use > > > these characters normally in the body of the document, which I guess > > > means having to make them active and somehow detect when they are > > > inside the argument of `\textit`. (Note: it is appropriate to use > > > `\textit` rather than `\emph` here because the purpose of the > > > italicization is to mark text as being in an object language in a > > > linguistic text.) Is that at all possible? I guess I could wrap > > > `\textit` in a macro which locally redefines the active characters, > > > but I’m not sure how to do that, nor how to access the glyphs > > > corresponding to the characters once the characters are active. I am a > > > user who isn’t afraid of using and making the most of various packages > > > or of writing an occasional custom command to wrap up some repeatedly > > > needed operation, but I am no expert. I am aware of all the arguments > > > against fake italics — that is why I want to limit the damage as much > > > as possible! — but I have no choice here. Waiting for the/an > > > appropriate font to include italic versions of these characters is not > > > an option at the moment. > > > > > > /Benct > > > > > > > > > > > > -------------------------------------------------- > > > Subscriptions, Archive, and List information, etc.: > > > http://tug.org/mailman/listinfo/xetex > > > > > > > > -------------------------------------------------- > > Subscriptions, Archive, and List information, etc.: > > http://tug.org/mailman/listinfo/xetex > > > > -------------------------------------------------- > Subscriptions, Archive, and List information, etc.: > http://tug.org/mailman/listinfo/xetex >
-------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex