Scribus Forums

Scribus => Layout Issues => Topic started by: Z4uit on April 02, 2024, 10:26:40 AM

Title: Display previous page number
Post by: Z4uit on April 02, 2024, 10:26:40 AM
Would there be a way to insert the page number from the PREVIOUS page and add it to a master page?

I am using Scribus 1.6.1 on Windows 10.
Title: Re: Display previous page number
Post by: a.l.e on April 02, 2024, 11:02:14 AM
my first reaction was:

what?

after some thoughts, i guess it's about putting both page numbers on the right page, when using facing pages.

if that's what you want to achieve, then, the answer is no, you can't do that.
but it might be possible to get there with a script.

two remarks from my side:

Title: Re: Display previous page number
Post by: Z4uit on April 02, 2024, 12:43:34 PM
Perhaps I should have been more specific about the end use, but I wanted to avoid comments on the intended use of Scribus. That being said, I like Scribus as a spreadsheet editor, as it gives me full control of placement (unlike Beamer) and good vector format compatibility (unlike Impress).

It would be nice to keep the slide/page number constant while adding/highlighting content on consequent slides/pages. Hence, I would like to retrieve the slide number from the previous page and display it using a "same slide" master page and continue numbering using the "normal" master page.

I have tried avoiding scripts up to now, but I know a bit of Python and am not afraid to try. Where should I start?
Title: Re: Display previous page number
Post by: a.l.e on April 02, 2024, 01:51:33 PM
... spreadsheet?

hopefully not!

that would really be the worst usage for scribus!

but, yes, you should be able to apply "increment" and "non increment" master pages, then detect them from a script, and add a frame with the "slide group" number on each page.

if you want, on the master page, you can create a "non printing" frame (called "slide-number"), take its size and position for creating new frames on each page (that you call "slide-number-##") which you remove or clear before creating / filling in the script.

otherwise you can get inspiration from the (soon to be retired?) "table of contents" script

https://github.com/aoloe/scribus-script-repository/tree/master/table_of_contents

and detect the start of the new slide group by checking the styles in use.

a nice but also more complex solution : - )

the right solution would probably to add a section number... but i really wonder if that would be a good feature for scribus.
Title: Re: Display previous page number
Post by: Z4uit on April 02, 2024, 03:00:53 PM
Quote from: Z4uit on April 02, 2024, 12:43:34 PMI like Scribus as a spreadsheet editor
Sorry, I mixed up terminology, I meant presentation editor.

Thank you for your suggestions, I will start puzzling!