17 Replies Latest reply on Mar 6, 2017 12:57 PM by mojo-risin

    How to scale TAB proportionally with font size by paragraph style?

    mojo-risin Level 1

      Hi all!

       

      Having a problem scaling TABs proportionally with font size - in other words, chaging font size by paragraph style doesn't affect tab lenght in sentences, and I would like them to be affected. Can You halp me find a way?

      (scaling a text block by mouse is not an option for me)

       

      Thanks in advance!

        • 1. Re: How to scale TAB proportionally with font size by paragraph style?
          rob day Adobe Community Professional & MVP

          in other words, chaging font size by paragraph style doesn't affect tab lenght in sentences, and I would like them to be affected.

          Tab positions have no relationship to the text's font size, but you can re-position them in the Paragraph Style Options dialog. You can also make the changes to font size and tab positions in an existing styled paragraph and then update the style via Paragraph Style panel's Redefine Style. That would make it easier to set the position relative to the changed font size.

          • 2. Re: How to scale TAB proportionally with font size by paragraph style?
            BarbBinder Adobe Community Professional

            Tabs use an absolute value, measured from the left margin of the frame. If you re-size the type and the original values no longer work, select the text, and choose Type > Tabs. Drag the tab arrow or change the X value. They will not change themselves.

            InDesign CCss_012.pngInDesign CCss_013.png

            • 3. Re: How to scale TAB proportionally with font size by paragraph style?
              mojo-risin Level 1

              Yes I see. I had an impression that they (tabs) resized along when I scaled the whole text frame, but they actually did not. Thanks.

               

              I will have to adjust tab lenght manually in paragraph style after changing font size.

              • 4. Re: How to scale TAB proportionally with font size by paragraph style?
                BarbBinder Adobe Community Professional

                I will have to adjust tab lenght manually in paragraph style after changing font size.

                Yes, but it's pretty quick—just select the text and drag the tab arrow as in my screen shots. And if you are using ¶ styles, you can refine the style after the adjustment, as per Rob's answer.

                • 5. Re: How to scale TAB proportionally with font size by paragraph style?
                  mojo-risin Level 1

                  Yes sure, it is a way, and it's quick, but it's made manually by eyesight, and that's my only problem. I will only achieve a close proportion in relation to text and tab size in not resized text block, not a perfect one, and not automatically.

                   

                  The thing is I have this text block I will resize for various projects - a list, not bulleted like below:

                   

                  LOREM     lorem ipsum lorem ipsum lorem ipsum

                  LOREM     lorem ipsum lorem ipsum lorem ipsum

                  LOREM     lorem ipsum lorem ipsum lorem ipsum

                  LOREM     lorem ipsum lorem ipsum lorem ipsum

                  LOREM     lorem ipsum lorem ipsum lorem ipsum

                  LOREM     lorem ipsum lorem ipsum lorem ipsum

                   

                  Content and font size will vary (depending on the print size) but the style must stay the same. You get the idea.

                  That's why I need a perfect proportion.

                  • 6. Re: How to scale TAB proportionally with font size by paragraph style?
                    Scott Falkner Level 5

                    I find it more intuitive to change tabs in context. Select, or simply insert the cursor into, a paragraph using the desired style and edit the tab positions in the tab ruler, which you can position above the selected text. You can’t do that when editing the style. Once the tabs are adjusted go to the Paragraph Style panel and select Redefine Style from the fly out menu. Any formatting that is different from the style definition will be applied to the definition and all paragraphs using that style will adjust. So make sure only the tabs are different, not the font, size, colour, or anything else.

                    • 7. Re: How to scale TAB proportionally with font size by paragraph style?
                      BarbBinder Adobe Community Professional

                      do you need to use a tab stop? What about using an em or en space? These commands are found in the Type menu, under Insert Whitespace. They are proportional, so they will adjust proportionately when you increase or decrease the size of the type.

                      • 8. Re: How to scale TAB proportionally with font size by paragraph style?
                        mojo-risin Level 1

                        Thanks, I will definitely check if I can use the em space here, but I'm afraid that tabs will have to stay in this case because it's a part of a project connected with a data base. Then again I could find and replace tab with em space, so I guess I will just have to see what is less exhausting

                        • 9. Re: How to scale TAB proportionally with font size by paragraph style?
                          BarbBinder Adobe Community Professional

                          Well, the good news is that you now have a clear understanding of your options, and can make an educated decision that will result in the best workflow for you and this document.

                          • 11. Re: How to scale TAB proportionally with font size by paragraph style?
                            rob day Adobe Community Professional & MVP

                            Yes I see. I had an impression that they (tabs) resized along when I scaled the whole text frame, but they actually did not.

                             

                            If you use the Transform tool to scale a text frame the font size and tabs scale proportionally

                             

                            So with your Preferences>General>When Scaling>Apply to Content selected.

                             

                            You could then scale a frame with one tabbed line, and then redefine the style. Some thing like this where I have a Paragraph Style named Tabbed text:

                             

                            Screen Shot 2017-03-05 at 4.03.40 PM.png

                            I scale the temporary text frame, which causes a style override +

                             

                             

                            tab.png

                             

                            Redefine Style updates the document's styled text and I can delete the temp frame:

                             

                            Screen Shot 2017-03-05 at 4.04.52 PM.png

                            1 person found this helpful
                            • 12. Re: How to scale TAB proportionally with font size by paragraph style?
                              mojo-risin Level 1

                              Great, but one more thing I did not mention (sorry) - I can't have odd numbers in font sizes, and scaling by transform tool gives fractions. I need to scale by font size by round numbers (other database system requirement this project is connected to).

                              • 13. Re: How to scale TAB proportionally with font size by paragraph style?
                                rob day Adobe Community Professional & MVP

                                Couldn't you just select a character after the scale and set the font size to the nearest whole number, then Redefine?

                                 

                                Screen Shot 2017-03-05 at 4.43.46 PM.png

                                 

                                16.92 to 17pt

                                 

                                Screen Shot 2017-03-05 at 4.44.00 PM.png

                                 

                                Screen Shot 2017-03-05 at 4.44.12 PM.png

                                • 14. Re: How to scale TAB proportionally with font size by paragraph style?
                                  mojo-risin Level 1

                                  Yes, I think it's better and more accurate than changing font size and adjusting TABs after that. Thank You.

                                  • 15. Re: How to scale TAB proportionally with font size by paragraph style?
                                    Obi-wan Kenobi Adobe Community Professional

                                    Hi,

                                     

                                    If you really wanna change the Tabs position when you change the font size, as:

                                     

                                    Capture d’écran 2017-03-05 à 23.56.45.png

                                     

                                    At the beginning, the "black" font size = 16 pts.

                                    In "blue": 14 pts.

                                    In "red": 12 pts.

                                    In "green": 10 pts.

                                    In "dark-blue": 8 pts.

                                     

                                    Note: the texts in the anchored text blocks have been reduced by the reduction of their respective block!

                                    That's the result we would like!    [3rd line in each case]

                                     

                                    Capture d’écran 2017-03-05 à 23.58.02.png

                                     

                                    To do it, just select the text and play the code below!

                                    The only thing to do is to indicate the new font size!

                                     

                                    /*
                                        0116_NewTabsPositionAfterTextFontSizeChange_MichelAllio.jsx
                                        Script written by Michel Allio [2017/03/06]
                                        See: https://forums.adobe.com/thread/2285966
                                        Object: Reposition Tabs after having modifoed the text selection font size! …
                                    */
                                    
                                    
                                    var w = new Window ('dialog {alignChildren: "top"}', 'New Tabs position! …');
                                     w.alignChildren = "right";
                                    
                                    
                                        var group1 = w.add ('group');
                                            group1.add ('statictext {text: "New Font Size:"}');
                                    
                                    
                                        var UIy = group1.add ("edittext", undefined, 0);
                                            UIy.characters = 5;
                                            UIy.minimumSize.width = 60;
                                            UIy.maximumSize.width = 60;
                                            UIy.active = true;
                                    
                                        var buttons = w.add ('group {alignment: "center"}');
                                            buttons.add ('button {text: "OK"}');
                                            buttons.add ('button {text: "Cancel"}');
                                    
                                    
                                        var group2 = w.add ('group');
                                      group2.add ('statictext {text: "(by Michel Allio, March 2017)"}');
                                    
                                    
                                    if (w.show () == 1) {
                                        var y = Number (UIy.text);
                                        }
                                    else
                                    exit ();
                                    
                                    
                                    app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.ENTIRE_SCRIPT, "New Tabs position! …");
                                    
                                    
                                    function main()     
                                        {
                                            var mySel = app.selection[0],
                                            myStops = mySel.tabStops,
                                            S = myStops.length,
                                            x = mySel.pointSize;
                                            mySel.pointSize = y;
                                    
                                    
                                            for ( var s = 0 ; s < S; s++ )  myStops[s].position = myStops[s].position/x*y;
                                        }
                                    

                                     

                                    (^/) 

                                    • 16. Re: How to scale TAB proportionally with font size by paragraph style?
                                      Obi-wan Kenobi Adobe Community Professional

                                      This new version is really cool!

                                       

                                      Thanks to Jarek [Jump_Over] and Philippe [Liphou] for their debugging help! 

                                       

                                      See: Re: Code to be evaluated! [016] Tabs Position! …

                                       

                                       

                                      /*
                                          0115_NewTabsPositionAfterTextFontSizeChange_MichelAllio.jsx
                                          Script written by Michel Allio [2017/03/06]
                                          See:
                                          • https://forums.adobe.com/thread/2285966
                                          • https://forums.adobe.com/message/9374649
                                          Debugged wth Jarek [Jump_Over] and Philippe [Liphou]' help [ Thanks to both of you!  ;-) ]
                                          Object: Reposition Tabs after having modifoed the text selection font size! …
                                      */
                                      
                                      
                                      var w = new Window ('dialog {alignChildren: "top"}', 'New Tabs position! …');
                                       w.alignChildren = "right";
                                      
                                      
                                          var group1 = w.add ('group');
                                              group1.add ('statictext {text: "New Font Size:"}');
                                      
                                      
                                          var UIy = group1.add ("edittext", undefined, 0);
                                              UIy.characters = 5;
                                              UIy.minimumSize.width = 60;
                                              UIy.maximumSize.width = 60;
                                              UIy.active = true;
                                      
                                          var buttons = w.add ('group {alignment: "center"}');
                                              buttons.add ('button {text: "OK"}');
                                              buttons.add ('button {text: "Cancel"}');
                                      
                                      
                                          var group2 = w.add ('group');
                                              group2.add ('statictext {text: "(by Michel Allio, March 2017)"}');
                                      
                                      
                                      if (w.show () == 1) {
                                          var y = Number (UIy.text);
                                          }
                                      else
                                      exit ();
                                      
                                      
                                      app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.ENTIRE_SCRIPT, "New Tabs position! …");
                                      
                                      
                                      function main()     
                                          {
                                              var mySel = app.selection[0],
                                              myStops = mySel.tabStops,
                                              S = myStops.length,
                                              x = mySel.pointSize;
                                              mySel.pointSize = y,
                                              myStops_0 = [];  
                                              for ( var s = 0 ; s < S; s++ )  myStops_0.push([myStops[s].alignment, myStops[s].leader, myStops[s].position]);  
                                              myStops.everyItem().remove();  
                                              for ( var s = 0 ; s < S; s++ )  myStops.add({alignment: myStops_0[s][0], leader: myStops_0[s][1], position: myStops_0[s][2]/x*y});
                                          }
                                      

                                       

                                       

                                      As my friend pixxxel schubser often say:  Enjoy! 

                                       

                                      (^/)

                                      1 person found this helpful
                                      • 17. Re: How to scale TAB proportionally with font size by paragraph style?
                                        mojo-risin Level 1

                                        Wow thanks! I will use this. The force is strong with this one