JATS Guide
Index Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Poetry and Verse

Poetry and Verse

Poetry, verse, song lyrics, and similar content should be tagged using <verse-group> and <verse-line> elements.

The <verse-group> element is the container for a poem, verse, song, etc.

If a label, title, and/or subtitle are present these should be tagged using the corresponding elements <label>, <title>, and <subtitle> within <verse-group>.

If an attribution or author name is present then this information should be tagged using the <attrib> element within <verse-group>.

The <verse-group> element is also a container for a stanza or grouping of lines within a <verse-group>.

The <verse-line> element holds one line of a poem, verse, song, etc. within a <verse-group>.

The <verse-line> element may contain any of the inline text formatting elements, such as <italic>, <bold>, <strike>, <underline>, and <styled-content>.

If lines need to be indented, the @indent-level attribute on <verse-line> can be used to indicate the level of indentation expressed as a number relative to the <verse-group>. The number should be an approximate number of characters. An equivalent in CSS is the property text-indent with ch units, for example indent-level="10" would be equivalent to text-indent: 10ch;. Note that the JATS standard does not specify any unit of measurement for the @indent-level attribute so different rendering systems might use different units.

If more complex styling is required, then the @style attribute on <verse-line>, <verse-group>, and <styled-content> can be used to add custom CSS formatting instructions.

At the present time, attributes @indent-level on <verse-line> and @style on <verse-line> and <verse-group> are not reflected in the HTML and EPUB renderings on Taylor & Francis Online. These attributes should still be tagged when they are needed so that content will display correctly in future after the renderings on Taylor & Francis Online are updated. The @style attribute on <styled-content> may be useful as a workaround in some instances.

Examples

Live examples of poetry tagging can be seen in these articles:

Basic verse group

This example shows XML tagging of a poem that has a title, subtitle, two stanzas, and an attribution.

<verse-group> 
    <title>This is the optional title of the poem</title> 
    <subtitle><bold><italic>This is the optional subtitle of the poem</italic></bold></subtitle> 
    <verse-line>This is the first line of the first stanza</verse-line> 
    <verse-line>This is the second line of the first stanza</verse-line> 
    <verse-line>This is the third line of the first stanza</verse-line> 
</verse-group> 
<verse-group> 
    <verse-line>This is the first line of the second stanza</verse-line> 
    <verse-line>This is the second line of the second stanza</verse-line> 
    <verse-line>This is the third line of the second stanza</verse-line> 
    <attrib><italic>This line is optional and is used for attribution</italic></attrib> 
</verse-group> 

The above tagging produces display output like this:

poetry-001 example rendering

Poem with indented lines and complex formatting

This example shows the @indent-level and @style attributes being used to apply custom formatting.

<sec>
<p>This entire poem is indented by 45% of the page width, and then individual lines are indented by varying amounts and styling is applied for artistic effect.</p>
<verse-group style="margin-inline-start: 45%; border: 1px solid #ccc; padding: 10px; background-color: #f9f9f9;">
    <title>Dancing atoms</title>
    <verse-group>
        <verse-line><italic>Science</italic>, the eternal quest,</verse-line>
        <verse-line indent-level="5">a spark in the void,</verse-line>
        <verse-line indent-level="2">where questions bloom like stars.</verse-line>
    </verse-group>
    <verse-group>
        <verse-line indent-level="20"><bold>Atoms</bold> <styled-content style="font-size: 1.5em; text-shadow: 5px 5px 5px rgba(0,0,0,0.3);">dance</styled-content>,</verse-line>
        <verse-line indent-level="10">spinning tales of creation,</verse-line>
        <verse-line style="text-align: center; transform: rotate(2deg);">their whispers shaping worlds unseen.</verse-line>
    </verse-group>
    <attrib>&#x2013; Anonymous</attrib>
</verse-group>
</sec>

The above tagging produces display output like this:

poetry-002 example rendering