ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Werners-Lucchini" <wwl@musensturm.de>
To: ntg-context@ntg.nl
Subject: Re: callback.register
Date: Fri, 09 Apr 2010 22:48:35 +0200	[thread overview]
Message-ID: <4BBFAEC3.16499.27FF086@wwl.musensturm.de> (raw)
In-Reply-To: <mailman.1.1270807202.19357.ntg-context@ntg.nl>

> 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'?

Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________


       reply	other threads:[~2010-04-09 20:48 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 ` Wolfgang Werners-Lucchini [this message]
2010-04-10  0:50   ` callback.register Li Yanrui (李延瑞)
     [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=4BBFAEC3.16499.27FF086@wwl.musensturm.de \
    --to=wwl@musensturm.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).