8 Replies Latest reply: Aug 20, 2008 4:35 AM by (Dave_Saunders) RSS

    Pseudo Vertical Justification

    Community Member
      A frequent request on this forum is the ability to have vertically centered text in text frames that have an irregular or non-rectangular shape. So that you can do this kind of thing:



      OK, so this particular example could be achieved by increasing the insets so that the text area becomes rectangular. But that's not a choice for this version:



      So, I created a script to do this job. I call it "PseudoVJ" because it gets the job done by adjusting the First Baseline Offset of the frame to get the text vertically centered.

      You can find the script here:

      http://pdsassoc.com/BetaScripts/PseudoVJ-centered.jsx.zip

      It won't work if your text frame has more than one column -- it just exits (or ignores the text frame if you're processing multiple frames at once).

      Enjoy!

      Dave
        • 1. Re: Pseudo Vertical Justification
          P Spier CommunityMVP
          Thanks Dave, and Happy Holidays to you, too.

          Peter
          • 2. Re: Pseudo Vertical Justification
            Harbs. CommunityMVP
            Thanks from me too!

            Nice job.

            Harbs
            • 3. Re: Pseudo Vertical Justification
              Community Member
              As a Boxing Day treat, I just added:

              http://pdsassoc.com/BetaScripts/PseudoVJ-bottom.jsx.zip

              This script is not as elegant as the centered script because bottom-alignment is a bear when the frame is not rectangular or not even a regular shape. I can see why the engineers restricted these features to rectangular frames. This script actually takes enough time to run that you have time to notice, so if the composer were trying to do this on the fly, your InDesign would slow to a crawl -- of course, that could just be a reflection of my algorithm not being all it might be.

              Like the centering script, this one uses First Baseline Offset to position the text. It also declines to operate on multi-column frames.

              Dave
              • 4. Re: Pseudo Vertical Justification
                Community Member
                Thank you so much. I don't know why Adobe didn't do this in the first place. I have been frustrated by this for some time now.
                • 5. Re: Pseudo Vertical Justification
                  Community Member
                  For those who don't know what to do with a script when they get one, follow these instructions for CS3.

                  1. Download and unzip the script.

                  2. With InDesign CS3 running, open the Scripts panel (you'll find it under Window/Automation).

                  3. Assuming you're still in the default state, you'll see two folders named Application and User. These are folders that hold your scripts. The Application folder holds scripts that any InDesign user on your computer can see and run. The User folder holds scripts that only you can see and run. Note: by default, the Application folder holds a number of scripts that come packaged with InDesign. You'll see that they're in a folder named Samples.

                  4. Click on the User folder and then access the drop-down menu in the panel and choose Reveal in Finder (Mac) or Reveal in Explorer (Windows). You can also get at that Reveal command by right-clicking the folder.

                  5. You'll find yourself looking at a window named Scripts that holds a folder named Scripts Panel. Open the Scripts Panel and then move the script to it (or, you can make a folder inside the Scripts Panel folder and put the script inside that).

                  6. Return to InDesign and you'll see the script listed in the Scripts panel -- you might have to open a folder or two to find it.

                  7. To use the script just setup the initial conditions (if any) and then double-click the script's name.

                  8. You can, if you wish, add keyboard shortcuts to scripts by using Edit/Keyboard Shortcuts and then choosing the Product Area named Scripts.
                  • 6. Re: Pseudo Vertical Justification
                    Community Member
                    thank a lot dave
                    Paolo
                    • 7. Re: Pseudo Vertical Justification
                      Community Member
                      I've imported your script it works, but I still cannot create a style able to work with circular shape, do you [or somebody else] know some trick
                      • 8. Re: Pseudo Vertical Justification
                        Community Member
                        A style for what? There is no way of doing this automatically. You have to use a script. That's why I wrote it. You can reuse it if you change the parameters of a frame or its text -- indeed, if you want the text to stay vertically centered, you must reuse it.

                        Dave