Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help! Need to change all endnote numbers to roman numerals quick and easy.

New Here ,
Apr 02, 2013 Apr 02, 2013

I have a document with about 150 endnotes (not footnotes) (yuck). When I brought it into indesign CS5.5 from word, it automatically changed all the numbers to regular 1-2-3-etc numbers. I was grateful they at least made it into the indesign document.

I tried changing the footnote number style to roman numerals, but of course, since they're not footnotes -- that didn't help.

Is there a way to do this by a GREP search and replace? If so, HOW and what do I type in?

They are all superscript, so I figure I'd find all the superscript numbers.... and just make a replace with Roman Numeerals -- just have no idea how to do it. Need it fast as I'm on deadline, as always.

Thank you!

Ty

TOPICS
Scripting
2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 02, 2013 Apr 02, 2013

Hi,

paste example and desired format, pls

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 02, 2013 Apr 02, 2013

Here's what I don't want:

Picture 62.png

Here's what I want: Lowercase Roman Numerals:

Picture 59.png

Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 02, 2013 Apr 02, 2013
LATEST

Hi,

try this:

var myDoc = app.activeDocument;

    app.findGrepPreferences = null;

    app.findGrepPreferences.findWhat = "\\d+";

    app.findGrepPreferences.position = Position.SUPERSCRIPT;

    var myFound = myDoc.findGrep();

    var l = myFound.length;

    while(l--)

        myFound.contents = arabic2roman(myFound.contents);

function arabic2roman (arab)

    {

    var roman = ''

    if (arab < 4000)

        {

        var rom = [];

        rom[0] = ["","i","ii","iii","iv","v","vi","vii","viii","ix"];

        rom[1] = ["","x","xx","xxx","il","l","lx","lxx","lxxx","xc"];

        rom[2] = ["","c","cc","ccc","cd","d","dc","dcc","dccc","cm"];

        rom[3] = ["","m","mm","mmm","4m","5m","6m","7m","8m","9m"];

        arab = arab.toString().split("").reverse().join("");

        for (var i = 0; i < arab.length; i++)

            roman = rom[arab.charAt(i)] + roman;

        }

    return roman

    }

this function is pasted from some Peter Kahrel's script

Be awared: script will change all (whole active doc) superscripted digits into roman.

Limited to numbers less then 4000

rgds

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines