Copy link to clipboard
Copied
Hello:
I created an index and everything works great with one exception.
When InDesgin creates or updates my index, it creates it with a return at the end of the index.
Hidden characters turns on so you can see what I mean.
I've tried several things to get InDesign to create the index without the return, but nothing seems to work.
I know I can create a GREP code s+/r, to delete the return in Find/Change, or even write a script to delete the return. But that adds an additional step for designers to perform. Probably just easier to manually delete the return.
I's there a way/method to get InDesign to NOT add the return when the index is created.
Maybe I'm doing something wrong when I create the index, but when I watch videos about InDesign indexing, all the videos also show/have the return at the end too. So maybe that is just the way InDesign creates its indexes.
I would like to get your feedback and suggestions if there is a way to get InDesign to create the index without that pesky return at the bottom.
Thanks.
Larry
Copy link to clipboard
Copied
It's... an ID thing. It seems to happen with endnotes as well. Just some tiny kink in the process, a working line or some such, left behind like a gum wrapper.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
To be honest, I don't see this as any sort of crisis. Yes, it's annoying. Yes, I sigh a bit when I find these tag-ons and delete them. But it seems as if it would take a very narrow set of circumstances to affect the final result at all — if the index or end notes are precisely sized to fit to the bottom margin, for example, or if balance-columns is used. Even in the latter case, the balance setting has to be manually applied and/or checked, and there you are, right where the extra paragraph needs to be deleted.
And, it only recurs when you update the list, which is a manual and often one-time operation. So checking the results and zapping the extra line could/should be one effortless operation.
But in general it's an invisible nit with little effect — at least, so I see it and so has been my experience. Am I missing something?
Copy link to clipboard
Copied
The table of contents used to have a trailing return, like the index. In the toc it was removed a couple of years ago. But Adobe left it in the index. They haven't touched the index since it was introduced many years ago. Sometimes I think they forgot that InDesign has an index. Or they're afraid of it.
Copy link to clipboard
Copied
Thanks, Peter. Yes, you're probably right. Perhaps Abode forgot about the index. I just discovered it myself, and I think it's pretty cool. Saves time from changing page numbers manually. Even with the pesky return at the bottom. Thank for taking the time to respond.
Copy link to clipboard
Copied
… Including Index Generation inside a Script:
/*
_FRIdNGE-0767_IndexGeneration.jsx
Script written by FRIdNGE, Michel Allio [17/11/24]
See: https://community.adobe.com/t5/indesign-discussions/indesign-index-adds-a-pesky-return-at-the-end-of-the-index-when-created/td-p/14984969
*/
var myDoc = app.activeDocument;
// Generate Index:
var myIndex = myDoc.indexes[0];
myIndex.generate();
// Remove Last Carriage Return Inside The Index Story:
var myStories = myDoc.stories;
for ( var s = 0; s < myStories.length; s++ ) {
if ( myStories[s].storyType === StoryTypes.INDEXING_STORY ) {
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "\\r\\z";
app.changeGrepPreferences.changeTo = "";
myStories[s].changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;
}
}
app.selection = null;
(^/) The Jedi
Copy link to clipboard
Copied
An Index is something different than a Table of Contents... But, yes it is the way it is with that return