Professional Web Applications Themes

Alphabetize - Adobe Indesign Macintosh

Shaun, You can sort text in a text box alphabetically in ID. Apply a paragraph style to the items that need to be sorted alphabetically. Go to "layout"- table of contents- add the paragraph style to the Include paragraph style menu. Put page number to "No page number" and check the box "Sort Entries in Alphabetical order" . Linda...

  1. #1

    Default Re: Alphabetize

    Shaun,
    You can sort text in a text box alphabetically in ID. Apply a paragraph style to the items that need to be sorted alphabetically. Go to "layout"- table of contents- add the paragraph style to the Include paragraph style menu. Put page number to "No page number" and check the box "Sort Entries in Alphabetical order" .
    Linda
    Linda_P@adobeforums.com Guest

  2. #2

    Default Re: Alphabetize

    Thanks, Linda, that's a clever use of the Table of Contents feature.

    For those of you unfamiliar with the feature, here's are more precise steps. It will only work (I think) with single lines of text.

    (1) Each included line much have the a unique paragraph style applied to it so it can be pulled out by the feature.
    (2) Choose Layout > Table of Contents
    (3) Delete word "Contents" in the Title field so it doesn't appear in the list
    (4) Select the unique paragraph style in the Other Styles list on the right, and click Add to move it into the Include Paragraph Styles on the left
    (5) In the Style section below the two lists, choose No Page Number in the Page Number menu.
    (6) Check Sort Entries in Alphabetical Order
    (7) Click OK
    ( 8 ) Use the text cursor to create a new text frame. It will contain the sorted list, formatted with the unique paragraph style.
    Steve_Werner@adobeforums.com Guest

  3. #3

    Default Re: Alphabetize

    Hi,

    This seems like such a simple and helpful facility that I can't believe it doesn't already exist within InDesign (I'm using CS2); so I'm guessing the fault lies with me in not being able to find it.

    THE ELUSIVE FEATURE
    I'd like to be able to name the objects I create to reflect the content they contain - for example a basic graphics frame containing an advert for for cakes could be called 'cakes ad'. Then if and when I need to find said object to modify or update the content I could just put out a search for 'cakes ad' and be taken straight to it, rather than having to spend ages trawling around the entire doent to find it.

    Does anyone know if this is do-able... and if so, how?

    A million thanks in advance for any help and and advice.

    Fran
    FranB@adobeforums.com Guest

  4. #4

    Default Re: Alphabetize

    It's easy with the combination of the Script Label palette and a fairly simple script. I'm not sure if anyone has written such a script, though.

    Here's a simple example I just knocked out:

    //DESCRIPTION: Find Object by Label

    if (app.doents.length == 0) { exit() }
    findObject(app.doents[0]);

    function findObject(doc) {
    app.activate();
    var myLabel = prompt("Label to seek:","","Find Object by Script Label");
    if (myLabel == null) { exit() }
    var myObj = doc.pageItems.item(myLabel);
    if (myObj == null) { alert("Couldn't find item with label: " + myLabel); exit() }
    selectIt(myObj);

    function selectIt(theObj) {
    // Selects object, turns to page and centers object var myZoom = app.activeWindow.zoomPercentage;
    app.selection = null;
    app.select(theObj);
    app.activeWindow.zoom(ZoomOptions.fitSpread);
    app.activeWindow.zoomPercentage = myZoom;
    }
    }

    Because this is a quick and dirty example, it has some significant limitations:

    1. It only finds free-standing page items. Label a graphic (rather than its frame) and it won't be found. Label an inline frame; it won't be found. Label a member of a group; it won't be found. The script could be extended to include all those possibilities by using the doent's allPageItems and allGraphics properties and sifting through them.

    2. It only finds the first instance and doesn't have a Find Next capability.

    3. It makes you type the label rather than letting choose among all the actual labels in use.

    Still, it might be useful as a stop-gap.

    To use the script, copy and paste to ExtendScript Toolkit and save with an appropriate name in the form SomeName.jsx in the Scripts folder of the Presets folder of your InDesign CS2 folder (you could put it in a subfolder if you wish). Then to run the script, set-up the appropriate initial conditions and double-click the script's name in the Scripts palette.

    To label an item, select it and type a label in the Script Label palette. Be sure to hit Enter (not Return) to actually enter the label.

    Dave
    Dave_Saunders@adobeforums.com Guest

  5. #5

    Default Re: Alphabetize

    Dave, that's a cracking solution. Thank you so much!!! I'll now be able to cut my working day down to the extent whereby I'll get to bed before 3am!

    Cheers!

    Fran
    FranB@adobeforums.com Guest

  6. #6

    Default Re: Alphabetize

    Here's an improved version. It fixes a bug in that first version -- if you had more than one labeled item on the same page, that earlier version would select all of them.

    And, it adds a Find Next feature. It works like this: If you have nothing selected when you run the script, it acts as before. If you have a labeled page item selected (for example, as you have immediately after a run of the script), run it again and it will find the next object with the same label.

    //DESCRIPTION: Find Object by Label

    if (app.doents.length == 0) { exit() }
    findObject(app.doents[0]);

    function findObject(doc) {
    if (app.selection.length > 0) {
    checkLabelFindNext(app.selection[0], doc);
    }
    app.activate();
    var myLabel = prompt(“Label to seek:”,””,”Find Object by Script Label”);
    if (myLabel == null) { exit() }
    var myObj = doc.pageItems.item(myLabel);
    if (myObj == null) { alert(“Couldn’t find item with label: “ + myLabel); exit() }
    selectIt(myObj.getElements()[0]);

    function checkLabelFindNext(obj, doc) {
    try {
    var myLabel = obj.label;
    } catch (e) { return } // selection has no label property so ignore it
    if (obj.parent.constructor.name != “Page”) { return }
    if (myLabel == “”) { return }
    var myPIs = doc.pageItems.everyItem().getElements();
    for (var j = 0; myPIs.length > j; j++) {
    if (myPIs[j].id == obj.id) {
    //found it; now find next
    for (var k = j+1; myPIs.length > k; k++) {
    if (myPIs[k].label == myLabel) {
    selectIt(myPIs[k]);
    exit();
    }
    alert(“End of doent reached.”); exit();
    }
    }
    }
    alert(“Unable to locate originally selected object.”); exit();
    }

    function selectIt(theObj) {
    // Selects object, turns to page and centers object
    var myZoom = app.activeWindow.zoomPercentage;
    app.selection = null;
    app.select(theObj);
    app.activeWindow.zoom(ZoomOptions.fitSpread);
    app.activeWindow.zoomPercentage = myZoom;
    }
    }



    I haven't tested this thoroughly, but it seems to work.

    Dave
    Dave_Saunders@adobeforums.com Guest

  7. #7

    Default Re: Alphabetize

    Dave you're a total star! I owe you a pint!

    I'll give the new script a go straight away. The old one was fine for my purposes but your latest act of genius looks to be supremely useful :-)

    Cheers!

    Fran

    BTW, can it really be that Adobe themselves didn't include something akin to this within InDesign??? It occurs to me that if I find it handy for relatively small projects (I mean I primarily working on beer guides and festival programmes) then SURELY it would prove a tremendous help for those compiling and typesetting weightier tomes?

    It just seems odd that it isn't an existing feature.
    FranB@adobeforums.com Guest

  8. #8

    Default Re: Alphabetize

    It would probably be relatively easy to assemble a list of 100 features for which someone would be astounded that it wasn't included in the product already.

    The choice is between working with an ever evolving application or waiting for perfection to be produced by some company that doesn't have to actually worry about income.

    Dave
    Dave_Saunders@adobeforums.com Guest

Similar Threads

  1. Alphabetize / Order Sites Listing
    By Hi There in forum Macromedia Contribute General Discussion
    Replies: 3
    Last Post: October 9th, 05:54 AM
  2. Alphabetize Connection List?
    By DKAllaire in forum Macromedia Contribute Connection Administrtion
    Replies: 1
    Last Post: December 13th, 02:53 PM
  3. Combo Box alphabetize
    By Dan Artuso in forum Microsoft Access
    Replies: 0
    Last Post: July 15th, 03:18 PM
  4. Cannot alphabetize drop down list! Why?
    By Randy in forum Microsoft Access
    Replies: 0
    Last Post: July 9th, 02:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139