Heiko Oberdiek <[log in to unmask]> writes: > On Thu, Nov 10, 2005 at 09:03:16AM +0100, Uwe Lück wrote: > >> At 07:52 10.11.05, Will Robertson wrote: >> >> >Finally, somehow the topic of extensions to pdf-e-TeX came up, and >> >there were some naive comments from me and some interesting comments >> >from Morten. I proposed the idea of something like \previouschar, >> >which we interpreted in two separate ways: >> > >> > - it "would return the slot number of the most recently seen char >> >or ligature node independently of whether we just saw a glue node or >> >another char/lig node; any other node type could reset it to >> >-1" [morten] >> > >> > - it would actually be more like LaTeX's \@ifnextchar, and look at >> >the input token list [me] >> > >> >Implicit in my thinking was that you could also eat up previous chars >> >in the same was as \unskip with a sort of fine-grained \lastbox; to >> >which idea Morten replied: >> > >> > This is exactly what some languages need. >> > >> > Since there are so many different node types the only safe >> > (IMO) way is to backtrack one node at a time so ideally we >> > would want the pair \lastchar and \unchar. And then we might >> > as well get one for each different node type. I guess someone >> > has to come up with a good idea about what to do with \discretionary >> > because I'm not at all sure what the semantics should be. >> >> by accident, this occurred to me as well, if only for a >> rather fun application. \lastchar > > And what kind of object is the return value of \lastchar? > A number is quite useless, because this misses the font property. It does not seem to be too useful if one can't deal with the last "character" being a ligature. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum