On Wed, Mar 7, 2012 at 3:39 PM, luigi scarso <luigi.scarso@gmail.com> wrote:


2012/3/7 Procházka Lukáš Ing. - Pontex s. r. o. <LPr@pontex.cz>

Hello,

I'd need to to hook \stoptext by Lua - I'd need to write something right before the end of the text.

At least
\let\Oldstoptext\stoptext
\def\stoptext{%
\startluacode
context("END")
\stopluacode
\Oldstoptext}



\starttext
 \input knuth
\stoptext % To be hooked by Lua


But there are several \every* tokens list for this.
--
luigi


\appendtoks%
\startluacode
context("END")
\stopluacode
\to\everylastshipout
\starttext
\showframe
 \input knuth
 \page
 \input tufte
\stoptext % To be hooked by Lua

It's hooked by Lua too, but is it what you want ?

--
luigi