TeX - LaTeX Asked on October 5, 2021
I need a way to ease the spotting of <
and >
used in text-mode
(I get ¡
and ¿
in the .pdf
file).
Is there a way to highlight these symbols in the .pdf
file? I mean ¡
and ¿
.
(I’m not allowed to use usepackage[T1]{fontenc}
).
I see no other way than to make <
and >
active so they print something evident when used in text mode and the standard symbols in math mode. Of course any <
or >
comparison in the context of ifnum
(or derived) that are not buried in macros defined in the preamble will die horribly.
documentclass{article}
AtBeginDocument{%
begingrouplccode`~=`< lowercase{endgroupprotecteddef~}{ifmmode<else OUCH!`fi}%
begingrouplccode`~=`> lowercase{endgroupprotecteddef~}{ifmmode>else OUCH?`fi}%
catcode`>=active
catcode`<=active
}
begin{document}
$a<b$ $a>b$
<>
$left<xright>$
end{document}
Correct answer by egreg on October 5, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP