6

Is there a way to find and change uppercase letters of a certain character style and change them to lowercase within InDesign?

7

Yes! First, be certain the font has both upper and lowercase. Then, highlight the text you wish to convert. Locate from the top menu Type -> Change Case -> lowercase.

Is this what you are asking?

Or

If you need to find something specific you can try the Find/Change feature... Locate from the top menu Edit -> Find/Change (or use the keyboard shortcut +F)

It will pull up a panel that looks like this... and with a little playing around, you can familiarize yourself with it's awesome abilities.

enter image description here

  • 1
    Just make sure the 'Case Sensitive' button is selected and the Find/Change feature should work. – GoofyMonkey Jun 13 '14 at 16:21
  • 2
    No, that's not going to work in the specific case that this question addresses. – Alan Gilbertson Jun 13 '14 at 20:08
6

Other than by scripting, InDesign has no way to force lowercase in a global search/replace, as you have no doubt discovered.

A slightly-less-than-manual way to tackle this is by using Find/Change in conjunction with the keyboard.

The automated part is to use a GREP search for any uppercase character in that Character Style. The manual part is to type the lowercase directly, overwriting the found character(s). Fortunately, Find/Change is non-modal, so you don't have to jump in and out of it to make text changes.

  • In the Search/Replace dialog, choose the GREP tab. Click the icon next to Find Format and choose the Character Style you want to target.

  • In Find What? enter \u+, which finds any sequence of consecutive uppercase letters.

  • Click Find Next. This will highlight the first uppercase character(s) in that Character Style. Type the lowercase equivalent(s) or use Type > Change Case > lowercase. Repeat until you reach the end of the document.

0

It's helpful to assign a shortcut to the Type-->change case-->option of your choice. That way you can put in your search string and then when it highlights it, you just hit your keyboard combo and then hit find next and keep on going.

0

I'm using (yes, it's outdated) CS5, and the following script from Peter Kahrel works wonderfully.

  1. Copy-and-paste the script and save it to a useful_filename.jsx located in InDesign's scripts directory (I personally put it in the Scripts Panel directory).

  2. You must set your search parameters in the Search/Find dialog. NOTE: This only works for search. There won't be a replace event. I've found it helpful to perform the search+replace event first, assigning some dummy style to the result, then set the search up to look for that dummy style.

  3. The script doesn't have a Title Case option. It could be easily added. However, CS5's Title Case conversion is a pile of rotting apples, so I don't consider it a loss.

Once you've set your search parameters, run the script, select your options, and use it (not the Search/Find dialog) to complete the action. Bob's your uncle.

// Change case interactively. Find/change options should be set in InDesign's Find/Change window.

// Peter Kahrel -- www.kahrel.plus.com

#targetengine "change_case";

create_palette().show();

function create_palette ()
{
var w = Window.find ("palette", "Change case");
if (w === null)
    return create_palette_sub ();
return w;
}


function create_palette_sub ()
{
var changetype;
var w = new Window ("palette", "Change case", undefined, {resizeable: true});
    w.alignChildren = "fill";
    var options = [ChangecaseMode.lowercase, ChangecaseMode.uppercase, ChangecaseMode.sentencecase];
    var rb = w.add ("panel");
        var upper_to_lower = rb.add ("radiobutton", undefined, "A > a");
        var lower_to_upper = rb.add ("radiobutton", undefined, "a > A");
        var upper_to_sentence = rb.add ("radiobutton", undefined, "AB > Ab");
    var smallcaps = w.add ("checkbox", undefined, " Apply SmallCaps");
    var b = w.add ("group {orientation: 'column', alignChildren: 'fill'}");

    var find = b.add ("button", undefined, "Find");
    var change = b.add ("button", undefined, "Change");
    var change_all = b.add ("button", undefined, "Change all");
    var change_find = b.add ("button", undefined, "Change/find");


    if (app.findGrepPreferences.findWhat.indexOf ("\\u") > -1)
        {
        upper_to_lower.value = true;
        changetype = ChangecaseMode.lowercase;
        }
    else
        {
        lower_to_upper.value = true;
        changetype = ChangecaseMode.uppercase;
        }

    upper_to_lower.onClick = function () {changetype = ChangecaseMode.lowercase};
    lower_to_upper.onClick = function () {changetype = ChangecaseMode.uppercase};
    upper_to_sentence.onClick = function () {changetype = ChangecaseMode.sentencecase};

    var found, found_counter;

    find.onClick = function () {
        if (this.text === 'Find') {
            found = app.documents[0].findGrep();
            if (found.length > 0){
                found_counter = 0;
                find.text = 'Find next';
                show_found (found[found_counter]);
            } else {
                alert ("No (more) matches found.");
            }
        } else {
            found_counter++;
            if (found_counter < found.length){
                show_found (found[found_counter]);
            } else {
                find.text = 'Find';
                alert ("No (more) matches found.");
            }
        }
    }


    change.onClick = function () {
        found[found_counter].changecase(changetype);
        if (smallcaps.value == true) {
            found[found_counter].capitalization = Capitalization.smallCaps;
        }
    }

    change_find.onClick = function (){
        if (found_counter < found.length){
            found[found_counter].changecase(changetype);
            if (smallcaps.value == true) {
                found[found_counter].capitalization = Capitalization.smallCaps;
            }
            found_counter++;
            if (found_counter < found.length){
                show_found (found[found_counter]);
            } else {
                alert ("No (more) matches found.");
            }
        }
    }

    change_all.onClick = function () {
        for (var i = found_counter; i < found.length; i++) {
            found[i].changecase(changetype);
            if (smallcaps.value == true) {
                found[i].capitalization = Capitalization.smallCaps;
            }
        }
    }

    w.onDeactivate = w.onActivate = function () {find.text = 'Find'}

return w;

} // create_palette_sub



function show_found (f)
{
if (f.parentTextFrames.length === 0)  // If in overset text
    {
    app.activeWindow.activePage = find_page(f.parentStory.textContainers[0].endTextFrame);
    }
else
    {
    f.select();
    app.activeWindow.activePage = find_page (f.parentTextFrames[0]);
    }
}


function find_page(o)
{
if (o.hasOwnProperty ("parentPage"))  // CS5 and later
    return o.parentPage;
else
    return find_page_classic(o)
}


function find_page_classic (o)
{
try
    {
    if (o.constructor.name == "Page")
        return o;
    switch (o.parent.constructor.name)
        {
        case "Character": return find_page_classic (o.parent);
        case "Cell": return find_page_classic (o.parent.texts[0].parentTextFrames[0]);
        case "Table" : return find_page_classic (o.parent);
        case "TextFrame" : return find_page_classic (o.parent);
        case "Group" : return find_page_classic (o.parent);
        case "Story": return find_page_classic (o.parentTextFrames[0]);
        case "Footnote": return find_page_classic (o.parent.storyOffset);
        case "Page" : return o.parent;
        }
    }
    catch (_) {return ""}
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.