LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Frank Mittelbach <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Mon, 20 Jan 2003 11:39:29 +0100
text/plain (92 lines)

 > Your implementation says that you are implementing the third approach:
 > %    \item
 > %    Keep the definition expandable and fail if at the start of
 > %    \texttt{eqnarry} and the like.


 > i.e. it will fail if the accented character occurs as the first character
 > inside the cell:
 > $$
 > \halign{$#$&$#$\cr
 > ^^e4^^e4&b\cr
 > c&d\cr
 > }
 > $$
 > here, the first ^^e4 will be "ignored" by TeX (with default fonts,
 > the character will just silently disappear, with a message in LOG file:
 > Missing character: There is no ^^e4 in font cmr10!

which is a sort of fail, isn't it? not a very nice one though :-)
it fails silently as it thinks it is not in math and so doesn't produce an
error or the right symbol.

one way (possibly) to mend that would be to have an aftercheck for math mode
once the character is typeset

 > well... my mathtext package tries to deal with this situation, and produce
 > the characters even if they appear at the beginning of the cell... :)

yes. at the cost of kerning and ligature errors in arbitrary places. as i
said, that seems okay for a language like Russian as the chance that the
\relax\ifmmode is seen as the very first char is huge, but it is unacceptable
for other languages that only sometimes use command names in the LICR.

 > also, i'm not sure how would i define cyrillic letters via the
 > \DeclareMathMeaning command, to preserve kerning...

sorry, can you elaborate on that a bit?

 > Please also look at my (very late) answer to your email on the mathtext
 > package.
 > For cyrillic texts, it is important to make the first character in a cell
 > work (but not disappear), so we can try to use some extension to the
 > approach
 > used in mathtext package WRT \if@mmode hack - i mean that to make it 100%
 > correct, some changes might be needed to the alignment preamble code...

my claim/fear/whatever-you-wan-to-call-it is that this is technically
impossible unless you either

 - change the whole input mechanism of LaTeX to make absolutely every
   character active

 - or try to detect the problem after it has produced some damage (ie only to
   inform the user that some char may have been lost and that \protect needs
   to be put somewhere)

i really don't see any other solution within TeX

 > Of course, users can just use {} or \relax as the first element
 > of a cell to solve all these problems with disappearing characters...
 > but it would be nice (and possible) to make a "real" solution.

yes it would. only that i don't really believe it exists, but it would be nice
to be proven wrong here

 > i wonder, maybe eTeX has some replacement to \ifmmode test which will stop
 > the look-ahead search for \omit but will not break kerning/ligatures...

it has not (IFAIK). if it has it would be a way out, i agree

 > also, one noticeable difference between your approach and mathtext is that
 > the latter defines math variants of characters depending on font encoding,
 > while your variant defines only one math meaning... i need to think about this
 > again (it was a long time ago)...

interesting have to take a look again as well. but i think it is the correct
approach to consider an LICR having only a single meaning in math. that is the
way math is set up for everything else. if you are interested in LICR chars to
have a "textual" meaning in math, eg depend on the text font etc, then this
should be done by telling the math thsi this piece here is "text" eg by
calling \text or \textrm or ... but not by staying within the math framework.