Skip to main content
ATreggia
Participating Frequently
October 16, 2019
Question

Text variables: how to manipulate strings page by page

  • October 16, 2019
  • 1 reply
  • 245 views

I have an Indesign document with titles and subtitles (I use for each a dedicated style) that I must recall in the header of each page.

For example: 

TITLE ONE (1)

some text

Art. 1

some text

Art. 2

some text ... and similar for about 3000 pages

will must be:

TITOLO ONE - Art. 1-2     in the page where is the text of Art. 1 and Art. 2.

The next page will must be: TITOLO ONE - Art. 3-5  and so on.

To do this I have used 3 text variables:

- Titolo, that change only when there is a new title

- ArtFrom, for the first paragraph article of the page

- ArtTo, for the last paragraph article of the page

 

I have two big problem:

- the first: I must eliminate the "(1)" (a note reminder) of TITOLO ONE.

- the second: I must eliminate the string "Art. " from the text variable ArtTo

 

I have searched for script (I can code script), but I have found only scripts that set statically a variable text, but I must use variable text that change on each page following the text on each page.

What I'm searching is the possibility to do some search/replace on the string content of a variable text that can go beyond the cancel of the final punctuation.

 

Can I have some suggestion from you?

Many thanks.

Andrea Treggia - Italia

 

    This topic has been closed for replies.

    1 reply

    ATreggia
    ATreggiaAuthor
    Participating Frequently
    October 22, 2019

    Any ideas? Thanks.