22 Replies Latest reply on Jul 25, 2014 10:17 AM by Helldoor

    Automated Textbox in InDesign CS5 ?

    Helldoor

      Hi there,

       

      I'm currently working on a portfolio in InDesign CS5. I have already made a small version of this portfolio in Illustrator CS5. As for I am a visual artist and most of my work are architectural visualisations, I have a very simple and minimalistic way of captioning my images - the image takes the whole page and a small caption bar on the side gives some title and customer info. Using Illustartor, I could simply lay a solid rectangle effect as a text backgorund, which would adjust to the text, the way I want (e.g. add 10mm on the left, +5mm on the right, ...). It doesn't matter how long my text will be - the 10mm to the left will always be there. It looks like this:

      Indesign.jpg

      As for this rectangular backgorund is a real solid shape, it allows further effects (such as shadows) and opacity adjustment.  However, I don't succeed in making the same in InDesign - ist impossible? And if not - how can I achieve that?

       

      Thanks in advance,
      Helldoor

        • 1. Re: Automated Textbox in InDesign CS5 ?
          Eugene Tyson Adobe Community Professional & MVP

          I'm not really sure what you want to accomplish.


          Can you it explain it a bit more?

          • 2. Re: Automated Textbox in InDesign CS5 ?
            Helldoor Level 1

            Well...

             

            I'm making a portfolio in InDesign. It conains A4 pages in landscape format. Every single page is filled with an image and on the one side, there comes a small caption with some information about the certain image. Like this:
            Page.jpg

            There are going to be various images and therefore - the caption text will be different by each image. In Illustrator I was able to adjust this caption text with its black rectangular background in the way, that the text background would automatically adjust itself to the text. In other words - the black rectangular box is set up to allways add up 9 mm on the left and right side of the text and 2 mm on the top and bottom of it. That way, I can freely type whatever I want - and the rectangular text background always 'follows' along. In the case of the image I posted, it says 'caption' and the black background around the text is set up to look like that. When I change the text in some other caption title, it adds the same amount of milimeters in fornt of the text automatically:PageOther.jpg

             

            And now I'm trying to achieve the same thing, but this time in InDesign. I need an text background box, which adds a certain amount of milimeters to the sides of my text captions automatically.

             

            I hope, this explanation was a bit better and clearer =]

            • 3. Re: Automated Textbox in InDesign CS5 ?
              Salah Fadlabi Level 5

              Do it with paragraph rules +drop shadow effect

              Para rules.jpg

              • 4. Re: Automated Textbox in InDesign CS5 ?
                Helldoor Level 1

                Hi Salah,

                 

                thanks for the answer. That shines to be the only way around, doesn't it...
                Applying some shadows is not a problem, as I see. How about the rule transparency - is this possible?

                 

                Thanks again!

                • 5. Re: Automated Textbox in InDesign CS5 ?
                  Salah Fadlabi Level 5

                  How about the rule transparency

                  If i understand correctly, for paragraph rules behind the text you can fake that effect with to apply tint percentage to the color on paragraph rules tab. if you use effect panel the effect will apply to both text and rules.

                  • 6. Re: Automated Textbox in InDesign CS5 ?
                    Helldoor Level 1

                    In Illustrator I was able to make the black, rectangular background a bit transparent (80% opacity), but the white text remained fully untransparent for better readability.
                    Faking the transparency effect is a good idea, but in my case it won't work, as I am using the opacity feature, in order for my black text backgounds not to appear so 'heavy' - that's why it's important for me, that they're really transparent, so that one can slightly see the picture underneath. I guess I should be using the transparency for both text and background in this case. Or I will simply redraw all the captions in the end, using an 80% opacity, black rectangle with shadow and a 100% opacity white text above...

                    • 7. Re: Automated Textbox in InDesign CS5 ?
                      Obi-wan Kenobi Adobe Community Professional

                      Hi,

                       

                      Can you show a real sample with a zoom on the black box and the effects you want. Not clear for me! 

                      • 8. Re: Automated Textbox in InDesign CS5 ?
                        Obi-wan Kenobi Adobe Community Professional

                        To myself:

                         

                        Using an auto-sized text block with the effects you want, as:

                        Capture d’écran 2014-07-24 à 16.16.24.png

                        Capture d’écran 2014-07-24 à 16.16.36.png

                        Capture d’écran 2014-07-24 à 16.16.47.png

                        Capture d’écran 2014-07-24 à 16.17.06.png

                        • 10. Re: Automated Textbox in InDesign CS5 ?
                          jmlevy Adobe Community Professional

                          He (she) is on CS5 and this feature did not exist before CS6. I had the same idea as you.

                          • 11. Re: Automated Textbox in InDesign CS5 ?
                            Obi-wan Kenobi Adobe Community Professional

                            Salut JM,

                             

                            Alors pas plus de problème avec l'approche suivante : on ancre le bloc légende (suffisamment grand (hauteur/largeur) dans un bloc texte, avec fer à droite/bord droit de l'image. On saisit la légende et on reproduit ce que fait l'auto-size, soit "Ajuster le bloc au contenu" (ajustement vertical) et "AjustementMagique.jsx" de Marc Autret [Salut Marc!] (ajustement horizontal).

                            Avec Quickeys, on lance les 2 avec un seul raccourci-clavier.

                            Faire clic ou regarder l'écran, ce n'est quand même pas trop fatigant !! COOL! 

                             

                            [Testé avec ID CS4]

                             

                            Aha! Last comments in French!

                            • 12. Re: Automated Textbox in InDesign CS5 ?
                              Helldoor Level 1

                              Obi-wan Kenobi wrote:

                               

                              Hi JM,

                               

                              Then no more problem with the following approach: one anchor block legend (large enough (height/width) in a text block, with putter right/edge of the image.) Enter the caption and it reproduces what auto-size, or "Adjust the block to content" (vertical adjustment) and "AjustementMagique.jsx" by Marc Autret [Hi Marc!] (horizontal adjustment).

                              With Quickeys, it launches the 2 with a single keyboard shortcut.

                              Click or watch the screen, it is still not too tiring! COOL!

                               

                              [Tested with ID CS4]

                               

                              Hi Obi-wan,

                               

                              you've got it right. Your 'aaaaaa' examples are exactly what I had in Illu and want in InDesign. I(he) have the CS5 and this option - in the way you've used it - is not available until CS6...
                              And how about the 'AjustementMagique.jsx'? Is this an action script, that can be downloaded and will allow me to have the automatic resize?

                               


                              Greetz
                              Helldoor

                              • 13. Re: Automated Textbox in InDesign CS5 ?
                                Obi-wan Kenobi Adobe Community Professional

                                Hi,

                                 

                                I'm searching on indiscripts.com, Marc Autret's web site, and I don't find his script. He's wrote it in 2006 !!!! An amazing script.

                                I just sent an email to Marc to ask his permission to write his code on this forum.

                                 

                                See you soon! 

                                • 14. Re: Automated Textbox in InDesign CS5 ?
                                  Helldoor Level 1

                                  Thanks, that would be great!

                                  • 15. Re: Automated Textbox in InDesign CS5 ?
                                    Javed_ali Adobe Employee

                                    Hi,

                                     

                                    Have you tried the Auto-Size feature in InDesign.

                                    Simply select the text box which you want to have resized and then go to Object > Text Frame Options > Auto-size and chose a convenient option from there.

                                     

                                    Thanks

                                    Javed

                                    • 16. Re: Automated Textbox in InDesign CS5 ?
                                      Obi-wan Kenobi Adobe Community Professional

                                      Hi Javed,

                                       

                                      Of course!!! It is true that this is an amazing feature! But ...

                                      • 17. Re: Automated Textbox in InDesign CS5 ?
                                        Eugene Tyson Adobe Community Professional & MVP

                                        You missed the part where they are on CS5

                                        • 18. Re: Automated Textbox in InDesign CS5 ?
                                          Javed_ali Adobe Employee

                                          Ahhh..... My Bad!!

                                          • 19. Re: Automated Textbox in InDesign CS5 ?
                                            Obi-wan Kenobi Adobe Community Professional

                                            No worries [see posts#8-10]! 

                                            • 20. Re: Automated Textbox in InDesign CS5 ?
                                              Obi-wan Kenobi Adobe Community Professional

                                              Hi,

                                               

                                              Another very easy and quick tip to do it in 1 click, only with ID [using QuicKeys to play 3 shortcuts in 1; if not quickeys, play: Cmd-V, Shift-Bottom arrow and Cmd-Alt-Shitf-O]

                                               

                                              Create the background module as an anchored block with the effects you want in a basic text block and associate it to an object style (to save the anchoring settings). Copy its anchor. As:

                                               

                                              Capture d’écran 2014-07-25 à 13.27.16.png

                                              Type the caption [Here, I type 3 captions in 3 text blocks, for samples]:

                                              Capture d’écran 2014-07-25 à 13.19.00.png

                                               

                                              Put the cursor at the beginning of the first caption text and play Cmd-0. It's the keyboard shortcut that launches the QuicKeys Shortcut I've created:

                                               

                                              Capture d’écran 2014-07-25 à 13.34.27.png

                                              Capture d’écran 2014-07-25 à 13.19.32.png

                                               

                                              Do it for the two other captions:

                                              Capture d’écran 2014-07-25 à 13.20.25.png

                                               

                                              Done!  Cool! 

                                              • 21. Re: Automated Textbox in InDesign CS5 ?
                                                rob day Adobe Community Professional & MVP

                                                which would adjust to the text, the way I want (e.g. add 10mm on the left, +5mm on the right, ...). It doesn't matter how long my text will be - the 10mm to the left will always be there.

                                                 

                                                If you are using OSX this AppleScript might work. Setup your caption box to be right justified with the right indent you need to clear the margin. Type or paste your caption text then run the script.

                                                 

                                                The first line sets the indent amount, which you can edit as needed.

                                                 

                                                Screen Shot 2014-07-25 at 11.13.02 AM.png

                                                 

                                                Screen Shot 2014-07-25 at 11.13.11 AM.png

                                                 

                                                 

                                                 

                                                 

                                                ============================================

                                                 

                                                --the indent amount in millimeters, adjust as needed

                                                set lindent to 10

                                                 

                                                tell application "Adobe InDesign CS5"

                                                   

                                                    --set units to millimeters

                                                    set ruler origin of view preferences of active document to spine origin

                                                    set horizontal measurement units of view preferences of active document to millimeters

                                                    set vertical measurement units of view preferences of active document to millimeters

                                                   

                                                    --make sure there's a selection and get the text and its frame

                                                    try

                                                        set c to {insertion point, character, word, line, paragraph}

                                                        if class of selection is in c then

                                                            set f to item 1 of parent text frames of selection

                                                            set t to parent of selection

                                                        else if class of selection is text frame then

                                                            set f to item 1 of selection

                                                            set t to parent story of selection

                                                        end if

                                                    on error

                                                        display dialog "Please make a selection"

                                                        return

                                                    end try

                                                   

                                                    --make sure alignment is right with no indents

                                                    set properties of t to {justification:right align, left indent:0, first line indent:0}

                                                   

                                                    --expand the frame and get the first character's position

                                                    set {a, b, c, d} to geometric bounds of f

                                                    set geometric bounds of f to {a, 0, c, d}

                                                    set hoff to (horizontal offset of insertion point 1 of t) - lindent

                                                   

                                                    --check for fit

                                                    if overflows of t is true or (count of lines of t) is greater than 1 then

                                                        display dialog "Text overflows"

                                                    else

                                                        set geometric bounds of f to {a, hoff, c, d}

                                                    end if

                                                end tell

                                                • 22. Re: Automated Textbox in InDesign CS5 ?
                                                  Helldoor Level 1

                                                  @ Obi-wan : this seems cool. I'll soon give it a try and see if it's easier than the way with the rule behind text! Thanks a lot!

                                                   

                                                  @ Rob : wow, a lovely script! sadly, I'm not a Mac user, but I'll look around and see if there's some Windows path to put that into work! Thank you too!

                                                   

                                                  @ all the others - it's very kind of you too!

                                                  Greetz
                                                  Helldoor