From: Philipp Gesang <gesang@stud.uni-heidelberg.de>
To: ConTeXt ML <ntg-context@ntg.nl>
Subject: [callbacks] proper registration, node subtypes
Date: Mon, 25 Jun 2012 15:39:24 +0200 [thread overview]
Message-ID: <20120625133924.GB31738@phlegethon> (raw)
[-- 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
___________________________________________________________________________________
next reply other threads:[~2012-06-25 13:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 13:39 Philipp Gesang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120625133924.GB31738@phlegethon \
--to=gesang@stud.uni-heidelberg.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).