Peter Kahrel
Community Expert
Peter Kahrel
Community Expert
Activity
15 hours ago
1 Upvote
You can try that in he interface: type abc-def in a frame, enter abc-def in the Find what field, enable whole word, and start the search. What happens in the interface is wha happens with the script.
Be aware that if the text uses a non-breaking hyphen, and you type a normal hyphen in the Find/Change window, you won't find it.
... View more
18 hours ago
1 Upvote
Thank you, @Peter Kahrel and thanks also to you @m1b, this works well and yes, I had thought about the issue around style names eg 'MONTH1', but hadn't put a fix for that, so what you have supplied is great. Many thanks!!
... View more
18 hours ago
1 Upvote
Then you probably don't have an object style defined. The error message is too general, it's not just about the selection. So here is a different version of the script.
Again, insert the name of your object style. Where it says van name = 'xyz' replace xyz with the name of your style.
(function () {
var name = 'xyz';
var ostyle = app.activeDocument.objectStyles.item (name);
if (!ostyle.isValid) {
alert ('The object style ' + name + ' does not exist');
exit();
}
if (app.selection.length === 0
|| !(app.selection[0] instanceof InsertionPoint)) {
alert ('Select an insertion point');
exit();
}
var tf = app.selection[0].textFrames.add ({
appliedObjectStyle: ostyle
});
tf.insertionPoints[0].select();
}());
... View more
‎Feb 26, 2025
07:56 PM
Thankyou so much sir, this script save many time.
... View more
‎Feb 26, 2025
04:07 AM
@matthewk24889660
You're welcome 🙂
I need to remember, that ".item" is for collections and "[ ]" alone are for arrays 😉
... View more
‎Feb 26, 2025
12:36 AM
You have to add teh prefix with the page number and it will pdf that specific section. i.e. B1-B10, C2-C5 etc.
... View more
‎Feb 25, 2025
08:41 AM
You can't and Adobe doesn't care. This has been going on for almost a year with many updates since it first became a nuisance. What's happening, and is more important, is that InDesign is not remembering our personalized Workspace setting. It seems random when it forgets. And so each time it thinks you're new. Mindbending.
... View more
‎Feb 25, 2025
03:41 AM
1 Upvote
You say 'cross-references', but I assume you mean 'page references'.
In your sample the topics have the same pattern: two digits, dot, two digits, dot, four digits. So you can find them all and create topics and page references. A simple script can handle that:
d = app.activeDocument;
app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = /\d\d\.\d\d\.\d\d\d\d/.source;
found = d.findGrep();
if (found.length > 0) {
if (d.indexes.length === 0) {
d.indexes.add();
}
index = d.indexes[0];
for (i = found.length-1; i >= 0; i--) {
topic = index.topics.add (found[i].contents);
topic.pageReferences.add (
found[i].insertionPoints[-1],
PageReferenceType.CURRENT_PAGE
);
}
}
... View more
‎Feb 24, 2025
12:32 PM
> (I still wonder why they use "about half" rather than the same font size as the text).
It's something that should be fixed by Adobe. There's a lot to fix still.
> But that still doesn't work when updating the MathML.
For now the situation seems to be that to update an eqn, you have to delete the image and place & generate it again.
... View more
‎Feb 23, 2025
08:22 AM
Thank you very much
... View more
‎Feb 19, 2025
03:32 PM
@Robert at ID-Tasker you are no village idiot!—you are an expert like each of us. I have made many more errors than you have on this one thread—some quite embarassing—so on that metric I would win the village idiot olympics here.
We could, as time permits, go back and look over our contributions on a thread such as this, and analyze the contribution we made. Did our comments push forward the discussion, or side-track it?
I find it uncomfortable work, as I see all my mistakes, but it can be edifying.
- Mark
... View more
‎Feb 19, 2025
03:09 PM
Tagging @Dirk Becker
... View more
‎Feb 18, 2025
09:02 PM
BIUTTT
... View more
‎Feb 18, 2025
02:01 PM
1 Upvote
If you marked upp the InDesign file with index markers and generated the index from InDesign, then if you see the topic 14344-01 appear twice, that means that either the names aren't really the same or you set someting in the sort-order field of one topic name but ot the other.
In your case, maybe the dashes aren't the same -- one a normal hyphen, the other, a non-breaking hyphen. Check that by editing the topic names: in both, delete the hyphen and type a normal hyphen.
If that doesn't fix it, maybe there's an invisible character at the end of one of the topic names. In the topic name field, press End to move the cursor to the end of the field, then press the BackSpace key until you delete the last character of the topic name. Then reenter the last character. Generate the index and check again.
... View more
‎Feb 17, 2025
04:57 PM
Hi @Robert at ID-Tasker r
I know but it doesn't work that way either...
By @uniq1
For me neither...
@FRIdNGE
What your script is doing exactly?
Can you post its contents?
... View more
‎Feb 15, 2025
12:37 PM
1 Upvote
Follow Peter's link. Find the about page. Think. For your particular problem better also use Uservoice and the point product's (InDesign) developer prerelease program. Put more effort on the latter. A good test case that illustrates the problem, added straight to the bug base, improves chances to get issues resolved. Also prepare the move to UXP, even though it has its own issues it is at least undergoing active development.
... View more
‎Feb 14, 2025
08:42 AM
Spam bots are getting better...
... View more
‎Feb 12, 2025
08:08 PM
Not sure why you're looking for "\n" and remove extra spaces? Just last character should be replaced with a space - or whatever separator OP wants.
Or simply F/C can be executed on the block of Paragraphs?
But it's still less optimal - the same paragraphs are processed twice - or in this case - six times - than going through all Paragraphs and merging them at the same time.
All three types of blocks - caution warning, note - can be checked in one pass.
Unless I'm missing something?
... View more
‎Feb 12, 2025
04:48 PM
@Suriya G
You can create a "symbolic link".
... View more
‎Feb 12, 2025
12:17 AM
Thank you! This solved my problems.
... View more
‎Feb 09, 2025
05:11 PM
https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mstyle
... View more
‎Feb 07, 2025
12:39 PM
great solutions!, also you can try the following script (Apply Language to Document v1.2.8): https://hasaninscripts.com/l/bzcgc
... View more
‎Feb 07, 2025
07:22 AM
 
