ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [callbacks] proper registration, node subtypes
@ 2012-06-25 13:39 Philipp Gesang
  2012-06-25 14:21 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp Gesang @ 2012-06-25 13:39 UTC (permalink / raw)
  To: ConTeXt ML


[-- Attachment #1.1.1: Type: text/plain, Size: 1033 bytes --]

Hi all,

I need a (pre-linebreak) callback to behave the same way with the
Context and Plain formats. *The sequence that nodes are traversed
in is very important.* Afaict the callback will have to be
registered as a “processors”/“before” nodes task. However, the
behavior is not identical:

1.  If the list contains a vlist or hlist, the callback is
    applied first on the inner list and then on the outer list.
    (Guess: it’s applied on the hpack_filter as well?)

2.  In Plain, glyph nodes have subtype 0 (GLYPH_CHARACTER), while
    in Context it’s 1 (GLYPH_LIGATURE).

Example code is appended.

Questions:
  - Which node task gets me a behavior similar to the raw
    pre_linebreak_filter?[*]
  - Does the difference wrt node subtype matter assuming I only
    (a) copy glyph nodes and (b) manipulate their .char field?

Any insights on this matter would be greatly appreciated. Regards
Philipp

[*] If this is not possible|recommended, what would a clean
    solution look like?



[-- Attachment #1.1.2: nlist-context.tex --]
[-- Type: application/x-tex, Size: 1499 bytes --]

[-- Attachment #1.1.3: nlist-plain.tex --]
[-- Type: application/x-tex, Size: 968 bytes --]

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-26 12:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-25 13:39 [callbacks] proper registration, node subtypes Philipp Gesang
2012-06-25 14:21 ` Hans Hagen
2012-06-25 14:50   ` Philipp Gesang
2012-06-26 11:13     ` Hans Hagen
2012-06-26 12:08       ` Philipp Gesang
2012-06-26 12:50         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).