<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This file is part of pybliographer</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"># This program is free software; you can redistribute it and/or</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"># modify it under the terms of the GNU General Public License</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"># as published by the Free Software Foundation; either version 2 </tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</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="L12"></a><tt class="py-lineno"> 12</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="L13"></a><tt class="py-lineno"> 13</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="L14"></a><tt class="py-lineno"> 14</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="L15"></a><tt class="py-lineno"> 15</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="L17"></a><tt class="py-lineno"> 17</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="L18"></a><tt class="py-lineno"> 18</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="L19"></a><tt class="py-lineno"> 19</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="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-docstring">Basic syntactic elements used to format a citation.</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-docstring">This module defines the base syntax elements providing the formatting</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-docstring">domain specific language.</tt> </tt>
</div><div id="Glue-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Glue-expanded"><a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> <tt class="py-docstring">""" A base class that known how to join together multiple</tt> </tt>
</div><div id="_S1T-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_S1T-expanded"><a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> <tt class="py-docstring">""" This is a stage 1 text, ie a text that returns a stage 2 text</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"><tt class="py-docstring"> when called."""</tt> </tt>
</div><div id="_Join-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_Join-expanded"><a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt class="py-docstring">""" The join operator is used to join together multiple fragments</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"><tt class="py-docstring"> of records::</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"><tt class="py-docstring"> part1, part2, ... are joined together by inserting 'middle'</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"><tt class="py-docstring"> between them. If a part is missing, it is simply skipped.</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"><tt class="py-docstring"> If no part is available at all, the join fails.</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"><tt class="py-docstring"> It is possible to specify a different separator between the last</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"><tt class="py-docstring"> two parts.</tt> </tt>
</div><div id="switch-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="switch-expanded"><a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-docstring">""" The switch operator helps in bringing together multiple</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"><tt class="py-docstring"> citation parts, according to the value of a Txo.</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-comment"># Warning: we do not affect the default parameter here. Doing</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># so would lead to weird behavior if it is ever modified later</tt> </tt>
</div><div id="switch.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="switch.__call__-expanded"><a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> <tt class="py-comment"># first of all, get access to the actual Txo being checked.</tt> </tt>
</div><div id="_SynTag-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_SynTag-expanded"><a name="L381"></a><tt class="py-lineno">381</tt> <tt class="py-line"> <tt class="py-docstring">""" This is a layout tag before its [] marker. """</tt> </tt>
</div><div id="_SynTag.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_SynTag.__call__-expanded"><a name="L388"></a><tt class="py-lineno">388</tt> <tt class="py-line"> <tt class="py-docstring">"""Change attributes of this tag. This is implemented using</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt> <tt class="py-line"><tt class="py-docstring"> __call__ because it then allows the natural syntax::</tt> </tt>
<a name="L421"></a><tt class="py-lineno">421</tt> <tt class="py-line"> <tt class="py-docstring">""" This is a layout tag after its [] marker, but before the</tt> </tt>
</div><div id="_Proto-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_Proto-expanded"><a name="L459"></a><tt class="py-lineno">459</tt> <tt class="py-line"> <tt class="py-docstring">"""Proto is a string subclass. Instances of Proto, which are constructed</tt> </tt>
<a name="L460"></a><tt class="py-lineno">460</tt> <tt class="py-line"><tt class="py-docstring"> with a string, will construct Tag instances in response to __call__</tt> </tt>
<a name="L461"></a><tt class="py-lineno">461</tt> <tt class="py-line"><tt class="py-docstring"> and __getitem__, delegating responsibility to the tag.</tt> </tt>
<a name="L487"></a><tt class="py-lineno">487</tt> <tt class="py-line"> <tt class="py-docstring">""" Transform a simple function into a lazy function lifted in the</tt> </tt>
<a name="L490"></a><tt class="py-lineno">490</tt> <tt class="py-line"><tt class="py-docstring"> This is only sugar : the initial function must be aware that every</tt> </tt>
<a name="L491"></a><tt class="py-lineno">491</tt> <tt class="py-line"><tt class="py-docstring"> argument must be made strict by calling them before use.</tt> </tt>