Discussion:
Indent Problem
(too old to reply)
P***@adobeforums.com
2008-11-14 02:00:57 UTC
Permalink
Converting a novel from Word to inDesign. Need to find a way to quickly change indents spacing(globally). I don't want to change indents manually.
K***@adobeforums.com
2008-11-14 02:52:32 UTC
Permalink
Find/Change. Search for (e.g.) .5" indent, replace with a .25" indent.

Personally, I'd want to set up some styles and search/replace indents to
appropriate styles.
--
Kenneth Benson
Pegasus Type, Inc.
www.pegtype.com
marlous2
2008-11-28 13:13:27 UTC
Permalink
Hello,

Unfortunately, I also have the same problem.

The idea of Kenneth is a great idea, unless there is no difference in styles in the whole novel, except for the indentation.

For example: they used in Word just 1 style for everything and there is only a difference in indentation for normal paragraphs and citations.
How do you change indentation for the citations with search and replace?
The only way to fix this is to do it manually, as far as I know.

So, if anyone have any suggestions, it would be great!

Thanks a lot.
P***@adobeforums.com
2008-11-28 14:15:55 UTC
Permalink
Set up the styles you want to use first, then search for the indents one at a time and in the replace formatting select the appropriate style. The style used by the author is basically irrelevant.
marlous2
2008-11-28 15:32:59 UTC
Permalink
Hello Peter,

Thank you for your reply.

The main problem is that it is not possible to search for any indents.

Not the left-, right- or first line-indentation.
P***@adobeforums.com
2008-11-28 17:49:32 UTC
Permalink
Edit > Find/Change and click the "more options" button.

You don't need to enter any text into either the find or change fields, but click the Magnifier/T icon next to the Find Format box and switch to the Indents and Spacing pane. Enter the indent you want to find in the appropriate field.

Do the same for the for the change format, but this time select the paragraph style you want to assign and leave everything else blank.

Peter
marlous2
2008-11-28 18:00:32 UTC
Permalink
I'm familiar with the "option" button.
Via the "T" I can specify the indentation, but it does not work with me. It keeps telling me that there is no such indentation.

I'm very curious.
Did you every try this search-action on your PC?
If you are able to do this, then there must be something wrong with my version.
I could'nt do this in CS2 ME(Middle East) and it also doesn't work in CS3 ME.
P***@adobeforums.com
2008-11-28 18:06:42 UTC
Permalink
It keeps telling me that there is no such indentation.




It works fine here. Are you sure you are entering a number that actually corresponds to the indent you are looking for, and that you are putting it into the correct field? You have both paragraph indents and first-line indents you can specify, and if you're like me it's pretty easy to fill in the wrong item.

Put the cursor into one of those paragraphs and copy the indent information, then paste it into the Find/Change dialog.

If that doesn't work, then it does sound like an issue with the ME version, or perhaps corrupt preferences.

