Scribus Forums

Scribus => Beginner Talk => Topic started by: rweilert on February 23, 2023, 09:08:25 AM

Title: Inline variables and functions
Post by: rweilert on February 23, 2023, 09:08:25 AM
Two things I have been looking for:

For many years we have created our brochures with Scribus, but every year I have to browse the complete text and pick all texts (for example) with a relation to the year to adapt them. For the new 2023 brochure, I have to change not only the title, but there are some pages which might say "will begin on September 1, YEAR".

So I would like to be able to make a list of variables (e. g. YEAR) at a central place in the program and then just put the appropriate variable in the text to be replaced by its contents. If there is no way yet, I could make a proposal in the proposal forum for it.

Second of all, sometimes it would be nice to be able to just have a simple function like "DATE(MM/YYYY)" to have a copyright or revision date printed.

But maybe I just oversaw these options? Thank you for your input.

Rolf
Title: Re: Inline variables and functions
Post by: PatJr on February 23, 2023, 04:03:11 PM
in the Scribus doc, I don't think that will work but not sure
but I do know in Scribus you can setup a pdf form and use javascript to do what you want but you have to export the document to a pdf for the fields to show up
I found a youtube video that showed how to do that but it did have some old code that didn't work properly in the newer version
Title: Re: Inline variables and functions
Post by: Nermander on February 23, 2023, 04:20:33 PM
In Scribus 1.5.8 in the Insert menu you can find Variable text under Marks. This does what you want.

It can be edited under Edit->Marks.
Title: Re: Inline variables and functions
Post by: rweilert on February 24, 2023, 09:19:51 AM
Wow great!   8) All my ideas and proposals in one menu!

It has not yet been integrated into the editor, right? Do you plan to do? I would find that very handy.

Regards
Rolf