Paragraph Styles

Search this space

In this section

Headings

The following example demonstrates the use of the Head 2 and Head 3 paragraph styles:

Screen shot in MS Word in Draft view. See following paragraph for further description

The above screenshot shows an example of a heading followed by a paragraph and a next level heading. In the Draft View margin, the paragraph styles used are: Head2, Paragraph_Post_Head, Head3, and Paragraph_Post_Head.

This formatting yields the following XML:

<sec> <title>Math as text</title> <p>Simple mathematical formulae (i.e., those expressions that can be expressed on a single line) can be typed into Word using the keyboard. Letters, numbers, and basic math symbols can be typed on an ASCII keyboard, and font face changes such as italic, bold, superscript, and subscript can be applied with Word character formatting. This method has been available since Word was first developed in the mid-1980s. Most special (non-ASCII) symbols can be typed as Unicode values or entered via Word&#x2019;s &#x201C;Insert Symbol&#x201D; function if a font containing the required symbol is available.</p> <sec> <title>Special symbols</title> <p>Entering mathematical &#x201C;special symbols&#x201D; could be challenging in Word&#x2019;s early years. Unicode did not exist when the earliest versions of Word were developed. Word included a Symbol font with a useful but limited math set, and many special needs were filled with a wide range of custom math symbol fonts that were each limited to 232 characters. Individual characters were addressed by font name and character offset within the font. This lack of standardization for special symbol fonts caused more than a few woes when converting Word files to XML, especially when more creative authors made custom fonts for themselves with the specific characters they needed. The STIX font project was developed in part to alleviate the problems caused by large numbers of special non-Unicode compliant math fonts [<xref ref-type="bibr" rid="r19">19</xref>].</p> ... </sec> ... </sec>

 

Regular Paragraphs

This first example demonstrates the use of the Paragraph and Post-Heading Paragraph styles:

MS Word screenshot in Draft View. See next paragraph for description.

The above screenshot shows an example of a heading followed by two paragraphs. In the Draft View margin, the paragraph styles used are: Head3, Paragraph_Post_Head, and Paragraph.

This formatting yields the following XML:

<title>Converting poorly typed math</title> <p>When converting keyboarded inline math to XML, typically some manual cleanup is required to overcome authors who are either lazy or creative typers. Consider the character &#x00B1; (plus-minus, U+00B1). It is all too often entered as an underlined plus symbol, <underline>+</underline>. Once, we saw a paper written by a scientist who knew a minus sign was different from a hyphen but could not figure out how to insert the symbol, so he typed an underscore character and applied superscript formatting!</p> <p>Improperly typed math may look similar to its semantically correct counterpart, but the difference between plus-minus and an underlined plus is important when the characters are published in XML. When the XML is then converted to text by text-to-speech or text-to-braille accessibility devices, the resulting equation is described inaccurately or nonsensically.</p>

If there are hyperlinks in your body content, see Hyperlinks, which explains how they are handled in the XML.

This second example the use of the Paragraph Continued style:

The above screenshot shows an example of a heading followed by paragraphs, an equation, and preformatted text. In the Draft View margin, the paragraph styles used are: Head3, Paragraph_Post_Head, Equation, Paragraph_Continued, Preformat, Paragraph_Continued, Preformat, Paragraph_Continued, Preformat, and Paragraph_Continued.

By styling the text in this specific order, eXtyles recognizes that all of the “paragraph” text is part of a single paragraph that is interrupted by other specifically-styled content and will results in this XML:

<title>Converting text equations to XML</title> <p>Text equations can be transformed from Word DOCX format to JATS XML. These keyboarded equations can be treated as plain text; for example, the expression <disp-formula id="e"><italic>x</italic> &#x2208; [10,350]</disp-formula> can be simply transformed to <preformat>&lt;italic&gt;x&lt;/italic&gt; &amp;#x2208; [10,350]</preformat> in JATS. Both &lt;disp-formula&gt; and &lt;inline-formula&gt; allow Unicode text and font face changes, so this could also appear as <preformat>&lt;inline-formula&gt;&lt;italic&gt;x&lt;/italic&gt; &amp;#x2208; [10,350]&lt;/inline-formula&gt;</preformat> or, correspondingly, <preformat>&lt;disp-formula&gt;&lt;italic&gt;x&lt;/italic&gt; &amp;#x2208; [10,350]&lt;/disp-formula&gt;</preformat> if it is a display formula. Text conversions such as these can be done by extracting the document.xml fragment of a DOCX file and then applying an XSLT transformation to create JATS XML.</p>

Find out more about the Equation style and the Preformat styles in the eXtyles JATS Style Guide.

Block Quotes

The following example demonstrates the use of the Block Quote paragraph style:

The above screenshot shows an example of a block quote followed by a paragraph. In the Draft View margin, the paragraph styles used are: Block_Quote and Paragraph.

Use of these paragraph styles yield this XML:

 

Copyright © 2022 Atypon Systems, LLC. All Rights Reserved.