Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > a2ac79ac252ef7b89f2f0fc449728720 > files > 426

ikiwiki-3.20190228-1.1.mga6.noarch.rpm

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>poetry (third party plugin)</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="stylesheet" href="../../style.css" type="text/css" />

<link rel="stylesheet" href="../../local.css" type="text/css" />






<meta name="author" content="spalax" />



</head>
<body>

<div class="page">

<div class="pageheader">
<div class="header">
<span>
<span class="parentlinks">

<a href="../../index.html">ikiwiki</a>/ 

<a href="../../plugins.html">plugins</a>/ 

<a href="../contrib.html">contrib</a>/ 

</span>
<span class="title">
poetry (third party plugin)

</span>
</span>



</div>









</div>





<div id="pagebody">

<div id="content" role="main">
<p><span class="infobox">
Plugin: poetry<br />
Author: <span class="createlink">Louis</span><br />
Included in ikiwiki: no<br />
Enabled by default: no<br />
Included in <a href="../goodstuff.html">goodstuff</a>: no<br />
Currently enabled: no<br />
</span></p>

<h1>Poetry</h1>

<p>The poetry plugin provides the <span class="createlink">poetry</span> directive, used to
render poetry (or songs).</p>

<h2>Why?</h2>

<h3>Typography</h3>

<p>In regular text, there are two different meaning of a new line: a break between
two paragraphs, and the line wrap.</p>

<p>When rendering poetry, we need a third one: the carriage return between two
verse lines. This one should be different from the line wrap carriage return,
otherwise one will not be able to tell apart these two: is a word displayed at
the begenning of its line a new verse line, or the previous verse line,
continuing on a new line because it is too long?</p>

<p>Generally, wrapped text is indented, whereas verse lines are not.</p>

<h3>Markdown</h3>

<p>One could use carriage return (two white spaces at the end of a line) between
verse lines, and paragraph break between stanzas, but:</p>

<ul>
<li>adding white spaces at the end of lines is painful;</li>
<li>there is no easy way to render chorus (in a different way from verses).</li>
</ul>

<h2>Usage</h2>

<p>The directive takes only one argument <code>content</code>, containing the poetry to
render. Carriage returns are respected.</p>

<p>Chorus are lines with <code>&gt;</code> as a starting character.</p>

<p>Lines starting with <code>)</code> are consored/outdated/crossed out verses.</p>

<p><a class="toggle" href="#plugins-contrib-poetry.example">View example</a></p>

<div class="toggleable" id="plugins-contrib-poetry.example">

<pre><code>[[!poetry  content="""
This is a verse
Made of several lines

&gt; And here is the chorus
&gt; La la la!
&gt; A beautiful chorus

Another verse
A bit longer
Than the previous one

) This one is deleted
) Because I did not like it
"""]]
</code></pre>

</div>

<h2>CSS</h2>

<p>This plugin is useless without some corresponding CSS. An example is given
below.</p>

<p><a class="toggle" href="#plugins-contrib-poetry.css">CSS</a></p>

<div class="toggleable" id="plugins-contrib-poetry.css">

<pre><code>.poetry {
  padding-left: 1em;
  border-left: 0.1em solid lightgray;
  border-radius: 0.5em;
}

.poetry .stanza {
  padding-left: 1em;
}

.poetry .paren {
  font-style: italic;
  font-size: smaller;
  text-decoration: line-through;
}

.poetry .paren:hover {
  text-decoration: initial;
}

.poetry .chorus {
  margin-left: 0.1em;
  padding-left: 2em;
  border-left: 0.3em solid slategray;
}

.poetry .line {
  display: block;
  text-indent: -1em;
}
</code></pre>

</div>

<h2>Example</h2>

<p>This plugin is used to render songs on <a href="http://barricades.int.eu.org/repertoire/bread_and_roses/">this choir's
website</a>.</p>

<h2>Code</h2>

<p>Code and documentation can be found here : <a href="https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Poetry">https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Poetry</a>.</p>

</div>







</div>

<div id="footer" class="pagefooter" role="contentinfo">

<div id="pageinfo">











<div class="pagedate">
Last edited <span class="date">Tue Feb 26 23:01:54 2019</span>
<!-- Created <span class="date">Tue Feb 26 23:01:54 2019</span> -->
</div>

</div>


<!-- from ikiwiki -->
</div>

</div>
<script src="../../ikiwiki/ikiwiki.js" type="text/javascript" charset="utf-8"></script>
<script src="../../ikiwiki/toggle.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>