Forum Replies Created
-
AuthorPosts
-
Jack Cane
MemberHere are captions for the top two genera (alphabetically), both beginning with ‘a’:
A – Ansellia africana, ABG
Angraecum longicalar, ABG(3) hybrids follow
Paphiopedilum hybrid, ABG
Phalaenopsis hybrid, ABG
Next – Aliceara hybrid Pacific Nova ‘Butter Buds’, ABGPlease note that all prefixes (A, L, Next, R, etc.) soon will go away, because I now realize that indexing cannot work unless captions are collocated with their respective images. The only remaining exceptions will be the front and back covers, which I believe I will be able to edit manually upon completion of the index.
Jack Cane
MemberThere also could be several instances of a species, or of the word, ‘hybrid’.
jwc
Jack Cane
MemberApproximately 70 genera, but this number can change. Book remains a work in progress. Number of species/hybrids ranges between about 1 to 4, variable.
Jack Cane
MemberYes if I understand you correctly, that is exactly what I am trying to create, indents included.
Jack Cane
MemberThanks in advance, very helpful.
Jack Cane
MemberYes, that is correct.
Jack Cane
MemberNo, David, not yet, b/c I (think I) have a history of successful, prior use of an existing script. I’m reluctant to start from scratch until/unless I’m forced to do so. If Peter and I cannot find a way to resolve this issue soon, then yes, I’ll have a look at IndexMatic.
I still think there may be some underlying issue with the way I’m trying to run Peter’s existing script.
BTW, FYI, for some reason my eMail server has begun to reject direct replies to ‘noreply@indesingsecrets.com’.
Best,
jwc
Jack Cane
MemberOK, thanks, have eliminated Martin’s script from my scripts folder.
After reading the content of the above link, I have concluded that it does not address my needs, which do not require altering the formatting of text within any given index entry. I only want to format the index entry to begin with. That should be the default, text format of my document.
What I found, however, on first indexing my document, was that no formatting whatever had been applied.
On attempting to RE-generate the index after receiving your further guidance, I performed the following steps, in order:
— Generate new index (replace old) based on first-level topics (genus);
— Regenerate index (without replacing old) based on first, second-level topics (species);
— Regenerate index (without replacing old) based on second, second-level topics (hybrid);That seems to have succeeded, but the index appears not to be generated, i.e., there is no “preview balloon” content at the mouse cursor, as there was in my earlier attempts to generate the index, which succeeded, but resulted an unformatted, incomplete set of entries in the index.
I’ll continue to investigate/pursue this, but wanted to provide this update in case you can find a way to improve/adjust the workflow.
Jack Cane
Memberindex_from_charstyles.jsx appears to have completed successfully.
I ran it three times: (1) for top-level (genus) and replacing the old index; (2) for species and (3) for hybrid, the latter bring equivalent to ‘species in ranking within the index, i.e. both are equal-ranking subitems of the index.
Now (again!) I need to flow the index onto the right page(s) of my book. Still unsure of that workflow item. The first time I ran the same text about 24 h. ago, the index did flow onto the book content, but all entries were not correctly formatted. I have not yet seen ability/workflow in which to control or apply the formatting of index entries.
But as I say, now the index does not appear ‘at all times’. I’m sure I’m doing something inconsistently or incorrectly; at one point I did see the entire index as a preview (balloon) adjacent to the mouse cursor. But now I’m not seeing that.
Any ideas appreciated.
jwc
Jack Cane
MemberPeter,
I successfully loaded index_from_charstyles.jsx into my document, and ran it with mixed results (about which more later). Have now added your old script, IndexFmCharStyle.js. Running that now.
Ths ‘incomplete’ posting is an update to an earlier one in which I reported a difficulty that had since been resolved. More to follow.
Jack Cane
MemberPeter,
Finding the Scripts folder and running the script were completed successfully. Script worked flawlessly; many thanks.
Now that the index is in place within my document, the last step will be to actually flow the index content onto that section of the document which I have reserved for the index to reside. Have looked around but have not found the workflow steps to make that happen.
The scripts menu does contain a line-item called index_from_charstyles.txt, with a balloon note to the effect that “this file is not executable by any supported script language”. I do not know how that file got there; I don’t recall placing there myself; not sure it matters, just passing this along,FYI.
Any ideas appreciated.
jwc
Jack Cane
MemberPeter,
Yes, your work looks like it (1) will be very useful, and (2) is either an extension of or a predecessor to the script that I posted about 7 am this morning, 05-04. I also note the same name (Martin Fischer) in your references as well as in that of Obi Wan at 9 am this morning, 05-04. Looks like we are talking about the same basic implementation. I just downloaded the script, thanks.
Question remains: how and where does one run the script from within inDesign? Probably a ‘Run’ button somewhere? Forgive me, have a LOT on my plate, juggling priorities, etc.
Jack Cane
MemberPeter,
Thanks for your reply and those of several others, whose links I have saved but have not yet explored.
I am just catching up on your and many other replies on this thread, some of which were relayed to me the junk folder of my eMail, and others not, all very confusing. Despite my having added this forum’s ‘from’ address to my ‘contacts, inDesign Secrets thread responses keep going to my eMail junk folder. So OK, going forward I’ll try to stay current by staying logged onto this thread itself.
Best,
jwc
Jack Cane
MemberI just read Randy’s comments of 03.v.02017. Randy, thanks for your careful responses, but why I’m ‘less than satisfied’ is because I would much prefer a script-based solution that would simply scoop up all items of a given (set of) style(s), and place those as entries and subentries in my index, after all images have been entered and captions created.
After further searching my archives, I uncovered a script used my first book “Atlanta’s Orchids”, apparently successfully, which resulted in a two-tiered index of what is called, in botanical jargon, ‘genus’ and ‘species’.
However, I (1) did not take good enough notes on what I did in the first book, (2) have an awful memory, and (3) have no idea how to implement that in my next and subsequent books.
A typical caption reads ‘ A – Phalaenopsis equestris, Atlanta Botanical Garden’, where only the first and second words after ‘A – ‘, which are the genus and species in this case, are to be indexed. I have defined separate character styles for genus and species, and am hoping for a script-based solution to implement this.
Randy, again please forgive me if I misread your responses on the inDesign forum, but they appeared, to me at least, to be pointed to the formatting of index entries themselves, rather than to the process of indexing text entries from the book.
Would appreciate advice from any of you about how best to implement the above in my next book(s), or better yet, place it into a template that works across all books.
Here is the script,just recovered from my archives:
// IndexFromCharacterStyle_z_CS4.jsx
//
// ggf. mit Zoom auf fehlerhafte Fundstelle
//
var myErr = mySucc = 0;
var myList = “”;
var doc = app.activeDocument
var myCharacterStyle = myDisplayDialog(doc);
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences = NothingEnum.nothing;app.findTextPreferences.appliedCharacterStyle = myCharacterStyle;
var _index = ( doc.indexes.length == 0 )
? doc.indexes.add()
: doc.indexes.firstItem();
f = doc.findText()
for( oneEntry = f.length-1; oneEntry > -1; oneEntry– ) {
var _topic = null;
_topic = _index.topics.itemByName( f[oneEntry].contents );
if (_topic == null) {
try {
_topic = _index.topics.add( f[oneEntry].contents );
}
catch(e) {
selectIt(f[oneEntry]);
}
}
try {
_topic.pageReferences.add( f[oneEntry], PageReferenceType.currentPage ) ;
mySucc++;
}
catch(e) {
myList += f[oneEntry].contents + “\r” ;
myErr++;
}
}alert( “Das Ergebnis:\r” + mySucc + ” x erfolgreich\r” + myErr + ” x versagt:\r———–\r” + myList );
function myDisplayDialog(doc){
var myFieldWidth = 120;var myCharStyles = doc.characterStyles.everyItem().name;
var myDialog = app.dialogs.add({name:”Index-Begriffe”});
with(myDialog.dialogColumns.add()){
with(dialogRows.add()){
with(dialogColumns.add()){
staticTexts.add({staticLabel:”Zeichenformat:”, minWidth:myFieldWidth});
}
with(dialogColumns.add()){
var mySourceDropdown = dropdowns.add({stringList:myCharStyles, selectedIndex:myCharStyles.length-1});
}
}
}
var myResult = myDialog.show();
if(myResult == true){
var theCharStyle =myCharStyles[mySourceDropdown.selectedIndex];
myDialog.destroy();
}
else{
myDialog.destroy()
exit();
}
return theCharStyle;
}function selectIt( theObj )
{
var myZoom = 400;
app.select(theObj,SelectionOptions.replaceWith);
app.activeWindow.zoomPercentage = myZoom;// Option zum Abbruch, falls innerhalb einer Schleife aufgerufen
var myChoice = confirm (‘Fundstelle fehlerhaft!\rWeiter?’ );
if (myChoice == false)
exit();
return app.selection[0];
}Skript ist lauff?§hig in:
InDesign Version CS3
InDesign Version CS4
InDesign Version CS5 -
AuthorPosts
