[NTG-pdftex] character attribute

Hans Hagen pragma at wxs.nl
Sun Jul 17 20:51:33 CEST 2005

The Thanh Han wrote:

>currently a character node in tex has the only attribute, ie
>the associated font. I m wondering whether it makes  sense
>to replace this attribute (font) by a pointer to some data
>structure representing a set of attributes. This way we can
>add further attributes of a character without messing up
>around the sources. Such attributes can be: font, color,
>location in tex sources, next bytes of a utf8 sequence etc.
>How to you guys see it?
this is indeed a much wanted feature although i don't know what you mean 
with utf 8 here since at the char node that has already been reslvbed

of course it needs some thinking because it should be easy to combine 
existing functionality with user built stuff; also, additional features 
would be needed in order to handle resources at page boundaries and such 
(comparable to marks ) ; fonts probably are hard coded features then

how do you envision this? Say that

\newfeature \mycolor

defines an abstract feature. At a certain point tex  needs to let a 
macro package handle the features, i.e. pass all relevant features to a 

\handlefeature (gets called as many times as needed with \feature set)

this could be something direct or delayed (it depends on how it will 
influence par building and page breaking etc; for instance one may now 
want specials/literals to end up too soon in the process; i can even 
imagine that all features are  delayed till shipout time;

we need to distinguish between begin and end situations (maybe even at 
the level of lines, paragraphs, pages, splits ... it's not that easy to 
come up with a good generic approach

to some extend marks are ok to handle features, but they lack some 
functionality (like a proper way to reset the internal mark register); 
and they also can interfere

[taco and i had some discussion on this but i don't think we ever wrote 
down something ...]


                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl

More information about the ntg-pdftex mailing list