Hi Bruno, On 14/05/2012, at 4:04 PM, Bruno Le Floch wrote:
>> If by styles, you mean in a macro definition made within >> a separate style file, then I agree with you 100%. >> >> But ... >> >>> But it doesn't >>> solve the problem here as pdftex chokes if it sees more than two ^^: OK. Mea Culpa. But this just reinforces the need for having style files, and engine-dependent subsidiary files. >> ... this is not a good example to support this view. >> >>> \documentclass{article} >>> \begin{document} >>> ^^^^00b5 >>> \end{document} >> >> The body of your document source should be engine independent, >> so this should look more like: >> >> >> \documentclass{article} >> \usepackage{ifxetex} >> >> \ifxetex \input{mydefs_xetex.def} ... > >> \else >> \if ... >> % \inputs to handle other engines >> ... >> \fi >> \fi >> >> \begin{document} >> \micronChar >> \end{document} >> You want to avoid having to find and replace multiple instances >> of the special characters, when you share your work with colleagues >> or need to reuse your own work in other contexts. >> Instead you should simply need to adjust the macro expansions, >> and all that previous work will adapt automatically. > You cannot do " \ifxetex ^^^^00b5 \else ^^c2^^b5 \fi " because the > character ^^^ is invalid in pdfTeX (catcode 15), hence pdfTeX chokes > whenever it sees that character in a line, with the exception of \^^^, > the command symbol (otherwise it would be difficult to change the > catcode of ^^^). On the other hand, you can do > > \ifxetex > \expandafter \@gobble \string \^^^^00b5 > \else > ... > \fi This kind of coding may have a place somewhere, but surely it is better to use different input files for different engines. This is a similar concept to "Content Negotiation" for websites, whereby a web server delivers different versions of the content according to which web browser is making the request. > > Regards, > Bruno Hope this helps, Ross ------------------------------------------------------------------------ Ross Moore ross.mo...@mq.edu.au Mathematics Department office: E7A-419 Macquarie University tel: +61 (0)2 9850 8955 Sydney, Australia 2109 fax: +61 (0)2 9850 8114 ------------------------------------------------------------------------ -------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex