Skip to main content
Inspiring
Jan 29, 2025 1:32 PM UTC
Answered

Changing Alphabet in numbered list

I have a problem setting my Paragraph style numbered list to sort by certain alphabet (in my case Slovenian). Is there any workaround to do this? The only one for now i see is to manually correct it (converting d) to character and change it to letter "č").

 

Example:

my list goes:                 But i want to go:

a)                                    a)

b)                                    b)

c)                                    c)

d)                                    č)

 

would really apriciate any tips.

Thank you!

urbangrmCorrect answer
Inspiring
Jan 31, 2025 8:58 AM UTC

Im posting updated script that works for me. Make sure your Paragraph style is not in folder/group of styles.

/*
    _FRIdNGE-0791_SlovenianAutoNum.jsx
    Script written by FRIdNGE, Michel Allio [30/01/25]

    See: https://community.adobe.com/t5/indesign-discussions/changing-alphabet-in-numbered-list/td-p/15119231
*/

var myDoc = app.activeDocument;
var myParaStyle = myDoc.paragraphStyles.item("Slovenian_List"); //Your Paragraph Style name
// -----------------------------------
var myNumberingExpression = "č)\t"; //Formation of your list
// -----------------------------------
// Reset:
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "^.+$\\r?";
app.findGrepPreferences.appliedParagraphStyle = myParaStyle;
var myParas = myDoc.findGrep();
var P = myParas.length;
for ( var p = 0; p < P; p++ ) if ( myParas[p].bulletsAndNumberingResultText.slice(0,1) === "č" ) myParas[p].numberingExpression = myParas[p].appliedParagraphStyle.numberingExpression;
// Treatment: "d" ==> "č"
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "^.+$\\r?";
app.findGrepPreferences.appliedParagraphStyle = myParaStyle;
var myParas = myDoc.findGrep();
var P = myParas.length;
for ( var p = 0; p < P; p++ ) if ( myParas[p].bulletsAndNumberingResultText.slice(0,1) === "c" && myParas[p+1].bulletsAndNumberingResultText.slice(0,1) === "d" ) myParas[p+1].numberingExpression = myNumberingExpression;
app.findGrepPreferences = app.changeGrepPreferences = null;

alert( "Done! ..." )

 

38 replies

urbangrmAuthorCorrect answer
Inspiring
Jan 31, 2025 8:58 AM UTC

Im posting updated script that works for me. Make sure your Paragraph style is not in folder/group of styles.

/*
    _FRIdNGE-0791_SlovenianAutoNum.jsx
    Script written by FRIdNGE, Michel Allio [30/01/25]

    See: https://community.adobe.com/t5/indesign-discussions/changing-alphabet-in-numbered-list/td-p/15119231
*/

var myDoc = app.activeDocument;
var myParaStyle = myDoc.paragraphStyles.item("Slovenian_List"); //Your Paragraph Style name
// -----------------------------------
var myNumberingExpression = "č)\t"; //Formation of your list
// -----------------------------------
// Reset:
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "^.+$\\r?";
app.findGrepPreferences.appliedParagraphStyle = myParaStyle;
var myParas = myDoc.findGrep();
var P = myParas.length;
for ( var p = 0; p < P; p++ ) if ( myParas[p].bulletsAndNumberingResultText.slice(0,1) === "č" ) myParas[p].numberingExpression = myParas[p].appliedParagraphStyle.numberingExpression;
// Treatment: "d" ==> "č"
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "^.+$\\r?";
app.findGrepPreferences.appliedParagraphStyle = myParaStyle;
var myParas = myDoc.findGrep();
var P = myParas.length;
for ( var p = 0; p < P; p++ ) if ( myParas[p].bulletsAndNumberingResultText.slice(0,1) === "c" && myParas[p+1].bulletsAndNumberingResultText.slice(0,1) === "d" ) myParas[p+1].numberingExpression = myNumberingExpression;
app.findGrepPreferences = app.changeGrepPreferences = null;

alert( "Done! ..." )

 

Translate
Robert at ID-Tasker
Legend
Jan 31, 2025 10:59 AM UTC

@urbangrm

 

So you wanted solution for exactly 4 items lists?

 

Because, this code won't work for three items lists and won't change 5th item to "d". 

 

Translate
FRIdNGE
Jan 31, 2025 11:53 AM UTC

The Script given works until the orginal basic auto-num "q"! That means a list with 17 paras!!

The following problematic char will be "q" that becomes "r" in slovenian!!!.

 

(^/)

Translate
FRIdNGE
Jan 30, 2025 1:33 PM UTC

Truly simplistically:

 

/*
    _FRIdNGE-0791_SlovenianAutoNum.jsx
    Script written by FRIdNGE, Michel Allio [30/01/25]

    See: https://community.adobe.com/t5/indesign-discussions/changing-alphabet-in-numbered-list/td-p/15119231
*/

var myDoc = app.activeDocument;
var myParaStyle = myDoc.paragraphStyles.item("Slovenian_List");
// -----------------------------------
var myNumberingExpression = "č)^>";
// -----------------------------------
// Reset:
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "^.+$\\r?";
app.findGrepPreferences.appliedParagraphStyle = myParaStyle;
var myParas = myDoc.findGrep();
var P = myParas.length;
for ( var p = 0; p < P; p++ ) if ( myParas[p].bulletsAndNumberingResultText.slice(0,1) === "č" ) myParas[p].numberingExpression = myParas[p].appliedParagraphStyle.numberingExpression;
// Treatment: "d" ==> "č"
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "^.+$\\r?";
app.findGrepPreferences.appliedParagraphStyle = myParaStyle;
var myParas = myDoc.findGrep();
var P = myParas.length;
for ( var p = 0; p < P; p++ ) if ( myParas[p].bulletsAndNumberingResultText.slice(0,1) === "c" && myParas[p+1].bulletsAndNumberingResultText.slice(0,1) === "d" ) myParas[p+1].numberingExpression = myNumberingExpression;
app.findGrepPreferences = app.changeGrepPreferences = null;

alert( "Done! ..." )

 

(^/)  The Jedi

Translate
Robert at ID-Tasker
Legend
Jan 30, 2025 1:46 PM UTC

@FRIdNGE

 

What with the rest of diacritics?

 

"č" is just one of them... 

 

Translate
FRIdNGE
Jan 30, 2025 2:00 PM UTC

Read me again, I said "simplistically" and a right-sorted list wouldn't be a real problem!  😉

 

(^/)

Translate
Robert at ID-Tasker
Legend
Jan 29, 2025 8:18 PM UTC

@urbangrm

 

Unfortunately, it's not possible - the only solution would be via scripting.

 

Translate
urbangrmAuthor
Inspiring
Jan 30, 2025 6:11 AM UTC

Thanks, i will look into that and get some help with chatgpt. Thank you for clearifying so i don't waste my time looking for a solution within InDesign.

Translate
Mike Witherell
Community Expert
Community Expert
Jan 29, 2025 1:43 PM UTC

Dobro jutro!

Interesting question.

Is your InDesign application installed as Slovenian?

I see that Slovenian is one of 60 languages currently supported in InDesign (of some 6,000+ human languages).

Does your paragraph style controlling the list have "Slovenian" chosen as the spell check language under "Advanced Character Formats"?

Translate
Mike Witherell
Robert at ID-Tasker
Legend
Jan 29, 2025 8:20 PM UTC

@Mike Witherell

 

OP wants to have the list on the right - which isn't possible using built-in Bullets and Numbering. 

 

Translate