25 Replies Latest reply on Sep 2, 2014 3:09 AM by Peter Spier

    Formatting of Heading Numbers

    Fred12345999 Level 1

      Is there any way to keep InDesign's heading numbering from adopting the style of the first character in the line?

       

      I have some headings that start with italics but I want the numbers to be consistently in roman.

        • 1. Re: Formatting of Heading Numbers
          Migintosh Level 4

          What do you mean by "heading numbering?" Are you talking about a numbered list, a bit of text that is acting like a headline, something in a TOC or index, or something else?

          • 2. Re: Formatting of Heading Numbers
            Fred12345999 Level 1

            I am talking about paragraph style numbering.

             

            If the first word is in italics, the number comes out in italics.

             

            It also comes out in italics in the TOC.

            • 3. Re: Formatting of Heading Numbers
              Peter Spier Most Valuable Participant (Moderator)

              Use a Character style (which you can assign in the numbering options) to format the number. I would keep it as minimal as possible, probably setting the type style to Roman or Regular (depending on the font) as the only attribute.

              • 4. Re: Formatting of Heading Numbers
                Willi Adelberger Most Valuable Participant

                You have to work completely with styles.

                Use a paragraph style for the numbered paragraph.

                Use a character style when you set up the numbers in the paragraph style.

                Use another character style when you want to emphasize any text in the paragraph.

                 

                Never make any text without paragraph style.

                Never make any changes from the default font settings in a paragraph without a character style.

                This is essential.

                • 5. Re: Formatting of Heading Numbers
                  Fred12345999 Level 1

                  I am using styles.

                   

                  The numbered paragraph heading is a style.

                  The italic text is a character style.

                   

                  If the text in the heading starts with an italic character style, the number becomes italic as well. Thus, the headings do not look the same, even with the same style.

                  • 6. Re: Formatting of Heading Numbers
                    Willi Adelberger Most Valuable Participant

                    Did you use a character style in your paragraph style definition for the numbers too?

                    • 7. Re: Formatting of Heading Numbers
                      Fred12345999 Level 1

                      Following the advice above, I added character style for the number , works with the number in the text.

                       

                      Oddly, the number goes back to being italic in the Table of Contents (where I don't see a style setting to control that).

                      • 8. Re: Formatting of Heading Numbers
                        Willi Adelberger Most Valuable Participant

                        In the TOC styles you have to create different paragragraph styles. I would format the number there with a nested character style in your paragraph style. Or with a GREP style.

                        • 9. Re: Formatting of Heading Numbers
                          Fred12345999 Level 1

                          I have a separate style for the TOC.

                           

                          Rather than applying the number character style from the heading paragraph style, it is applying the character style of text at the start of the paragraph to the number in the TOC.

                          • 10. Re: Formatting of Heading Numbers
                            Peter Spier Most Valuable Participant (Moderator)

                            I'm not sure you are going to be able to fix that using a second style if you are including the numbers for numbered paragraphs. Are you able to select that number in the TOC?

                            • 11. Re: Formatting of Heading Numbers
                              Fred12345999 Level 1

                              Yes, I can manually remove the style application.  The number in the TOC is plain text that gets the same character style that I use for the starting text within the heading paragraph.

                               

                              In my heading I have

                               

                              4. Mendoza and Bricklayers do not support DHS’s standing argument.


                              where


                              [4. ][[Mendoza] and [Bricklayers] do not support DHS’s standing argument. }

                              Automatic numbered with my do nothing character style-not editable

                                      My text

                                         My italic character style

                                                                   My italic character style again


                              In the TOC this come out as

                               

                              4. Mendoza and Bricklayers do not support DHS’s standing argument. 

                               


                              [ [4. Mendoza] and [Bricklayers] do not support DHS’s standing argument. ]

                               

                              TOC line in my TOC Paragraph style

                                  My Italic Character Style

                                                                My Italic Character Style




                               

                              • 12. Re: Formatting of Heading Numbers
                                Willi Adelberger Most Valuable Participant

                                Die you read my answer?

                                When you create a TOC, all automatically applied character styles from the entry style are removed. So, you have to apply them either with GREP (more flexibility) or with nested styles in the TOC paragragraph styles.

                                • 13. Re: Formatting of Heading Numbers
                                  Fred12345999 Level 1

                                  Yes, but I am getting the opposite.

                                   

                                   

                                  I am getting character styles applied automatically that I don't want to be there.

                                   

                                  I have reo remove the styles applied to the number; not add it.

                                  • 14. Re: Formatting of Heading Numbers
                                    Willi Adelberger Most Valuable Participant

                                    Ok, I see your problem:

                                    tocs.png

                                    This is odd. I see only the solution to apply the number's character style at the end again. Otherwise it will inherit the character style from the first word after the numbers this style does override any nested or GREP style included in the toc style. You are right, this is not good. I think it could be considered as bug situation.


                                    • 15. Re: Formatting of Heading Numbers
                                      Peter Spier Most Valuable Participant (Moderator)

                                      I think this is expected behavior.

                                       

                                      The good news is that it can be handled with a nested character style or GREP Style defined in the paragraph style applied to the listing. On the original list, the number is not selectable, so you can only format it with the numbering options, but the number is selectable in the TOC, so subject to ordinary formatting options.

                                       

                                      From the OP's example, one could apply the style through 1 Tab (or whatever whitespace was used in the list), or use the following GREP expression in a GREP style: ^\d+\. or ^\d+\.\s if you want to pick up the whitespace too. This GREP expression is only good for the standard number followed by a dot, so if you use a more complex system it would need to be re-written, which is one reason to prefer the regular nested style.

                                      • 16. Re: Formatting of Heading Numbers
                                        Willi Adelberger Most Valuable Participant

                                        Peter, GREP or nested Styles will neither help here. Because there is no method to apply a character style automatically to a leading number which was drawn from the headline when the first word has any character style applied in the headline.

                                        • 17. Re: Formatting of Heading Numbers
                                          Peter Spier Most Valuable Participant (Moderator)

                                          Did you try it? Here's proof that it does work:

                                          Styled numbers in TOC.png

                                          • 18. Re: Formatting of Heading Numbers
                                            Willi Adelberger Most Valuable Participant

                                            But it does NOT work, if the headline’s first word has a character style applied, the the number inherits the design of the first word which will override any character style which is applied via nested/GREP styles in the paragraph.

                                             

                                            ////

                                            An Yes, I tried it. Did you have look into my screen shot? The numbers in toc have a specific character style without any italic formatting. I have specified the font (Minion Pro Condensed with orange color, not italic) and when I have applied to the first word in the headline an Italic Character Style, without a definition of the color, the numbers became Italic too.

                                            The toc style is applied via GREP or nested style.

                                            • 19. Re: Formatting of Heading Numbers
                                              Peter Spier Most Valuable Participant (Moderator)

                                              Styled numbers in TOC2.png

                                               

                                              In the above screen shot he word One inthe main text has a manually applied Bold character style, the word Two is in a paragraph with a new paragraph style that applies the bold to the first word as a nested style. Other than I didn't change the regular tab to right indent for that style in the TOC, I see exactly what I would expect, manually applied styles are preserved (because they are overrides to the paragraph style definition, and styles applied as part of the paragraph style are lost and would need to be built into the new style used for the listings if you want them.

                                               

                                              I see no evidence at all that formatting of the first word, no matter how applied, is overriding the GREP style for the number.

                                               

                                              I've been doing this in CS6, so I can't say if Adobe screwed it up in CC or CC2014.

                                              • 20. Re: Formatting of Heading Numbers
                                                Willi Adelberger Most Valuable Participant

                                                Peter, can you try it with a multi step level toc? I have tried it now:

                                                1. In the first level I get exactly the same result as you do, but
                                                2. in the second and third level I get the wrong result. The settings are the same as in the first level.
                                                • 21. Re: Formatting of Heading Numbers
                                                  Peter Spier Most Valuable Participant (Moderator)

                                                  Still no problem, though I switched to the nested style from the GREP style so it would pick up both numbers and letters used to number paragraphs. You'd need a GREP style for every case where you change numbering styles.

                                                   

                                                  Are you using a new paragraph style for the TOC listings themselves? That's essential.

                                                  • 23. Re: Formatting of Heading Numbers
                                                    Willi Adelberger Most Valuable Participant

                                                    Of course, I am using a new style. In the beginning I thought as you do, but now I can follow up the problem what Fred described.

                                                    Did you apply to "Two" a character style or comes the font from the default paragraph font in your example.

                                                    What I am talking about is if you would apply a character style to the Word "Two" after the automatic numbering.

                                                    • 24. Re: Formatting of Heading Numbers
                                                      Peter Spier Most Valuable Participant (Moderator)

                                                      OK, now I have a failure, level two listing with a manually applied character style on the first word, and it really seems like a bug:

                                                      Styled numbers in TOC4.png

                                                       

                                                      In the list, Paragraph a uses a nested style, paragraph b a manually applied bold character style (as does paragraph 1). I say bug because ID is clearly applying PART of the correct formatting -- the color -- but is not applying the correct font style (which it does for paragraph 1), and when I select the "b" in the TOC there is no font style listed.

                                                       

                                                      In this next screen shot I've replaced the manually applied style in paragraphs 1 and b with a manually applied local format by changing the font style to Bold (I know you don't approve of not using styles, but it's important to know what is happening):

                                                      Styled numbers in TOC5.png

                                                       

                                                      The style is now working again in the TOC, but we still have a bug because Two A is no longer bold, and local overrides should carry through.

                                                       

                                                      It's worth noting that since all of text in the TOC is selectable it is easy enough to repair the missing font style in the level two heading with applied character style on the first word. Since this is a very specific bug and hits only lower-level headings (which may not be used at all), and can be worked around easily if required, I think applying a style to format the numbers in the TOC listing style is a good solution to the OP's problem.

                                                       

                                                      I'm going to log the bug on this...

                                                      • 25. Re: Formatting of Heading Numbers
                                                        Peter Spier Most Valuable Participant (Moderator)

                                                        I'm now getting different results in the TOC than I did yesterday without the level 2 listings, which makes me think that once this bug is introduced it infects the file.