Copy link to clipboard
Copied
I have a 300-page file of mostly text that gets revised and updated every few years. Sometimes I need to copy text out of the file and into a new document. I am having trouble that InDesign does weird things with the text styles when I copy it. Sometimes the text appears the same as the orginal, but it has style overrides on that should not be there. I don't want to clear all overrides, becasue there are places that overrides are needed. Here is what I have tried so far:
What do you think? Is this a bug in InDesign? (I think it has happened with other files, but this is the one I've tested the most.) What else shall I try? The file has likely been converted from Quark, but that was before I was involved with the project. The file appears to have "code" in it that it doesn't know what to do with. I've noticed similar unidentified overrides when a file has text copied or imported from an html source. The only way I know to solve that is to clear all the overrides before I begin formatting or else I will have a hopelessly messy file at the end. Would it be possible to write a script to clear all styling not explicitly defined by the paragraph style but retaining purposeful overrides? Any other ideas?
Hi @Bethany24827540qilv , I can see that none of your styles are based on [Basic Paragraph], so there is a corruption in your file causing the problem that saving as IDML does not fix.
Normally the default [No Paragraph Style] can not be edited either via the UI or scripting, but there have been reported cases like yours where it gets altered—it might be the file originated from Quark or a very early version of InDesign?
In your document the [No Paragraph Style] applied font is Times Roman a
...Copy link to clipboard
Copied
Hi @Bethany24827540qilv, someone may have the exact answer for you, but it might help if you could post an .indd document with a small sample of the text (just enough to show the problem when someone else tries to copy to another document).
Even better if you specify the steps to reproduce the problem, eg. step 1: open "sample.indd" doc, step 2, copy all text from main story, step 3, new document, step 4, paste, step 5. compare paragraph #3 on both documents.
This sort of approach can really speed things up.
- Mark
Copy link to clipboard
Copied
Ok. I've left just enough text for you to get the picture. The first file is from the original document after it was recreated with IDML. The second is text that I copied and pasted into a new file. Both have the override highlighter turned on. Almost all of the copied text has overrides, while very little of the original file did.
To recreate the problem.
Copy link to clipboard
Copied
Hi @Bethany24827540qilv, thanks for the demo files, that was helpful. I had a look and I can confirm the behaviour that you see. There is something interesting going on, but I'm not knowledgeable enough to nail it down I'm afraid.
See the attached "demo.indd" document which is based on your document, but is simplified—it has one text frame with one paragraph set in one paragraph style ("church page"). I have removed the extra styles from the document. Even so much simplified, the problem still happens, so this demo document is a good test case.
Here are some notes:
1. If I copy and paste in the same document, the problem doesn't occur.
2. If I delete all the text and text frames, and paragraph styles from the demo document, and save it as a copy, then paste from the demo.indd the problem doesn't occur. This suggests that the problem is an interaction between a document-level preference and the demo paragraph style.
3. When I paste into a new document (and the paragraph shows an override) when I then create a new Paragraph Style from that selected text, and edit it, here's what I see:
This implies that the only "override" is the "Regular" font style. But this is weird because the "church page" style I am using for the test already has a font style of "Regular".
Unfortunately in my opinion your options are: (a) bite the bullet and fix all the styles in the new document (this is what I would do I think), or (b) make an empty copy of the first document, and use this as the base for your new document as I found in (2) above.
Still, there are some amazingly knowledgable people on this forum, so we might still get a better answer.
- Mark
Copy link to clipboard
Copied
This is likely caused by the two documents having different definitions of he Basic Paragraph style that is included in every InDesign file and cannot be deleted. I have found that text copied from one document to another iwll often look different when pasted even if the source and target documents use the same style names and the same attributes for each style.
The Basic Paragraph style, when it is different between two documents, can cause the text to change appearance, even if you are not using that style. For this reason I have a few hard and fast rules I tell everyone (I was an InDesign instructor at a local community college):
If, like me, you believe it was a mistake to include the style and wish Adobe would remove it (or at least make it deletable), please vote here.
Copy link to clipboard
Copied
I agree Scott, and I never use Basic Paragraph Style. But I believe that [No Paragraph Style] is also essentially a paragraph style, and that might be the culprit here.
- Mark
(Something went crashed while I was commenting on your post at uservoice and I seem to be locked out of it for now, so I'll try and vote later.)
Copy link to clipboard
Copied
Thank you, m1b . I have wondered too if the [no paragraph style] isn't involved somehow.
Scott, I agree about not using [Basic Paragraph Style]. In fact, I rarely base any styles on other styles; it just causes problems in the future. But I have a few questions.
Have any of you seen this kind of odd override, often unidentified, when text is brought in from Word? I run into that alot, especially when the text originated from an email and might even be translated text (one overide that shows up is text direction, which doesn't apply to English). I don't know the exact way to recreate it because it comes to me that way. My normal editing process is to look for overrides only when I am almost finished fine-tuning the document, to make sure that nothing is riding along that shouldn't be. But if I clear all overrides then (the only way I know to get rid of these odd settings that aren't available in InDesign, or at least not for English text), I am likely clearing overrides that are important and waste time resetting them up. I also risk missing something important unless I reread the whole document. If I leave all the overrides there because it is too time-involving to review each one when most of the text is affected, I might miss settings that will look strange once printed. If this is new to you, I will try to save an example to send in the future.
Copy link to clipboard
Copied
Just a note on your point (1) @Bethany24827540qilv. My opinion—and I think Scott would agree—is that *being able to edit* the default paragraph style is a bad move, and is very likely the entire reason for the problem you describe here. When you edit the "default" font for Indesign, I think you are actually editing the [No paragraph style] paragraph style(!) for every new document created.
So then all your paragraph styles in that new document that has [No paragraph style] as an ancestor (which is almost certainly *every* style) will potentially be upset when copy/pasting to a new document made on another person's Indesign with their default[No paragraph style] style.
It would be better if Indesign's [No paragraph style] was a constant across all systems. This would make this problem go away and it wouldn't stop anyone from importing styles anyway so nothing would be lost as far as I can see. I think if [No paragraph style] was carved in stone, then [Basic Paragraph Style] could actually be useful for users who wanted the benefit of editing the default style, and for those (like us here) who don't use it, then our styles could be based on [No paragraph style] safely.
Sorry that was longer than I expected!
- Mark
Copy link to clipboard
Copied
Your expanation makes sense. I'm not sure this covers all the problem though.
My observation is that it occurs mostly
1) In old files used throughout multiple versions of InDesign and possibly Quark. (Perhaps this is covered though if we say that Adobe changing the default is creating the same problem as users editing the default.)
2) in current files that have text added from other languages/countries. I'm not aware that this text originates in InDesign, so I think it is more of an import or pasting error.
Is it theoretically possible to add an option to clear all styling not explicitly defined by the paragraph style while still retaining purposeful overrides?
Copy link to clipboard
Copied
@Bethany24827540qilv said: I'm not sure this covers all the problem though.
I think it does. If every copy of indesign has the exact same [No paragraph style] then the problem will go away as soon as you "base on [No paragraph style]".
The question remains: what happens when [Basic Paragraph Style] differs between documents. In that case Indesign SHOULD give us the option of adding "[Basic Paragraph Style] Copy" but at the moment (I just tested it) it just does nothing, and the pasted text adopts the target document's [Basic Paragraph Style] instead of keeping the source document's.
This behaviour is definitely either a bug or a very poor design choice, in my opinion.
Copy link to clipboard
Copied
I have no interest in changing the default font. What I do is, with no document open, select No Paragraph Style in the control panel or click in the blank area in the Paragraph Style panel. This way any text I create in a new document won’t be linked to BP. I do some other things to change the defaults, like delete unused swatches, set my black preferences, and change the cursor key increments to something far more sensible than the dumb defualts Adobe chose for us.
Copy link to clipboard
Copied
I did an experiment. I created two documents one after the other, so they both have the same defaults. I edited Basic Paragraph in one document but left it alone in the other. I created two text frames in each document. One frame has text with no paragraph style applied, so the formatting is the default for the document (which is the default for the application). The other text frame uses Basic Paragraph.
Here is what that looks like in each document…
As you can see, the default text formatting is the same for both files. Editing Basic Paragraph has no effect on the defualt text format.
I then copied both text frames and pasted them into the other document. Here is what that looks like in each document…
As I expected, the appearance of the second text frame changed to match the style of Basic Paragraph in the target (i.e. pasted into) document. Also as I expected, the text in the upper text frame, which has no paragraph style applied, did not change.
In other words, if you don’t use Basic Paragraph anywhere in your formatting (either by applying it to text or basing other styles on it) you shouldn’t fall into the Basic Paragraph trap. But my testing was limited. For exampl,e I did not change the paragraph attributes or colour of Basic Paragraph or text using paragraph styles, either with ot without basing them on Basic Paragraph.
Copy link to clipboard
Copied
Hi @Bethany24827540qilv , I can see that none of your styles are based on [Basic Paragraph], so there is a corruption in your file causing the problem that saving as IDML does not fix.
Normally the default [No Paragraph Style] can not be edited either via the UI or scripting, but there have been reported cases like yours where it gets altered—it might be the file originated from Quark or a very early version of InDesign?
In your document the [No Paragraph Style] applied font is Times Roman and not Minion pro. If I run this script on your document:
var s = app.activeDocument.allParagraphStyles
alert(s[0].name + "\r Font: " + s[0].appliedFont.name+"\r Style: " + s[0].fontStyle)
I get this—the [No Paragraph Style] font is Times and the style is Roman:
But if I create a new document I get the expected Minion Pro Regular—InDesign will not let me alter [No Paragraph Style] in either case:
This is causing the behavior you might expect when cutting and pasting between documents where the style has been Based On [Basic Paragraph], but the document’s [Basic Paragraph] styles are not the same.
I think a solution might be to edit the IDML file’s Styles.xml and restore the [No Paragraph Style] definition to the InDesign default. Do a search for editing IDM, e.g:
https://opensource.com/article/18/7/adobe-indesign-open-source-tools
Copy link to clipboard
Copied
Hey @rob day, this is great work! I now realise that I really did not understand what was going on here at all.
I tested your idea quickly and you are right, the problem goes away if we export the original Indesign document as IDML and edit the Styles.xml to change "Times" font to "Minion Pro" and fontStyle to "Regular".
Here it is in my editor:
After making that change (for details on how to expand/compress IDML files see note at end), I can paste into a new indesign document and it does not show overridden style!
- Mark
EDITING IDML FILES:
I learned about how to expand idml files into folders of files (IDML files are actually zip files) and I learned the fiddle required to re-compress them (it's more complicated than just zipping them back up). BUT then I came across this answer by léo which shows that you can use Indesign App object has built-in methods for expanding and re-compressing IDML documents. I think that is the best way to go now.
Copy link to clipboard
Copied
Also, just to be safe, you could IDML a new document and get the entire [No Paragraph Style] definition, and paste that into the corrupted Styles.xml—I’m guessing @Bethany24827540qilv might have more than one problem document.
Copy link to clipboard
Copied
@rob day Hello 🙂
I have read this issue, and then wondered (again) what would you recommend regarding Paragraph Styles:
Based on [Basic Paragraph] or Based on [No Paragraph Style]?
Or maybe it depends on the job you're doing?
I prefer not to use the [Basic Paragraph] option as I found out that if the [Basic paragraph] is defined differently on another computer can change the Par. Style definitions so I stopped using it. But now, I'm wondering again.
By the way, I don't like to use overrides. Especially on Important documents. I will create character styles only so I won't have the + mark on the Par. Style. I feel safer this way especially on complex text documents.
Thank you,
Shlomit
Copy link to clipboard
Copied
Hi @Shlomit Heymann , Generally speaking you want the Based On style to be [No Paragraph Syle], or a style you have created, which is Based On [No Paragraph Syle] — @Bethany24827540qilv ’s case where [No Paragraph Style] was altered would be extremely rare. It isn’t clear how it happened, but editing [No Paragraph Style] is not possible from the UI or via scripting.
Copy link to clipboard
Copied
@rob day Thank you. I've been using InDesign sice version 1.5, but mainly since version 2.0. Before that I used Quark.
Over the years I have developed my own system of working with Paragraph styles. The default Basic Par. style is defined with all the correc definitions for Hebrew and with Adobe's default Hebrew fonts so I can always select any text and clear overrides to see if something is wrong with the text but I never bese any style on it.
I create for myself basic styles for any type of text I have, and then I bese all the others on those basic styles. This way, if suddenly I want to change the font, I change it only in the "bacsic" styles I created. I find it the best way to keep my documents in order and to speed up my work.
all the best 🙂
Shlomit
Copy link to clipboard
Copied
The default Basic Par. style is defined with all the correc definitions for Hebrew and with Adobe's default Hebrew fonts
There’s not a problem with your workflow as long as you are not collaborating or cutting and pasting into new doucuments—on a paste the destination’s style is used when there is a conflict with same named styles. So:
An edited [Basic Paragraph] style, and a style named Head Style, which is based on [Basic Paragraph] style:
Pasted into a document with a conflicting [Basic Paragraph] style definition
An alternative would be to make a custom base style named for the project, which is based on [No Paragraph Style]:
In this case there is no conflict on the paste into a new document
Copy link to clipboard
Copied
@rob day said: "… In your document the [No Paragraph Style] applied font is Times Roman and not Minion pro. "
Well yes, that's exactly the symptom that the InDesign document was once created with a version before CS5 Version 7.
InDesign's CS4 for example had the [No Paragraph Style] defined with Times Roman.
Regards,
Uwe Laubender
( Adobe Community Expert )
Copy link to clipboard
Copied