31 Replies Latest reply on Nov 30, 2016 10:48 AM by rob day

    Fixing Rule in Indesign

    KuttiNajar

      Hi All,

       

      Is there any way to fix the rule adjustment in indesign paragraph stye rule option if the text increase or decrease automatically.

      Right now i am working manually given the tab character and apply one character style for this. See below screenshot for reference.

       

      Screen Shot 2016-11-28 at 2.20.11 PM.png

       

      Thanks for looking this.

      Kasi

        • 1. Re: Fixing Rule in Indesign
          vinny38 Level 4

          Hi there

          Not sure I understood well what you want to achieve, but let's have a try.

           

          Ok now, on your screenshot, I see you have used two different methods for "Learning objectives" and "Key Ideas".

          In the first case, looks like you have used paragraph rules, with a manually fixed offset. Not a good method, because the offset is fixed and won't adjust of you modify the length of your text.

          For "Keys ideas", looks like you used tab leaders, which is a far better option. Now, if you modify text, stroke will adjust. Isn't it what you want? What's not working for you here?

          Tip: you may use GREP style in order not to apply manually your character style onto your tab. Use ~y Grep query to catch right indent tab.

          • 2. Re: Fixing Rule in Indesign
            KuttiNajar Level 1

            Thanks for the reply vinny, my need is when i apply the paragraph style the rule length should be adjusted based on the contents without any manual works (no other character style).

            • 3. Re: Fixing Rule in Indesign
              vinny38 Level 4

              Well, in that case, you can use tab leaders, just like you did for "keys idea":

              1- create a character style with wanted settings (i.e. color) > lets call it "TAB"

              2- create a paragraph style for your header and apply settings:

              • tabs: set a new tab (any value) and fill tab leader option with an underscore
              • GREP style : apply "TAB" character style to ~y (right indent tab)

              3- that's it: Type your text, insert right indent tab at the end of it and apply paragraph style.

              It should do the job

              regards

              • 4. Re: Fixing Rule in Indesign
                KuttiNajar Level 1

                Yes, i know that way and also we can do it using the nested style option if we insert the tab character manually. But my concern is there any way without inserting the tab character?

                • 5. Re: Fixing Rule in Indesign
                  vinny38 Level 4

                  Ok I understand better your request.

                   

                  You could use a GREP find/replace to add the right indent tab after the last character:

                  search .$

                  replace $0~y

                  (this is very basic, it could be improved)

                   

                  Or, you could use a trick, not very orthodox but would work (assuming you have a one-color background, i.e. white):

                  combine both paragraph rules and character underlining.

                  1- create your paragraph style with a rule under, column length

                  2- set up a new nested style on your phrase that would apply a character style. This char. style will be set up with underline same color than your background. It will be placed over the paragraph rule.

                  tricky...

                   

                  hope that helps

                  • 6. Re: Fixing Rule in Indesign
                    KuttiNajar Level 1

                    yes, we can find and replace the tags using the paragraph style also. i am asking any tricky option to use for this while applying style.

                     

                    I already tried your tricky method, but it's not working here, you can look the screen shot closely, we have the background image on this page. If we use the white or paper colour, that image also hiding.

                    • 7. Re: Fixing Rule in Indesign
                      Sandee Cohen Adobe Community Professional

                      As long as your text stays at a single line, this can be done easily and defined as part of a Paragraph Style that adjusts without any manual intervention.

                       

                      Start with a yellow Rule Above at the point size and offset you want. Set it for Column Width. I have made mine cyan so you can see it better.

                       

                      Rule 1.png

                       

                      Now create a Rule Below at the same point size. Set it to Paper color. (I've made mine magenta so you can see it better.) Set the offset so it moves down to knockout the yellow rule. Then set this Rule  Below to the Text width but set the Right Indent to a negative value that is the same amount as that space after the text.

                       

                      Rule 2.png

                       

                      EDIT: Ooops! Just saw you have that background image. Let me see what I can do. But I doubt I can do it.

                      • 8. Re: Fixing Rule in Indesign
                        KuttiNajar Level 1

                        yes sandee, we tried this method also, we have images on background, on this case image also hiding using this option, look at the screenshot.

                        • 9. Re: Fixing Rule in Indesign
                          Sandee Cohen Adobe Community Professional

                          Nope, I can't do it without paper color. If automation is important, you might consider deleting that bkg image.

                          • 10. Re: Fixing Rule in Indesign
                            vinny38 Level 4

                            Sorry,

                            I have no solution for that.

                            Consider scripting if you want to automate.

                            But I guess that would take much more time than inserting tabs manually or by find/replace GREP query.

                            regards

                            • 11. Re: Fixing Rule in Indesign
                              rob day Adobe Community Professional & MVP

                              Why not use an underline with a nested style rather than paragraph rules? Like this where I have the text followed by a tab and a right indent tab (Shift-tab):

                               

                              Screen Shot 2016-11-28 at 12.03.17 PM.png

                              • 12. Re: Fixing Rule in Indesign
                                rob day Adobe Community Professional & MVP

                                Also, you would need to span the columns to match your screen capture:

                                 

                                Screen Shot 2016-11-28 at 12.20.50 PM.png

                                • 13. Re: Fixing Rule in Indesign
                                  Obi-wan Kenobi Adobe Community Professional

                                  Just for comment!

                                   

                                  Capture d’écran 2016-11-28 à 21.19.14.png

                                   

                                  Capture d’écran 2016-11-28 à 23.07.21.png

                                   

                                  Capture d’écran 2016-11-28 à 23.07.38.png

                                   

                                  … With a para rule!

                                   

                                  (^/)

                                  • 14. Re: Fixing Rule in Indesign
                                    Sandee Cohen Adobe Community Professional

                                    It doesn't help anyone if you only show but don't explain.

                                    • 15. Re: Fixing Rule in Indesign
                                      vinny38 Level 4

                                      Text frame is set with transparency "Multiply".

                                      So, the white rule below text kinda "disappear". But of course, it affects all non-black elements with transparency effect.

                                      I thought about suggesting this solution, but I found it way too "brutal" ^^

                                      But jedis don't care about being brutal sometimes...

                                       

                                      Still thinking that inserting right indent tab is the easiest way, even if it doesn't answer the request.

                                      • 16. Re: Fixing Rule in Indesign
                                        Obi-wan Kenobi Adobe Community Professional

                                        Hi vinny38,

                                         

                                        Thanks for the explanation!

                                        But the para rule below on the column is not white but in color and I use a nested line style on all the para associated to a white underlining that covers the para rule on the last line! …

                                         

                                        I've another one!

                                        No underlining, no transparency, no tab, no space at the end of the para and really only one para rule below!

                                        But the op will need … one click… So, not automatic!

                                        See you soon, return to work! 

                                         

                                        (^/)

                                        • 17. Re: Fixing Rule in Indesign
                                          Sandee Cohen Adobe Community Professional

                                          It's not just brutal, but setting text like that should be made against the law!

                                          • 18. Re: Fixing Rule in Indesign
                                            Scott Falkner Level 5

                                            Add a tab to the end of the paragraph with a tab stop at the right edge of the text frame. Use a custom underline on the tab. Make this a Character Style (its only attribute is the Underline) and apply it using  Nested Styles.

                                             

                                            Edit: Rob Day beat me to it.

                                            • 19. Re: Fixing Rule in Indesign
                                              rob day Adobe Community Professional & MVP

                                              Edit: Rob Day beat me to it.

                                              I hadn't read #4, the OP wants the rule to be automatic so there's no need to key in extra tabs

                                              • 20. Re: Fixing Rule in Indesign
                                                Obi-wan Kenobi Adobe Community Professional

                                                If you consider that 2 simple spaces forgotten at the para end is … acceptable and make "part of the para", so, yes!, it's totally doable!

                                                 

                                                Capture d’écran 2016-11-29 à 23.34.02.png

                                                Capture d’écran 2016-11-29 à 23.34.32.png

                                                 

                                                … With no tab, no transparency, no para rule, no nested line! … In fact, nearly nothing, as two spaces! 

                                                 

                                                (^/)

                                                • 21. Re: Fixing Rule in Indesign
                                                  rob day Adobe Community Professional & MVP

                                                  In fact, nearly nothing!

                                                  It won't help the OP much if you don't explain how you are automating the rule.

                                                  • 22. Re: Fixing Rule in Indesign
                                                    Obi-wan Kenobi Adobe Community Professional

                                                    … and funny: using the same para style, just change the color of the stroke … adding simple spaces! 

                                                     

                                                    Finally, Spaces are very useful!

                                                     

                                                    (^/)

                                                    • 23. Re: Fixing Rule in Indesign
                                                      Obi-wan Kenobi Adobe Community Professional

                                                      Hi Rob,

                                                       

                                                      Just Grep!

                                                       

                                                      Capture d’écran 2016-11-30 à 00.06.28.png

                                                       

                                                      Capture d’écran 2016-11-30 à 00.07.34.png

                                                      Capture d’écran 2016-11-30 à 00.07.44.png

                                                      Capture d’écran 2016-11-30 à 00.08.31.png

                                                       

                                                      That's all! 

                                                       

                                                      (^/)

                                                      • 24. Re: Fixing Rule in Indesign
                                                        rob day Adobe Community Professional & MVP

                                                        Tabs ¯\_(ツ)_/¯ Spaces

                                                        • 25. Re: Fixing Rule in Indesign
                                                          rob day Adobe Community Professional & MVP

                                                          It would be possible to apply the style via a script and enforce two spaces (or tabs) at the end, so you would have to touch the keyboard.

                                                          • 26. Re: Fixing Rule in Indesign
                                                            Laubender Adobe Community Professional & MVP

                                                            Hi Obi-wan,

                                                            cool trick.

                                                             

                                                            Using a tracking value of 10000 and horizontal scaling with 1000% together with a colored underline for a space at the end of a paragraph.

                                                             

                                                            However, I would write the GREP a bit different to make it more clear that there is a space in the expression:

                                                             

                                                            \K\x{0020}{1}$
                                                            

                                                             

                                                            Fully automating this?

                                                            Would require scripting an event listening mechanism.

                                                            But I guess, that could slow down editing the text tremendously…

                                                             

                                                            Regards,
                                                            Uwe

                                                            • 27. Re: Fixing Rule in Indesign
                                                              Obi-wan Kenobi Adobe Community Professional

                                                              Hi Uwe,

                                                               

                                                              So, here:  (\x{0020})\K\1{1}$

                                                               

                                                              (^/) 

                                                              • 28. Re: Fixing Rule in Indesign
                                                                rob day Adobe Community Professional & MVP

                                                                Would require scripting an event listening mechanism.

                                                                I was assuming a script could be used to apply the style, so a simple script with a key command could enforce the ending white spaces (either a right indent tab with an underline or Obi's spaces) and then apply the style. In that case you wouldn't need a listener or even a Grep style.

                                                                • 29. Re: Fixing Rule in Indesign
                                                                  Obi-wan Kenobi Adobe Community Professional

                                                                  Hi Rob,

                                                                   

                                                                  I don't think in that way!

                                                                   

                                                                  No tab, no space! Just a para rule below.

                                                                   

                                                                  I took a look to this question. I think it could be very simple to script:

                                                                  After defining a para style with a "column" para rule below and "left indent" by default equal to zero and applying everywhere [Op's work],

                                                                  the script just search all the paras with this para style, save the x-offset of the last char of each para [of course, on the last line!] and update the "left indent" of the para rule below! ( some math to do!  ]

                                                                   

                                                                  It's not an automatic way, but I find it cool! 

                                                                   

                                                                  (^/)

                                                                  • 30. Re: Fixing Rule in Indesign
                                                                    rob day Adobe Community Professional & MVP

                                                                    and update the "left indent" of the para rule below! ( some math to do!   ]

                                                                    But then I think any future edit would alter the column width and you would have to rerun the script right? The right intent tab is designed for this kind of thing, so I'm not seeing a compelling reason to avoid it when a script could easily insert the needed tab at the end as the style is applied.

                                                                    • 31. Re: Fixing Rule in Indesign
                                                                      rob day Adobe Community Professional & MVP

                                                                      Here's an Applescript example, edit pstyle and whitespace variables as needed. Note that AS lets you copy and paste right intent tabs and other white spaces from ID but you can't see them in the code.

                                                                       

                                                                       

                                                                       

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

                                                                      --name of style to apply

                                                                      set pstyle to "Your Style"

                                                                      --the desired trailing whitespace.

                                                                      set whitespace to "     "

                                                                       

                                                                      tell application "Adobe InDesign CC 2014"

                                                                          tell active document

                                                                            

                                                                              --in case more than 1 paragraph is selected

                                                                              set p to object reference of every paragraph of selection

                                                                              set c1 to index of character 1 of item 1 of p

                                                                              set c2 to index of last character of last item of p

                                                                            

                                                                              --get the text of all the paragraphs and search. need repeat below to add space in case there is nothing to find

                                                                              set tf to object reference of text from character c1 of parent of item 1 of p to character (c2 + 1) of parent of item 1 of p

                                                                              my GrepSearch(tf, "[\\s]+$", "")

                                                                            

                                                                              --reverse repeat because the edits change the text flow

                                                                              set ns to object reference of every paragraph of selection

                                                                              repeat with a from (count of ns) to 1 by -1

                                                                                  set c to item a of ns

                                                                                  set contents of insertion point -2 of c to whitespace

                                                                                  set applied paragraph style of c to pstyle

                                                                              end repeat

                                                                          end tell

                                                                      end tell

                                                                       

                                                                      --strip the white space from end of paragraphs

                                                                      on GrepSearch(t, f, c)

                                                                          tell application "Adobe InDesign CC 2014"

                                                                              set find grep preferences to nothing

                                                                              set change grep preferences to nothing

                                                                              set find what of find grep preferences to f

                                                                              set change to of change grep preferences to c

                                                                              tell t

                                                                                  change grep

                                                                              end tell

                                                                          end tell

                                                                      end GrepSearch