Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Style Highlighting

Last week at PePCon during the tips session I showed a new script called StyLighter that can create a color-coded preview of where paragraph and character styles have been used in your documents. The script was written by Marc Autret, author of IndexMatic, Show/Hide Local Formatting, Wordalizer, and several other great scripts. StyLighter works with CS4, 5, and 6, and you can download it at Marc’s website, Indiscripts.com.

When you run StyLighter, you get a dialog box where you can select which styles you want highlighted and with which colors.

You then select Activate Preview Mode and click OK. After that, there are no more secrets when it comes to text formatting. Every style and every override is revealed. Red vertical bars indicate paragraph formatting overrides, red strikethoughs indicate character formatting overrides.

Interestingly, as Marc notes on his website, the script merely enables a preview mode that is built into InDesign. You can’t normally access this mode since the folks at Adobe didn’t put any means of controlling it in InDesign’s user interface. But the StyLighter script reveals the feature, in all its glorious colors. ;)

Mike Rankin

Mike Rankin

Editor in Chief of InDesignSecrets.com, InDesign Magazine, and CreativePro.com. Author of lynda.com courses on InDesign and Illustrator. Husband. Dad. Dog walker.
Mike Rankin

Latest posts by Mike Rankin (see all)

  • - November 30, -0001
Tags
Related Articles
Comments

