Adding customized paged counter & header #2115
Replies: 1 comment 3 replies
-
I am converting your issue to a question. Both are doable, yes, with different possible techniques. My answer below is just one of many alternatives (= what I've done personally for such things!). At the core, it will require you to write your own document class (derived from an existing one), and/or some small support packages. They would be the most suitable place to implement such hooks. For the "page of total", you need to track the last page reached at document finish...
For custom headers (the easiest of the two), you could look at how the default "book" class does it for chapter/section titles, and start from that. The trick here is that such classes ("book" here, but it would also be the case for my own "resilient.book") already have their own page header logic (for showing the chapter/section titles as headers). So you'd likely have to override things for the default page header logic not to apply. Here again, the feasibility can be seen in my resume example (where all pages but the first repeat the candidate's name)3 So it's doable, yes, but not it's not straightforward, however :) Footnotes
|
Beta Was this translation helpful? Give feedback.
-
I have gone through the entire "SILE Book", looking for the solution, but I guess I'm too stupid.
The issue: I want to change the footer with page counter from "Page number" to "<Page number> of <Total amount of pages>".
Is it possible? Also is there any lua code to reference these 2 value & more simple way to do it?
The second question is, is there a way to create a header that will be present on top of every one of the pages? e.g. with the name of the author or the document's (e.g. book's) name.
Thank you in advance for the answers.
Beta Was this translation helpful? Give feedback.
All reactions