Received: from webgate.proteosys.de (mail.proteosys-ag.com [62.225.9.49]) by lucy.proteosys (8.11.0/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id f12HlP710515 for ; Fri, 2 Feb 2001 18:47:25 +0100 Received: by webgate.proteosys.de (8.11.0/8.11.0) with ESMTP id f12HmG708344 . for ; Fri, 2 Feb 2001 18:48:16 +0100 Received: from mail.Uni-Mainz.DE (mailserver1.zdv.Uni-Mainz.DE [134.93.8.30]) by mailgate2.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f12HlO711019 for ; Fri, 2 Feb 2001 18:47:24 +0100 (MET) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C08D40.33A13480" Received: from mailgate1.zdv.Uni-Mainz.DE (mailgate1.zdv.Uni-Mainz.DE [134.93.8.56]) by mail.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id SAA02438 for ; Fri, 2 Feb 2001 18:47:23 +0100 (MET) X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from mail.listserv.gmd.de (mail.listserv.gmd.de [192.88.97.5]) by mailgate1.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f12HlLM02983 for ; Fri, 2 Feb 2001 18:47:23 +0100 (MET) Received: from mail.listserv.gmd.de (192.88.97.5) by mail.listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <9.07F4366C@mail.listserv.gmd.de>; Fri, 2 Feb 2001 18:47:18 +0100 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 486370 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Fri, 2 Feb 2001 18:47:17 +0100 Received: from ix.urz.uni-heidelberg.de (mail.urz.uni-heidelberg.de [129.206.119.234]) by relay.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id SAA00520 for ; Fri, 2 Feb 2001 18:47:16 +0100 (MET) Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by ix.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id SAA22552 for ; Fri, 2 Feb 2001 18:47:17 +0100 Received: from abel.math.umu.se (abel.math.umu.se [130.239.20.139]) by relay.uni-heidelberg.de (8.10.2+Sun/8.10.2) with ESMTP id f12HlHu10295 for ; Fri, 2 Feb 2001 18:47:17 +0100 (MET) Received: from [130.239.20.144] (mac144.math.umu.se [130.239.20.144]) by abel.math.umu.se (8.9.2/8.9.2) with ESMTP id SAA31818; Fri, 2 Feb 2001 18:45:35 +0100 (CET) In-Reply-To: <14968.26883.994029.840070@istrati.zdv.uni-mainz.de> References: <14968.6710.114015.220264@ux28.nets.de.eds.com> <200101292234.RAA14964@pluto.math.albany.edu> <14967.8829.903878.620595@istrati.zdv.uni-mainz.de> <200101310003.BAA02073@peano.cs.uni-dortmund.de> <14967.46479.253389.421142@istrati.zdv.uni-mainz.de> <14968.6710.114015.220264@ux28.nets.de.eds.com> Return-Path: X-Sender: lars@abel.math.umu.se x-mime-autoconverted: from quoted-printable to 8bit by relay.urz.uni-heidelberg.de id SAA00521 Content-class: urn:content-classes:message Subject: Re: inputenc -> text+math Date: Fri, 2 Feb 2001 18:47:16 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: =?iso-8859-1?Q?Lars_Hellstr=F6m?= Sender: "Mailing list for the LaTeX3 project" To: "Multiple recipients of list LATEX-L" Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 3698 This is a multi-part message in MIME format. ------_=_NextPart_001_01C08D40.33A13480 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable At 20.35 +0100 2001-01-31, Frank Mittelbach wrote: >I wrote: > > > do you mind outlining the solution in a few sentences? how do you = want > > to be able to find out that you are not in math but will be once > > something (eg tha actual letter) triggered the \halign u part = without > > actually triggering it (with something like \relax which kills > > ligaturing)? > >but by now i got a chance to looked at it. quite a nice idea but i = don't think >it is fully correct yet. you change \if@mmode at each \halign thus an = \halign >that doesn't generate math mode cells will have this setting = throughout, eg >something like > >\begin{tabular}[t]{..} > >will have broken text inside, wouldn't it? or do i overlook something? There is an \ifmmode in \@inmathwarn, which appears in both = \@current@cmd and \@changed@cmd. If that isn't fully expandable all text command might = be affected by broken ligatures and kerns. >assuming that the analysis is right, what follows is that instead of = changing >\halign internally you would have to change those uses of \halign where = it is >needed (only) and that cuts through all existing macros and isn't = transparent >ie you can't simply get it done by a single package or inclusion of = code in >the kernel you actually have to change every second use of \halign Simply fiddling with the definition of \ifmmode isn't sufficient for = taking care of all related problems. The small document \documentclass{article} \usepackage{array} \usepackage[T1]{fontenc} \begin{document} \begin{tabular}{>{\fontencoding{OT1}\selectfont}l} a\\ \r{a}\\ \'{a} \end{tabular} \end{document} will try to use the T1 definitions in an OT1 font; the log file = contains: Missing character: There is no ^^e5 in font cmr10! Missing character: There is no ^^e1 in font cmr10! Only the first row comes out right. However, I noticed that a \noexpand\empty will stop the alignment = mechanism from looking any further for an \omit, so it isn't necessary to insert = an actual command to prevent it from scanning any further. Unfortunately a \noexpand\empty also breaks ligatures (and most likely kerning as well; = I haven't checked) so simply inserting that into e.g. \IeC and \T1-cmd and friends isn't the solution either. What I suspect is the right solution is to have \protect set to \@unexpandable@protect when scanning for \omit and have it reset to \@typeset@protect in the column template---then the robustness = mechanisms for normal robust commands, text commands, and in the \IeC command respectively would take care of sorting things out. I doubt this can be done by patching the \halign primitive, but it could be built into e.g. = the array package. Lars Hellstr=F6m ------_=_NextPart_001_01C08D40.33A13480 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: inputenc -> text+math

At 20.35 +0100 2001-01-31, Frank Mittelbach = wrote:
>I wrote:
>
> > do you mind outlining the solution in a few = sentences? how do you want
> > to be able to find out that you are not in = math but will be once
> > something (eg tha actual letter) triggered = the \halign u part without
> > actually triggering it (with something like = \relax which kills
> > ligaturing)?
>
>but by now i got a chance to looked at it. quite = a nice idea but i don't think
>it is fully correct yet. you change \if@mmode at = each \halign thus an \halign
>that doesn't generate math mode cells will have = this setting throughout, eg
>something like
>
>\begin{tabular}[t]{..}
>
>will have broken text inside, wouldn't it? or do = i overlook something?

There is an \ifmmode in \@inmathwarn, which appears in = both \@current@cmd
and \@changed@cmd. If that isn't fully expandable all = text command might be
affected by broken ligatures and kerns.

>assuming that the analysis is right, what follows = is that instead of changing
>\halign internally you would have to change those = uses of \halign where it is
>needed (only) and that cuts through all existing = macros and isn't transparent
>ie you can't simply get it done by a single = package or inclusion of code in
>the kernel you actually have to change every = second use of \halign

Simply fiddling with the definition of \ifmmode isn't = sufficient for taking
care of all related problems. The small = document

\documentclass{article}
\usepackage{array}
\usepackage[T1]{fontenc}

\begin{document}

\begin{tabular}{>{\fontencoding{OT1}\selectfont}l}
  a\\
  \r{a}\\
  \'{a}
\end{tabular}

\end{document}

will try to use the T1 definitions in an OT1 font; the = log file contains:
Missing character: There is no ^^e5 in font = cmr10!
Missing character: There is no ^^e1 in font = cmr10!

Only the first row comes out right.

However, I noticed that a \noexpand\empty will stop = the alignment mechanism
from looking any further for an \omit, so it isn't = necessary to insert an
actual command to prevent it from scanning any = further. Unfortunately a
\noexpand\empty also breaks ligatures (and most = likely kerning as well; I
haven't checked) so simply inserting that into e.g. = \IeC and \T1-cmd and
friends isn't the solution either.

What I suspect is the right solution is to have = \protect set to
\@unexpandable@protect when scanning for \omit and = have it reset to
\@typeset@protect in the column template---then the = robustness mechanisms
for normal robust commands, text commands, and in the = \IeC command
respectively would take care of sorting things out. I = doubt this can be
done by patching the \halign primitive, but it could = be built into e.g. the
array package.

Lars Hellstr=F6m

------_=_NextPart_001_01C08D40.33A13480--