identifying external styles

Advisor ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

Nightmare task, preparing .docx files as the lowest common denominator to transfer content from other environments into InDesign. The idea, which hasn't fallen over so far, is that we spend some time looking at a representative document and prepare a master InDesign file with a first set of style defitions; then we import a first .docx, import the InDesign style definitions over the top of the .docx definitions, stand back in amazement and admire the results.
Known snag: as we continue processing .docx files, we are going to run into style definitions that are not present in our InDesign template. Question: is there an easy way to identify these intruders and add them to the template?

[can't help thinking Wolf in sheep's clothing or possibly The body-snatchers, but those wouldn't count as "simple subjects"]

TOPICS
Import and export

Views

64

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Apr 19, 2021 Apr 19, 2021
There ParagraphStyles panel shows an imported icon with imported styles:     The is also a true or false imported property, which you can get via scripting. This would get a list of imported styles     var cs = app.activeDocument.paragraphStyles; var pl = "Imported Paragraph Styles \r" for (var i = 0; i < cs.length; i++){ if (cs[i].imported) pl += cs[i].name + "\r" } alert(pl)  

Likes

translate

Translate

Translate
Adobe Community Professional ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

There ParagraphStyles panel shows an imported icon with imported styles:

 

Screen Shot 45.png

 

The is also a true or false imported property, which you can get via scripting. This would get a list of imported styles

 

 

var cs = app.activeDocument.paragraphStyles;
var pl = "Imported Paragraph Styles \r"   
for (var i = 0; i < cs.length; i++){
    if (cs[i].imported) pl += cs[i].name + "\r"
}   
alert(pl)

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

Short of tagging text in Word and using those tags to match up with your InDesign paragraph and character styles, with varying degrees of success, I know of no way to automatically seek out these intruders and assimilate them into the borg.

 

But if you want to do this by hand, it is possible to recognize the body (type) snatchers and deal with those anomalies as they're found.

 

But first, you need to apply some file hygenics in Word to be copascetic with your InDesign paragraph and character styles:

 

  • Paragraph styles need to be named exactly the same between the MSWord source and the InDesign receiving document, down to case and spacing. Any variations and there will be a disconnect.
  • Character styling is done differently in MSWord (and depending on platforms, even the same version of MSWord for Windows/Mac/iOS/iPadOS/Android platforms) and InDesign on either Mac or Windows platforms. e.g. MSWord may read Times Standard styled in Bold as Times Standard with a bold styling while InDesign recognizes it with the relevant font, as in Times Bold, with no styling. This difference in standards can be reflected in various, inconsistent ways — with the point below demonstrating but one example.
  • If the initial character in a placed MSWord text file is stylized (e.g. Times Standard, styled Bold and Italic), you can just about count on that formatting everything you place in that thread will be stylized the same way.

 

With these caveats covered, you can identify your style intruders pretty easily:

 

  • 1.jpgPlace the text thread.
  • Select the Edit>Edit in Story Editor menu command. This opens the Story Editor window, where each paragraph is identified by the paragraph style applied to it, a shown in the left column of the illustration at right.
  • From there, you can either apply InDesign styles to anomalies on the fly, or you can click into the offending paragraph text and create a New Style from the Paragraph Styles panel that incorporates your custom MSWord formatting intact or you can tailor to meet your specific InDesign layout needs.

 

It'll take a little work, but if you're willing to put the effort into these tricks, you can get the results you're looking for.

 

Hope this helps,

 

Randy

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

Thanks for the extra information … I have my suspicions that my colleague may never have got as far as the Story Editor; I know she's never used an InDesign book, and I'm pretty sure from what she says that she's never generated an IDD table of contents.

Howsomedever: I've just run a small experiment. New file, place styled .docx, Load paragraph styles from a 'canonical' InDesign file. As Rob says, where there is no definition in the canonical file the Paragraph Styles panel shows a sort of Space Invaders icon. All colleague now needs to do is update the canonical file with new styles as they arrive in different .docx – probably safer if this is done style by style rather than with any sort of automation ;-}

"exceptions" in Paragraph Styles panel"exceptions" in Paragraph Styles panel

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines