Skip to main content
Logo image

Section 29 Poetry

View Source for section
<section xml:id="poetry" label="section-poetry">
  <title>Poetry</title>
  <p>
    There is support for poems via the <c>poem</c>
        <idx>poem</idx>
    tag, which can contain a <c>title</c>,
    <c>author</c> and multiple <c>stanza</c>,
    each containing multiple <c>line</c>.
    See the source of the following poem for an example of the exact arrangement.
    Note how the first quote crosses two <c>line</c> elements and how this is handled in the source.
    There are many very flexible options for horizontal alignment and indentation.
    Further extensive examples,
    constructed by Jahrme Risner,
    are available in the example Humanities document.
  </p>
  <poem xml:id="poem-light-brigade">
    <title>The Charge of the Light Brigade</title>
    <idx>Charge of the Light Brigade, The, Tennyson</idx>
    <author>
      Alfred Lord Tennyson
    </author>
    <stanza>
      <line>Half a league, half a league,</line>
      <line>Half a league onward,</line>
      <line>All in the valley of Death</line>
      <line>Rode the six hundred.</line>
      <line><lq />Forward, the Light Brigade!</line>
      <line>Charge for the guns!<rq /> he said:</line>
      <line>Into the valley of Death</line>
      <line>Rode the six hundred.</line></stanza>
    <stanza>
      <idx><h>Charge of the Light Brigade</h><h>second stanza</h></idx>
      <line>
      <q>Forward, the Light Brigade!</q>
      </line>
      <line>Was there a man dismay'd?</line>
      <line>Not tho' the soldier knew</line>
      <line>Someone had blunder'd:</line>
      <line>Theirs not to make reply,</line>
      <line>Theirs not to reason why,</line>
      <line>Theirs but to do and die:</line>
      <line>Into the valley of Death</line>
      <line>Rode the six hundred.</line></stanza>
  </poem>
  <p>
    Ken Levasseur, who teaches at UMass-Lowell,
    has limericks in his Applied Discrete Structures textbook.
    When he reported that they were unable to be the target of a cross-reference, Karl-Dieter Crisman penned the following limerick.
  </p>
  <poem>
    <author>
      Karl-Dieter Crisman
    </author>
    <stanza>
      <line>CS students studying in Lowell</line>
      <line>Required their books to have soul.</line>
      <line>Along came their teacher</line>
      <line>Who asked for this feature:</line>
      <line>A poem that lives in a knowl.</line></stanza>
  </poem>
  <p>
    And when yours truly tried to joke about poetry on
    <url href="https://github.com/PreTeXtBook/pretext-cli/issues/182" visual="https://github.com/PreTeXtBook/pretext-cli/issues/182">GitHub CLI #182</url>,
    back came:
  </p>
  <poem xml:id="limerick-clontz">
    <author>
      Steven Clontz
    </author>
    <stanza>
      <line>There once was a maintainer named Rob</line>
      <line>Who told bad jokes while on the job</line>
      <line>While they were lame</line>
      <line>You could say the same</line>
      <line>Of Steven's limericks that cause you to sob</line></stanza>
  </poem>
</section>
There is support for poems via the poem tag, which can contain a title, author and multiple stanza, each containing multiple line. See the source of the following poem for an example of the exact arrangement. Note how the first quote crosses two line elements and how this is handled in the source. There are many very flexible options for horizontal alignment and indentation. Further extensive examples, constructed by Jahrme Risner, are available in the example Humanities document.

The Charge of the Light Brigade

View Source for poem
<poem xml:id="poem-light-brigade">
  <title>The Charge of the Light Brigade</title>
  <idx>Charge of the Light Brigade, The, Tennyson</idx>
  <author>
    Alfred Lord Tennyson
  </author>
  <stanza>
    <line>Half a league, half a league,</line>
    <line>Half a league onward,</line>
    <line>All in the valley of Death</line>
    <line>Rode the six hundred.</line>
    <line><lq />Forward, the Light Brigade!</line>
    <line>Charge for the guns!<rq /> he said:</line>
    <line>Into the valley of Death</line>
    <line>Rode the six hundred.</line></stanza>
  <stanza>
    <idx><h>Charge of the Light Brigade</h><h>second stanza</h></idx>
    <line>
    <q>Forward, the Light Brigade!</q>
    </line>
    <line>Was there a man dismay'd?</line>
    <line>Not tho' the soldier knew</line>
    <line>Someone had blunder'd:</line>
    <line>Theirs not to make reply,</line>
    <line>Theirs not to reason why,</line>
    <line>Theirs but to do and die:</line>
    <line>Into the valley of Death</line>
    <line>Rode the six hundred.</line></stanza>
</poem>
Half a league, half a league,
Half a league onward,
All in the valley of Death
Rode the six hundred.
“Forward, the Light Brigade!
Charge for the guns!” he said:
Into the valley of Death
Rode the six hundred.
“Forward, the Light Brigade!”
Was there a man dismay’d?
Not tho’ the soldier knew
Someone had blunder’d:
Theirs not to make reply,
Theirs not to reason why,
Theirs but to do and die:
Into the valley of Death
Rode the six hundred.
Alfred Lord Tennyson
Ken Levasseur, who teaches at UMass-Lowell, has limericks in his Applied Discrete Structures textbook. When he reported that they were unable to be the target of a cross-reference, Karl-Dieter Crisman penned the following limerick.
View Source for poem
<poem>
  <author>
    Karl-Dieter Crisman
  </author>
  <stanza>
    <line>CS students studying in Lowell</line>
    <line>Required their books to have soul.</line>
    <line>Along came their teacher</line>
    <line>Who asked for this feature:</line>
    <line>A poem that lives in a knowl.</line></stanza>
</poem>
CS students studying in Lowell
Required their books to have soul.
Along came their teacher
Who asked for this feature:
A poem that lives in a knowl.
Karl-Dieter Crisman
And when yours truly tried to joke about poetry on GitHub CLI #182
 1 
https://github.com/PreTeXtBook/pretext-cli/issues/182
, back came:
View Source for poem
<poem xml:id="limerick-clontz">
  <author>
    Steven Clontz
  </author>
  <stanza>
    <line>There once was a maintainer named Rob</line>
    <line>Who told bad jokes while on the job</line>
    <line>While they were lame</line>
    <line>You could say the same</line>
    <line>Of Steven's limericks that cause you to sob</line></stanza>
</poem>
There once was a maintainer named Rob
Who told bad jokes while on the job
While they were lame
You could say the same
Of Steven’s limericks that cause you to sob
Steven Clontz