Skip to main content
Inspiring
January 29, 2025
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
January 31, 2025

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
January 31, 2025

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
January 31, 2025

@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
January 31, 2025

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
January 30, 2025

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
January 30, 2025

@FRIdNGE

 

What with the rest of diacritics?

 

"č" is just one of them... 

 

Translate
FRIdNGE
January 30, 2025

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

 

(^/)

Translate
Robert at ID-Tasker
Legend
January 29, 2025

@urbangrm

 

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

 

Translate
urbangrmAuthor
Inspiring
January 30, 2025

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
January 29, 2025

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
January 29, 2025

@Mike Witherell

 

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

 

Translate