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