ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] LUA API for page numbers
@ 2024-05-21  8:26 Luc Chabassier
  2024-05-21  9:45 ` [NTG-context] " Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Luc Chabassier @ 2024-05-21  8:26 UTC (permalink / raw)
  To: ntg-context

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.

Thanks,
Luc

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-21 14:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-21  8:26 [NTG-context] LUA API for page numbers Luc Chabassier
2024-05-21  9:45 ` [NTG-context] " Hans Hagen
2024-05-21 13:35   ` 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

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).