24 Comments on “Style Highlighting

  1. Thank you Mike for this nice spotlight.

    Just to make it clear to your readers: ‘StyLighter’ simply extends?well, it wasn’t that simple!?the functionality of ‘Show/Hide Local Formatting’ in the sense that it provides style highlighting in addition to local override markers. In this regard it seems to me that there is more reason to use SHLF, which by the way offers no user interface.

    @+
    Marc

  2. Script works, and works very well, only thing i realize is that does not respects all selected colors, I choose gray color to highlight bulleted lists but instead gray highlights was in brown color. It will be more useful to let user choose or select color instead of random color option.

  3. @ Bojan

    “I choose gray color to highlight bulleted lists but instead gray highlights was in brown color”

    Yes, this bug may occur in ID CS5 and later. You’ll find further detail on this issue in the original article.

    In StyLighter, click the “Fix colors…” button.

    @+
    Marc

  4. Neat script!

    For those who’re fretting about how to turn this blazing rainbow of colors off, run the script again and uncheck the “Activate the Preview Mode” box.

  5. Another cool thing about this script is that if I have it turned on in a template file, it’s on automatically in any files I make using that template. Maybe that’s the case with any script, but I’ve never tried it before and I like it.
    I’m working on book right now with chapters coming from many different authors and editors, using various versions of various software, so I like knowing instantly with each chapter what’s happening with the styles.

  6. We can all say that Marc is our newest hero! We should make a comic of all these scripting men and women trying to endure those binaire codes, just for our sake!

    Maybe i’ll put up a shrine of some kind, ;-)

    @ Olaf, i did to…. (since 1,5 indesign even)

  7. I was part of the ID team that implemented this feature back in CS4 and the whole purpose of it was to make checking for incorrect or unexpected text styling faster and easier. Character Styles can sometimes be quite subtle (such as applying a different language dictionary) and the same goes for unintentional text overrides and we figured that would be far easier to scan a page looking for large blocks of color than slowly moving your text cursor through your text and looking for little plus (+) signs next to the applied styles in the various Styles panels.

    But, as Mike correctly points out, with all the other features going into CS4 we just ran out of time before we could put in a proper user interface for it but we left it in via scripting. I’m so glad somebody found it and is making such good use of it!

    I relied on this feature quite a bit when I used ID CS4 to layout a neighborhood newspaper and I found it to be super helpful in catching places where I had forgotten to apply a Character Style or where incorrect styling had been applied to invisible characters, such as the dreaded override to the return character at the end of a paragraph. (Argh!)

    One little detail that wasn’t mentioned in this article was that when you apply a Character Style via a Nested style or a GREP style the Character Style highlighting will only cover the top half of the text while the Paragraph Style color will remain on the bottom half. And if you have a Nested Style AND a GREP Style applied to the same character the top half of the color bar will again be split, with the bottom portion showing the Nested Style color and the top portion showing the GREP Style color. If you manually apply a Character Style on top of this you don’t get any color indication of this Character Style- oops, sorry, looks like we missed that scenario…

    One other little bug: if you have this style color turned on it will cover up any regular Underline attribute that you might have applied to the text (it will show up again if you turn off the style coloring or switch to Preview mode). Again- oops! Sorry about that.

    I think we did a good job at showing the different types of overrides but one issue that we never quite figured out how to display properly was how to show multiple overrides or how to differentiate between desired and undesired overrides. For example, imagine that you apply an override to a large range of text, such as when you copyfit a story by tweaking the tracking just a tiny bit across an entire story. In this scenario you will get a red override strikethrough running through your entire story. There is nothing wrong with this except that the red strikethrough line that is caused by this “desired” override now obscures any indication of additional “undesired” overrides that might occur somewhere else in the story.

  8. @Ashley:

    As was noted in the Adobe Forum thread on same, it kinda works in CS4 (so I guess we have to thank you for that!), but it is severly broken in later versions and even can cause ID to crash and burn. Fortunately Marc circumvented those circumstances nicely, but …

    1. it seems to indicate that further development on this “sleeping” feature is stopped,
    2. … although the code is still in there! And thus causing the erratic behavior that has been observed.

    That really sounds like two Bad Decisions in a row …

  9. @Jongware

    Now that you point out the problems with this I totally disavow all knowledge of this feature! :-)

    The feature was only half implemented and only got as far as the “proof of concept” stage before the engineer had to stop work on it and no one has touched this code since then? new features always seem to have a higher priority than fixing old “features” that can only be accessed via scripting.

    As Marc has shown, it is possible that a clever programmer can circumvent some of the issues that exist with this half-implemented feature but I have no doubt that turning on the style highlighting setting can make false some of the assumptions that other parts of InDesign have about styles and that this can cause problems or even, as you stated, crashes.

    The engineer who wrote this code is no longer at Adobe, nor am I. I think the feature has a lot of promise and could be very useful but we would need to have the ear of someone on the Adobe InDesign team if you wanted to see this fixed or improved or fully implemented.

  10. I was surprised to find that the red lines are visible to remote editors using InCopy, even though they don’t have it installed. I thought I’d post a warning here, because it can really freak them out when they see an entire paragraph covered by red lines!

  11. how to differentiate between desired and undesired overrides.
    One way of dealing with it could be to have different colour intensity depending on the strength of the override – for the tracking example, -5 tracking is a light red colour, whereas -50 tracking is an intense red colour. This way, if a setting changes in one paragraph, or even if it is reset, you can see it change.
    The best thing, though would be to see the text style ranges highlighted directly, without taking notice of what kind of style change is done.

    Since InDesign really applies formatting to text style ranges, this would allow you to see exactly where they break, every time there is a break – even if it is the same setting applied over and over again to short ranges of text. Say, English (UK) is repeatedly chosen as language dictionary, or some obscure OpenType setting is turned on repeatedly.

  12. Does anyone know how to save settings of stylighter?
    Each time I open an new indd file (a lot of small files)to check it with the stylighter I have to check the colours,… which is teddious.

    Some change in the code or usage?

    TIA

  13. Hi folks,

    Thanks for an interesting script.

    Is there a way to remove Stylighter from CS6 after it has been installed?

    I dislike that my files open highlighted by default and when I removed the script the files still open highlighted. Are there “ghost” files that should also be removed?

  14. I have installed this script and run it on one of my documents. I now wish to remove it.

    I have deleted the script from the script panels, but the red formatting is still visible.

    Urgent assistance needed! Thanks!

  15. In my opinion, it’s a fault we can’t change the overrides style color… If I want to highlight only ONE character style (and NOT the normal overrides, like kerning or tracking changes, etc), the remote editor goes crazy with all the red lines over the text. :(

    It would be an absolutely great solution for my case, but, without the chance to remove the override highlights, it’s unusefull…

    Anyone have an idea?

Leave a Reply

Your email address will not be published. Required fields are marked *