Object Examples
Objects (tables, figures, and boxes) should be styled using items on the Obj tab of the eXtyles style palette. This section describes how to correctly style these objects in your content.
Tables
Accurate styling of table content is critical to ensure that it is both rendered correctly during layout and formatted properly for screen readers and other accessibility requirements.
The following examples show how to use the table paragraph styles correctly.
Although eXtyles Cleanup will auto-style most table content at the start of the eXtyles workflow, you must still carefully proof table styling before exporting to XML and correct any misapplied styles.
Simple Table
The style of content within Word table cells will not show up in the Style Area Pane that is exposed in Draft view (see the following image). This is a limitation of Word. To proof the styles of content in Word table cells, place your cursor in the cell and the style will appear in the style drop-down window on the eXtyles ribbon.
A simple table will include a title, headings, body content, and possibly notes. For example,
Word
XML
<table-wrap id="t01.02" position="float">
<label>Table 1.2</label><caption><title>Liechtenstein – Selected macroeconomic indicators, 2012-15</title>
</caption>
<table rules="groups">
<col width="43.11%"/>
<col width="14.23%"/>
<col width="14.22%"/>
<col width="14.22%"/>
<col width="14.22%"/>
<thead>
<tr>
<td valign="top" align="left" scope="col" style="border-left: solid 0.50pt; border-top: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(0,98,131)"/>
<td valign="top" align="right" scope="col" style="border-left: solid 0.50pt; border-top: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(0,98,131)">2012</td>
<td valign="top" align="right" scope="col" style="border-left: solid 0.50pt; border-top: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(0,98,131)">2013</td>
<td valign="top" align="right" scope="col" style="border-left: solid 0.50pt; border-top: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(0,98,131)">2014</td>
<td valign="top" align="right" scope="col" style="border-left: solid 0.50pt; border-top: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(0,98,131)">2015</td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt" scope="row">GDP at market prices (SwF million)<sup>a</sup></td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">5,116</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">5,925</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">6,105</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">..</td>
</tr>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)" scope="row">GDP at market prices (US$ million)<sup>a, b</sup></td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">5,456</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">6,392</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">6,672</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">..</td>
</tr>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt" scope="row">Real GDP (%age change)</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">-0.1</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">2.1</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">3.0</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">..</td>
</tr>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)" scope="row">GNI per inhabitant at current prices (SwF)</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">97,410</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">108,830</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">..</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">..</td>
</tr>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt" scope="row">Population ('000)</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">36.8</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">37.1</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">37.4</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">37.6</td>
</tr>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)" scope="col">GDP by industry (% of GDP at basic prices)</td>
<td valign="top" align="left" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)"/>
<td valign="top" align="left" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)"/>
<td valign="top" align="left" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)"/>
<td valign="top" align="left" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)"/>
</tr>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt" scope="row">Industry and manufacturing</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">38.6</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">40.7</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">41.0</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">..</td>
</tr>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)" scope="row">General services</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">28.9</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">27.3</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">26.8</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; background-color:rgb(201,222,212)">..</td>
</tr>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt" scope="row">Financial services</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">24.0</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">25.1</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">25.2</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt">..</td>
</tr>
<tr>
<td valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt; border-bottom: solid 0.50pt; background-color:rgb(201,222,212)" scope="row">Agriculture and households</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; border-bottom: solid 0.50pt; background-color:rgb(201,222,212)">8.6</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; border-bottom: solid 0.50pt; background-color:rgb(201,222,212)">7.0</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; border-bottom: solid 0.50pt; background-color:rgb(201,222,212)">7.0</td>
<td valign="top" align="right" style="border-left: solid 0.50pt; border-right: solid 0.50pt; border-bottom: solid 0.50pt; background-color:rgb(201,222,212)">..</td>
</tr>
</tbody></table>
<table-wrap-foot>
<fn><p>.. Not available.</p></fn>
<fn><p>a Provisional data for 2014.</p></fn>
<fn><p>b Swiss/US$ exchange rate was applied.</p></fn>
<attrib>Source: Statistical information provided by the authorities of Liechtenstein; <italic>Volkswirtschaftliche Gesamtrechnung 2014</italic> (National Accounts 2014<?word-comment COMMENT4: The in-text citation "National Accounts 2014" is not in the reference list. Please correct the citation, add the reference to the list, or delete the citation.?>). Viewed at: <ext-link ext-link-type="uri" xlink:href="https://www.llv.li/files/as/volkswirtschaftliche-gesamtrechnung-2014.pdf">https://www.llv.li/files/as/volkswirtschaftliche-gesamtrechnung-2014.pdf</ext-link> [January 2017]; and <italic>Liechtenstein in Figures 2017</italic><?word-comment COMMENT5: No figure matches the in-text citation "Figures 2017". Please supply a legend and figure or delete the citation.?>. Viewed at: <ext-link ext-link-type="uri" xlink:href="https://www.llv.li/files/as/fliz-englisch-2017.pdf">https://www.llv.li/files/as/fliz-englisch-2017.pdf</ext-link> [January 2017].</attrib></table-wrap-foot>
</table-wrap>
Complex Tables
More complex tables can include subheadings and accessibility captions. eXtyles can support all of these structures. For example, the table internal head “Switzerland” should be styled like this:
Word
XML
<tbody>
<tr>
<th colspan="3" valign="top" align="justify" style="border-left: solid 0.50pt; border-right: solid 0.50pt" scope="col">Switzerland</th>
</tr>
<tr>
Local Formatting and and Other Design Elements
Unlike other parts of the text, eXtyles will capture in the XML formatting and design elements in tables. This information will come directly from the Word document, so it is important that tables in Word are carefully proofed for display as well as content prior to generating XML.
Bold, Italic, and Underline
As with elsewhere in the text, bold, italic, and underline formatting that is used in tables is preserved in the XML. For example, in the following table, the text Goods (net) is underlined, and the text Foreign trade total is italic:
Word
XML
<td><underline>Goods (net)</underline></td>
...
<td>F<italic>oreign trade total<sup>i</sup></italic></td>
The eagle-eyed will notice that the letter F in Foreign trade total is not italicized. eXtyles XML export will preserve in the XML the local formatting that is present in the Word document, so it is important that formatting be carefully and deliberately applied to table content to avoid rendering errors.
Borders, Shading, and Alignment
Table borders, cell shading, and text alignment will be preserved in the XML. This formatting information can be important when representing data, and so eXtyles will capture it directly from the Word document. For example, table borders are represented as a style attribute:
Cell shading is represented as RGB values (again, per the precise shading used in the Word document):
And the alignment, both vertical (valign
) and horizontal (align
), of the text in the table cells - right, center, left, or decimal - is captured as:
The indentation of text is also captured to ensure correct layout; for example, from the previous Word sample:
Because of this it is important to carefully review the format of the table in the Word document. For example, if the final table should not include cell shading, there should be no shading in the table in the Word document.
Table Placement in the Document
Tables are not moved during XML export; that is, eXtyles will not move tables to the location of their citation in the text - they will remain where they are placed in the Word document. Because of this, it is important to ensure that in Word tables are placed where they are intended to be set in the PDF.
Figures
Figures (charts) can be retained in the Word document during eXtyles processing; or, they can be removed, leaving just the figure title and notes. Often the latter is preferred because images can bloat a Word document and slow eXtyles processing.
eXtyles Cleanup can automatically remove any images in the Word document and replace them with placeholder text.
A typical setup for a figure in a WTO document is:
Word
XML
Figure Naming and the <graphic> Element
eXtyles will automatically generate a <graphic>
element for each figure caption in the Word document. This element is very important, because it will be used by rendering systems to pull in the correct image file during layout. For example, in the above instance, the system will be looking for an image named 17-4996_cht1.1, from the <graphic xlink:href="17-4996_cht1.1"/>
element.
These IDs will be generated by eXtyles using information from the Document Information dialog. In the dialog, the Serial Number field will be used to construct the graphic ID:
Boxes
Use the family of box styles on the Obj tab of the eXtyles style palette to style box content in WTO documents. Boxes can be simple or complex, with complex boxes including images, tables, lists, and other items. Both simple and complex boxes are supported by eXtyles, but careful styling is required.
Simple Boxes
Simple boxes can be styled using just the Box Title, Box Text, Box Source, and Box Note styles on the palette; for example,
Word
XML
Subheadings and lists may also be included in a simple box, and should be styled using the box heading and box list paragraph styles:
Word
XML
Complex Boxes
Complex boxes include objects, such as figures and tables. For these boxes, special begin and end markers are required to let the export engine understand where the box content starts and ends. For any box that includes content that is not specifically supported with a box paragraph style on the Obj tab of the eXtyles palette, these begin and end box styles must be used.
Word
XML
In the XML example you can see that with the use of the Box Begin and Box End markers in Word, the box Figure 1 is correctly included within the <boxed-text>
markup.
Similarly, boxes that include tables require the use of the Box Begin and Box End markers; also, because nested tables are illegal in an eXtyles workflow, box content must be converted from a table to text, as in the following example.
Word
XML