Peter
K***@adobeforums.com
2008-11-28 20:56:51 UTC
Permalink
Post by marlous2
It keeps telling me that there is no such indentation.
Could be a rounding error. Sometimes I get Word files that claim to have
indents (first, left, or right, it doesn't matter) of some messy decimal
like 2p11.4, but when I search for exactly that indent, Indesign can't
find it (because the real number is something like 2p11.40009, but you
can't put all those decimals into the field even if you could
successfully guess them). I posted about this on 9/18/2007 ("Find won't
find specific indent"), but I can't find that post in Indesign Windows
Archive or in the regular forum. Too bad these things get erased. It's
still on my computer, buried deep in my newsreader.
--
Kenneth Benson
Pegasus Type, Inc.
www.pegtype.com
K***@adobeforums.com
2008-11-28 21:15:07 UTC
Permalink
BTW, I never did find a solution for this. Submitted a bug report, but
it's not fixed for CS4. So I'm going to submit it again.

If anyone wants to reproduce this, download

http://www.pegtype.com/findindent.zip

extract the Word file, Place it in a new, empty Indesign file (CS3 or
CS4), and then use Find/Replace to try and find the 2p11.4 indent that
the paragraph claims to be using.

marlous2, if this is your situation, we might get a better result if you
post a bug report too:

http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
--
Kenneth Benson
Pegasus Type, Inc.
www.pegtype.com
unknown
2008-11-29 23:45:12 UTC
Permalink
I once wrote a script for dealing with converted documents and had to
deal with rounding errors. The simplest way to deal with this, is to
simply un-round the numbers first. I'll see if I can rummage through my
old files to find something useful...
--
Harbs
http://www.in-tools.com
marlous2
2008-11-28 18:15:25 UTC
Permalink
Hello Peter,

Thank you for your quick reply. I didn't know that you are that fast!
(I edited my message, after posting it.)

Yes, I am very positive about the exact numbers to fill in.
I also know about the 3 kinds of different indentations: left, right, first line.
I also tried to copy to be very sure that I didn't make any typing errors.

I'm afraid that there is a bug in my ME-version.

What do you mean by "corrupt preferences"?
P***@adobeforums.com
2008-11-28 18:37:01 UTC
Permalink
What do you mean by "corrupt preferences"?




Occasionally things stop working as they should, and replacing the application preferences will set things right.

But reading your revised post, I'm not sure we are currently all understanding one another. You should not need GREP, and I can't see how it would help. Also, when searching for an indent, EVERYTHING else should be blank or set for any style. If you introduce more parameters it becomes likely there will be no matches.

It's possible that first-line indents aren't really indents at all, but leading TAB characters, Word users being what they are...

Peter
marlous2
2008-11-28 20:29:11 UTC
Permalink
I know what you mean. We often get various Word-document to convert...
But no, there are no leading TAB characters in this document.(ctrl alt I)

Yes, I left everything completely blank in the first place, then I tried it with ^? (wildcards)
I know that I don't need GREP at all for this kind of action, but this is to show that I tried so many things:
both searching with "search and replace" and
searching with "GREP" as well.

Do you mean change 'preferences "units and increments"' in mm
by "replacing the application preferences will set things right" ?
How can I change the application preferences?

Thank you for helping me.
marlous2
2008-11-28 20:42:17 UTC
Permalink
I have tried something else:
Started with a new file, typed a few paragraphs with indented text. Now I can search for the indent!

The problem must be in the imported text in the other file.

So, I think that you are absolutely right about application preferences that have been changed.
But how can I set things right?
P***@adobeforums.com
2008-11-28 20:54:55 UTC
Permalink
<http://livedocs.adobe.com/en_US/InDesign/5.0/help.html?content=WSa285fff53dea4f8617383751001ea8cb3f-6d1e.html>

But if it works in a new doc, but not an old one, it isn't likely to be a preferences issue. You might want to try exporting the problem document to .inx, then opening that and saving as a new .indd.
P***@adobeforums.com
2008-11-28 21:09:07 UTC
Permalink
Do you remember what you did to work around this, if anything?

Given that Word users tend not to understand picas and points, I'd bet if you change the ruler units to either inches or mm and look at the indent field again you might get a number that isn't rounded and works.

Peter
K***@adobeforums.com
2008-11-28 21:33:18 UTC
Permalink
I didn't find a workaround. I visually identified the different indent
levels (it was an index) and assigned appropriate styles to them.

Changing units didn't help. But feel free to play with it:

http://www.pegtype.com/findindent.zip
--
Kenneth Benson
Pegasus Type, Inc.
www.pegtype.com
P***@adobeforums.com
2008-11-28 21:31:18 UTC
Permalink
That is nasty, isn't it. :(
P***@adobeforums.com
2008-11-28 21:40:26 UTC
Permalink
I tried a lot of permutations and "reasonable guesses" for units, all to no avail.

What I didn't try was changing the indent in Word. I wonder if you can fix it there?
marlous2
2008-11-28 21:54:49 UTC
Permalink
Peter, It is really a nasty problem! My document is full of those indented quotes.

Kenneth: I tried to play with changing units and found no solution.
Yes, This is my problem!
I will post a bug report.
I understand that the problem is not solved in CS4.

One more strange thing happened tonight that might give you an idea (hopefully):

1. I opened a new document
2. Typed a few paragraphs with indents (units and increments: mm)
3. Search for the indents and CS3 found the indents (so far so good)
4. I did go to my other "problem"-document and copied a few paragraphs
5. Copy/paste in the new document
6. Search again for the indents: nothing can be found
7. Strange thing is this: the newly typed paragraph can NO LONGER be found!

Hopefully I explained it the right way.
marlous2
2008-11-28 22:06:41 UTC
Permalink
I didn't try to change the indents in Word either.
Unfortunately I already made several other changes in CS3 (fonts, characters, etc.), but it is worth to try in Word...

I have another nasty problem about GREP, posted in another message.
I wonder if you both know 'everything' about GREP-possibilities?
The problem is looking for footnotes in GREP. Do you know the parameters? I cannot find it.
And if you are wondering why I want to search in GREP instead of normal S&R: because I have the punctuation before the footnotenumber instead of after it.

Thankx
K***@adobeforums.com
2008-11-29 01:38:06 UTC
Permalink
You should be able to find footnote marker with ~F in GREP (not that
I've tried it).
--
Kenneth Benson
Pegasus Type, Inc.
www.pegtype.com
N***@adobeforums.com
2008-11-29 05:01:49 UTC
Permalink
It's possible that first-line indents aren't really indents at all, but leading TAB characters, Word users being what they are...

Peter, "Word users being what they are" could mean the spaces are Alt-255 nulls. :P

I learned long ago that the way to deal with Word file is to print it to PDF for visual reference, then strip it to bare, unformatted text for import into a real typography app. You'll waste less time cleanly reformatting it than trying to fix it.
unknown
2008-11-29 23:59:56 UTC
Permalink
Okay.
That was quick rummaging... ;)

Here's the function I used to un-round the numbers. It rounds them to
the nearest single decimal place. It will round the text point size of
near 11.3 points as well. (That was the point size in that document.) I
also just added in support for footnotes...

RoundNumbers(app.documents[0]);

function RoundNumbers(doc){
var theParas =
doc.stories.everyItem().paragraphs.everyItem().getElements().slice(0);
var theFootnotes =
doc.stories.everyItem().footnotes.everyItem().paragraphs.everyItem().getElements().slice(0);
//var theStories=doc.stories;
for (var i=0;i<theParas.length;i++){
try{
var theText = theParas[i];
theText.spaceBefore = Math.round(theText.spaceBefore*10)/10;
theText.spaceAfter = Math.round(theText.spaceAfter*10)/10;
theText.leftIndent = Math.round(theText.leftIndent*10)/10;
theText.rightIndent = Math.round(theText.rightIndent*10)/10;
theText.firstLineIndent =
Math.round(theText.firstLineIndent*10)/10;
for (var j=0;j<theText.textStyleRanges.length;j++){

if(Math.round(theText.textStyleRanges[j].pointSize*10)/10==11.3){
theText.textStyleRanges[j].pointSize=11.3;
}
}
}catch(e){}
}
for (var i=0;i<theFootnotes.length;i++){
try{
var theText = theFootnotes[i];
theText.spaceBefore = Math.round(theText.spaceBefore*10)/10;
theText.spaceAfter = Math.round(theText.spaceAfter*10)/10;
theText.leftIndent = Math.round(theText.leftIndent*10)/10;
theText.rightIndent = Math.round(theText.rightIndent*10)/10;
theText.firstLineIndent =
Math.round(theText.firstLineIndent*10)/10;
for (var j=0;j<theText.textStyleRanges.length;j++){

if(Math.round(theText.textStyleRanges[j].pointSize*10)/10==11.3){
theText.textStyleRanges[j].pointSize=11.3;
}
}
}catch(e){}
}
}
--
Harbs
http://www.in-tools.com
K***@adobeforums.com
2008-12-01 15:02:16 UTC
Permalink
Thanks, Harbs

I get an error running this with the placed sample file I posted. Error is:

Error Number: 24
Error String:
doc.stories.everyItem().footnotes.everyItem()paragraphs.everyItem is not
a function
Line: 12
Source: var theFootnotes =
--
Kenneth Benson
Pegasus Type, Inc.
www.pegtype.com
unknown
2008-12-02 00:07:27 UTC
Permalink
Hi Kenneth,

Thanks for reporting back. (Sometimes I wonder if people care that I
post these scripts...) :(

The script is missing some error checking. This should work better:

if(app.documents.length>0)
RoundNumbers(app.documents[0]);

function RoundNumbers(doc){
var err;
try{var theParas =
doc.stories.everyItem().paragraphs.everyItem().getElements().slice(0)}
catch(err){var theParas = []}
try{var theFootnotes =
doc.stories.everyItem().footnotes.everyItem().paragraphs.everyItem().getElements().slice(0)}
catch(err){var theFootnotes = []}
//var theStories=doc.stories;
for (var i=0;i<theParas.length;i++){
try{
var theText = theParas[i];
theText.spaceBefore = Math.round(theText.spaceBefore*10)/10;
theText.spaceAfter = Math.round(theText.spaceAfter*10)/10;
theText.leftIndent = Math.round(theText.leftIndent*10)/10;
theText.rightIndent = Math.round(theText.rightIndent*10)/10;
theText.firstLineIndent =
Math.round(theText.firstLineIndent*10)/10;
for (var j=0;j<theText.textStyleRanges.length;j++){

if(Math.round(theText.textStyleRanges[j].pointSize*10)/10==11.3){
theText.textStyleRanges[j].pointSize=11.3;
}
}
}catch(e){}
}
for (var i=0;i<theFootnotes.length;i++){
try{
var theText = theFootnotes[i];
theText.spaceBefore = Math.round(theText.spaceBefore*10)/10;
theText.spaceAfter = Math.round(theText.spaceAfter*10)/10;
theText.leftIndent = Math.round(theText.leftIndent*10)/10;
theText.rightIndent = Math.round(theText.rightIndent*10)/10;
theText.firstLineIndent =
Math.round(theText.firstLineIndent*10)/10;
for (var j=0;j<theText.textStyleRanges.length;j++){

if(Math.round(theText.textStyleRanges[j].pointSize*10)/10==11.3){
theText.textStyleRanges[j].pointSize=11.3;
}
}
}catch(e){}
}
}
--
Harbs
http://www.in-tools.com
K***@adobeforums.com
2008-12-02 01:39:16 UTC
Permalink
That works great! Thanks!
--
Kenneth Benson
Pegasus Type, Inc.
www.pegtype.com
Loading...