Ask a Question related to Adobe Indesign Macintosh, Design and Development.
-
Linda_P@adobeforums.com #1
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
-
Alphabetize / Order Sites Listing
Is it possible to Alphabetize / Order the sites listing in Contribute? There's nothing under Preferences or My Connections. I checked the... -
Alphabetize Connection List?
I oversee about 45 different sites. Does anyone know a way to alphabetize the connections list? -
Combo Box alphabetize
Hi, Use a query as the row source for your combo, sorted on the field on question. -- HTH Dan Artuso, Access MVP "Sullivan"... -
Cannot alphabetize drop down list! Why?
I have tried everything I can think of to alphabetize a drop down list (Combo Box) on my form. everything is mixed up, out of order. I can... -
Steve_Werner@adobeforums.com #2
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
-
FranB@adobeforums.com #3
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 document 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
-
Dave_Saunders@adobeforums.com #4
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.documents.length == 0) { exit() }
findObject(app.documents[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 document'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
-
FranB@adobeforums.com #5
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
-
Dave_Saunders@adobeforums.com #6
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.documents.length == 0) { exit() }
findObject(app.documents[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 document 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
-
FranB@adobeforums.com #7
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
-
Dave_Saunders@adobeforums.com #8
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



Reply With Quote

