Skip to main content
Participant
December 15, 2023
Question

Index - Register: Page in German: 50f or 50ff

  • December 15, 2023
  • 2 replies
  • 199 views

Hi veryone,

 

How can I change my Register-Page from "–" to "f" or "ff"?

 

InDesign makes:

Theme 1 . . . . . . . .  10–11

Theme 2 . . . . . . . .  12–19

 

I want it to be:

Theme 1 . . . . . . . .  10f

Theme 2 . . . . . . . .  12ff

 

Thank you so much

 

 

This topic has been closed for replies.

2 replies

FRIdNGE
December 15, 2023

Simplistically, with this Script:

 

/*
    _FRIdNGE-0747_IndexPagesF-FF.jsx
    Script written by FRIdNGE, Michel Allio [15/12/2023]
*/

app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.ENTIRE_SCRIPT, "Index Pages F-FF! …");

function main()     
    {
        
        // Place the cursor inside the Index Story
        var myIndexStory = app.selection[0].parentStory;

        app.findGrepPreferences = app.changeGrepPreferences = null;
        app.findGrepPreferences.findWhat = "\\d+–\\d+";
        myFound = myIndexStory.findGrep();
        for ( var i = myFound.length-1; i >= 0; i-- ) {
            if ( Number(myFound[i].contents.split("–")[1]) == Number(myFound[i].contents.split("–")[0]) + 1 ) myFound[i].contents = myFound[i].contents.split("–")[0] + "f";
            else myFound[i].contents = myFound[i].contents.split("–")[0] + "ff";
        }
        app.findGrepPreferences = app.changeGrepPreferences = null;

        alert( "Done! …" )

    }

 

(^/)  The Jedi

German23Author
Participant
December 15, 2023

I'll try it, thank you so much