In your case - "undefined" becomes your destination.
... View more
‎Feb 06, 2025
12:23 AM
Hey bud! I just facing the same problem as you Today. I did all the stuff some people told you in the comment section but nothing works. Silly me, it turns out I selected the wrong kind of style for all the text, I'm using character styles instead of paragraph styles. In case someone crosses this discussion and has the same problem, please check the styles you are using.
... View more
‎Jan 31, 2025
02:02 PM
Absolutely nothing tops having a clean, organized doc structure, especially styles and their application, in ID. It's not just fussing around with the layout, but so many things (like TOC generation) are dependent on that organized structure. You can't really patch and fix and work around a sloppy setup, at least, not without just as much work or more.
... View more
‎Jan 30, 2025
01:54 PM
@dgbeig
You shouldn't piggy-back on an existing topic, even if it's related. Create a new topic. I've done that now:
https://community.adobe.com/t5/indesign-discussions/add-a-manual-entry-to-the-toc-for-a-book-file/m-p/15122728#M608566
Locking this topic
... View more
‎Jan 30, 2025
10:49 AM
While you can paste an existing endnote, it's no longer dynamically linked to an endnote like the others; it's just the number as text. Right? So in order to create a link you'd have to make a text anchor on the endnote and then link to that anchor from your pasted number. (Or link to the page on which the endnote resides.)
... View more
‎Jan 30, 2025
10:46 AM
3 Upvotes
Here's a free script, works on Mac and PC:
https://creativepro.com/files/kahrel/indesign/text_anchors.html
... View more
‎Jan 28, 2025
07:34 AM
This script works so well so thank you to everyone who posted and tweaked it. Now I'm asking for a different tweak - is there a way to do this for alternate layouts of a .indb? Or does it only work for individual files? Thanks in advance.
... View more
‎Jan 27, 2025
05:50 PM
Many thanks. David
... View more