<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is free software; you can redistribute it and/or</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># modify it under the terms of the GNU General Public License</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># as published by the Free Software Foundation; either version 2 </tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># of the License, or (at your option) any later version.</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is distributed in the hope that it will be useful,</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># but WITHOUT ANY WARRANTY; without even the implied warranty of</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># GNU General Public License for more details. </tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># You should have received a copy of the GNU General Public License</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># along with this program; if not, write to the Free Software</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-docstring">Rationale: the difficult part in formatting the records is not how the</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"><tt class="py-docstring">records are actually laid out on a page, the keys,... but rather the</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"><tt class="py-docstring">actual layout of the authors, the publication information,...</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"><tt class="py-docstring">especially given that all the records are not complete.</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring">So, this module is only intended to handle I{this specific aspect},</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring">not to compose a whole page.</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring">The code here allows the writing of citation styles with a convenient</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-docstring"> - B{stage 1:} the citation is written by the programmer in a</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> convenient Domain Specific Language (DSL)</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"><tt class="py-docstring"> - B{stage 2:} the formatter of stage 1 is 'compiled' on a specific</tt> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-docstring"> database (which allows for some initial checks (existence of the</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-docstring"> requested fields and txo for instance)</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"><tt class="py-docstring"> - B{stage 3:} the compiled formatter can accept records, and return an</tt> </tt>
<a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"><tt class="py-docstring"> abstract representation of the citation, with style indications</tt> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"><tt class="py-docstring"> - B{stage 4:} the abstract representation is turned into a concrete</tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"><tt class="py-docstring">The ideas for the syntax have been heavily borrowed from nevow's stan.</tt> </tt>