Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Formatting for variables

Return to Member Forum

  • Author
    Posts
    • #14410185

      Hello.
      My book is set up so that each chapter title is shown on a “continued” line on all pages in that chapter. I use a variable on my master pages for that setup. Sometimes, my chapter titles include italicized words. The italics are added with a character style. Is there a way to have the variable automatically display the italics? I would like to avoid manually changing the “continued” line, but as far as I can tell, there is no option for me to set the variable so that it includes any character styles.
      Thank you.

    • #14410186
      David
      Member

      There might be a script out there somewhere. It would be a good one for seasoned script writers. I found this like via Google search: https://graphicdesign.stackexchange.com/questions/68712/script-for-applying-character-style-on-text-after-inserting-it-from-variable

    • #14410189
      Steve
      Member

      Set up your text variables as running header character styles… then reference them in that manner.

    • #14410209
      David Blatner
      Keymaster

      You can also search for variables of various sorts in the @ menu inside the Find/Change dialog box. So you could search for that variable and then apply a character style to it.

      To do it automatically, you could apply the character style using a GREP Style:

      5 Cool Things You Can Do with GREP Styles

      • #14410213

        Thank you for your suggestions. I’ll search for a script, since I can’t get a GREP style (or character style) to carry over into my variable.

    • #14410217
      David
      Member

      Maybe if you were to use some sort of Special Character (that doesn’t add space, like a end nested style or non-joiner) between the first character you want to show up as italic in the variable of the title and last and GREP search with those parameters in mind using sets (you know, like Found 1 Found 2 etc.)? I dunno… best I can do with GREP really is find/change characters between parentheses, so I might not know what I’m talking about. You’d have to look up the actual caret code for those Special characters in order to enter them into the GREP search, but that shouldn’t be hard.

    • #14410222
      David Blatner
      Keymaster

      Sorry that I gave you wrong information. I did not read your original post carefully enough.

      Yes, the problem is that variables are considered a single character in InDesign! The only way to format some words inside a variable is to convert it to regular text. There is a script to do that:

      Script to convert all text variables

Viewing 5 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads