Another common way to represent tabular data is to have text separated by tab characters in a standard QuarkXPress text box.
- Open RT_Tutorial7.qpt : this is a template into which we’re going to import the tabular data. You’ll notice that this just
contains a couple of normal text boxes - but these boxes are going to contain our table.
Whereas a QuarkXPress table has separate ‘cells’ for each piece of data, a table created using a text box in QuarkXPress simply
uses the tab character to give the impression of columns of data. Where we inserted a ‘new box’ character to move from one
cell to the next in a QuarkXPress table box, for a text table we will instead use a tab character (the character which is
inserted into the text flow when you press the ‘Tab’ key on the keyboard).
- Next we need to create a ruleset for the XML which we are about to import. In order to do this, select ‘Create -> Create
Ruleset...’ from the Atomik Roundtrip menu. Again, you will be prompted to choose a DTD and name the ruleset - select ‘Tutorial
7.DTD’ from the DTD pop-up menu, and enter ‘Tutorial7b.rls’ as the name of the ruleset.
- You’ll then be prompted to select an XML file to import - choose the file ‘Tutorial7b.xml’.
- For the first rule in this ruleset, make a rule for the ‘TableData’ element which adds a Tab character after each occurence
of the element. If you’re not sure how to do this, take a look back over the earlier sections of this Tutorial, and also Tutorials
3 and 6.
- Next we’re going to create some rules which will ensure that our table’s columns are appropriately placed. The easiest way
to ensure that all the tabs in a table appear in the right place is to define a QuarkXPress paragraph style sheet and apply
it to the text. We’ve already defined some suitable styles in the template you’re working with, so all you need to do now
is to make some rules to use them.
- • Make a rule to apply the style ‘01 Table Head Row Bold’ to ‘TableHeadRow’ elements. As this rule will be applying a paragraph
style sheet, ensure that you check the ‘Is a Paragraph’ checkbox in the ruleset dialog.
- • Make a rule to apply the style ‘01 Table Data Row’ to ‘TableDataRow’ elements. Again, make sure you check the ‘Is a Paragraph’
- • Make a rule to append a ‘New Box’ character to the end of each table element.
- Now your ruleset is ready to import your data onto the page. So now close the ruleset palette, and switch to the ‘XML’ tab
of the Roundtrip XML palette. Simply drag & drop the Publication element into the large empty text box on the left hand side
of the page, and your XML content will be flowed into the text box in a tabular format, which should (hopefully) look like
the illustration above.