1

I'm trying to generate lots of files by dynamically loading texts inside of a template. The layout I'm going for is 2 threaded textboxes for 2 columns, and the text is made of title, paragraph, title, paragraph. Like this:

Illustrator variable text box - desired formatting The textboxes are bound to an Illustrator variable named Textbox, and my XML looks like this:

<variableSets  xmlns="&ns_vars;">
  <variableSet  varSetName="binding1" locked="none">
    <variables>
      <variable  varName="Textbox" category="&ns_flows;" trait="textcontent"></variable>
    </variables>
    <v:sampleDataSets  xmlns:v="&ns_vars;" xmlns="&ns_custom;">
      <v:sampleDataSet  dataSetName="1">
      <Textbox>
        <p>Variable-length title</p>
        <p>
          Lorem ipsum dolor sit amet etc. etc. etc.
        </p>
        <p> </p>
        <p>Second variable-length title</p>
        <p>
          Ad delectus in, consequuntur eligendi incidunt etc. etc. etc.
        </p>
      </Textbox>
      </v:sampleDataSet>
    </v:sampleDataSets>
  </variableSet>
</variableSets>

When I import this the whole paragraph is the same style, as it's only using <p> tags. No differentiation for title. I thought I could simply write <h1>Title</h1> for this but have found that Illustrator won't parse this.

How can I make this textbox have different formatting?

I would create different separate textboxes for titles, but where to place them? I never know where they will show up vertically, that's determined by the amount of paragraph text in each data set. The title itself could wrap on 2 lines as well.

7
  • 1
    Not easily, but you can do this inDesign quite painlessly.
    – joojaa
    Dec 11, 2016 at 14:56
  • I think it's impossible without a post-population processing script which could match and process special characters that you'd have to also feed into the text. You could write your own tags with a name of the character style to wrap some text in, and use a script which applies this named style and afterwards removes all such tags from the body of the text.
    – Silly-V
    Dec 12, 2016 at 21:43
  • @Silly-V Like joojaa was mentioning above, this sounds like the InDesign workflow, where you can just use GREP Find to identify the titles, apply the styles and remove the tags. An Illustrator script would of course be a good addition to the toolchain here.
    – Leeroy
    Dec 14, 2016 at 11:11
  • Yea, if you're able to use Indesign, it's just a native feature of being able to assign a variable to a stretch of text - you wouldn't need to really do anything else than have titles, etc, as separate variables.
    – Silly-V
    Dec 14, 2016 at 14:52
  • Did you ever find a solution for Illustrator? It would be soooooo helpful!
    – Andy Swift
    Nov 22, 2022 at 17:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.