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.
Note |
---|
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
Info |
---|
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
Code Block | ||||
---|---|---|---|---|
| ||||
<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
Code Block | ||||
---|---|---|---|---|
| ||||
<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
Code Block | ||||
---|---|---|---|---|
| ||||
<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:
Code Block | ||||
---|---|---|---|---|
| ||||
style="border-left: solid 0.50pt; border-top: solid 0.50pt; border-right: solid 0.50pt; border-bottom: solid 0.50pt" |
Cell shading is represented as RGB values (again, per the precise shading used in the Word document):
Code Block | ||
---|---|---|
| ||
style="background-color:rgb(201,222,212)" |
And the alignment, both vertical (valign
) and horizontal (align
), of the text in the table cells - right, center, left, or decimal - is captured as:
Code Block | ||||
---|---|---|---|---|
| ||||
valign="top" align="center" |
The indentation of text is also captured to ensure correct layout; for example, from the previous Word sample:
Code Block | ||
---|---|---|
| ||
<td>       F<italic>oreign trade total<sup>i</sup></italic></td> |
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.
Tip |
---|
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
Code Block | ||||
---|---|---|---|---|
| ||||
<fig id="cht1.1" position="float" fig-type="chart"> <label>Chart 1.1</label><caption><p>Foreign exchange rates, 2008-16</p></caption> <graphic xlink:href="17-4996_cht1.1"/> <attrib>Source: Information provided by the Swiss authorities.</attrib> </fig> |
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
Code Block | ||||
---|---|---|---|---|
| ||||
<boxed-text id="b02.01">
<label>Box 2.1</label><caption><title>Liechtenstein's Market Control and Surveillance Mechanism</title></caption>
<p>As a consequence of Liechtenstein's EEA membership since 1 May 1995, and in order to maintain the Customs Union with Switzerland (Switzerland is not an EEA member), Liechtenstein must ensure the parallel marketability of goods under Swiss and EEA rules within its territory. Liechtenstein maintains a Market Control and Surveillance Mechanism (MCSM), applicable to imports subject to customs tariffs or non-tariff requirements that are different in the EEA and Switzerland, for this purpose. The MCSM aims at ensuring that goods that do not satisfy Swiss import requirements do not enter the Swiss market via the open border. The MCSM has been accepted by the other EEA members (EEA Council Decision No. 1/95).</p>
<attrib>Source: WTO Secretariat.</attrib>
</boxed-text> |
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
Code Block | ||||
---|---|---|---|---|
| ||||
<boxed-text id="b04.02">
<label>Box 4.2</label><caption><title>Switzerland's regulatory framework for banking services</title></caption>
<sec>
<title>Recent or planned regulatory changes</title>
<p><underline>Additional criteria for foreign banks</underline>: requirements are the same for Swiss and foreign banks; access remains subject to reciprocity, except when covered by international obligations such as the WTO agreements. However, for Swiss branches of foreign banks, FINMA will grant the foreign banks a licence only if;</p>
<list id="L11" list-type="alpha-lower">
<list-item><label>a</label><p>the foreign bank is appropriately organized, employs adequately qualified staff and has financial resources to operate a branch in Switzerland;</p></list-item>
<list-item><label>b</label><p>the foreign bank and branch are subjected to adequate supervision;</p></list-item>
<list-item><label>c</label><p>the competent foreign supervisory authorities make no objection to the establishment of a branch;</p></list-item>
</list>
...
</sec>
</boxed-text> |
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.