11 Replies Latest reply on Jul 26, 2016 4:12 AM by JanCE

    Forced line breaks on variables don't turn to spaces

    Regis Xupisco

      Here's my issue:

       

      When I have a forced line break on a phrase, which paragraph style is applied on a variable inside a master page, that line break turns into a space on the first page, but simply disappear on the next ones.

      That's a problem I can't find how to solve.

      There's an image below, to show it better.

      May someone have an answer for that? :/

      Thanks!

       

      indesign_issue.jpg

        • 1. Re: Forced line breaks on variables don't turn to spaces
          Laubender Adobe Community Professional & MVP

          Interesting. Could be a bug. And after a bit of testing: Yes, it looks like…

          But I see something differently. Or better put, my conclusions about this bug are a bit different.

           

          I think what really happens here is, that:

          1. On the first page the text variable is used

          2. One single additional blank is added

           

          If you inspect your actual text on the page, you may notice, that between the comma and the line end character there is no blank.

          Also no blank between the line end character and the next line perhaps.

          ( Just tested that with inDesign CC 2014.2, so this bug is not new. )

           

          What could be a workaround?


          1. Adding one unused spread with one ore two pages pages before all other pages where there are text frames using the text variable and set to none-printing? Perhaps.

           

          2. Using two text variables for the two lines of text separated by a paragraph sign and formatted with different paragraph styles?
          Perhaps the better idea…

           

          Uwe

          • 2. Re: Forced line breaks on variables don't turn to spaces
            Obi-wan Kenobi Adobe Community Professional

             

            or

             

            3. Simulating a soft-return without using one! 

            • 3. Re: Forced line breaks on variables don't turn to spaces
              Laubender Adobe Community Professional & MVP

              Workaround:

              4. Do not add a blank before or after the first source for the first instance of the text variable.

              Just add one blank for all following sources for that text var.

               

              Comment on workaround 3:

              Using an anchored object with text wrap perhaps?

               

              Uwe

              • 4. Re: Forced line breaks on variables don't turn to spaces
                Obi-wan Kenobi Adobe Community Professional

                Uwe,

                 

                Just a grep style! .~j with a +10,000 approach char style (my preference! … or no-break sometimes!)

                Instead of a soft-return, just inserting a non-joiner! 

                • 5. Re: Forced line breaks on variables don't turn to spaces
                  Willi Adelberger Most Valuable Participant

                  I recommend to avoid forced line breaks in most cases. If I want that several words will never break apart if a line break is needed, I insert a non-breaking space between these words. This is very important in headlines. If I have a multiline headline, an automatically created TOC would use these forcing spaces, but would only insert a new line with my method, if not enough space would be available.

                  • 6. Re: Forced line breaks on variables don't turn to spaces
                    Laubender Adobe Community Professional & MVP

                    Hi Willi and Obi-wan,

                    that's all interesting and very helpful.

                     

                    But if we look at the screenshot in the initial post and inspecting the situation there, what would you both recommend in this special case in order to make it most flexible regarding the width of line one and the width of line two in contrast to the width of the text frame?

                     

                    A general rule for this kind of paragraph design and formatting would be:

                    Break line after comma.

                     

                    I still think, in this special case two paragraphs as text source for two text variables are the best solution here.
                    Maybe you need four text variables to pick up the right contents, if the text sources occur multiple times on the spread.

                     

                    Uwe

                    • 7. Re: Forced line breaks on variables don't turn to spaces
                      Peter Spier Most Valuable Participant (Moderator)

                      Here's another alternative: Running Header (Character Style) and nested styles in the paragraph style.

                       

                      The character styles can be nothing more than style names (so you have something to select in the variable dialog) with no text attributes so they don't affect the formatting. Apply one though the forced line break and the other through anything that will run to the end of the heading in the text, such as through an end nested style character. In the page header insert two running header variables in succession, one catching the first character style and one catching the second.

                      • 8. Re: Forced line breaks on variables don't turn to spaces
                        Obi-wan Kenobi Adobe Community Professional

                        Peter,

                         

                        If I understand what you mean, it's not really doable!

                        imagine a first header with 2 lines and a second with only one line!!

                         

                        All the tricks we give are turn-around!

                         

                        The real best way for me has been given a long time ago by Gabe Harbs! All of us know it: it's called "Power Headers"!! 

                        • 10. Re: Forced line breaks on variables don't turn to spaces
                          Regis Xupisco Level 1

                          I see some good advices for workarounds, and I thank you, people, for your attention!!

                          That's a really annoying bug.

                           

                          And here's a plus:

                          If I insert a blank before the line break, then we get 2 blank spaces on the first page of the variable, and just 1 on the next ones (as it had to be, after all). We used that solution here, but it's horrible to have that double-space on some pages.

                           

                          The idea of creating 2 variables and using one for each line is a good idea, but unfortunately it's not the best one to be applied on this job, because we have more than 300 entries like that throughout the book!

                           

                          We'll keep trying some tips. Any good news, I'll announce here for you.

                          Thanks again, people!

                          • 11. Re: Forced line breaks on variables don't turn to spaces
                            JanCE Level 1

                            for "Break line after comma." I would use GREP style with character style "NoBreak" and grep expression "(?<!,)\s"

                            That would bind all the words together except the ones with coma+space between them... than no forced linebreaks are necessary in headings and lines will automatically break after coma.