From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: Max Chernoff via ntg-context <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: Re: Missing parinitskips in \normalizelinemode=0
Date: Wed, 19 Oct 2022 11:59:44 +0200 [thread overview]
Message-ID: <ace30992-d1aa-9287-d6a7-df7cabfa2c1b@freedom.nl> (raw)
In-Reply-To: <13633db20e19ff133dcdc5b5f3faac2268a3e8d9.camel@telus.net>
On 10/19/2022 3:01 AM, Max Chernoff via ntg-context wrote:
> Hi Hans,
>
> When running in \normalizelinemode=0, the \parinitleftskip and
> \parinitrightskip nodes are either nonexistant or invisible from Lua,
> causing tex.linebreak to not work correctly.
>
> This sample file:
>
> \enabledirectives[system.callbacks.permitoverloads]
>
> \normalizelinemode=0
>
> \directlua{
> callback.register("pre_linebreak_filter", function(head)
> tex.preparelinebreak(head)
> local list, info = tex.linebreak(head)
> print(info)
>
> return head
> end)
> }
>
> \starttext
> \input knuth
> \stoptext
>
> Produces this output:
>
> luatex warning > linebreak: list seems already prepared
> luatex warning > linebreak: [ leftinit | rightinit | leftfill | rigthfill ] expected
> nil
i'll bypass that warnign when the mode is zero
btw, you need to work with a copy of the list
Hans
-----------------------------------------------------------------
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@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2022-10-19 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 1:01 Max Chernoff via ntg-context
2022-10-19 9:59 ` Hans Hagen via ntg-context [this message]
2022-10-27 3:48 ` Max Chernoff via ntg-context
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=ace30992-d1aa-9287-d6a7-df7cabfa2c1b@freedom.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@freedom.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).