From: Hans Hagen <j.hagen@xs4all.nl>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: LUA API for page numbers
Date: Tue, 21 May 2024 11:45:20 +0200 [thread overview]
Message-ID: <6df206ec-ba48-4e50-98df-a0bbebcc11f6@xs4all.nl> (raw)
In-Reply-To: <1716278987.izni348y64.astroid@tungdil.none>
On 5/21/2024 10:26 AM, Luc Chabassier wrote:
> Hi everyone,
>
> I have recently migrated my PhD dissertation from LaTeX to ConTeXt. In
> LaTeX I was using kaobook, a template with lots of margin notes, but I
> was frustrated with the automatic placement of the notes.
>
> I implemented a system using overlays that automatically places the
> notes using lua. To know where the ideal placement should be (if they do
> not interact with each other), I use lua to insert a latelua whatsit
> that uses lpdf.getpos() to get the coordinate on the rendered page.
> However, I haven't found a way to get the page number using lua, and the
> tex macro \pagenumber is unreliable near pagebreaks.
>
> Furthermore, it would be helpful to know if there is a way to access the
> position and sizes of figures at the end.
you have to provide some mwe so that we can see what is intended; in
principle much info is available one way or the other
concerning notes in the margin ... did you try the built in magin text
mechanisms?
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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2024-05-21 9:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-21 8:26 [NTG-context] " Luc Chabassier
2024-05-21 9:45 ` Hans Hagen [this message]
2024-05-21 13:35 ` [NTG-context] " Luc Chabassier
2024-05-21 13:54 ` Wolfgang Schuster
2024-05-21 14:07 ` vm via ntg-context
2024-05-21 14:30 ` Wolfgang Schuster
2024-05-21 14:17 ` vm via ntg-context
2024-05-21 14:39 ` Luc Chabassier
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=6df206ec-ba48-4e50-98df-a0bbebcc11f6@xs4all.nl \
--to=j.hagen@xs4all.nl \
--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).