[NTG-context] prevgraf change if page break occurs in a paragraph

Joseph Canedo josephcanedo at gmail.com
Mon Mar 5 09:43:47 CET 2018

I see. I use prevgraf to get number of lines in most recent paragraph to compute eventually hangindent if there is a lettrine in paragraph (in case first paragraph has fewer lines than the lettrine itself, of course next paragraph needs to setup hangindent properly).

I guess as an alternative, I could use the callback after paragraph is split in N lines to count the number of lines, or is this number can be accessed via some other existing variable in tex lua « table » ? Currently I access prevgraf value Inside lua. Probably better than making things more complicated in luatex itself.

Thanks a lot,


De : Hans Hagen
Envoyé le :lundi 5 mars 2018 08:58
À : ntg-context at ntg.nl
Objet :Re: [NTG-context] prevgraf change if page break occurs in a paragraph

On 3/4/2018 10:59 PM, Joseph Canedo wrote:

> I am aware that ConTeXt betas might use experimental luaTeX changes (I 
> use both stable and latest and run both), just wanted to report a change 

not really, as we don't ship beta luatex's so context normally either 
has adaptive code or delays usage for a year

> in prevgraf result. Apparently with latest beta it reports the number of 
> lines in last page of paragraph (only tested with pars on 2 pages 
> maximum, haven’t tried longer ones). Simple MWE reproduces the case:
> \starttext
> \dorecurse{15}{
> A\\ B\\ C\\ D\\ E\\ F\\ G\\ H\\ I\\ J\\ K\\ L \\M\\ N.
> \the\prevgraf
> }
> \stoptext
> Using ConTeXt online always reports « 14 » after the letters, latest 
> ConTeXt reports different numbers if the par before it has been split in 
> 2 pages.
well, i could store the old prevgraf (of make that an option) but it's a 
fact that a top of page is basically a change (in prevgraf and prevdepth)

what do you use prevgraf for?


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180305/8dfe5f69/attachment-0001.html>

More information about the ntg-context mailing list