Frank Mittelbach <[log in to unmask]> writes:

> Donald,
>  > > nope nope (imho:-)
>  > >
>  > > that's for the case where \"a is precisely *not* executing an \accent but is
>  > > actually a glyph in the current font
>  >
>  > But that is the only case you have to handle!  \accent combinations
>  > don't have the right kerning anyway, so just stick \relax before
>  > the \accent.
> you both are right and i was wrong (for the case of accents). however you would
> have to identify that \"a is a glyph first, even more, you would need to do the
> right thing concerning any text character eg some are fetched from a different
> encoding so all that would be very messy indeed

Not at all.  You test the same way as ever,
 \ifx \csname \<encoding>\<cmd>-<char>\endcsname \relax
 \ifx \\T1\"-q \relax

>  > Definition to convert from LICR to glyph:

Note that statement!  This really doesn't have anything to do with
*input* encoding, but deals with the output encoding.

>  >
>  > \def{\"a}{\ifmmode \relax % make sure we are in math mode to stay
>  >           \ifmmode \ddot a%
>  >           \else \string \fi
>  >           \else \string \fi}
> sorry, perhaps i'm still dumb from my cold or else dumb anyway, but i don't
> get you here. what is this supposed to tell me?
> one of the problem is that pressing key  (umlaut-a) on the keyboard maps to
> \"a alright in the LICR but that is not equiv to doing
>  \string 
> for typesetting ---  the slot to use varies from encoding to encoding. so if i
> interpret your definition above correctly then you end up with exactly
> typesetting \char ` always for \"a ... or what?

Yes, this is pseudo-TeX.  Replace  \string   with  \\T1\"-a  as for T1.

To get past some of the "pseudo" aspect, here is a concrete demonstration,
though *not* a proper implementation:


Test  {\tracingall  \"a \"q}


  \expandafter\@mathtext@composite %% <-- changed from \@text@composite
  \csname T1\string\"\endcsname
    {\ddot{#1}}%          %% <-- added new option

\let\@inmathwarn\@gobble  % omit prohibition on math mode

\def\@mathtext@composite #1#2#3\@mathtext@composite{%
 \expandafter \@mathtext@composite@x \csname \string #1-\string #2\endcsname}

\def\@mathtext@composite@x #1{% based on \@text@composite
  \ifx #1\relax % No single-glyph defined, use choice of accent commands
    \relax % stop \halign pre-expansion when using accents
    \ifmmode \@use@third
    \else \@use@second
  \else %  Single character for text mode
    \ifmmode \relax \fi % test for math mode, even in \halign
    \ifmmode \@use@third
    \else \@use@first
  \@use@ #1}



Test  {\tracingall  \"a \"q

   char:  &  & \cr
   glyph: & \"a\"a & \"a\"a\cr
   comp:  & \"q\"q & \"q\"q\cr}



Donald Arseneau                          [log in to unmask]