Le 01/03/2016 23:54, jfbu a écrit :
Hence one only needs to modify the definition of one such character
not elsewhere used. For example your obelus ÷ expands to \textdiv.
With \def\textdiv{\textbackslash} the trick is done.

Some LaTeX complements are needed here, because I got some
surprises. First one needs package textcomp (which may be loaded
by default by some font packages). But then, turns out my last
experience was with an utf-8 encoded source.

% -*- coding: utf-8; -*-
\documentclass{article}
\usepackage[TS1,T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}

\begin{document}
\meaning\textdiv

{
\tracingmacros 1
÷
}

\end{document}

However if one uses (as has been prevalently for me the
case because I usually have no use for UTF-8 and LaTeX
fills the log with dozens of extra lines if one uses it)

% -*- coding: iso-latin-1; -*-
\documentclass{article}
\usepackage[TS1,T1]{fontenc}
\usepackage{textcomp}
\usepackage[latin1]{inputenc}

\begin{document}
\meaning\textdiv

{
\tracingmacros 1
÷
}

\end{document}

one gets an error because ÷ is configured to expand to \div
which is math-mode only.

I traced this to \DeclareInputMath{247}{\div} in latin1.def
to be compared with \DeclareUnicodeCharacter{00F7}{\textdiv}
in file ts1enc.dfu used by inputenc in case of utf8 encoding.

This discrepancy looks like a LaTeX bug I never went to the
effort of completely examining the inputenc dealings.


Jean-François



_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to