[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [help-texinfo] trying to make a unicode math char appear in all formats

**From**: |
Paul Jakma |

**Subject**: |
[help-texinfo] trying to make a unicode math char appear in all formats |

**Date**: |
Thu, 10 Dec 2015 13:25:06 +0000 (GMT) |

**User-agent**: |
Alpine 2.20 (LFD 67 2015-01-07) |

Hi,

`I want to use the unicode 'precedes' math symbol, ≺, 0x227A, in a TeXinfo
``document. If I type @math{\prec} it will appear in PDF, but I get \prec in
``most other output formats. If I type @math{≺} then I get it in at least
``the text format, but not in the PDF - presumably because texinfo is using
``the non-UTF8 capable pdftex (??).
`

`So I tried to create a macro to conditionally use the appropriate method.
``However, I couldn't get that work either.
`
@macro prec{}
@iftex
@math{\prec}
@end iftex
@ifnottex
≺
@end ifnottex
@end macro
unicode: ≺
prec: @prec{}
math unicode: @math{≺}
math tex: @math{\prec}
Produces the following in PDF:
unicode:
prec:
math unicode: math tex:
In HTML:
unicode: âº
prec: âº math unicode: âº math tex: \prec
In text (e.g. the info format as viewed with pinfo):
unicode: ≺
prec: ≺ math unicode: ≺ math tex: \prec

`Does anyone know how I can get the right character generated across these
``formats?
`
I also tried to define a macro as follows:
@macro precb{}
@inlinefmtifelse{tex,@tex \ensuremath{\prec} @end tex, ≺}
@end macro

`but that fails to compile (and trying to escape the \ in various ways
``didn't fix it).
`
Any help on this would be greatyl appreciated.
Thanks,
--
Paul Jakma address@hidden @pjakma Key ID: 64A2FF6A
Fortune:
Fidelity, n.:
A virtue peculiar to those who are about to be betrayed.

**[help-texinfo] trying to make a unicode math char appear in all formats**,
*Paul Jakma* **<=**