Forum Replies Created
-
AuthorPosts
-
Peter KahrelParticipant> Have now added your old script, IndexFmCharStyle.js
That’s not my script, it’s Martin Fischer’s. The two scripts do more or less the same, though by the looks of it, Martin’s script doesn’t do subtopics. Use only one of the scripts. If you want to do subtopics (genera/species), reflecting style groups, you’re stuck with mine.
To update an index, do the same as generating one, but click ‘Replace existing index’ in InDesign’s ‘Generate Index’ dialog.
As to formatting, you can format page numbers (e.g. to indicate principal references); see the article linked above. The entries themselves you can’t format directly. For instance, to apply italic to certain topic names you’ll have to use a rounabout way. There is a good workaround using GREP styles, see e.g. https://creativepro.com/formatting-in-indesign-index-entries.php
Peter KahrelParticipantHere’s an outline of InDesign’s index feature:
https://helpx.adobe.com/indesign/using/creating-index.html
It has a section ‘Generate an index’, you can look for that, but reading the whole article is probably useful.
> The scripts menu does contain a line-item called index_from_charstyles.txt
It’s a small text file written by the script to store the settings of the script’s dialog. Next time you run the script those data are placed in the dialog.
P.
Peter KahrelParticipantThis page explains where to place a script and how to run it: https://www.kahrel.plus.com/indesign/script-info.html
These two sections are relevant for you:
The Script folder
Running a scriptP.
Peter KahrelParticipantMichel — So all that Jack Cane said was that he found the results of the discussion in the other thread ‘less than satisfying’. You may find that expression less than tactful, or maybe a bit ungrateful, or just clumsily expressed. I still think that your responses to him and to Masood Ahmad were out of line. But let’s not bore the forum any longer with this disagreement.
Peter
Peter KahrelParticipantMichel — You’re way out of line here. You have no cause to abuse Jack Cane and Masood Ahmad the way you did. I think you owe them an apology.
Your rant about people trying to have other people do their work for free is misguided and hypocritical. Misguided because Jack was just looking for some guidance — he wasn’t asking anyone to do work for him; and hypocritical because you asked for and received a lot of support in Adobe’s scripting forum when you asked the forum regulars to evaluate your scripts without offering anything in return.
Peter
Peter KahrelParticipantMichel — In the last example volander uses a character style, not a paragraph rule. And his image shows he just wants to add space at the start and the end of the paragraph (not before and after the paragraph).
P.
Peter KahrelParticipantJack,
There’s a script that you can use to add the content of character styles to the index:
https://www.kahrel.plus.com/indesign/index_charstyles.html> I assume that my separate documents will therefore need to be combined into an inDesign, multi-volume ‘document’
Correct. It’s called a book file. You can add individual InDesign documents to a book file, then add a separate document for the index, and have the index generated into that.
Peter
Peter KahrelParticipantIn that case you can replace
^.+$with\x20$0\x20(\x20 is the space character). If you have just text there then that works. A safer method would be to replace^(.)with\x20$1and(.)$with$1\x20.P.
Peter KahrelParticipant> if the condition is applied to visible text and you use “ConditionIndicatorMode.SHOW_AND_PRINT_INDICATORS”, I can see here the hightlighting in a PDF.
Ok.
Peter KahrelParticipantCondition highlights don’t show in a PDF.
If you want to apply a colour you can use this one-liner:
app.documents[0].stories.everyItem().changes.everyItem().characters.everyItem().fillColor = app.documents[0].swatches.item(‘C=0 M=100 Y=0 K=0’);
This uses the default colour ‘C=0 M=100 Y=0 K=0’ — make sure it’s there, or use any other colour.
Peter
Peter KahrelParticipantDoesn’t have to be complex (or even a script). You can apply some form of highlighting as a local override, e.g. underline.
Peter KahrelParticipantTrack changes isn’t exposed in the Find/Change window, but you can add a character style to additions with the following one-liner (first create a character style called change and set any formatting):
app.documents[0].stories.everyItem().changes.everyItem().characters.everyItem().appliedCharacterStyle = app.documents[0].characterStyles.item(‘change’);
Peter
Peter KahrelParticipantGREP styles are defined inside a paragraph (or paragraph style). Which means that you’d first have to apply a paragraph style to those titles — in which case you don’t need a GREP style, you simply make the formatting part of the paragraph style. Also, Anne-Marie correctly wrote that you can look for , but that’s a forced line break. If those line breaks are paragraph breaks then you can’t use a GREP style.
Why don’t you apply a paragraph style with a GREP find/change? Look for (?<=\r\r).+ and apply a paragraph style. And if you set space before in the paragraph style, you can remove those two line breaks (which you really should do): Find what: \r\r(.) Change to: $1 Change Format:
Peter
April 19, 2017 at 12:57 am in reply to: Custom Excel Number Formats for linked table in InDesign #93748
Peter KahrelParticipantYes.
Peter KahrelParticipantOnly now do I see that the original question was posted eight years ago. Duh!, as they say.
-
AuthorPosts
