Skip to main content
carlanem
Known Participant
April 30, 2018
Answered

find format not working

  • April 30, 2018
  • 3 replies
  • 1644 views

Hello

I have an Indesign document filled with a text imported from a word file. It contains text styles imported from that word file along with others specific to the .indd. Searching for any text (leaving the search field blank) formatted in a specified way (namely the left indent) leads to no search results, although there clearly are paragraphs with that indent. Deleting the imported styles changes nothing. The same search mode works flawlessly in other documents.

Any hint will be greatly appreciated.

Thanks

This topic has been closed for replies.
Correct answer Jongware

Yes, sorry typed from memory, and it should actually be

app.findTextPreferences.leftIndent = app.selection[0].leftIndent

("findWhat" holds only the text string that you'd enter in the Find dialog. But that would still need the full "findTextPreferences" before it.)

3 replies

Jongware
Community Expert
Community Expert
April 30, 2018

Did you copy the exact digits into the Find field for "Left Indent" that appear when you inspect such a paragraph?

Then, some bad news. (Well... partly.) InDesign is spectacularly more accurate than the paltry 5-or-so digits that you can see in the User Interface. I could say "by a factor of about a million" and it would sound like a hyperbole, but it is vastly more accurate than that (it would imply 6 more digits, while in reality it is something like 20).

Fortunately, the programmers decided to hide that from us in regular use. I would not care to know what my leading is in umpteen significant digits. For a slightly overseen example, check the scaling fields in the control bar – there are hugely accurate numbers in there, even though most digits  are hidden beyond the right edge of the input field.

But it's a pain if you want to search for such an unknown value. A small JavaScript can help:

    app.findWhat.leftIndent = app.selection[0].leftIndent

Save in the usual place (your own Scripts folder), click the text cursor inside a paragraph with the desired left indent, then double-click the script to run. You will find the value inside the Find dialog is updated.

carlanem
carlanemAuthor
Known Participant
April 30, 2018

Dear all,

thanks for your swift replies. First, here the Find/Replace dialogue along with some others:

Then: No, as far as I can see, indents didn't convert to spaces. The paragraph palette shows an indent, and the display of hidden characters reveals none.

Jongware, that's good to know. The script doesn't seem to work yet — in InDesign CC2014, I get

Would you have any clue why?

Thanks again!

Jongware
Community Expert
JongwareCommunity ExpertCorrect answer
Community Expert
April 30, 2018

Yes, sorry typed from memory, and it should actually be

app.findTextPreferences.leftIndent = app.selection[0].leftIndent

("findWhat" holds only the text string that you'd enter in the Find dialog. But that would still need the full "findTextPreferences" before it.)

Bevi Chagnon - PubCom.com
Legend
April 30, 2018

Did the indents convert to spaces when the file was imported?

|    Bevi Chagnon   |  Designer, Trainer, & Technologist for Accessible Documents ||    PubCom |    Classes & Books for Accessible InDesign, PDFs & MS Office |
Anna Lander
Inspiring
April 30, 2018

could you please share the Find/Change window? There might be an additional search condition that you did not notice or something else. And, if possible, the Paragraph Styles panel.