auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] overlay prompting


From: jfbu
Subject: Re: [AUCTeX] overlay prompting
Date: Wed, 2 Mar 2016 09:20:01 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]