15 Replies Latest reply on Apr 8, 2017 5:46 AM by jane-e

    Resolving color name conflicts when combining ID documents

    Home Power Level 1

      Hi,

       

      I use an ID template document (.indt) when building layouts for my individual magazine articles. In the colors pallet are colors named "Article primary accent" and "Article secondary accent" (as well as a plethora of custom stock colors that remain fixed). The primary and secondary accent colors make it easy to use other preset styles with these colors applied. E.G. then when I'm ready to set a color 'mood' for the document, all I need to do is change the color definition, and then all my titles, sub-headers, page numbers, table rows, box borders, etc. switch to the new color automatically. Makes sense?

       

      We use a separate ID document for each article so that different editors can work on different parts of the magazine at different times.

       

      Now I want to try using the Publish Online feature to create a HTML version of the whole magazine. That requires assembling all articles into a single ID document. This is a bit clunky with section start, page numbering, and LH vs RH page idiosyncrasies...but doable.

       

      However, I'm running into color naming conflicts when combining documents to assemble the full magazine in ID. "Article primary accent" from later articles is getting reset to the color definition of the color used in the initial (first article) starting document. I am not getting a color name conflict warning dialog box like I get if copy/pasting and object from one layout to another. It seems like dragging pages from one document's Pages pallet into a second document (the right way to combine/add pages, right?) does not recognize that there are 2 colors with the same name.

       

      Am I missing something? Is there a better way of doing this? Is there a non-tedious way of hard-coding color definitions so documents can be combined?

       

      Thanks,

      Ben

        • 1. Re: Resolving color name conflicts when combining ID documents
          Willi Adelberger Most Valuable Participant

          If the swatches are changed I would recommend to rename them before. I would also suggest that all styles are moved in a folder in each document with a different name.

          1 person found this helpful
          • 2. Re: Resolving color name conflicts when combining ID documents
            rob day Adobe Community Professional & MVP

            I don't think what you are describing should be happening. What version of ID are you using? You might expect that behavior if the documents were part of a Book file and the swatches were set to synchronize.

             

            When you drag and drop to combine pages, swatches with same names but different values should get appended. Like this where I've dragged the page on the right into the doc on the left and the swatch AccentColor gets renamed to AccentColor2:

             

            Screen Shot 2017-04-07 at 7.59.19 AM.png

            1 person found this helpful
            • 3. Re: Resolving color name conflicts when combining ID documents
              Home Power Level 1

              Thanks for the reply Rob,

               

              I'm running CC2017 now. Some of the layouts I'm trying to combine are from CC2015, But I just tried doing a Save-As to update the source layout before dragging pages to the "build" layout. No help.

               

              I did just run a test by creating a new object with the color definition in question. In the new (combined) doc, that color was moved/added as "Article Primary Accent 2" and the new object maintained it's proper color. This is what you were predicting. However, the objects that are improperly defaulting to the wrong color seem to be text that is defined with a text style or paragraph style. It seems that the "Character Color" setting in Paragraph Style Options is not smart enough to link to the new color definition/name when pages are combined.

               

              Of course, the work-around would just be to hard-code/name the colors I want...IE just fix the layout. But we're hoping to back convert 180 issues of the magazine into HTML format. Each magazine, has a dozen or so separate layout docs just asking for trouble. This would be tedious to the point of aggravation.

               

              Ben

               

              PS I'm also running in to master page confusion. More on that later...or in another thread.

              • 4. Re: Resolving color name conflicts when combining ID documents
                rob day Adobe Community Professional & MVP

                Right, I think you will have problems with this approach. When you copy text between documents, same named styles take on the attributes of the style in the destination doc. If you wanted to use the source styles you would have to load them before the move, but that wouldn't help in your case.

                 

                It would be possible to script a name change for the colors—a script could append all of the swatches in a doc with the document name, so AccentColor would become AccentColor-docName. Then there would be no conflicts with either the styles or swatches.

                1 person found this helpful
                • 5. Re: Resolving color name conflicts when combining ID documents
                  Home Power Level 1

                  Thanks Rob,

                   

                  So it's actually a style issue, not a color issue. The style isn't smart enough to stay linked to the original color, as that color's name gets updated in the destination document. Seems like they developed half a solution (swatch naming), but forgot to apply it deeply enough into the structure (styles). Damn.

                   

                  I am interested in your script to append all color names. But I know nothing about writing scripts. Is this something that I would run for each document prior to opening it? Or?

                   

                  My concern though, is that this would help the color issue, but not any of the other Style changes that occurred between the documents. E.G. if I changed the definition of "Paragraph sub heading" in other ways than just color, (EG font, size, leading, etc.) those changes will be overridden during by the destination document Style settings. Right? There is a way to "Break link to style", but you have to individually select each object/paragraph/character...It can't be applied globally to the document.

                   

                  Can scripts be written to append the names of Object Styles, Paragraph Styles,  and Character Styles as well as Swatches? Who can do this kind of voodoo?

                   

                  Ben

                  1 person found this helpful
                  • 6. Re: Resolving color name conflicts when combining ID documents
                    Home Power Level 1

                    It would be so darn cool if the "Publish Online" feature could be run on a PDF document, (EG from inside Acrobat Pro) so that all of this pagination and compiling could be done there. PDFs are the default file format for almost all printers these days, so if you are trying to make an HTML version from a "print" document, you'll likely be going through PDF anyway. Even if print isn't one of your ouput goals, making PDFs from ID is so darn easy already.

                    1 person found this helpful
                    • 7. Re: Resolving color name conflicts when combining ID documents
                      rob day Adobe Community Professional & MVP

                      What OS are you on?

                       

                      A swatch renaming script is fairly simple. Here it is as AppleScript (OSX only):

                       

                      -------------------------------------------------

                      tell application "Adobe InDesign CC 2014"

                          tell active document

                              set s to every swatch

                              set n to name

                              set n to "-" & (characters 1 thru -6) of n as string

                              repeat with x in s

                                  try

                                      set sn to name of x

                                      set name of x to sn & n

                                  end try

                              end repeat

                          end tell

                      end tell

                       

                      Here's my swatch panel after running it on a document named April. I'm not sure if there is a character limit for swatch naming, so you might have to consider that.

                       

                      Screen Shot 2017-04-07 at 1.49.35 PM.png

                       

                       

                      My concern though, is that this would help the color issue, but not any of the other Style changes that occurred between the documents. E.G. if I changed the definition of "Paragraph sub heading"

                      When you rename a swatch any styles that use the swatch are automatically update, so I don't think that would be a problem

                      1 person found this helpful
                      • 8. Re: Resolving color name conflicts when combining ID documents
                        Home Power Level 1

                        Hi Rob,

                         

                        Thanks!

                         

                        I'm running OS 10.12.3 (Sierra). InDesign CC2017, so I'd need to change the application name in the script you offer, right?

                         

                        How do I implement this script though? Paste into Terminal? Then run this on all ID docs independently before opening a document to compile into? This stuff is outside of my normal operating parameters...I'm scared.

                         

                        Yes, I am also concerned about file name lengths as they get pretty long in our company (e.g.: "HP178 p45-52 Weis Freitas Self-Consumption.13.sp.indd" is a typically long one). Probably, if truncated it will be fine though, since in any given issue the file names are pretty discrete. should "(characters 1 thru -6)" be a longer range, 13 should do it?

                         

                        Can this kind of script be done to names of Styles (Object, Paragraph, and Character) too?

                        • 9. Re: Resolving color name conflicts when combining ID documents
                          rob day Adobe Community Professional & MVP

                          Open Utilities>Script Editor an paste the code into a new window, click compile and save as Script format into your InDesign scripts folder. It will then show in the scripts panel where you can double-click it to run. The path to the ID scripts folder is: /Applications/Adobe InDesign CC 2017/Scripts/Scripts Panel

                           

                          The first version I posted removes the .indd suffix from the file name. You could also get the first 10 characters via

                          set n to "-" & (characters 1 thru 10) of n as string

                           

                          Although it looks to me like the swatch names don't have a limit

                           

                          tell application "Adobe InDesign CC 2017"

                              tell active document

                                  set s to every swatch

                                  set n to name

                                  set n to "-" & (characters 1 thru 10) of n as string

                                  repeat with x in s

                                      try

                                          set sn to name of x

                                          set name of x to sn & n

                                      end try

                                  end repeat

                              end tell

                          end tell

                          1 person found this helpful
                          • 10. Re: Resolving color name conflicts when combining ID documents
                            Home Power Level 1

                            YES!

                             

                            This works great!

                             

                            Would you be willing to write equivalent scripts to do the exact same renaming protocol using the first 13 characters of document's file name for Paragraph Styles, Character Styles, and Object Styles?

                             

                            How Can I pay you back?

                            Beer by mail?

                             

                            Thanks,

                            Ben

                            • 11. Re: Resolving color name conflicts when combining ID documents
                              rob day Adobe Community Professional & MVP

                              It's actually very easy—you can make scripts for each by changing the 3rd line. So:

                               

                              set s to every paragraph style

                               

                              set s to every character style

                               

                              set s to every object style

                               

                              You can even paste all 4 into one script to do it all at once

                              1 person found this helpful
                              • 12. Re: Resolving color name conflicts when combining ID documents
                                Home Power Level 1

                                OK,

                                 

                                I'll try it and keep you posted.

                                 

                                Thanks for sticking with me on this! I consider this a good fix, all things considered.

                                 

                                But I still think that the necessity of using a single merged ID doc to Publish Online, means that these sorts of issues are going to crop up for lot's of ID users. Too bad that the merging conventions aren't designed to deal with these conflicts without custom-coding workarounds from benevolent Adobe forum members.

                                 

                                Better yet, Publish Online feature from Acrobat Pro.

                                Who do we tell? Do Adobe developers monitor these kinds of discussions?

                                 

                                Thanks Again!

                                Ben

                                • 13. Re: Resolving color name conflicts when combining ID documents
                                  rob day Adobe Community Professional & MVP

                                  There's a feature request forum:

                                   

                                  InDesign Feature Requests

                                   

                                  I think it would have to be added to the Book panel.

                                  1 person found this helpful
                                  • 14. Re: Resolving color name conflicts when combining ID documents
                                    rob day Adobe Community Professional & MVP

                                    This is the script for master spread names :

                                     

                                    tell application "Adobe InDesign CC 2017"

                                        tell active document

                                            set s to every master spread

                                            set n to name

                                            set n to "-" & (characters 1 thru 13) of n as string

                                            repeat with x in s

                                                set sn to base name of x

                                                set base name of x to sn & n

                                            end repeat

                                        end tell

                                    end tell

                                    1 person found this helpful
                                    • 15. Re: Resolving color name conflicts when combining ID documents
                                      jane-e Adobe Community Professional

                                      https://forums.adobe.com/people/Home+Power  wrote

                                       

                                      YES! This works great!

                                      Would you be willing to write equivalent scripts to do the exact same renaming protocol using the first 13 characters of document's file name for Paragraph Styles, Character Styles, and Object Styles?

                                      How Can I pay you back? Beer by mail?

                                      Thanks, Ben

                                      Rob may have another idea, but one thing your can do is to click "Helpful" on every single one of his replies plus mark one of them correct!