From: "Li Yanrui (李延瑞)" <liyanrui.m2@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: callback.register
Date: Sat, 10 Apr 2010 08:50:25 +0800 [thread overview]
Message-ID: <z2qc3f901471004091750kfa045cedoe0a5688673d74dcb@mail.gmail.com> (raw)
In-Reply-To: <4BBFAEC3.16499.27FF086@wwl.musensturm.de>
2010/4/10 Wolfgang Werners-Lucchini <wwl@musensturm.de>:
>> there are two user hooks:
>>
>> tasks.appendaction("processors","before","modules.mine.whatever_a")
>> tasks.appendaction("processors","after","modules.mine.whatever_b")
>> -----------------------------------------
>
> My example looks now
>
> \starttext
> \startluacode
> function MyPreLB(head,gc)
> texio.write("\n")
> for n in node.traverse(head) do
> if node.type(n.id) == "glyph" then
> texio.write(string.char(n.char))
> elseif node.type(n.id) == "glue" then
> texio.write(' ')
> end
> end
> texio.write("\n")
> return head
> end
> tasks.appendaction("processors","before","MyPreLB")
> \stopluacode
> Dies ist ein Test.
> \stoptext
>
> Is it correct to return 'head'?
>
Maybe 'return head, true', because I found a few functions in the beta
do so. Such as 'scripts.preprocess'.
--
Best regards,
Li Yanrui (李延瑞)
___________________________________________________________________________________
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 prev parent reply other threads:[~2010-04-10 0:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1.1270807202.19357.ntg-context@ntg.nl>
2010-04-09 20:48 ` callback.register Wolfgang Werners-Lucchini
2010-04-10 0:50 ` Li Yanrui (李延瑞) [this message]
[not found] <mailman.460.1270827309.4277.ntg-context@ntg.nl>
2010-04-09 18:11 ` callback.register Wolfgang Werners-Lucchini
[not found] <mailman.450.1270787806.4277.ntg-context@ntg.nl>
2010-04-09 9:59 ` callback.register Wolfgang Werners-Lucchini
2010-04-08 18:28 callback.register Wolfgang Werners-Lucchini
2010-04-08 20:20 ` callback.register Peter Münster
2010-04-09 0:30 ` callback.register Li Yanrui (李延瑞)
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=z2qc3f901471004091750kfa045cedoe0a5688673d74dcb@mail.gmail.com \
--to=liyanrui.m2@gmail.com \
--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).