A Guide to QuarkXPress 2018

Content variables

A content variable is an item you insert in your document that varies according to the context. For example, the Last Page Number variable displays the page number of the last page of the document. If you add or remove pages, the variable is updated accordingly.

Content variables will line wrap and break just like text, including hyphenating when appropriate.

The text within a content variable is searchable using the Find/Change palette. If the text you are searching for is contained within a content variable, the entire variable will be highlighted.

To highlight all content variables in the current project, choose View > Highlight Content Variables.

QuarkXPress includes the following preset content variables that you can insert in your document:

  • Creation Date

  • Current Page Number

  • File Name

  • Last Page Number

  • Modification Date

  • Next Page Number

  • Output Date

  • Previous Page Number

You can edit the format of these variables, or you can create your own.

In addition to the set of pre-defined variables, you can create the following additional text type variables:

  • Custom Variable: You can combine a text string with other pre-defined variables to make a combination.

  • Running Header: This variable type allows you to choose source data within the document by referring to a paragraph or character style sheet. This variable type can be applied in the master page so that the running headers are automatically updated. For example, a left side page can have book title and on right side page can have Chapter/Section title.

  • Page Reference: This variable is used to create a reference to an existing layout object using the existing Anchors feature, and allows you to refer to that object elsewhere in the document, including the page number for the referred to object.

  • Static Text: With this you can create a simple static text variable that can be inserted throughout the document. For example, if you want to refer to a company name across a document consistently and want to make any changes to it in one go, this variable can be useful.

Edit content variables

To edit content variables, choose Window > Content Variables to display the Content Variables palette. The buttons at the top of this palette let you add, edit and duplicate content variables. Choose an existing content variable and click the button to edit it, or click the button to add a new content variable.

The Edit Content Variable dialog displays.

If you are adding a new content variable, you can also display this dialog by choosing Utilities > Content Variable and selecting New from the drop-down menu.

Enter a name in the Name field. If you are adding a new content variable or duplicating an existing content variable , select the content variable Type from the drop-down menu. Specify the attributes for your content variable, these will vary depending on the type of content variable you are editing :

  • Creation Date: Creation Date inserts the date or time the document was first saved. You can insert text before and after the date, and you can modify the date format for all date variables using the drop-down menus.

  • Current Page Number: This variable inserts the current page number of the current project into the document.

  • Custom Variable: See "Create a custom content variable" for more information.

  • File Name: This variable inserts the name of the current file into the document. Select Include Extension to include the file name extension. The File Name variable is updated whenever you save the file with a new name or to a new location. The extension does not appear in the document until it is saved.

  • Flow Box Page Number: This variable inserts the page number where the current box continues (or where the current box is continuing from) if the current box spans multiple pages that may not be contiguous. From the Context drop-down menu, choose either Next Box or Previous Box to specify whether to insert the page number where this box continues or where it is continuing from.

  • Last Page Number: This variable inserts the last page number of the current project into the document. The Last Page Number type is useful for adding the total number of pages in a document to headers and footers using the common Page 3 of 12 format. In this case, the number 12 is generated by the Last Page Number, and is updated whenever pages are added or removed. From the Scope drop-down menu, choose an option to determine whether the last page number in the section or layout is used.

  • Modification Date: Modification Date inserts the date or time the document was last saved. You can insert text before and after the date, and you can modify the date format for all date variables using the drop-down menus.

  • Next Page Number: This variable inserts the next page number of the current project into the document. From the Scope drop-down menu, choose an option to determine whether the next page number in the section or layout is used.

  • Output Date: Output Date inserts the date or time the document was printed or exported. You can insert text before and after the date, and you can modify the date format for all date variables using the drop-down menus.

  • Page Reference: You can insert text before and after the page reference variable. Select an Anchor Name from the drop-down menu. Select Create Hyperlink to create a hyperlink in the text.

  • Previous Page Number: This variable inserts the previous page number of the current project. From the Scope drop-down menu, choose an option to determine whether the previous page number in the section or layout is used.

  • Running Header: Choose the source style sheet to display in your header and then choose whether you want to display the first occurrence on the page, the last occurrence on the page, the first occurrence on the spread or the last occurrence on the spread.

  • Static Text: Type in the text you want to appear when inserting this content variable.

When you're done, click OK.

After you have added or updated a content variable, it will be listed in the Utilities > Content Variable drop-down menu and also in the Content Variables palette (Window > Content Variables). The new variable will be available when you attempt to insert a content variable into the text.

Create a custom content variable

In addition to the existing preset content variables offered by QuarkXPress, you can also create custom content variables to use in your projects. Custom variables are great if you want to use text content somewhere within a text story and the same content in a different story or at a different place. When you change the content of the custom variable, it is changed everywhere where used.

To create a custom content variable:

  1. Place the insertion point where you want the variable to appear.

  2. Select Utilities > Content Variable and choose New from the drop-down menu.

    The Edit Content Variable dialog displays.

  3. Enter a name in the Name field.

  4. Choose Custom Variable from the Type drop-down menu.

  5. You can choose to insert a Text String or a Text Variable when using this custom content variable.

    • If creating a custom variable that inserts a text string, type in the text you want to appear when inserting this content variable. Click the plus symbol to add more lines to the text.

    • If creating a custom variable that inserts a text variable, select the text variable you want from the drop-down menu. You can combine 2 or more text variables by clicking the plus symbol to add another.

  6. Click OK.

After you have added a custom content variable, it will be listed in the Utilities > Content Variable drop-down menu and also in the Content Variables palette (Window > Content Variables). The new variable will be available when you attempt to insert a content variable into the text.

Insert a content variable

To insert a content variable in your project:

  1. Place the insertion point where you want the variable to appear.

  2. Select Utilities > Content Variable and choose the variable you want to insert from the drop-down menu.

The variable appears on the page as if you'd typed it in the document.

Content variables can be inserted into lists and indexes.