all repos — h3rald @ 75d8481757f0535305523ccd7ee3dc53586061d9

The sources of https://h3rald.com

Updated Glyph book, tags, articles; added textures.
h3rald h3rald@h3rald.com
Sun, 04 Dec 2011 15:04:01 +0100
commit

75d8481757f0535305523ccd7ee3dc53586061d9

parent

7fc23344d777fd238b03ba7d3a0492f69858d2b7

130 files changed, 1422 insertions(+), 3405 deletions(-)

jump to
M RulesRules

@@ -132,7 +132,7 @@ item.identifier.chop + '.js'

end route '/fonts/*' do - item.identifier.chop + '.ttf' + item.identifier.chop + '.otf' end route '*' do
M content/about.textilecontent/about.textile

@@ -23,15 +23,15 @@ The following ruby libraries (gems) are used to compile this web site:

* *"nanoc":http://rubygems.org/gems/nanoc*, to generate the entire web site * *"Extlib":http://rubygems.org/gems/extlib*, in some custom Rake tasks -* *"BB-Ruby":http://rubygems.org/gems/bb-ruby*, for the BBCode filter +* *"BB-Ruby":http://rubygems.org/gems/bb-ruby*, for BBCode support * *"Builder":http://rubygems.org/gems/builder/*, to create RSS and ATOM feeds * *"Sass":http://sass-lang.com/*, for the SASS filter * *"CodeRay":http://rubygems.org/gems/coderay/*, for syntax highlighting * *"RedCloth":http://rubygems.org/gems/redcloth/*, for Textile support * *"BlueCloth":http://rubygems.org/gems/bluecloth/*, for Markdown support -* *"Glyph":http://rubygems.org/gems/glyph*, for the Glyph filter +* *"Glyph":http://rubygems.org/gems/glyph*, for the Glyph support -Additionally, the following gems were necessary to migrate from the previous version of this web site, powered by "Typo":http://www.typosphere.org: +Additionally, the following gems were necessary to migrate from the previous version of this web site, powered by "Typo":http://blog.typosphere.org: * *"MySQL":http://rubyforge.org/projects/mysql/* * *"Sequel":http://rubyforge.org/projects/sequel/*

@@ -41,5 +41,5 @@

Special thanks to the following people, who made this web site possible: * "Denis Defreyne":http://www.stoneship.org/, for creating the wonderful "nanoc":http://nanoc.stoneship.org/ site publishing system. -* "David J.Perry":http://scholarsfonts.net/, who designed the "Cardo font":http://scholarsfonts.net/cardofnt.html I used for the H3RALD logo and the navigation buttons. -* The creators of the free "Gentium":http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=gentium font, used throughout the web site. +* "David J.Perry":http://scholarsfonts.net/, who designed the "Cardo font":http://scholarsfonts.net/cardofnt.html I used for the H3RALD logo. +* Sebastian Kosch, creator of the "Crimson Text":http://aldusleaf.org/ font, used throughout the web site.
M content/archives/april-2006.textilecontent/archives/april-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: April 2006" :type: page -:permalink: april-2006 :filters_pre: - erb -:title: "Archive: April 2006" +:permalink: april-2006 ----- <p>14 articles were written in <em>April 2006</em>:</p>
M content/archives/april-2008.textilecontent/archives/april-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: April 2008" :type: page -:permalink: april-2008 :filters_pre: - erb -:title: "Archive: April 2008" +:permalink: april-2008 ----- <p>2 articles were written in <em>April 2008</em>:</p>
M content/archives/april-2009.textilecontent/archives/april-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: April 2009" :type: page -:permalink: april-2009 :filters_pre: - erb -:title: "Archive: April 2009" +:permalink: april-2009 ----- <p>3 articles were written in <em>April 2009</em>:</p>
M content/archives/april-2010.textilecontent/archives/april-2010.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: April 2010" :type: page -:permalink: april-2010 :filters_pre: - erb -:title: "Archive: April 2010" +:permalink: april-2010 ----- <p>2 articles were written in <em>April 2010</em>:</p>
M content/archives/august-2006.textilecontent/archives/august-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: August 2006" :type: page -:permalink: august-2006 :filters_pre: - erb -:title: "Archive: August 2006" +:permalink: august-2006 ----- <p>3 articles were written in <em>August 2006</em>:</p>
M content/archives/august-2007.textilecontent/archives/august-2007.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: August 2007" :type: page -:permalink: august-2007 :filters_pre: - erb -:title: "Archive: August 2007" +:permalink: august-2007 ----- <p>1 article was written in <em>August 2007</em>:</p>
M content/archives/august-2008.textilecontent/archives/august-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: August 2008" :type: page -:permalink: august-2008 :filters_pre: - erb -:title: "Archive: August 2008" +:permalink: august-2008 ----- <p>1 article was written in <em>August 2008</em>:</p>
M content/archives/august-2011.textilecontent/archives/august-2011.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: August 2011" :type: page -:permalink: august-2011 :filters_pre: - erb -:title: "Archive: August 2011" +:permalink: august-2011 ----- <p>2 articles were written in <em>August 2011</em>:</p>
M content/archives/december-2005.textilecontent/archives/december-2005.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: December 2005" :type: page -:permalink: december-2005 :filters_pre: - erb -:title: "Archive: December 2005" +:permalink: december-2005 ----- <p>9 articles were written in <em>December 2005</em>:</p>
M content/archives/december-2007.textilecontent/archives/december-2007.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: December 2007" :type: page -:permalink: december-2007 :filters_pre: - erb -:title: "Archive: December 2007" +:permalink: december-2007 ----- <p>5 articles were written in <em>December 2007</em>:</p>
M content/archives/december-2008.textilecontent/archives/december-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: December 2008" :type: page -:permalink: december-2008 :filters_pre: - erb -:title: "Archive: December 2008" +:permalink: december-2008 ----- <p>1 article was written in <em>December 2008</em>:</p>
M content/archives/december-2010.textilecontent/archives/december-2010.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: December 2010" :type: page -:permalink: december-2010 :filters_pre: - erb -:title: "Archive: December 2010" +:permalink: december-2010 ----- <p>1 article was written in <em>December 2010</em>:</p>
M content/archives/february-2006.textilecontent/archives/february-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: February 2006" :type: page -:permalink: february-2006 :filters_pre: - erb -:title: "Archive: February 2006" +:permalink: february-2006 ----- <p>2 articles were written in <em>February 2006</em>:</p>
M content/archives/february-2009.textilecontent/archives/february-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: February 2009" :type: page -:permalink: february-2009 :filters_pre: - erb -:title: "Archive: February 2009" +:permalink: february-2009 ----- <p>1 article was written in <em>February 2009</em>:</p>
M content/archives/february-2011.textilecontent/archives/february-2011.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: February 2011" :type: page -:permalink: february-2011 :filters_pre: - erb -:title: "Archive: February 2011" +:permalink: february-2011 ----- <p>1 article was written in <em>February 2011</em>:</p>
M content/archives/january-2006.textilecontent/archives/january-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: January 2006" :type: page -:permalink: january-2006 :filters_pre: - erb -:title: "Archive: January 2006" +:permalink: january-2006 ----- <p>2 articles were written in <em>January 2006</em>:</p>
M content/archives/january-2007.textilecontent/archives/january-2007.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: January 2007" :type: page -:permalink: january-2007 :filters_pre: - erb -:title: "Archive: January 2007" +:permalink: january-2007 ----- <p>1 article was written in <em>January 2007</em>:</p>
M content/archives/january-2008.textilecontent/archives/january-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: January 2008" :type: page -:permalink: january-2008 :filters_pre: - erb -:title: "Archive: January 2008" +:permalink: january-2008 ----- <p>1 article was written in <em>January 2008</em>:</p>
M content/archives/january-2009.textilecontent/archives/january-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: January 2009" :type: page -:permalink: january-2009 :filters_pre: - erb -:title: "Archive: January 2009" +:permalink: january-2009 ----- <p>2 articles were written in <em>January 2009</em>:</p>
M content/archives/january-2010.textilecontent/archives/january-2010.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: January 2010" :type: page -:permalink: january-2010 :filters_pre: - erb -:title: "Archive: January 2010" +:permalink: january-2010 ----- <p>1 article was written in <em>January 2010</em>:</p>
M content/archives/january-2011.textilecontent/archives/january-2011.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: January 2011" :type: page -:permalink: january-2011 :filters_pre: - erb -:title: "Archive: January 2011" +:permalink: january-2011 ----- <p>1 article was written in <em>January 2011</em>:</p>
M content/archives/july-2005.textilecontent/archives/july-2005.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: July 2005" :type: page -:permalink: july-2005 :filters_pre: - erb -:title: "Archive: July 2005" +:permalink: july-2005 ----- <p>1 article was written in <em>July 2005</em>:</p>
M content/archives/july-2006.textilecontent/archives/july-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: July 2006" :type: page -:permalink: july-2006 :filters_pre: - erb -:title: "Archive: July 2006" +:permalink: july-2006 ----- <p>4 articles were written in <em>July 2006</em>:</p>
M content/archives/july-2007.textilecontent/archives/july-2007.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: July 2007" :type: page -:permalink: july-2007 :filters_pre: - erb -:title: "Archive: July 2007" +:permalink: july-2007 ----- <p>5 articles were written in <em>July 2007</em>:</p>
M content/archives/july-2008.textilecontent/archives/july-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: July 2008" :type: page -:permalink: july-2008 :filters_pre: - erb -:title: "Archive: July 2008" +:permalink: july-2008 ----- <p>1 article was written in <em>July 2008</em>:</p>
M content/archives/july-2009.textilecontent/archives/july-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: July 2009" :type: page -:permalink: july-2009 :filters_pre: - erb -:title: "Archive: July 2009" +:permalink: july-2009 ----- <p>1 article was written in <em>July 2009</em>:</p>
M content/archives/july-2011.textilecontent/archives/july-2011.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: July 2011" :type: page -:permalink: july-2011 :filters_pre: - erb -:title: "Archive: July 2011" +:permalink: july-2011 ----- <p>1 article was written in <em>July 2011</em>:</p>
M content/archives/june-2005.textilecontent/archives/june-2005.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: June 2005" :type: page -:permalink: june-2005 :filters_pre: - erb -:title: "Archive: June 2005" +:permalink: june-2005 ----- <p>1 article was written in <em>June 2005</em>:</p>
M content/archives/june-2006.textilecontent/archives/june-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: June 2006" :type: page -:permalink: june-2006 :filters_pre: - erb -:title: "Archive: June 2006" +:permalink: june-2006 ----- <p>2 articles were written in <em>June 2006</em>:</p>
M content/archives/june-2007.textilecontent/archives/june-2007.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: June 2007" :type: page -:permalink: june-2007 :filters_pre: - erb -:title: "Archive: June 2007" +:permalink: june-2007 ----- <p>3 articles were written in <em>June 2007</em>:</p>
M content/archives/june-2008.textilecontent/archives/june-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: June 2008" :type: page -:permalink: june-2008 :filters_pre: - erb -:title: "Archive: June 2008" +:permalink: june-2008 ----- <p>4 articles were written in <em>June 2008</em>:</p>
M content/archives/june-2009.textilecontent/archives/june-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: June 2009" :type: page -:permalink: june-2009 :filters_pre: - erb -:title: "Archive: June 2009" +:permalink: june-2009 ----- <p>2 articles were written in <em>June 2009</em>:</p>
M content/archives/june-2010.textilecontent/archives/june-2010.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: June 2010" :type: page -:permalink: june-2010 :filters_pre: - erb -:title: "Archive: June 2010" +:permalink: june-2010 ----- <p>2 articles were written in <em>June 2010</em>:</p>
M content/archives/march-2006.textilecontent/archives/march-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: March 2006" :type: page -:permalink: march-2006 :filters_pre: - erb -:title: "Archive: March 2006" +:permalink: march-2006 ----- <p>1 article was written in <em>March 2006</em>:</p>
M content/archives/march-2007.textilecontent/archives/march-2007.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: March 2007" :type: page -:permalink: march-2007 :filters_pre: - erb -:title: "Archive: March 2007" +:permalink: march-2007 ----- <p>2 articles were written in <em>March 2007</em>:</p>
M content/archives/march-2008.textilecontent/archives/march-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: March 2008" :type: page -:permalink: march-2008 :filters_pre: - erb -:title: "Archive: March 2008" +:permalink: march-2008 ----- <p>2 articles were written in <em>March 2008</em>:</p>
M content/archives/march-2009.textilecontent/archives/march-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: March 2009" :type: page -:permalink: march-2009 :filters_pre: - erb -:title: "Archive: March 2009" +:permalink: march-2009 ----- <p>4 articles were written in <em>March 2009</em>:</p>
M content/archives/march-2011.textilecontent/archives/march-2011.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: March 2011" :type: page -:permalink: march-2011 :filters_pre: - erb -:title: "Archive: March 2011" +:permalink: march-2011 ----- <p>1 article was written in <em>March 2011</em>:</p>
M content/archives/may-2006.textilecontent/archives/may-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: May 2006" :type: page -:permalink: may-2006 :filters_pre: - erb -:title: "Archive: May 2006" +:permalink: may-2006 ----- <p>12 articles were written in <em>May 2006</em>:</p>
M content/archives/may-2008.textilecontent/archives/may-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: May 2008" :type: page -:permalink: may-2008 :filters_pre: - erb -:title: "Archive: May 2008" +:permalink: may-2008 ----- <p>1 article was written in <em>May 2008</em>:</p>
M content/archives/may-2009.textilecontent/archives/may-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: May 2009" :type: page -:permalink: may-2009 :filters_pre: - erb -:title: "Archive: May 2009" +:permalink: may-2009 ----- <p>1 article was written in <em>May 2009</em>:</p>
M content/archives/may-2010.textilecontent/archives/may-2010.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: May 2010" :type: page -:permalink: may-2010 :filters_pre: - erb -:title: "Archive: May 2010" +:permalink: may-2010 ----- <p>1 article was written in <em>May 2010</em>:</p>
M content/archives/november-2005.textilecontent/archives/november-2005.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: November 2005" :type: page -:permalink: november-2005 :filters_pre: - erb -:title: "Archive: November 2005" +:permalink: november-2005 ----- <p>4 articles were written in <em>November 2005</em>:</p>
M content/archives/november-2006.textilecontent/archives/november-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: November 2006" :type: page -:permalink: november-2006 :filters_pre: - erb -:title: "Archive: November 2006" +:permalink: november-2006 ----- <p>1 article was written in <em>November 2006</em>:</p>
M content/archives/november-2007.textilecontent/archives/november-2007.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: November 2007" :type: page -:permalink: november-2007 :filters_pre: - erb -:title: "Archive: November 2007" +:permalink: november-2007 ----- <p>3 articles were written in <em>November 2007</em>:</p>
M content/archives/november-2008.textilecontent/archives/november-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: November 2008" :type: page -:permalink: november-2008 :filters_pre: - erb -:title: "Archive: November 2008" +:permalink: november-2008 ----- <p>3 articles were written in <em>November 2008</em>:</p>
M content/archives/november-2009.textilecontent/archives/november-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: November 2009" :type: page -:permalink: november-2009 :filters_pre: - erb -:title: "Archive: November 2009" +:permalink: november-2009 ----- <p>3 articles were written in <em>November 2009</em>:</p>
M content/archives/november-2010.textilecontent/archives/november-2010.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: November 2010" :type: page -:permalink: november-2010 :filters_pre: - erb -:title: "Archive: November 2010" +:permalink: november-2010 ----- <p>1 article was written in <em>November 2010</em>:</p>
M content/archives/october-2007.textilecontent/archives/october-2007.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: October 2007" :type: page -:permalink: october-2007 :filters_pre: - erb -:title: "Archive: October 2007" +:permalink: october-2007 ----- <p>3 articles were written in <em>October 2007</em>:</p>
M content/archives/october-2008.textilecontent/archives/october-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: October 2008" :type: page -:permalink: october-2008 :filters_pre: - erb -:title: "Archive: October 2008" +:permalink: october-2008 ----- <p>1 article was written in <em>October 2008</em>:</p>
M content/archives/october-2009.textilecontent/archives/october-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: October 2009" :type: page -:permalink: october-2009 :filters_pre: - erb -:title: "Archive: October 2009" +:permalink: october-2009 ----- <p>2 articles were written in <em>October 2009</em>:</p>
M content/archives/september-2006.textilecontent/archives/september-2006.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: September 2006" :type: page -:permalink: september-2006 :filters_pre: - erb -:title: "Archive: September 2006" +:permalink: september-2006 ----- <p>1 article was written in <em>September 2006</em>:</p>
M content/archives/september-2007.textilecontent/archives/september-2007.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: September 2007" :type: page -:permalink: september-2007 :filters_pre: - erb -:title: "Archive: September 2007" +:permalink: september-2007 ----- <p>6 articles were written in <em>September 2007</em>:</p>
M content/archives/september-2008.textilecontent/archives/september-2008.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: September 2008" :type: page -:permalink: september-2008 :filters_pre: - erb -:title: "Archive: September 2008" +:permalink: september-2008 ----- <p>1 article was written in <em>September 2008</em>:</p>
M content/archives/september-2009.textilecontent/archives/september-2009.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: September 2009" :type: page -:permalink: september-2009 :filters_pre: - erb -:title: "Archive: September 2009" +:permalink: september-2009 ----- <p>1 article was written in <em>September 2009</em>:</p>
M content/archives/september-2010.textilecontent/archives/september-2010.textile

@@ -1,9 +1,9 @@

----- +:title: "Archive: September 2010" :type: page -:permalink: september-2010 :filters_pre: - erb -:title: "Archive: September 2010" +:permalink: september-2010 ----- <p>3 articles were written in <em>September 2010</em>:</p>
M content/glyph.textilecontent/glyph.textile

@@ -13,7 +13,7 @@ - "Download": http://www.rubygems.org/gems/glyph

- "Documentation": /glyph/book/ - "User Group": http://groups.google.com/group/glyph-framework status: Active -version: 0.5.0 +version: 0.5.1 ----- <%= render 'project_data', :tag => 'glyph' %>
M content/glyph/book/acknowledgements.htmlcontent/glyph/book/acknowledgements.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/changelog.htmlcontent/glyph/book/changelog.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -71,9 +71,45 @@

<section class="section"> -<header><h1 id="h_286">v0.5.0 &ndash; August 28th 2011</h1></header> +<header><h1 id="h_286">v0.5.1 &ndash; December 4th 2011</h1></header> <section class="section"> -<header><h1 id="h_287">16 Features Implemented</h1></header> +<header><h1 id="h_287">2 Bugs Fixed</h1></header> +<table> + <tr> + <th>ID</th> + <th>Description</th> + </tr> + + + <tr> + <td><a href="https://github.com/h3rald/glyph/issues/203">#203</a></td> + <td> +<p>Fixed error in <a href="/glyph/book/macros/macros_block.html#m_pubdate"><code>pubdate</code></a> macro.</p> +</td> + </tr> + + <tr> + <td><a href="https://github.com/h3rald/glyph/issues/204">#204</a></td> + <td> +<p>Updated CodeRay stylesheet.</p> +</td> + </tr> + + </table> + +</section> + + + <p> +<em>&rarr; View closed issues on <a href="https://github.com/h3rald/glyph/issues?direction=asc&amp;labels=0.5.1&amp;sort=created&amp;state=closed">GitHub</a>.</em> +</p> + +</section> + + <section class="section"> +<header><h1 id="h_288">v0.5.0 &ndash; August 28th 2011</h1></header> +<section class="section"> +<header><h1 id="h_289">16 Features Implemented</h1></header> <table> <tr> <th>ID</th>

@@ -199,7 +235,7 @@ </section>

<section class="section"> -<header><h1 id="h_288">4 Bugs Fixed</h1></header> +<header><h1 id="h_290">4 Bugs Fixed</h1></header> <table> <tr> <th>ID</th>

@@ -247,9 +283,9 @@

</section> <section class="section"> -<header><h1 id="h_289">v0.4.2 &ndash; October 22th 2010</h1></header> +<header><h1 id="h_291">v0.4.2 &ndash; October 22th 2010</h1></header> <section class="section"> -<header><h1 id="h_290">3 Features Implemented</h1></header> +<header><h1 id="h_292">3 Features Implemented</h1></header> <table> <tr> <th>ID</th>

@@ -284,7 +320,7 @@ </section>

<section class="section"> -<header><h1 id="h_291">1 Bug Fixed</h1></header> +<header><h1 id="h_293">1 Bug Fixed</h1></header> <table> <tr> <th>ID</th>

@@ -311,9 +347,9 @@

</section> <section class="section"> -<header><h1 id="h_292">v0.4.1 &ndash; September 23th 2010</h1></header> +<header><h1 id="h_294">v0.4.1 &ndash; September 23th 2010</h1></header> <section class="section"> -<header><h1 id="h_293">5 Bugs Fixed</h1></header> +<header><h1 id="h_295">5 Bugs Fixed</h1></header> <table> <tr> <th>ID</th>

@@ -368,9 +404,9 @@

</section> <section class="section"> -<header><h1 id="h_294">v0.4.0 &ndash; September 3th 2010</h1></header> +<header><h1 id="h_296">v0.4.0 &ndash; September 3th 2010</h1></header> <section class="section"> -<header><h1 id="h_295">13 Features Implemented</h1></header> +<header><h1 id="h_297">13 Features Implemented</h1></header> <table> <tr> <th>ID</th>

@@ -475,7 +511,7 @@ </section>

<section class="section"> -<header><h1 id="h_296">7 Bugs Fixed</h1></header> +<header><h1 id="h_298">7 Bugs Fixed</h1></header> <table> <tr> <th>ID</th>

@@ -544,9 +580,9 @@

</section> <section class="section"> -<header><h1 id="h_297">v0.3.0 &ndash; June 13th 2010</h1></header> +<header><h1 id="h_299">v0.3.0 &ndash; June 13th 2010</h1></header> <section class="section"> -<header><h1 id="h_298">13 Features Implemented</h1></header> +<header><h1 id="h_300">13 Features Implemented</h1></header> <table> <tr> <th>ID</th>

@@ -651,7 +687,7 @@ </section>

<section class="section"> -<header><h1 id="h_299">3 Bugs Fixed</h1></header> +<header><h1 id="h_301">3 Bugs Fixed</h1></header> <table> <tr> <th>ID</th>

@@ -692,9 +728,9 @@

</section> <section class="section"> -<header><h1 id="h_300">v0.2.0 &ndash; May 9th 2010</h1></header> +<header><h1 id="h_302">v0.2.0 &ndash; May 9th 2010</h1></header> <section class="section"> -<header><h1 id="h_301">11 Features Implemented</h1></header> +<header><h1 id="h_303">11 Features Implemented</h1></header> <table> <tr> <th>ID</th>

@@ -785,7 +821,7 @@ </section>

<section class="section"> -<header><h1 id="h_302">8 Bugs Fixed</h1></header> +<header><h1 id="h_304">8 Bugs Fixed</h1></header> <table> <tr> <th>ID</th>

@@ -861,7 +897,7 @@

</section> <section class="section"> -<header><h1 id="h_303">v0.1.0 &ndash; April 8th 2010</h1></header> +<header><h1 id="h_305">v0.1.0 &ndash; April 8th 2010</h1></header> Initial release. <p>
M content/glyph/book/compiling/compiling.htmlcontent/glyph/book/compiling/compiling.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -73,7 +73,7 @@ <li>Web (i.e. multiple <span class="caps">HTML</span> files)</li>

<li>Web5 (i.e. multiple HTML5 files)</li> </ul> <section class="section"> -<header><h1 id="h_51">HTML/HTML5 output</h1></header> +<header><h1 id="h_50">HTML/HTML5 output</h1></header> <p>To compile a Glyph project to an HTML document, use the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command within your Glyph project folder. Glyph parses the <code>document.glyph</code> file (and all included files and snippets); if no errors are found, Glyph creates an HTML document in the <code>/output/html</code> folder.</p> <p>The name of the HTML file can be set in the configuration (<a href="/glyph/book/config/document.html#s_document_filename"><code>document.filename</code></a> setting).</p> <p>To create an HTML5 file instead, you must specify it explicitly like this:</p>

@@ -83,7 +83,7 @@ </p>

</section> <section class="section"> -<header><h1 id="h_52">PDF Output</h1></header> +<header><h1 id="h_51">PDF Output</h1></header> <p>To generate a PDF document, you must specify <code>pdf</code> as format, like this:</p> <p> <code> glyph compile -f pdf </code>

@@ -107,7 +107,7 @@

</section> <section class="section"> -<header><h1 id="h_53">EPUB/MOBI output</h1></header> +<header><h1 id="h_52">EPUB/MOBI output</h1></header> <p>To generate .epub or .mobi e-books, you must specify <code>epub</code> or <code>mobi</code> as format, like this:</p> <p> <code> glyph compile -f mobi </code>
M content/glyph/book/compiling/lite_mode.htmlcontent/glyph/book/compiling/lite_mode.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/compiling/programmatic_usage.htmlcontent/glyph/book/compiling/programmatic_usage.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/config/document.htmlcontent/glyph/book/config/document.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/config/filters.htmlcontent/glyph/book/config/filters.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/config/options.htmlcontent/glyph/book/config/options.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/config/output.htmlcontent/glyph/book/config/output.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/extending/bookmarks_headers.htmlcontent/glyph/book/extending/bookmarks_headers.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -68,14 +68,15 @@ <nav class="navigation"><a href="/glyph/book/extending/params_attrs.html">Parameters and Attributes</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/extending/placeholders.html">Using Placeholders</a></nav>

<p>The <a href="http://rubydoc.info/gems/glyph/Macro"><code>Glyph::Macro</code></a> class also includes a few methods to check and store bookmarks and headers. Consider for example the following source code for the <a href="/glyph/book/macros/macros_inline.html#m_anchor"><code>anchor</code></a> macro:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> macro <span class="sy">:anchor</span> <span class="r">do</span> -<span class="no">2</span> min_parameters <span class="i">1</span> -<span class="no">3</span> max_parameters <span class="i">2</span> -<span class="no">4</span> bookmark <span class="sy">:id</span> =&gt; param(<span class="i">0</span>), <span class="sy">:title</span> =&gt; param(<span class="i">1</span>), <span class="sy">:file</span> =&gt; <span class="iv">@source_file</span> -<span class="no">5</span> <span class="iv">@data</span>[<span class="sy">:id</span>] = param <span class="i">0</span> -<span class="no">6</span> <span class="iv">@data</span>[<span class="sy">:title</span>] = param <span class="i">1</span> -<span class="no">7</span> render -<span class="no">8</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>macro <span class="symbol">:anchor</span> <span class="keyword">do</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> min_parameters <span class="integer">1</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> max_parameters <span class="integer">2</span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> bookmark <span class="symbol">:id</span> =&gt; param(<span class="integer">0</span>), <span class="symbol">:title</span> =&gt; param(<span class="integer">1</span>), <span class="symbol">:file</span> =&gt; <span class="instance-variable">@source_file</span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> <span class="instance-variable">@data</span>[<span class="symbol">:id</span>] = param <span class="integer">0</span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> <span class="instance-variable">@data</span>[<span class="symbol">:title</span>] = param <span class="integer">1</span> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> render +<span class="line-numbers"><a href="#n8" name="n8">8</a></span><span class="keyword">end</span> +</pre></div> </div>
M content/glyph/book/extending/command.htmlcontent/glyph/book/extending/command.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -67,52 +67,55 @@

<nav class="navigation"><a href="/glyph/book/extending/output_format.html">Custom Output Formats</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/troubleshooting/errors_generic.html">Generic Errors</a></nav> <p>Glyph relies on <a href="http://davetron5000.github.com/gli/"><span class="caps">GLI</span></a> for defining commands. This useful library provides a high-level framework for creating command-line interface similar to <a href="http://git-scm.com/">Git</a>, its <span class="caps">DSL</span> takes care of pretty much everything, from managing command line arguments and options to providing an interactive help system.</p> <section class="section"> -<header><h1 id="h_109">Creating a 'glyph generate' command</h1></header> +<header><h1 id="h_108">Creating a 'glyph generate' command</h1></header> <p>Consider the custom task defined in <a href="/glyph/book/extending/task.html#custom_generate_task">Creating a &#8216;custom:generate&#8217; task</a>. Creating a custom command to call it is fairly straightforward.</p> <p>First of all, create a <code>lib/commands</code> folder in your project directory. Then, create a <code>.rb</code> file within it, e.g. <code>commands.rake</code>.</p> <p>Finally, here&#8217;s the source of the command:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> <span class="co">GLI</span>.desc <span class="s"><span class="dl">'</span><span class="k">Generates a specific file required for Glyph releases</span><span class="dl">'</span></span> -<span class="no"> 2</span> arg_name <span class="s"><span class="dl">&quot;</span><span class="k">file_name</span><span class="dl">&quot;</span></span> -<span class="no"> 3</span> command <span class="sy">:generate</span> <span class="r">do</span> |c| -<span class="no"> 4</span> c.action <span class="r">do</span> |global_options,options,args| -<span class="no"> 5</span> <span class="r">if</span> args.blank? <span class="r">then</span> -<span class="no"> 6</span> raise <span class="co">RuntimeError</span>, <span class="s"><span class="dl">&quot;</span><span class="k">You must specify a file to generate</span><span class="dl">&quot;</span></span> -<span class="no"> 7</span> <span class="r">else</span> -<span class="no"> 8</span> <span class="co">Glyph</span>.run <span class="s"><span class="dl">'</span><span class="k">custom:generate</span><span class="dl">'</span></span>, args[<span class="i">0</span>] -<span class="no"> 9</span> <span class="r">end</span> -<span class="no"><strong>10</strong></span> <span class="r">end</span> -<span class="no">11</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="constant">GLI</span>.desc <span class="string"><span class="delimiter">'</span><span class="content">Generates a specific file required for Glyph releases</span><span class="delimiter">'</span></span> +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>arg_name <span class="string"><span class="delimiter">&quot;</span><span class="content">file_name</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>command <span class="symbol">:generate</span> <span class="keyword">do</span> |c| +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> c.action <span class="keyword">do</span> |global_options,options,args| +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> <span class="keyword">if</span> args.blank? <span class="keyword">then</span> +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> raise <span class="constant">RuntimeError</span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">You must specify a file to generate</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> <span class="keyword">else</span> +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> <span class="constant">Glyph</span>.run <span class="string"><span class="delimiter">'</span><span class="content">custom:generate</span><span class="delimiter">'</span></span>, args[<span class="integer">0</span>] +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> <span class="keyword">end</span> +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n11" name="n11">11</a></span><span class="keyword">end</span> +</pre></div> </div> <p>That&#8217;s it. If you try to run <code>glyph help</code> within your project directory, notice that there&#8217;s a new entry for the generate command:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> $ glyph help -<span class="no"> 2</span> ===================================== -<span class="no"> 3</span> Glyph v/0.5.0 -<span class="no"> 4</span> ===================================== -<span class="no"> 5</span> usage: glyph command [options] -<span class="no"> 6</span> -<span class="no"> 7</span> Options: -<span class="no"> 8</span> -d, --debug - Enable debugging -<span class="no"> 9</span> -<span class="no"><strong>10</strong></span> Commands: -<span class="no">11</span> add - Add a new text file to the project -<span class="no">12</span> compile - Compile the project -<span class="no">13</span> config - Get/set configuration settings -<span class="no">14</span> generate - Generates a specific file required for Glyph releases -<span class="no">15</span> help - Shows list of commands or help for one command -<span class="no">16</span> init - Create a new Glyph project -<span class="no">17</span> outline - Display the document outline -<span class="no">18</span> stats - Display statistics -<span class="no">19</span> todo - Display all project TODO items</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>$ glyph help +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>===================================== +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>Glyph v/0.5.1 +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span>===================================== +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span>usage: glyph command [options] +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span>Options: +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> -d, --debug - Enable debugging +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span>Commands: +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> add - Add a new text file to the project +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> compile - Compile the project +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> config - Get/set configuration settings +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> generate - Generates a specific file required for Glyph releases +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> help - Shows list of commands or help for one command +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> init - Create a new Glyph project +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> outline - Display the document outline +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> stats - Display statistics +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> todo - Display all project TODO items +</pre></div> </div> <p>You can now run the Glyph command as expected:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> $ glyph -d generate changelog -<span class="no">2</span> -- Generating CHANGELOG... -<span class="no">3</span> -- Done.</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>$ glyph -d generate changelog +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>-- Generating CHANGELOG... +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>-- Done. +</pre></div> </div> </section>
M content/glyph/book/extending/commands_tasks.htmlcontent/glyph/book/extending/commands_tasks.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/extending/further_reading.htmlcontent/glyph/book/extending/further_reading.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/extending/internals.htmlcontent/glyph/book/extending/internals.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -75,58 +75,61 @@ <li>The <em>Analysis Phase</em> (Processing) starts when the interpreter method calls the <code>analyze</code> method, instantiating a new <a href="http://rubydoc.info/gems/glyph/Glyph/Document"><code>Glyph::Document</code></a>. The <code>Glyph::Document</code> object evaluates the <span class="caps">AST</span> expanding all macro nodesth (that&#8217;s when macros are executed) and generates string.</li>

<li>The <em>Finalization Phase</em> (Post-Processing) starts when the interpreter calls the <code>finalyze</code> method, causing the <code>Glyph::Document</code> object to perform a series of finalizations on the string obtained after analysis, i.e. it replaces escape sequences and placeholders.</li> </ul> <section class="section"> -<header><h1 id="h_84">Example: A short note</h1></header> +<header><h1 id="h_83">Example: A short note</h1></header> <p>As an example, consider the following Glyph code:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> fmi[something|#test] -<span class="no">2</span> ... -<span class="no">3</span> section[ -<span class="no">4</span> @title[Test Section] -<span class="no">5</span> @id[test] -<span class="no">6</span> ... -<span class="no">7</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>fmi[something|#test] +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>... +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>section[ +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> @title[Test Section] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> @id[test] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>... +<span class="line-numbers"><a href="#n7" name="n7">7</a></span>] +</pre></div> </div> <p>This simple snippet uses the <a href="/glyph/book/macros/macros_inline.html#m_fmi"><code>fmi</code></a> macro to link to a section later on in the document. When parsed, the produced AST is the following:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> {<span class="sy">:name</span>=&gt;<span class="sy"><span class="sy">:</span><span class="dl">&quot;</span><span class="k">--</span><span class="dl">&quot;</span></span>} -<span class="no"> 2</span> {<span class="sy">:name</span>=&gt;<span class="sy">:fmi</span>, <span class="sy">:escape</span>=&gt;<span class="pc">false</span>} -<span class="no"> 3</span> {<span class="sy">:name</span>=&gt;<span class="sy"><span class="sy">:</span><span class="dl">&quot;</span><span class="k">0</span><span class="dl">&quot;</span></span>} -<span class="no"> 4</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="k">something</span><span class="dl">&quot;</span></span>} -<span class="no"> 5</span> {<span class="sy">:name</span>=&gt;<span class="sy"><span class="sy">:</span><span class="dl">&quot;</span><span class="k">1</span><span class="dl">&quot;</span></span>} -<span class="no"> 6</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="k">#test</span><span class="dl">&quot;</span></span>} -<span class="no"> 7</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\n</span><span class="dl">&quot;</span></span>} -<span class="no"> 8</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\</span><span class="k">[</span><span class="dl">&quot;</span></span>, <span class="sy">:escaped</span>=&gt;<span class="pc">true</span>} -<span class="no"> 9</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="k">...</span><span class="dl">&quot;</span></span>} -<span class="no"><strong>10</strong></span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\</span><span class="k">]</span><span class="dl">&quot;</span></span>, <span class="sy">:escaped</span>=&gt;<span class="pc">true</span>} -<span class="no">11</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\n</span><span class="dl">&quot;</span></span>} -<span class="no">12</span> {<span class="sy">:name</span>=&gt;<span class="sy">:section</span>, <span class="sy">:escape</span>=&gt;<span class="pc">false</span>} -<span class="no">13</span> {<span class="sy">:name</span>=&gt;<span class="sy"><span class="sy">:</span><span class="dl">&quot;</span><span class="k">0</span><span class="dl">&quot;</span></span>} -<span class="no">14</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\n</span><span class="ch">\t</span><span class="dl">&quot;</span></span>} -<span class="no">15</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\n</span><span class="ch">\t</span><span class="dl">&quot;</span></span>} -<span class="no">16</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\n</span><span class="dl">&quot;</span></span>} -<span class="no">17</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\</span><span class="k">[</span><span class="dl">&quot;</span></span>, <span class="sy">:escaped</span>=&gt;<span class="pc">true</span>} -<span class="no">18</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="k">...</span><span class="dl">&quot;</span></span>} -<span class="no">19</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\</span><span class="k">]</span><span class="dl">&quot;</span></span>, <span class="sy">:escaped</span>=&gt;<span class="pc">true</span>} -<span class="no"><strong>20</strong></span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="ch">\n</span><span class="dl">&quot;</span></span>} -<span class="no">21</span> {<span class="sy">:name</span>=&gt;<span class="sy">:title</span>, <span class="sy">:escape</span>=&gt;<span class="pc">false</span>} -<span class="no">22</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="k">Test Section</span><span class="dl">&quot;</span></span>} -<span class="no">23</span> {<span class="sy">:name</span>=&gt;<span class="sy">:id</span>, <span class="sy">:escape</span>=&gt;<span class="pc">false</span>} -<span class="no">24</span> {<span class="sy">:value</span>=&gt;<span class="s"><span class="dl">&quot;</span><span class="k">test</span><span class="dl">&quot;</span></span>}</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>{<span class="symbol">:name</span>=&gt;<span class="symbol"><span class="symbol">:</span><span class="delimiter">&quot;</span><span class="content">--</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> {<span class="symbol">:name</span>=&gt;<span class="symbol">:fmi</span>, <span class="symbol">:escape</span>=&gt;<span class="predefined-constant">false</span>} +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> {<span class="symbol">:name</span>=&gt;<span class="symbol"><span class="symbol">:</span><span class="delimiter">&quot;</span><span class="content">0</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="content">something</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> {<span class="symbol">:name</span>=&gt;<span class="symbol"><span class="symbol">:</span><span class="delimiter">&quot;</span><span class="content">1</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="content">#test</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\n</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\</span><span class="content">[</span><span class="delimiter">&quot;</span></span>, <span class="symbol">:escaped</span>=&gt;<span class="predefined-constant">true</span>} +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="content">...</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\</span><span class="content">]</span><span class="delimiter">&quot;</span></span>, <span class="symbol">:escaped</span>=&gt;<span class="predefined-constant">true</span>} +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\n</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> {<span class="symbol">:name</span>=&gt;<span class="symbol">:section</span>, <span class="symbol">:escape</span>=&gt;<span class="predefined-constant">false</span>} +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> {<span class="symbol">:name</span>=&gt;<span class="symbol"><span class="symbol">:</span><span class="delimiter">&quot;</span><span class="content">0</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\n</span><span class="char">\t</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\n</span><span class="char">\t</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\n</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\</span><span class="content">[</span><span class="delimiter">&quot;</span></span>, <span class="symbol">:escaped</span>=&gt;<span class="predefined-constant">true</span>} +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="content">...</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\</span><span class="content">]</span><span class="delimiter">&quot;</span></span>, <span class="symbol">:escaped</span>=&gt;<span class="predefined-constant">true</span>} +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="char">\n</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> {<span class="symbol">:name</span>=&gt;<span class="symbol">:title</span>, <span class="symbol">:escape</span>=&gt;<span class="predefined-constant">false</span>} +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="content">Test Section</span><span class="delimiter">&quot;</span></span>} +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> {<span class="symbol">:name</span>=&gt;<span class="symbol">:id</span>, <span class="symbol">:escape</span>=&gt;<span class="predefined-constant">false</span>} +<span class="line-numbers"><a href="#n24" name="n24">24</a></span> {<span class="symbol">:value</span>=&gt;<span class="string"><span class="delimiter">&quot;</span><span class="content">test</span><span class="delimiter">&quot;</span></span>} +</pre></div> </div> <p>This output is produced by calling the <code>inspect</code> method on the AST. Each <a href="http://rubydoc.info/gems/glyph/Glyph/SyntaxNode"><code>Glyph::SyntaxNode</code></a> object in the tree is basically an ordinary Glyph Hash with a parent and 0 or more chidren, so the code snippets above shows how the syntax nodes are nested.</p> <p>The AST contains information about macro, parameter and attribute names, and escaping, and raw text values (the nodes without a <code>:name</code> key), but nothing more.</p> <p>When the AST is analyzed, the resulting textual output is the following:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> <span class="ta">&lt;span</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">fmi</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>for more information on something, see ‡‡‡‡‡PLACEHOLDER ¤ 1‡‡‡‡‡ -<span class="no">2</span> <span class="ta">&lt;/span&gt;</span> -<span class="no">3</span> \/[...\/] -<span class="no">4</span> <span class="ta">&lt;div</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">section</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span> -<span class="no">5</span> <span class="ta">&lt;h2</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">test</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>Test Section<span class="ta">&lt;/h2&gt;</span> -<span class="no">6</span> \/[...\/] -<span class="no">7</span> -<span class="no">8</span> <span class="ta">&lt;/div&gt;</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag">&lt;span</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">fmi</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>for more information on something, see ‡‡‡‡‡PLACEHOLDER ¤ 1‡‡‡‡‡ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span><span class="tag">&lt;/span&gt;</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>\/[...\/] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span><span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span><span class="tag">&lt;h2</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">test</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Test Section<span class="tag">&lt;/h2&gt;</span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>\/[...\/] +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> +<span class="line-numbers"><a href="#n8" name="n8">8</a></span><span class="tag">&lt;/div&gt;</span> +</pre></div> </div> <p>This looks almost perfect, except that:</p>

@@ -136,14 +139,15 @@ <li>There are some escaped brackets.</li>

</ul> <p>Finally, when the document is finalized, placeholders and escape sequences are removed and the final result is the following:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> <span class="ta">&lt;span</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">fmi</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>for more information on something, -<span class="no">2</span> see <span class="ta">&lt;a</span> <span class="an">href</span>=<span class="s"><span class="dl">&quot;</span><span class="k">#test</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>Test Section<span class="ta">&lt;/a&gt;</span><span class="ta">&lt;/span&gt;</span> -<span class="no">3</span> [...] -<span class="no">4</span> <span class="ta">&lt;div</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">section</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span> -<span class="no">5</span> <span class="ta">&lt;h2</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">test</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>Test Section<span class="ta">&lt;/h2&gt;</span> -<span class="no">6</span> [...] -<span class="no">7</span> -<span class="no">8</span> <span class="ta">&lt;/div&gt;</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag">&lt;span</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">fmi</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>for more information on something, +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> see <span class="tag">&lt;a</span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">#test</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Test Section<span class="tag">&lt;/a&gt;</span><span class="tag">&lt;/span&gt;</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>[...] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span><span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span><span class="tag">&lt;h2</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">test</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Test Section<span class="tag">&lt;/h2&gt;</span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>[...] +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> +<span class="line-numbers"><a href="#n8" name="n8">8</a></span><span class="tag">&lt;/div&gt;</span> +</pre></div> </div> </section>
M content/glyph/book/extending/interpreting.htmlcontent/glyph/book/extending/interpreting.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -69,13 +69,14 @@

<p>What if you need to evaluate some Glyph code <em>within</em> a macro? Say for example you want to transform a parameter in a link, and you want to make sure that link gets validated exactly like the others, in this case, you can use the <code>interpret</code> method, as follows:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> macro <span class="sy">:fmi</span> <span class="r">do</span> -<span class="no">2</span> topic, href = <span class="iv">@params</span> -<span class="no">3</span> link = placeholder <span class="r">do</span> |document| -<span class="no">4</span> interpret <span class="s"><span class="dl">&quot;</span><span class="k">link[</span><span class="il"><span class="idl">#{</span>href<span class="idl">}</span></span><span class="k">]</span><span class="dl">&quot;</span></span> -<span class="no">5</span> <span class="r">end</span> -<span class="no">6</span> <span class="s"><span class="dl">%{</span><span class="k">&lt;span class=&quot;fmi&quot;&gt;for more information on </span><span class="il"><span class="idl">#{</span>topic<span class="idl">}</span></span><span class="k">, see </span><span class="il"><span class="idl">#{</span>link<span class="idl">}</span></span><span class="k">&lt;/span&gt;</span><span class="dl">}</span></span> -<span class="no">7</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>macro <span class="symbol">:fmi</span> <span class="keyword">do</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> topic, href = <span class="instance-variable">@params</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> link = placeholder <span class="keyword">do</span> |document| +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> interpret <span class="string"><span class="delimiter">&quot;</span><span class="content">link[</span><span class="inline"><span class="inline-delimiter">#{</span>href<span class="inline-delimiter">}</span></span><span class="content">]</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> <span class="string"><span class="delimiter">%{</span><span class="content">&lt;span class=&quot;fmi&quot;&gt;for more information on </span><span class="inline"><span class="inline-delimiter">#{</span>topic<span class="inline-delimiter">}</span></span><span class="content">, see </span><span class="inline"><span class="inline-delimiter">#{</span>link<span class="inline-delimiter">}</span></span><span class="content">&lt;/span&gt;</span><span class="delimiter">}</span></span> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span><span class="keyword">end</span> +</pre></div> </div>

@@ -87,33 +88,34 @@ <li>Any macro included in the <code>String</code> is evaluated, and the resulting text is returned by the method. Note that this new document does not get finalized: in other words, placeholders will be left as they are, and they&#8217;ll eventually be replaced when <em>the main document</em> is finalized.</li>

</ol> <section class="section"> -<header><h1 id="h_94">Dispatching</h1></header> +<header><h1 id="h_93">Dispatching</h1></header> <p><a href="/glyph/book/text_editing/macro_composition.html#composition">Macro Composition</a> can be useful to remove nesting, but you can also use it to create your own macro <em>dispatchers</em>. What is a macro dispatcher? The easies way to understand this is by looking at the source code of one of them, the <a href="/glyph/book/macros/macros_core.html#m_s"><code>s</code></a> macro:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> macro <span class="sy">:s</span> <span class="r">do</span> -<span class="no"> 2</span> dispatch <span class="r">do</span> |node| -<span class="no"> 3</span> forbidden = [<span class="sy">:each</span>, <span class="sy">:each_line</span>, <span class="sy">:each_byte</span>, <span class="sy">:upto</span>, <span class="sy">:intern</span>, <span class="sy">:to_sym</span>, <span class="sy">:to_f</span>] -<span class="no"> 4</span> meth = node[<span class="sy">:name</span>] -<span class="no"> 5</span> infer_type = lambda <span class="r">do</span> |str| -<span class="no"> 6</span> <span class="c"># Code omitted...</span> -<span class="no"> 7</span> <span class="r">end</span> -<span class="no"> 8</span> macro_error <span class="s"><span class="dl">&quot;</span><span class="k">Macro 's/</span><span class="il"><span class="idl">#{</span>meth<span class="idl">}</span></span><span class="k">' takes at least one parameter</span><span class="dl">&quot;</span></span> <span class="r">unless</span> node.params.length &gt; <span class="i">0</span> -<span class="no"> 9</span> macro_error <span class="s"><span class="dl">&quot;</span><span class="k">String method '</span><span class="il"><span class="idl">#{</span>meth<span class="idl">}</span></span><span class="k">' is not supported</span><span class="dl">&quot;</span></span> <span class="r">if</span> meth.in?(forbidden) || meth.to_s.match(<span class="rx"><span class="dl">/</span><span class="k">!$</span><span class="dl">/</span></span>) -<span class="no"><strong>10</strong></span> str = node.param(<span class="i">0</span>).evaluate(node, <span class="sy">:params</span> =&gt; <span class="pc">true</span>) -<span class="no">11</span> <span class="r">begin</span> -<span class="no">12</span> <span class="r">if</span> node.param(<span class="i">1</span>) <span class="r">then</span> -<span class="no">13</span> meth_params = node.params[<span class="i">1</span>..node.params.length-<span class="i">1</span>].map <span class="r">do</span> |p| -<span class="no">14</span> infer_type.call(p.evaluate(node, <span class="sy">:params</span> =&gt; <span class="pc">true</span>)) -<span class="no">15</span> <span class="r">end</span> -<span class="no">16</span> str.send(meth, *meth_params).to_s -<span class="no">17</span> <span class="r">else</span> -<span class="no">18</span> str.send(meth).to_s -<span class="no">19</span> <span class="r">end</span> -<span class="no"><strong>20</strong></span> <span class="r">rescue</span> <span class="co">Exception</span> =&gt; e -<span class="no">21</span> <span class="c"># Code omittted</span> -<span class="no">22</span> <span class="r">end</span> -<span class="no">23</span> <span class="r">end</span> -<span class="no">24</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>macro <span class="symbol">:s</span> <span class="keyword">do</span> +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> dispatch <span class="keyword">do</span> |node| +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> forbidden = [<span class="symbol">:each</span>, <span class="symbol">:each_line</span>, <span class="symbol">:each_byte</span>, <span class="symbol">:upto</span>, <span class="symbol">:intern</span>, <span class="symbol">:to_sym</span>, <span class="symbol">:to_f</span>] +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> meth = node[<span class="symbol">:name</span>] +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> infer_type = lambda <span class="keyword">do</span> |str| +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> <span class="comment"># Code omitted...</span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> <span class="keyword">end</span> +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> macro_error <span class="string"><span class="delimiter">&quot;</span><span class="content">Macro 's/</span><span class="inline"><span class="inline-delimiter">#{</span>meth<span class="inline-delimiter">}</span></span><span class="content">' takes at least one parameter</span><span class="delimiter">&quot;</span></span> <span class="keyword">unless</span> node.params.length &gt; <span class="integer">0</span> +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> macro_error <span class="string"><span class="delimiter">&quot;</span><span class="content">String method '</span><span class="inline"><span class="inline-delimiter">#{</span>meth<span class="inline-delimiter">}</span></span><span class="content">' is not supported</span><span class="delimiter">&quot;</span></span> <span class="keyword">if</span> meth.in?(forbidden) || meth.to_s.match(<span class="regexp"><span class="delimiter">/</span><span class="content">!$</span><span class="delimiter">/</span></span>) +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> str = node.param(<span class="integer">0</span>).evaluate(node, <span class="symbol">:params</span> =&gt; <span class="predefined-constant">true</span>) +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> <span class="keyword">begin</span> +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> <span class="keyword">if</span> node.param(<span class="integer">1</span>) <span class="keyword">then</span> +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> meth_params = node.params[<span class="integer">1</span>..node.params.length-<span class="integer">1</span>].map <span class="keyword">do</span> |p| +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> infer_type.call(p.evaluate(node, <span class="symbol">:params</span> =&gt; <span class="predefined-constant">true</span>)) +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> str.send(meth, *meth_params).to_s +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> <span class="keyword">else</span> +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> str.send(meth).to_s +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> <span class="keyword">end</span> +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> <span class="comment"># Code omittted</span> +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n24" name="n24">24</a></span><span class="keyword">end</span> +</pre></div> </div> <p>See the <code>dispatch</code> method at the very beginning? This method takes a block with a <code>node</code> parameter, corresponding to the MacroNode of the macro which is being composed with <code>s</code>. So, for example, if you write <code>s/sub[my string|/my/|your]</code> the node of a macro called <code>sub</code> will be passed to the block. Of course there&#8217;s no <code>sub</code> macro defined in Glyph, but it doesn&#8217;t matter: its name will be interpreted as the name of a method of the Ruby String class in this case, so no worries.</p>

@@ -126,24 +128,26 @@ <header><h1 id="rewriting">Defining macros using Glyph</h1></header>

<p>While the <code>interpret</code> method is useful to evaluate Glyph code in a macro while performing other actions (storing a bookmark, checking for the presence of an anchor, etc.), in some cases it may not be necessary. If you simply want your macro to be converted into existing Glyph macro without performing any action excepting parameter substitution, you can just use the <a href="/glyph/book/macros/macros_core.html#m_define_"><code>define:</code></a> macro within your Glyph document</p> <p>Consider the following macro definition:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> macro <span class="sy">:issue</span> <span class="r">do</span> -<span class="no">2</span> interpret <span class="s"><span class="dl">%{</span><span class="k"> -<span class="no">3</span> tr[ -<span class="no">4</span> td[/=&gt;[http://github.com/h3rald/glyph/issues/closed#issue/</span><span class="il"><span class="idl">#{</span>param[<span class="i">0</span>]<span class="idl">}</span></span><span class="k">|#</span><span class="il"><span class="idl">#{</span>param(<span class="i">0</span>)<span class="idl">}</span></span><span class="k">]] -<span class="no">5</span> td[txt[</span><span class="il"><span class="idl">#{</span>param(<span class="i">1</span>)<span class="idl">}</span></span><span class="k">]] -<span class="no">6</span> ] -<span class="no">7</span> </span><span class="dl">}</span></span> -<span class="no">8</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>macro <span class="symbol">:issue</span> <span class="keyword">do</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> interpret <span class="string"><span class="delimiter">%{</span><span class="content"></span></span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span><span class="string"><span class="content"> tr[</span></span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span><span class="string"><span class="content"> td[/=&gt;[http://github.com/h3rald/glyph/issues/closed#issue/</span><span class="inline"><span class="inline-delimiter">#{</span>param[<span class="integer">0</span>]<span class="inline-delimiter">}</span></span><span class="content">|#</span><span class="inline"><span class="inline-delimiter">#{</span>param(<span class="integer">0</span>)<span class="inline-delimiter">}</span></span><span class="content">]]</span></span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span><span class="string"><span class="content"> td[txt[</span><span class="inline"><span class="inline-delimiter">#{</span>param(<span class="integer">1</span>)<span class="inline-delimiter">}</span></span><span class="content">]]</span></span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span><span class="string"><span class="content"> ]</span></span> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span><span class="string"><span class="content"> </span><span class="delimiter">}</span></span> +<span class="line-numbers"><a href="#n8" name="n8">8</a></span><span class="keyword">end</span> +</pre></div> </div> <p>The <code>issue</code> macro is only rewriting existing Glyph code around the two parameters provided. In this case, it is possible to do exactly the same thing using the <a href="/glyph/book/macros/macros_core.html#m_define_"><code>define:</code></a> macro (aliased by @def:@):</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> define:[issue| -<span class="no">2</span> tr[ -<span class="no">3</span> td[/=<span class="er">&gt;</span>[http://github.com/h3rald/glyph/issues/closed#issue/{{0}}|#{{0}}]] -<span class="no">4</span> td[txt[{{1}}]] -<span class="no">5</span> ] -<span class="no">6</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>define:[issue| +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> tr[ +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> td[/=<span class="error">&gt;</span>[http://github.com/h3rald/glyph/issues/closed#issue/{{0}}|#{{0}}]] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> td[txt[{{1}}]] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> ] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>] +</pre></div> </div> <p>Within the <a href="/glyph/book/macros/macros_core.html#m_define_"><code>define:</code></a> macro, it is possible to use a special syntax to call the <code>raw_attr</code> or <code>raw_param</code> methods: <br />
M content/glyph/book/extending/layouts.htmlcontent/glyph/book/extending/layouts.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -72,24 +72,25 @@ <li><code>index</code> &#8212; used to render the index page of your document.</li>

</ul> <p>Layouts are nothing more than &#8220;fancy&#8221; Glyph macros defined using the Glyph language (i.e. by using <a href="/glyph/book/extending/interpreting.html#rewriting">macro rewriting</a>) within a single <code>.glyph</code> file.</p> <section class="section"> -<header><h1 id="h_97">Topic Layout</h1></header> +<header><h1 id="h_96">Topic Layout</h1></header> <p>The default layout used to render all web topics (the layout used for web5 topics is very similar) is defined as follows:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> document[ -<span class="no"> 2</span> head[ -<span class="no"> 3</span> style[default.css] -<span class="no"> 4</span> ] -<span class="no"> 5</span> body[ -<span class="no"> 6</span> @class[topic] -<span class="no"> 7</span> section[ -<span class="no"> 8</span> @title[{{title}}] -<span class="no"> 9</span> @id[{{id}}] -<span class="no"><strong>10</strong></span> navigation[{{id}}] -<span class="no">11</span> {{contents}} -<span class="no">12</span> navigation[{{id}}] -<span class="no">13</span> ] -<span class="no">14</span> ] -<span class="no">15</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>document[ +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> head[ +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> style[default.css] +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> ] +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> body[ +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> @class[topic] +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> section[ +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> @title[{{title}}] +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> @id[{{id}}] +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> navigation[{{id}}] +<span class="line-numbers"><a href="#n11" name="n11">11</a></span>{{contents}} +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> navigation[{{id}}] +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> ] +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> ] +<span class="line-numbers"><a href="#n15" name="n15">15</a></span>] +</pre></div> </div> <p>Note that it takes the following attributes, passed automatically by Glyph when processing each topic:</p>

@@ -104,29 +105,30 @@ <section class="section">

<header><h1 id="index_layout">Index Layout</h1></header> <p>The default layout used to render the web index page (the layout used for the web5 index is very similar) is defined as follows:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> document[ -<span class="no"> 2</span> head[ -<span class="no"> 3</span> style[default.css] -<span class="no"> 4</span> ] -<span class="no"> 5</span> body[ -<span class="no"> 6</span> @class[topic] -<span class="no"> 7</span> halftitlepage[ -<span class="no"> 8</span> title[] -<span class="no"> 9</span> subtitle[] -<span class="no"><strong>10</strong></span> author[] -<span class="no">11</span> ] -<span class="no">12</span> frontmatter[ -<span class="no">13</span> toc[] -<span class="no">14</span> ] -<span class="no">15</span> ] -<span class="no">16</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>document[ +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> head[ +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> style[default.css] +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> ] +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> body[ +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> @class[topic] +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> halftitlepage[ +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> title[] +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> subtitle[] +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> author[] +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> ] +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> frontmatter[ +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> toc[] +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> ] +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> ] +<span class="line-numbers"><a href="#n16" name="n16">16</a></span>] +</pre></div> </div> <p>Index layouts do not take any attribute or parameter (basically because they are used to produce only one page).</p> </section> <section class="section"> -<header><h1 id="h_99">Creating a Custom Layout</h1></header> +<header><h1 id="h_98">Creating a Custom Layout</h1></header> <p>To create a custom layout, proceed as follows:</p> <ul> <li>Create a <code>.glyph</code> file in the <code>lib/layouts</code> directory, within your project, e.g. <code>mytopic.glyph</code></li>
M content/glyph/book/extending/macro_def.htmlcontent/glyph/book/extending/macro_def.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -76,12 +76,13 @@ </ul>

</aside> <p>This is the source code of a fairly simple macro used to format a note:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> macro <span class="sy">:note</span> <span class="r">do</span> -<span class="no">2</span> <span class="s"><span class="dl">%{</span><span class="k">&lt;div class=&quot;</span><span class="il"><span class="idl">#{</span><span class="iv">@name</span><span class="idl">}</span></span><span class="k">&quot;&gt;&lt;span class=&quot;note-title&quot;&gt;</span><span class="il"><span class="idl">#{</span><span class="iv">@name</span>.to_s.capitalize<span class="idl">}</span></span><span class="k">&lt;/span&gt; -<span class="no">3</span> </span><span class="il"><span class="idl">#{</span><span class="iv">@value</span><span class="idl">}</span></span><span class="k"> -<span class="no">4</span> -<span class="no">5</span> &lt;/div&gt;</span><span class="dl">}</span></span> -<span class="no">6</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>macro <span class="symbol">:note</span> <span class="keyword">do</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> <span class="string"><span class="delimiter">%{</span><span class="content">&lt;div class=&quot;</span><span class="inline"><span class="inline-delimiter">#{</span><span class="instance-variable">@name</span><span class="inline-delimiter">}</span></span><span class="content">&quot;&gt;&lt;span class=&quot;note-title&quot;&gt;</span><span class="inline"><span class="inline-delimiter">#{</span><span class="instance-variable">@name</span>.to_s.capitalize<span class="inline-delimiter">}</span></span><span class="content">&lt;/span&gt;</span></span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span><span class="string"><span class="content"> </span><span class="inline"><span class="inline-delimiter">#{</span><span class="instance-variable">@value</span><span class="inline-delimiter">}</span></span><span class="content"></span></span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span><span class="string"><span class="content"></span></span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span><span class="string"><span class="content"> &lt;/div&gt;</span><span class="delimiter">}</span></span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span><span class="keyword">end</span> +</pre></div> </div> <p>The <code>macro</code> method takes a single <code>Symbol</code> or <code>String</code> parameter, corresponding to the name of the macro. In this case, the entire block (or <em>body</em> of the macro) is a <code>String</code> corresponding to what we want the macro to evaluate to: a <code>&lt;div&gt;</code> tag containing a note.</p>

@@ -138,37 +139,40 @@ <td>A <code>String</code> identifying the source file of the macro.</td>

</tr> </table> <section class="section"> -<header><h1 id="h_86">Representations</h1></header> +<header><h1 id="h_85">Representations</h1></header> <p>There&#8217;s a small problem with the code used to define the <code>note</code> macro in the previous section: what if I want to format notes using HTML5 instead of <span class="caps">HTML</span>, or another output format?</p> <p>Glyph supports different output formats, therefore macros must be format-independent! In fact, this is the actual source of the <code>note</code> macro:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> macro <span class="sy">:note</span> <span class="r">do</span> -<span class="no">2</span> <span class="iv">@data</span>[<span class="sy">:name</span>] = <span class="iv">@name</span> -<span class="no">3</span> <span class="iv">@data</span>[<span class="sy">:text</span>] = value -<span class="no">4</span> render -<span class="no">5</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>macro <span class="symbol">:note</span> <span class="keyword">do</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> <span class="instance-variable">@data</span>[<span class="symbol">:name</span>] = <span class="instance-variable">@name</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> <span class="instance-variable">@data</span>[<span class="symbol">:text</span>] = value +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> render +<span class="line-numbers"><a href="#n5" name="n5">5</a></span><span class="keyword">end</span> +</pre></div> </div> <p>The <span class="caps">HTML</span> representation of the note macro is defined in the <code>macros/reps/html.rb</code> file as follows:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> rep <span class="sy">:note</span> <span class="r">do</span> |data| -<span class="no">2</span> css_class = data[<span class="sy">:name</span>].to_s.match(<span class="rx"><span class="dl">/</span><span class="k">[a-z0-9_-]</span><span class="dl">/</span><span class="mod">i</span></span>) ? data[<span class="sy">:name</span>] : <span class="s"><span class="dl">&quot;</span><span class="k">note</span><span class="dl">&quot;</span></span> -<span class="no">3</span> <span class="s"><span class="dl">%{</span><span class="k">&lt;div class=&quot;</span><span class="il"><span class="idl">#{</span>css_class<span class="idl">}</span></span><span class="k">&quot;&gt; -<span class="no">4</span> &lt;span class=&quot;note-title&quot;&gt;</span><span class="il"><span class="idl">#{</span>data[<span class="sy">:name</span>].to_s.capitalize<span class="idl">}</span></span><span class="k">&lt;/span&gt;</span><span class="il"><span class="idl">#{</span>data[<span class="sy">:text</span>]<span class="idl">}</span></span><span class="k"> -<span class="no">5</span> -<span class="no">6</span> &lt;/div&gt;</span><span class="dl">}</span></span> -<span class="no">7</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>rep <span class="symbol">:note</span> <span class="keyword">do</span> |data| +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> css_class = data[<span class="symbol">:name</span>].to_s.match(<span class="regexp"><span class="delimiter">/</span><span class="content">[a-z0-9_-]</span><span class="delimiter">/</span><span class="modifier">i</span></span>) ? data[<span class="symbol">:name</span>] : <span class="string"><span class="delimiter">&quot;</span><span class="content">note</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> <span class="string"><span class="delimiter">%{</span><span class="content">&lt;div class=&quot;</span><span class="inline"><span class="inline-delimiter">#{</span>css_class<span class="inline-delimiter">}</span></span><span class="content">&quot;&gt;</span></span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span><span class="string"><span class="content">&lt;span class=&quot;note-title&quot;&gt;</span><span class="inline"><span class="inline-delimiter">#{</span>data[<span class="symbol">:name</span>].to_s.capitalize<span class="inline-delimiter">}</span></span><span class="content">&lt;/span&gt;</span><span class="inline"><span class="inline-delimiter">#{</span>data[<span class="symbol">:text</span>]<span class="inline-delimiter">}</span></span><span class="content"></span></span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span><span class="string"><span class="content"></span></span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span><span class="string"><span class="content">&lt;/div&gt;</span><span class="delimiter">}</span></span> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span><span class="keyword">end</span> +</pre></div> </div> <p>The HTML5 representation of the note macro, on the other hand, is defined in the <code>macros/reps/html5.rb</code> file as follows:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> rep <span class="sy">:note</span> <span class="r">do</span> |data| -<span class="no">2</span> css_class = data[<span class="sy">:name</span>].to_s.match(<span class="rx"><span class="dl">/</span><span class="k">[a-z0-9_-]</span><span class="dl">/</span><span class="mod">i</span></span>) ? data[<span class="sy">:name</span>] : <span class="s"><span class="dl">&quot;</span><span class="k">note</span><span class="dl">&quot;</span></span> -<span class="no">3</span> <span class="s"><span class="dl">%{</span><span class="k">&lt;aside class=&quot;</span><span class="il"><span class="idl">#{</span>css_class<span class="idl">}</span></span><span class="k">&quot;&gt; -<span class="no">4</span> &lt;span class=&quot;note-title&quot;&gt;</span><span class="il"><span class="idl">#{</span>data[<span class="sy">:name</span>].to_s.capitalize<span class="idl">}</span></span><span class="k">&lt;/span&gt;</span><span class="il"><span class="idl">#{</span>data[<span class="sy">:text</span>]<span class="idl">}</span></span><span class="k"> -<span class="no">5</span> -<span class="no">6</span> &lt;/aside&gt;</span><span class="dl">}</span></span> -<span class="no">7</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>rep <span class="symbol">:note</span> <span class="keyword">do</span> |data| +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> css_class = data[<span class="symbol">:name</span>].to_s.match(<span class="regexp"><span class="delimiter">/</span><span class="content">[a-z0-9_-]</span><span class="delimiter">/</span><span class="modifier">i</span></span>) ? data[<span class="symbol">:name</span>] : <span class="string"><span class="delimiter">&quot;</span><span class="content">note</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> <span class="string"><span class="delimiter">%{</span><span class="content">&lt;aside class=&quot;</span><span class="inline"><span class="inline-delimiter">#{</span>css_class<span class="inline-delimiter">}</span></span><span class="content">&quot;&gt;</span></span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span><span class="string"><span class="content">&lt;span class=&quot;note-title&quot;&gt;</span><span class="inline"><span class="inline-delimiter">#{</span>data[<span class="symbol">:name</span>].to_s.capitalize<span class="inline-delimiter">}</span></span><span class="content">&lt;/span&gt;</span><span class="inline"><span class="inline-delimiter">#{</span>data[<span class="symbol">:text</span>]<span class="inline-delimiter">}</span></span><span class="content"></span></span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span><span class="string"><span class="content"></span></span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span><span class="string"><span class="content">&lt;/aside&gt;</span><span class="delimiter">}</span></span> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span><span class="keyword">end</span> +</pre></div> </div> Note the different tags used to render the note.
M content/glyph/book/extending/output_format.htmlcontent/glyph/book/extending/output_format.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -69,20 +69,21 @@ <p>As shown in <a href="/glyph/book/extending/commands_tasks.html#cmd_tasks_arch">How Commands and Tasks work</a>, the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command command calls specific tasks defined in the <code>generate:</code> Rake namespace to generate output files in a particular format.</p>

<p>More specifically, when a <code>--format</code> option is specified, the command looks for a task with the same name within the <code>generate:</code> namespace. This makes adding new output formats to Glyph a fairly easy task, without the need to specify custom commands or similar.</p> <p>The following sections explain how the <code>h3rald</code> output format was created to integrate this book into the <a href="http://www.h3rald.com">H3RALD.com</a> website.</p> <section class="section"> -<header><h1 id="h_106">Output Configuration</h1></header> +<header><h1 id="h_105">Output Configuration</h1></header> <p>The first step required to add a new output format to Glyph is extending Glyph&#8217;s configuration by adding the appropriate output hash, as follows:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> <span class="sy">:output</span>: -<span class="no"> 2</span> <span class="sy">:h3rald</span>: -<span class="no"> 3</span> <span class="sy">:multifile</span>: <span class="er">true</span> -<span class="no"> 4</span> <span class="sy">:extension</span>: <span class="er">'.html'</span> -<span class="no"> 5</span> <span class="sy">:filter_target</span>: <span class="er">'html'</span> -<span class="no"> 6</span> <span class="sy">:base</span>: <span class="er">'/glyph/book/'</span> -<span class="no"> 7</span> <span class="sy">:macro_rep</span>: <span class="er">html5</span> -<span class="no"> 8</span> <span class="sy">:layout_dirs</span>: [<span class="er">'web5']</span> -<span class="no"> 9</span> <span class="sy">:layouts</span>: -<span class="no"><strong>10</strong></span> <span class="sy">:topic</span>: <span class="er">bookpage</span> -<span class="no">11</span> <span class="sy">:index</span>: <span class="er">bookindex</span></pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="symbol">:output</span>: +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> <span class="symbol">:h3rald</span>: +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> <span class="symbol">:multifile</span>: <span class="error">true</span> +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> <span class="symbol">:extension</span>: <span class="error">'.html'</span> +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> <span class="symbol">:filter_target</span>: <span class="error">'html'</span> +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> <span class="symbol">:base</span>: <span class="error">'/glyph/book/'</span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> <span class="symbol">:macro_dirs</span>: [<span class="error">'html', 'html5']</span> +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> <span class="symbol">:layout_dirs</span>: [<span class="error">'web5']</span> +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> <span class="symbol">:layouts</span>: +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> <span class="symbol">:topic</span>: <span class="error">bookpage</span> +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> <span class="symbol">:index</span>: <span class="error">bookindex</span> +</pre></div> </div> <p>In particular, the following keys are mandatory:</p>

@@ -97,39 +98,40 @@ </ul>

</section> <section class="section"> -<header><h1 id="h_107">Creating a 'generate:h3rald' task</h1></header> +<header><h1 id="h_106">Creating a 'generate:h3rald' task</h1></header> <p>The next (and final) step involves creating a custom <code>h3rald</code> task within the <code>generate:</code> namespace. This task can be placed in any <code>.rake</code> file within the <code>lib/tasks</code> directory:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> namespace <span class="sy">:generate</span> <span class="r">do</span> -<span class="no"> 2</span> desc <span class="s"><span class="dl">&quot;</span><span class="k">Create output for h3rald.com integration</span><span class="dl">&quot;</span></span> -<span class="no"> 3</span> task <span class="sy">:h3rald</span> =&gt; [<span class="sy">:web5</span>] <span class="r">do</span> -<span class="no"> 4</span> dir = <span class="co">Glyph</span>::<span class="co">PROJECT</span>/<span class="s"><span class="dl">'</span><span class="k">output/h3rald</span><span class="dl">'</span></span> -<span class="no"> 5</span> (dir/<span class="s"><span class="dl">&quot;</span><span class="k">glyph/book</span><span class="dl">&quot;</span></span>).mkpath -<span class="no"> 6</span> <span class="c"># Copy files in subdir</span> -<span class="no"> 7</span> (dir).find <span class="r">do</span> |i| -<span class="no"> 8</span> <span class="r">if</span> i.file? <span class="r">then</span> -<span class="no"> 9</span> <span class="r">next</span> <span class="r">if</span> i.to_s.match(<span class="co">Regexp</span>.escape(dir/<span class="s"><span class="dl">'</span><span class="k">glyph</span><span class="dl">'</span></span>)) -<span class="no"><strong>10</strong></span> dest = dir/<span class="s"><span class="dl">&quot;</span><span class="k">glyph/book/</span><span class="il"><span class="idl">#{</span>i.relative_path_from(<span class="co">Glyph</span>::<span class="co">PROJECT</span>/dir)<span class="idl">}</span></span><span class="dl">&quot;</span></span> -<span class="no">11</span> src = i.to_s -<span class="no">12</span> <span class="co">Pathname</span>.new(dest).parent.mkpath -<span class="no">13</span> file_copy src, dest -<span class="no">14</span> <span class="r">end</span> -<span class="no">15</span> <span class="r">end</span> -<span class="no">16</span> <span class="c"># Remove files from output dir</span> -<span class="no">17</span> dir.children.each <span class="r">do</span> |c| -<span class="no">18</span> <span class="r">unless</span> c == dir/<span class="s"><span class="dl">'</span><span class="k">glyph</span><span class="dl">'</span></span> <span class="r">then</span> -<span class="no">19</span> c.directory? ? c.rmtree : c.unlink -<span class="no"><strong>20</strong></span> <span class="r">end</span> -<span class="no">21</span> <span class="r">end</span> -<span class="no">22</span> (dir/<span class="s"><span class="dl">'</span><span class="k">glyph/book/images/glyph/glyph.eps</span><span class="dl">'</span></span>).unlink -<span class="no">23</span> (dir/<span class="s"><span class="dl">'</span><span class="k">glyph/book/images/glyph/glyph.svg</span><span class="dl">'</span></span>).unlink -<span class="no">24</span> <span class="c"># Create project page</span> -<span class="no">25</span> project = <span class="co">Glyph</span>.filter <span class="s"><span class="dl">%{</span><span class="k">layout/project[ -<span class="no">26</span> @contents[</span><span class="il"><span class="idl">#{</span>file_load(<span class="co">Glyph</span>::<span class="co">PROJECT</span>/<span class="s"><span class="dl">'</span><span class="k">text/introduction.glyph</span><span class="dl">'</span></span>)<span class="idl">}</span></span><span class="k">] -<span class="no">27</span> ]</span><span class="dl">}</span></span> -<span class="no">28</span> file_write dir/<span class="s"><span class="dl">&quot;</span><span class="k">glyph.textile</span><span class="dl">&quot;</span></span>, project -<span class="no">29</span> <span class="r">end</span> -<span class="no"><strong>30</strong></span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>namespace <span class="symbol">:generate</span> <span class="keyword">do</span> +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> desc <span class="string"><span class="delimiter">&quot;</span><span class="content">Create output for h3rald.com integration</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> task <span class="symbol">:h3rald</span> =&gt; [<span class="symbol">:web5</span>] <span class="keyword">do</span> +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> dir = <span class="constant">Glyph</span>::<span class="constant">PROJECT</span>/<span class="string"><span class="delimiter">'</span><span class="content">output/h3rald</span><span class="delimiter">'</span></span> +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> (dir/<span class="string"><span class="delimiter">&quot;</span><span class="content">glyph/book</span><span class="delimiter">&quot;</span></span>).mkpath +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> <span class="comment"># Copy files in subdir</span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> (dir).find <span class="keyword">do</span> |i| +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> <span class="keyword">if</span> i.file? <span class="keyword">then</span> +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> <span class="keyword">next</span> <span class="keyword">if</span> i.to_s.match(<span class="constant">Regexp</span>.escape(dir/<span class="string"><span class="delimiter">'</span><span class="content">glyph</span><span class="delimiter">'</span></span>)) +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> dest = dir/<span class="string"><span class="delimiter">&quot;</span><span class="content">glyph/book/</span><span class="inline"><span class="inline-delimiter">#{</span>i.relative_path_from(<span class="constant">Glyph</span>::<span class="constant">PROJECT</span>/dir)<span class="inline-delimiter">}</span></span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> src = i.to_s +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> <span class="constant">Pathname</span>.new(dest).parent.mkpath +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> file_copy src, dest +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> <span class="comment"># Remove files from output dir</span> +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> dir.children.each <span class="keyword">do</span> |c| +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> <span class="keyword">unless</span> c == dir/<span class="string"><span class="delimiter">'</span><span class="content">glyph</span><span class="delimiter">'</span></span> <span class="keyword">then</span> +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> c.directory? ? c.rmtree : c.unlink +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> (dir/<span class="string"><span class="delimiter">'</span><span class="content">glyph/book/images/glyph/glyph.eps</span><span class="delimiter">'</span></span>).unlink +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> (dir/<span class="string"><span class="delimiter">'</span><span class="content">glyph/book/images/glyph/glyph.svg</span><span class="delimiter">'</span></span>).unlink +<span class="line-numbers"><a href="#n24" name="n24">24</a></span> <span class="comment"># Create project page</span> +<span class="line-numbers"><a href="#n25" name="n25">25</a></span> project = <span class="constant">Glyph</span>.filter <span class="string"><span class="delimiter">%{</span><span class="content">layout:project[</span></span> +<span class="line-numbers"><a href="#n26" name="n26">26</a></span><span class="string"><span class="content"> @contents[</span><span class="inline"><span class="inline-delimiter">#{</span>file_load(<span class="constant">Glyph</span>::<span class="constant">PROJECT</span>/<span class="string"><span class="delimiter">'</span><span class="content">text/introduction.glyph</span><span class="delimiter">'</span></span>)<span class="inline-delimiter">}</span></span><span class="content">]</span></span> +<span class="line-numbers"><a href="#n27" name="n27">27</a></span><span class="string"><span class="content"> ]</span><span class="delimiter">}</span></span> +<span class="line-numbers"><a href="#n28" name="n28">28</a></span> file_write dir/<span class="string"><span class="delimiter">&quot;</span><span class="content">glyph.textile</span><span class="delimiter">&quot;</span></span>, project +<span class="line-numbers"><a href="#n29" name="n29">29</a></span> <span class="keyword">end</span> +<span class="line-numbers"><strong><a href="#n30" name="n30">30</a></strong></span><span class="keyword">end</span> +</pre></div> </div> <p>In this case, this task does not actually renders files in a different format, it just moves the files generated by the @generate:web5@ task in different subdirectories.</p>
M content/glyph/book/extending/params_attrs.htmlcontent/glyph/book/extending/params_attrs.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -80,42 +80,45 @@ </ul>

</section> <section class="section"> -<header><h1 id="h_89">Accessing Raw Values</h1></header> +<header><h1 id="h_88">Accessing Raw Values</h1></header> <p>While accessing expanded values is simple and immediate, in some cases it may not produce the desired results. Consider the following macro definition:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> macro <span class="sy">:nest_section</span> <span class="r">do</span> -<span class="no"> 2</span> interpret <span class="s"><span class="dl">%{</span><span class="k">section[ -<span class="no"> 3</span> @title[A] -<span class="no"> 4</span> section[ -<span class="no"> 5</span> @title[B] -<span class="no"> 6</span> </span><span class="il"><span class="idl">#{</span>value<span class="idl">}</span></span><span class="k"> -<span class="no"> 7</span> ] -<span class="no"> 8</span> ]</span><span class="dl">}</span></span> -<span class="no"> 9</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>macro <span class="symbol">:nest_section</span> <span class="keyword">do</span> +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> interpret <span class="string"><span class="delimiter">%{</span><span class="content">section[</span></span> +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span><span class="string"><span class="content"> @title[A]</span></span> +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span><span class="string"><span class="content"> section[</span></span> +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span><span class="string"><span class="content"> @title[B]</span></span> +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span><span class="string"><span class="content"> </span><span class="inline"><span class="inline-delimiter">#{</span>value<span class="inline-delimiter">}</span></span><span class="content"></span></span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span><span class="string"><span class="content"> ]</span></span> +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span><span class="string"><span class="content"> ]</span><span class="delimiter">}</span></span> +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span><span class="keyword">end</span> +</pre></div> </div> <p>And suppose to use it as follows:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> nest_section[ -<span class="no">2</span> section[ -<span class="no">3</span> <span class="iv">@title</span>[<span class="co">Inner</span> <span class="co">Section</span>] -<span class="no">4</span> ... -<span class="no">5</span> ] -<span class="no">6</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>nest_section[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> section[ +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> <span class="instance-variable">@title</span>[<span class="constant">Inner</span> <span class="constant">Section</span>] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> ... +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> ] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>] +</pre></div> </div> <p>It produces the following HTML code:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> <span class="ta">&lt;div</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">section</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span> -<span class="no"> 2</span> <span class="ta">&lt;h2</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">h_2</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>A<span class="ta">&lt;/h2&gt;</span> -<span class="no"> 3</span> <span class="ta">&lt;div</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">section</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span> -<span class="no"> 4</span> <span class="ta">&lt;h3</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">h_3</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>B<span class="ta">&lt;/h3&gt;</span> -<span class="no"> 5</span> <span class="ta">&lt;div</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">section</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span> -<span class="no"> 6</span> <span class="ta">&lt;h2</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">h_1</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>Inner Section<span class="ta">&lt;/h2&gt;</span> -<span class="no"> 7</span> ... -<span class="no"> 8</span> <span class="ta">&lt;/div&gt;</span> -<span class="no"> 9</span> <span class="ta">&lt;/div&gt;</span> -<span class="no"><strong>10</strong></span> <span class="ta">&lt;/div&gt;</span></pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> <span class="tag">&lt;h2</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">h_2</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>A<span class="tag">&lt;/h2&gt;</span> +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> <span class="tag">&lt;h3</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">h_3</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>B<span class="tag">&lt;/h3&gt;</span> +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> <span class="tag">&lt;h2</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">h_1</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Inner Section<span class="tag">&lt;/h2&gt;</span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span>... +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> <span class="tag">&lt;/div&gt;</span> +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> <span class="tag">&lt;/div&gt;</span> +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span><span class="tag">&lt;/div&gt;</span> +</pre></div> </div> <p>Everything is fine <em>except</em> for the header level: the heading "Inner Section" is of level 2, but it should be level 4!</p>
M content/glyph/book/extending/placeholders.htmlcontent/glyph/book/extending/placeholders.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -68,36 +68,37 @@ <nav class="navigation"><a href="/glyph/book/extending/bookmarks_headers.html">Bookmarks and Headers</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/extending/validators.html">Using Validators</a></nav>

<p>Sometimes you may need to access some data that will not be available until the entire document has been fully parsed and analyzed. For example, in order to be able to validate internal links, it is necessary to know in advance if the bookmark ID referenced in the link exists or not, either before (that&#8217;s easy) or even <em>after</em> the link.</p> <p>Here&#8217;s the source code of the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> macro <span class="sy">:link</span> <span class="r">do</span> -<span class="no"> 2</span> min_parameters <span class="i">1</span> -<span class="no"> 3</span> max_parameters <span class="i">2</span> -<span class="no"> 4</span> target = param <span class="i">0</span> -<span class="no"> 5</span> title = param <span class="i">1</span> -<span class="no"> 6</span> <span class="r">if</span> target.match <span class="rx"><span class="dl">/</span><span class="k">^#</span><span class="dl">/</span></span> <span class="r">then</span> -<span class="no"> 7</span> <span class="iv">@node</span>[<span class="sy">:document</span>].links &lt;&lt; target -<span class="no"> 8</span> anchor = target.gsub <span class="rx"><span class="dl">/</span><span class="k">^#</span><span class="dl">/</span></span>, <span class="s"><span class="dl">'</span><span class="dl">'</span></span> -<span class="no"> 9</span> bmk = bookmark? anchor -<span class="no"><strong>10</strong></span> <span class="r">if</span> !bmk <span class="r">then</span> -<span class="no">11</span> placeholder <span class="r">do</span> |document| -<span class="no">12</span> bmk = document.bookmark?(anchor) -<span class="no">13</span> macro_error <span class="s"><span class="dl">&quot;</span><span class="k">Bookmark '</span><span class="il"><span class="idl">#{</span>anchor<span class="idl">}</span></span><span class="k">' does not exist</span><span class="dl">&quot;</span></span> <span class="r">unless</span> bmk -<span class="no">14</span> bmk_title = title -<span class="no">15</span> bmk_title = bmk.title <span class="r">if</span> bmk_title.blank? -<span class="no">16</span> <span class="iv">@data</span>[<span class="sy">:target</span>] = bmk.link(<span class="iv">@source_file</span>) -<span class="no">17</span> <span class="iv">@data</span>[<span class="sy">:title</span>] = bmk_title -<span class="no">18</span> render -<span class="no">19</span> <span class="r">end</span> -<span class="no"><strong>20</strong></span> <span class="r">else</span> -<span class="no">21</span> bmk_title = title -<span class="no">22</span> bmk_title = bmk.title <span class="r">if</span> bmk_title.blank? -<span class="no">23</span> <span class="iv">@data</span>[<span class="sy">:target</span>] = bmk.link(<span class="iv">@source_file</span>) -<span class="no">24</span> <span class="iv">@data</span>[<span class="sy">:title</span>] = bmk_title -<span class="no">25</span> render -<span class="no">26</span> <span class="r">end</span> -<span class="no">27</span> <span class="r">else</span> -<span class="no">28</span> <span class="c"># Code omitted...</span> -<span class="no">29</span> <span class="r">end</span> -<span class="no"><strong>30</strong></span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>macro <span class="symbol">:link</span> <span class="keyword">do</span> +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> min_parameters <span class="integer">1</span> +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> max_parameters <span class="integer">2</span> +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> target = param <span class="integer">0</span> +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> title = param <span class="integer">1</span> +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> <span class="keyword">if</span> target.match <span class="regexp"><span class="delimiter">/</span><span class="content">^#</span><span class="delimiter">/</span></span> <span class="keyword">then</span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> <span class="instance-variable">@node</span>[<span class="symbol">:document</span>].links &lt;&lt; target +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> anchor = target.gsub <span class="regexp"><span class="delimiter">/</span><span class="content">^#</span><span class="delimiter">/</span></span>, <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span> +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> bmk = bookmark? anchor +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> <span class="keyword">if</span> !bmk <span class="keyword">then</span> +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> placeholder <span class="keyword">do</span> |document| +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> bmk = document.bookmark?(anchor) +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> macro_error <span class="string"><span class="delimiter">&quot;</span><span class="content">Bookmark '</span><span class="inline"><span class="inline-delimiter">#{</span>anchor<span class="inline-delimiter">}</span></span><span class="content">' does not exist</span><span class="delimiter">&quot;</span></span> <span class="keyword">unless</span> bmk +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> bmk_title = title +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> bmk_title = bmk.title <span class="keyword">if</span> bmk_title.blank? +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> <span class="instance-variable">@data</span>[<span class="symbol">:target</span>] = bmk.link(<span class="instance-variable">@source_file</span>) +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> <span class="instance-variable">@data</span>[<span class="symbol">:title</span>] = bmk_title +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> render +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> <span class="keyword">end</span> +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> <span class="keyword">else</span> +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> bmk_title = title +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> bmk_title = bmk.title <span class="keyword">if</span> bmk_title.blank? +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> <span class="instance-variable">@data</span>[<span class="symbol">:target</span>] = bmk.link(<span class="instance-variable">@source_file</span>) +<span class="line-numbers"><a href="#n24" name="n24">24</a></span> <span class="instance-variable">@data</span>[<span class="symbol">:title</span>] = bmk_title +<span class="line-numbers"><a href="#n25" name="n25">25</a></span> render +<span class="line-numbers"><a href="#n26" name="n26">26</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n27" name="n27">27</a></span> <span class="keyword">else</span> +<span class="line-numbers"><a href="#n28" name="n28">28</a></span> <span class="comment"># Code omitted...</span> +<span class="line-numbers"><a href="#n29" name="n29">29</a></span> <span class="keyword">end</span> +<span class="line-numbers"><strong><a href="#n30" name="n30">30</a></strong></span><span class="keyword">end</span> +</pre></div> </div> <p>If there&#8217;s already a bookmark stored in the current document, then it is possible to retrieve its title and use it as link text. Otherwise, it is necessary to wait until the entire document has been fully processed and then check if the bookmark exists. To do so, use the <code>placeholder</code> method. When called, this method returns an unique placeholder, which is then substituted with the value of the block, right before the document is finalized.</p>
M content/glyph/book/extending/task.htmlcontent/glyph/book/extending/task.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -79,26 +79,27 @@ </ul>

<p>First of all, create a <code>lib/tasks</code> folder in your project directory. Then, create a <code>.rake</code> file within it, e.g. <code>tasks.rake</code>.</p> <p>Finally, here&#8217;s the source of the task:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> namespace <span class="sy">:custom</span> <span class="r">do</span> -<span class="no"> 2</span> task <span class="sy">:generate</span>, [<span class="sy">:file</span>] <span class="r">do</span> |t, args| -<span class="no"> 3</span> generate = lambda <span class="r">do</span> |source, destination| -<span class="no"> 4</span> <span class="co">Glyph</span>.info <span class="s"><span class="dl">&quot;</span><span class="k">Generating </span><span class="il"><span class="idl">#{</span>destination<span class="idl">}</span></span><span class="k">...</span><span class="dl">&quot;</span></span> -<span class="no"> 5</span> <span class="co">Glyph</span>.compile <span class="co">Glyph</span>::<span class="co">PROJECT</span>/<span class="s"><span class="dl">&quot;</span><span class="k">text/</span><span class="il"><span class="idl">#{</span>source<span class="idl">}</span></span><span class="k">.glyph</span><span class="dl">&quot;</span></span>, -<span class="no"> 6</span> <span class="co">Glyph</span>::<span class="co">PROJECT</span>/<span class="s"><span class="dl">&quot;</span><span class="k">../</span><span class="il"><span class="idl">#{</span>destination<span class="idl">}</span></span><span class="k">.textile</span><span class="dl">&quot;</span></span> -<span class="no"> 7</span> <span class="r">end</span> -<span class="no"> 8</span> files = { -<span class="no"> 9</span> <span class="sy">:AUTHORS</span> =&gt; <span class="sy">:acknowledgements</span>, -<span class="no"><strong>10</strong></span> <span class="sy">:CHANGELOG</span> =&gt; <span class="sy">:changelog</span>, -<span class="no">11</span> <span class="sy">:LICENSE</span> =&gt; <span class="sy">:license</span>, -<span class="no">12</span> <span class="sy">:README</span> =&gt; <span class="sy">:introduction</span> -<span class="no">13</span> } -<span class="no">14</span> arg = args[<span class="sy">:file</span>].upcase.to_sym -<span class="no">15</span> raise <span class="co">RuntimeError</span>, <span class="s"><span class="dl">&quot;</span><span class="k">Unknown file '</span><span class="il"><span class="idl">#{</span>arg<span class="idl">}</span></span><span class="k">.glyph'</span><span class="dl">&quot;</span></span> -<span class="no">16</span> <span class="r">unless</span> files.keys.include? arg -<span class="no">17</span> generate.call files[arg], arg -<span class="no">18</span> <span class="co">Glyph</span>.info <span class="s"><span class="dl">&quot;</span><span class="k">Done.</span><span class="dl">&quot;</span></span> -<span class="no">19</span> <span class="r">end</span> -<span class="no"><strong>20</strong></span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>namespace <span class="symbol">:custom</span> <span class="keyword">do</span> +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> task <span class="symbol">:generate</span>, [<span class="symbol">:file</span>] <span class="keyword">do</span> |t, args| +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> generate = lambda <span class="keyword">do</span> |source, destination| +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> <span class="constant">Glyph</span>.info <span class="string"><span class="delimiter">&quot;</span><span class="content">Generating </span><span class="inline"><span class="inline-delimiter">#{</span>destination<span class="inline-delimiter">}</span></span><span class="content">...</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> <span class="constant">Glyph</span>.compile <span class="constant">Glyph</span>::<span class="constant">PROJECT</span>/<span class="string"><span class="delimiter">&quot;</span><span class="content">text/</span><span class="inline"><span class="inline-delimiter">#{</span>source<span class="inline-delimiter">}</span></span><span class="content">.glyph</span><span class="delimiter">&quot;</span></span>, +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> <span class="constant">Glyph</span>::<span class="constant">PROJECT</span>/<span class="string"><span class="delimiter">&quot;</span><span class="content">../</span><span class="inline"><span class="inline-delimiter">#{</span>destination<span class="inline-delimiter">}</span></span><span class="content">.textile</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> <span class="keyword">end</span> +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> files = { +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> <span class="symbol">:AUTHORS</span> =&gt; <span class="symbol">:acknowledgements</span>, +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> <span class="symbol">:CHANGELOG</span> =&gt; <span class="symbol">:changelog</span>, +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> <span class="symbol">:LICENSE</span> =&gt; <span class="symbol">:license</span>, +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> <span class="symbol">:README</span> =&gt; <span class="symbol">:introduction</span> +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> } +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> arg = args[<span class="symbol">:file</span>].upcase.to_sym +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> raise <span class="constant">RuntimeError</span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">Unknown file '</span><span class="inline"><span class="inline-delimiter">#{</span>arg<span class="inline-delimiter">}</span></span><span class="content">.glyph'</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> <span class="keyword">unless</span> files.keys.include? arg +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> generate.call files[arg], arg +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> <span class="constant">Glyph</span>.info <span class="string"><span class="delimiter">&quot;</span><span class="content">Done.</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> <span class="keyword">end</span> +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span><span class="keyword">end</span> +</pre></div> </div> <p>That&#8217;s it. Note that this task is pretty useless without a command that calls it, and it won&#8217;t even show up if you run <code>rake -T</code> within your project directory. <span class="fmi">for more information on <mark>creating custom commands</mark>, see <a href="/glyph/book/extending/command.html#custom_command">Defining Custom Commands</a></span>.</p>
M content/glyph/book/extending/validators.htmlcontent/glyph/book/extending/validators.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/getting_started/configuration.htmlcontent/glyph/book/getting_started/configuration.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/getting_started/create_project.htmlcontent/glyph/book/getting_started/create_project.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/getting_started/structure.htmlcontent/glyph/book/getting_started/structure.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -69,35 +69,36 @@

<p>Every Glyph project contains a <code>document.glyph</code> file that is typically used to define the document structure. The default <code>document.glyph</code> generated automatically when creating a new project is the following:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> book[ -<span class="no"> 2</span> @frontmatter[ -<span class="no"> 3</span> toc[] -<span class="no"> 4</span> preface[ -<span class="no"> 5</span> @title[Preface] -<span class="no"> 6</span> todo[Write the preface] -<span class="no"> 7</span> include[preface] -<span class="no"> 8</span> ] -<span class="no"> 9</span> ] -<span class="no"><strong>10</strong></span> @bodymatter[ -<span class="no">11</span> chapter[ -<span class="no">12</span> @title[Chapter 1] -<span class="no">13</span> todo[Write chapter 1] -<span class="no">14</span> include[chapter_1] -<span class="no">15</span> ] -<span class="no">16</span> chapter[ -<span class="no">17</span> @title[Chapter 2] -<span class="no">18</span> todo[Write chapter 2] -<span class="no">19</span> include[chapter_2] -<span class="no"><strong>20</strong></span> ] -<span class="no">21</span> ] -<span class="no">22</span> @backmatter[ -<span class="no">23</span> appendix[ -<span class="no">24</span> @title[Appendix A] -<span class="no">25</span> todo[Write appendix A] -<span class="no">26</span> include[appendix_a] -<span class="no">27</span> ] -<span class="no">28</span> ] -<span class="no">29</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>book[ +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> @frontmatter[ +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> toc[] +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> preface[ +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> @title[Preface] +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> todo[Write the preface] +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> include[preface] +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> ] +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> ] +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> @bodymatter[ +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> chapter[ +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> @title[Chapter 1] +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> todo[Write chapter 1] +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> include[chapter_1] +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> ] +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> chapter[ +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> @title[Chapter 2] +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> todo[Write chapter 2] +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> include[chapter_2] +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> ] +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> ] +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> @backmatter[ +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> appendix[ +<span class="line-numbers"><a href="#n24" name="n24">24</a></span> @title[Appendix A] +<span class="line-numbers"><a href="#n25" name="n25">25</a></span> todo[Write appendix A] +<span class="line-numbers"><a href="#n26" name="n26">26</a></span> include[appendix_a] +<span class="line-numbers"><a href="#n27" name="n27">27</a></span> ] +<span class="line-numbers"><a href="#n28" name="n28">28</a></span> ] +<span class="line-numbers"><a href="#n29" name="n29">29</a></span>] +</pre></div> </div>
M content/glyph/book/index.htmlcontent/glyph/book/index.html

@@ -2,6 +2,9 @@ <!DOCTYPE html>

<html lang="en"> <head> <title>Glyph - Document Authoring Framework</title> + <link href='http://fonts.googleapis.com/css?family=Crimson+Text:400,400italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'> + + <meta charset="utf-8" /> <meta name="author" content="Fabio Cevasco" />

@@ -24,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -70,15 +73,15 @@ <li class="frontmatter acknowledgement"><a href="/glyph/book/acknowledgements.html#h_13">Acknowledgements</a></li><li class="bodymatter chapter">Getting Started</li><li><ol><li class="bodymatter section"><a href="/glyph/book/getting_started/create_project.html#h_15">Creating your first Glyph Project</a></li><li class="bodymatter section"><a href="/glyph/book/getting_started/structure.html#struct">Document Structure</a></li><li class="bodymatter section"><a href="/glyph/book/getting_started/configuration.html#cfg">Project Configuration</a></li></ol></li>

<li class="bodymatter chapter">Authoring Documents</li><li><ol><li class="bodymatter section"><a href="/glyph/book/text_editing/glyph_files.html#h_19">.glyph files</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/macro_intro.html#macro_intro">Introducing Glyph Macros</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/attribute_intro.html#attribute_intro">Macro attributes</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/macro_composition.html#composition">Macro Composition</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/esc_quot.html#esc_quot">Escaping and Quoting</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/sections.html#sec_head">Sections and Headers</a></li><li><ol><li class="bodymatter section"><a href="/glyph/book/text_editing/section_aliases.html#h_26">Section Aliases</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/topics.html#topics">Topics</a></li></ol></li> <li class="bodymatter section"><a href="/glyph/book/text_editing/links.html#links">Links and Bookmarks</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/images.html#img_fig">Images and Figures</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/code.html#source_code">Source Code</a></li><li class="bodymatter section">Other HTML Elements</li><li><ol><li class="bodymatter section"><a href="/glyph/book/text_editing/raw_html.html#h_32">Textile or Markdown</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/xml_fallback.html#h_33">XML Fallback</a></li></ol></li> <li class="bodymatter section"><a href="/glyph/book/text_editing/stylesheets.html#stylesheets">Adding Stylesheets</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/inclusions.html#incl">Content Reuse</a></li><li><ol><li class="bodymatter section">Remarks</li></ol></li> -<li class="bodymatter section"><a href="/glyph/book/text_editing/conditionals.html#cond_macros">Conditional Macros</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/evaluation.html#h_44">Simple Programming and Code Evaluation</a></li><li><ol><li class="bodymatter section">Turing-completeness</li><li class="bodymatter section">Operations on integer values</li><li class="bodymatter section">Lexically-scoped attribute assignment</li><li class="bodymatter section">Evaluating Ruby code</li></ol></li> +<li class="bodymatter section"><a href="/glyph/book/text_editing/conditionals.html#cond_macros">Conditional Macros</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/evaluation.html#h_43">Simple Programming and Code Evaluation</a></li><li><ol><li class="bodymatter section">Turing-completeness</li><li class="bodymatter section">Operations on integer values</li><li class="bodymatter section">Lexically-scoped attribute assignment</li><li class="bodymatter section">Evaluating Ruby code</li></ol></li> </ol></li> -<li class="bodymatter chapter">Generating Output Files</li><li><ol><li class="bodymatter section"><a href="/glyph/book/compiling/compiling.html#compile">Compiling a project</a></li><li class="bodymatter section"><a href="/glyph/book/compiling/lite_mode.html#lite_mode">Compiling single Glyph files</a></li><li class="bodymatter section"><a href="/glyph/book/compiling/programmatic_usage.html#h_58">Using Glyph programmatically</a></li></ol></li> -<li class="bodymatter chapter">Document Statistics</li><li><ol><li class="bodymatter section"><a href="/glyph/book/stats/stats.html#h_61">Using the stats command</a></li><li class="bodymatter section"><a href="/glyph/book/stats/macros.html#stats_macros">Macro Statistics</a></li><li class="bodymatter section"><a href="/glyph/book/stats/snippets.html#stats_snippets">Snippet Statistics</a></li><li class="bodymatter section"><a href="/glyph/book/stats/bookmarks.html#stats_bookmarks">Bookmark Statistics</a></li><li class="bodymatter section"><a href="/glyph/book/stats/links.html#stats_links">Link Statistics</a></li></ol></li> -<li class="bodymatter chapter">Extending Glyph</li><li><ol><li class="bodymatter section"><a href="/glyph/book/extending/internals.html#h_83">A quick look at Glyph's internals</a></li><li class="bodymatter section"><a href="/glyph/book/extending/macro_def.html#macro_def">Defining Custom Macros</a></li><li><ol><li class="bodymatter section"><a href="/glyph/book/extending/params_attrs.html#h_87">Parameters and Attributes</a></li><li class="bodymatter section"><a href="/glyph/book/extending/bookmarks_headers.html#h_90">Bookmarks and Headers</a></li><li class="bodymatter section"><a href="/glyph/book/extending/placeholders.html#h_91">Using Placeholders</a></li><li class="bodymatter section"><a href="/glyph/book/extending/validators.html#h_92">Using Validators</a></li><li class="bodymatter section"><a href="/glyph/book/extending/interpreting.html#interpreting">Interpreting Glyph Code</a></li><li class="bodymatter section"><a href="/glyph/book/extending/layouts.html#layouts">Layouts</a></li><li class="bodymatter section"><a href="/glyph/book/extending/further_reading.html#h_100">Further Reading</a></li></ol></li> -<li class="bodymatter section"><a href="/glyph/book/extending/commands_tasks.html#h_101">Defining Custom Commands and Tasks</a></li><li><ol><li class="bodymatter section"><a href="/glyph/book/extending/task.html#custom_task">Defining Custom Tasks</a></li><li class="bodymatter section"><a href="/glyph/book/extending/command.html#custom_command">Defining Custom Commands</a></li></ol></li> +<li class="bodymatter chapter">Generating Output Files</li><li><ol><li class="bodymatter section"><a href="/glyph/book/compiling/compiling.html#compile">Compiling a project</a></li><li class="bodymatter section"><a href="/glyph/book/compiling/lite_mode.html#lite_mode">Compiling single Glyph files</a></li><li class="bodymatter section"><a href="/glyph/book/compiling/programmatic_usage.html#h_57">Using Glyph programmatically</a></li></ol></li> +<li class="bodymatter chapter">Document Statistics</li><li><ol><li class="bodymatter section"><a href="/glyph/book/stats/stats.html#h_60">Using the stats command</a></li><li class="bodymatter section"><a href="/glyph/book/stats/macros.html#stats_macros">Macro Statistics</a></li><li class="bodymatter section"><a href="/glyph/book/stats/snippets.html#stats_snippets">Snippet Statistics</a></li><li class="bodymatter section"><a href="/glyph/book/stats/bookmarks.html#stats_bookmarks">Bookmark Statistics</a></li><li class="bodymatter section"><a href="/glyph/book/stats/links.html#stats_links">Link Statistics</a></li></ol></li> +<li class="bodymatter chapter">Extending Glyph</li><li><ol><li class="bodymatter section"><a href="/glyph/book/extending/internals.html#h_82">A quick look at Glyph's internals</a></li><li class="bodymatter section"><a href="/glyph/book/extending/macro_def.html#macro_def">Defining Custom Macros</a></li><li><ol><li class="bodymatter section"><a href="/glyph/book/extending/params_attrs.html#h_86">Parameters and Attributes</a></li><li class="bodymatter section"><a href="/glyph/book/extending/bookmarks_headers.html#h_89">Bookmarks and Headers</a></li><li class="bodymatter section"><a href="/glyph/book/extending/placeholders.html#h_90">Using Placeholders</a></li><li class="bodymatter section"><a href="/glyph/book/extending/validators.html#h_91">Using Validators</a></li><li class="bodymatter section"><a href="/glyph/book/extending/interpreting.html#interpreting">Interpreting Glyph Code</a></li><li class="bodymatter section"><a href="/glyph/book/extending/layouts.html#layouts">Layouts</a></li><li class="bodymatter section"><a href="/glyph/book/extending/further_reading.html#h_99">Further Reading</a></li></ol></li> +<li class="bodymatter section"><a href="/glyph/book/extending/commands_tasks.html#h_100">Defining Custom Commands and Tasks</a></li><li><ol><li class="bodymatter section"><a href="/glyph/book/extending/task.html#custom_task">Defining Custom Tasks</a></li><li class="bodymatter section"><a href="/glyph/book/extending/command.html#custom_command">Defining Custom Commands</a></li></ol></li> </ol></li> -<li class="bodymatter chapter">Troubleshooting</li><li><ol><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_generic.html#h_111">Generic Errors</a></li><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_parser.html#h_112">Parsing Errors</a></li><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_command.html#h_113">Command Errors</a></li><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_macro.html#h_114">Macro Errors</a></li></ol></li> -<li class="backmatter appendix"><a href="/glyph/book/ref_commands.html#cmd_ref">Command Reference</a></li><li class="backmatter appendix">Macro Reference</li><li><ol><li class="appendix section"><a href="/glyph/book/macros/macros_core.html#h_136">Core Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_block.html#h_212">Block Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_inline.html#h_232">Inline Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_filters.html#f_macros">Filter Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_structure.html#h_255">Structure Macros</a></li></ol></li> +<li class="bodymatter chapter">Troubleshooting</li><li><ol><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_generic.html#h_110">Generic Errors</a></li><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_parser.html#h_111">Parsing Errors</a></li><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_command.html#h_112">Command Errors</a></li><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_macro.html#h_113">Macro Errors</a></li></ol></li> +<li class="backmatter appendix"><a href="/glyph/book/ref_commands.html#cmd_ref">Command Reference</a></li><li class="backmatter appendix">Macro Reference</li><li><ol><li class="appendix section"><a href="/glyph/book/macros/macros_core.html#h_135">Core Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_block.html#h_211">Block Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_inline.html#h_232">Inline Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_filters.html#f_macros">Filter Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_structure.html#h_255">Structure Macros</a></li></ol></li> <li class="backmatter appendix">Configuration Reference</li><li><ol><li class="appendix section"><a href="/glyph/book/config/document.html#cfg_document">document.*</a></li><li class="appendix section"><a href="/glyph/book/config/filters.html#cfg_filters">filters.*</a></li><li class="appendix section"><a href="/glyph/book/config/options.html#cfg_options">options.*</a></li><li class="appendix section"><a href="/glyph/book/config/output.html#cfg_output">output.*</a></li></ol></li> <li class="backmatter appendix"><a href="/glyph/book/changelog.html#h_285">Changelog</a></li> </ol>
M content/glyph/book/introduction.htmlcontent/glyph/book/introduction.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/license.htmlcontent/glyph/book/license.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -65,7 +65,7 @@ </header>

<section id="body-text" class="hyphenate glyph-book"> <nav class="navigation"><a href="/glyph/book/introduction.html">Introduction</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/acknowledgements.html">Acknowledgements</a></nav> - <p>Copyright &copy; 2010 <strong>Fabio Cevasco</strong>, <a href="http://www.h3rald.com">http://www.h3rald.com</a></p> + <p>Copyright &copy; 2010-2011 <strong>Fabio Cevasco</strong>, <a href="http://www.h3rald.com">http://www.h3rald.com</a></p> <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights
M content/glyph/book/macros/macros_block.htmlcontent/glyph/book/macros/macros_block.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -77,9 +77,10 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> box[Why boxes?| -<span class="no">2</span> Boxes can be used to make a section of text stand out from the rest of the document. -<span class="no">3</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>box[Why boxes?| +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> Boxes can be used to make a section of text stand out from the rest of the document. +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>] +</pre></div> </div> </div>

@@ -87,7 +88,7 @@

<section class="section"> -<header><h1 id="h_214">Parameters</h1></header> +<header><h1 id="h_213">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -122,11 +123,12 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> code[ -<span class="no">2</span> def hello -<span class="no">3</span> puts &quot;Hello World&quot; -<span class="no">4</span> end -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>code[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> def hello +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> puts &quot;Hello World&quot; +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> end +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> </div>

@@ -134,7 +136,7 @@

<section class="section"> -<header><h1 id="h_216">Parameters</h1></header> +<header><h1 id="h_215">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -150,7 +152,7 @@ </section>

<section class="section"> -<header><h1 id="h_217">Remarks</h1></header> +<header><h1 id="h_216">Remarks</h1></header> <p>For code highlighting, see the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro.</p> </section>

@@ -170,10 +172,11 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> figure[ -<span class="no">2</span> graph.png|Monthly Pageviews -<span class="no">3</span> @width[90%] -<span class="no">4</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>figure[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> graph.png|Monthly Pageviews +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @width[90%] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>] +</pre></div> </div> </div>

@@ -181,7 +184,7 @@

<section class="section"> -<header><h1 id="h_219">Parameters</h1></header> +<header><h1 id="h_218">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -203,7 +206,7 @@ </section>

<section class="section"> -<header><h1 id="h_220">Attributes</h1></header> +<header><h1 id="h_219">Attributes</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Attribute</th>

@@ -232,11 +235,12 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> img[ -<span class="no">2</span> holidays/landscape.jpg -<span class="no">3</span> @class[photo] -<span class="no">4</span> @style[border: 1px solid black;] -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>img[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> holidays/landscape.jpg +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @class[photo] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> @style[border: 1px solid black;] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> </div>

@@ -244,7 +248,7 @@

<section class="section"> -<header><h1 id="h_222">Parameters</h1></header> +<header><h1 id="h_221">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -260,7 +264,7 @@ </section>

<section class="section"> -<header><h1 id="h_223">Attributes</h1></header> +<header><h1 id="h_222">Attributes</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Attribute</th>

@@ -287,7 +291,7 @@

<section class="section"> -<header><h1 id="h_225">Parameters</h1></header> +<header><h1 id="h_224">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -314,7 +318,7 @@

<section class="section"> -<header><h1 id="h_227">Parameters</h1></header> +<header><h1 id="h_226">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -334,9 +338,26 @@

<section class="section"> <header><h1 id="m_pubdate">pubdate</h1></header> -<p>Evaluates to a date string (in the format: <em>current_month</em> <em>current_year</em>; i.e. <em>%B</em> <em>%Y</em>), within a <code>&lt;div&gt;</code> tag.</p> +<p>Evaluates to a date string (in the format: <em>current_month</em> <em>current_year</em>; i.e. <em>%B</em> <em>%Y</em>), within a <code>&lt;div&gt;</code> tag. If a parameter is supplied, its value is used instead of the current date.</p> <p><strong>Example:</strong> <code>pubdate[]</code></p> + + + + <section class="section"> +<header><h1 id="h_228">Parameters</h1></header> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>An alternative content for the _pubdate_ @div@.</td> + </tr> + </table> + +</section> </section>
M content/glyph/book/macros/macros_core.htmlcontent/glyph/book/macros/macros_core.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -76,7 +76,7 @@

<section class="section"> -<header><h1 id="h_138">Parameters</h1></header> +<header><h1 id="h_137">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -100,7 +100,7 @@

<section class="section"> -<header><h1 id="h_140">Parameters</h1></header> +<header><h1 id="h_139">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -133,7 +133,7 @@

<section class="section"> -<header><h1 id="h_142">Parameters</h1></header> +<header><h1 id="h_141">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -165,7 +165,7 @@

<section class="section"> -<header><h1 id="h_144">Parameters</h1></header> +<header><h1 id="h_143">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -185,14 +185,14 @@

<section class="section"> <header><h1 id="m_attribute_">attribute:</h1></header> -<p>Sets the value of the specified attribute. For a more complete example, see the ‡‡‡‡‡PLACEHOLDER¤279‡‡‡‡‡ macro.</p> +<p>Sets the value of the specified attribute. For a more complete example, see the ‡‡‡‡‡PLACEHOLDER¤277‡‡‡‡‡ macro.</p> <strong>Aliases:</strong> <code>@:</code> <p><strong>Example:</strong> <code>@:[title|Test Title]</code></p> <section class="section"> -<header><h1 id="h_146">Parameters</h1></header> +<header><h1 id="h_145">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -225,7 +225,7 @@

<section class="section"> -<header><h1 id="h_148">Parameters</h1></header> +<header><h1 id="h_147">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -241,7 +241,7 @@ </section>

<section class="section"> -<header><h1 id="h_149">Remarks</h1></header> +<header><h1 id="h_148">Remarks</h1></header> <p>Macros are not expanded within comments.</p> </section>

@@ -259,7 +259,7 @@

<section class="section"> -<header><h1 id="h_151">Parameters</h1></header> +<header><h1 id="h_150">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -281,7 +281,7 @@ </section>

<section class="section"> -<header><h1 id="h_152">Remarks</h1></header> +<header><h1 id="h_151">Remarks</h1></header> <p>For examples see any of the following:</p> <ul> <li><a href="#m_and"><code>and</code></a> macro</li>

@@ -306,7 +306,7 @@

<section class="section"> -<header><h1 id="h_154">Parameters</h1></header> +<header><h1 id="h_153">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -333,7 +333,7 @@

<section class="section"> -<header><h1 id="h_156">Parameters</h1></header> +<header><h1 id="h_155">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -355,7 +355,7 @@ </section>

<section class="section"> -<header><h1 id="h_157">Remarks</h1></header> +<header><h1 id="h_156">Remarks</h1></header> <p>This macro cannot be used in <a href="/glyph/book/compiling/programmatic_usage.html#modes">safe mode</a>.</p> </section>

@@ -373,7 +373,7 @@

<section class="section"> -<header><h1 id="h_159">Parameters</h1></header> +<header><h1 id="h_158">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -405,7 +405,7 @@

<section class="section"> -<header><h1 id="h_161">Parameters</h1></header> +<header><h1 id="h_160">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -432,7 +432,7 @@

<section class="section"> -<header><h1 id="h_163">Parameters</h1></header> +<header><h1 id="h_162">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -465,7 +465,7 @@

<section class="section"> -<header><h1 id="h_165">Parameters</h1></header> +<header><h1 id="h_164">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -495,7 +495,7 @@

<section class="section"> -<header><h1 id="h_167">Parameters</h1></header> +<header><h1 id="h_166">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -530,7 +530,7 @@

<section class="section"> -<header><h1 id="h_169">Parameters</h1></header> +<header><h1 id="h_168">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -564,7 +564,7 @@

<section class="section"> -<header><h1 id="h_171">Parameters</h1></header> +<header><h1 id="h_170">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -580,7 +580,7 @@ </section>

<section class="section"> -<header><h1 id="h_172">Remarks</h1></header> +<header><h1 id="h_171">Remarks</h1></header> <ul> <li> <p>This macro cannot be used in <a href="/glyph/book/compiling/programmatic_usage.html#modes">safe mode</a>.</p>

@@ -608,14 +608,15 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> let[ -<span class="no">2</span> @:[a|2] -<span class="no">3</span> @:[b|3] -<span class="no">4</span> section[ -<span class="no">5</span> @title[Testing] -<span class="no">6</span> @[title]: @[a] * @[b] = multiply[@[a]|@[b]] --[Outputs: Testing: 2 * 3 = 6] -<span class="no">7</span> ] -<span class="no">8</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>let[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @:[a|2] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @:[b|3] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> section[ +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> @title[Testing] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> @[title]: @[a] * @[b] = multiply[@[a]|@[b]] --[Outputs: Testing: 2 * 3 = 6] +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> ] +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>] +</pre></div> </div> </div>

@@ -623,7 +624,7 @@

<section class="section"> -<header><h1 id="h_174">Parameters</h1></header> +<header><h1 id="h_173">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -650,7 +651,7 @@

<section class="section"> -<header><h1 id="h_176">Parameters</h1></header> +<header><h1 id="h_175">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -678,7 +679,7 @@

<section class="section"> -<header><h1 id="h_178">Parameters</h1></header> +<header><h1 id="h_177">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -713,7 +714,7 @@

<section class="section"> -<header><h1 id="h_180">Parameters</h1></header> +<header><h1 id="h_179">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -747,7 +748,7 @@

<section class="section"> -<header><h1 id="h_182">Parameters</h1></header> +<header><h1 id="h_181">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -775,7 +776,7 @@ </section>

<section class="section"> -<header><h1 id="h_183">Remarks</h1></header> +<header><h1 id="h_182">Remarks</h1></header> <p>This macro must be used with the <a href="#m_condition"><code>condition</code></a> macro.</p> </section>

@@ -793,7 +794,7 @@

<section class="section"> -<header><h1 id="h_185">Parameters</h1></header> +<header><h1 id="h_184">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -815,7 +816,7 @@ </section>

<section class="section"> -<header><h1 id="h_186">Remarks</h1></header> +<header><h1 id="h_185">Remarks</h1></header> <ul> <li> <p>This macro cannot be used in <a href="/glyph/book/compiling/programmatic_usage.html#modes">safe mode</a>.</p>

@@ -838,7 +839,7 @@

<section class="section"> -<header><h1 id="h_188">Parameters</h1></header> +<header><h1 id="h_187">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -862,7 +863,7 @@

<section class="section"> -<header><h1 id="h_190">Parameters</h1></header> +<header><h1 id="h_189">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -889,7 +890,7 @@

<section class="section"> -<header><h1 id="h_192">Parameters</h1></header> +<header><h1 id="h_191">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -916,7 +917,7 @@

<section class="section"> -<header><h1 id="h_194">Parameters</h1></header> +<header><h1 id="h_193">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -950,15 +951,16 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> def:[factorial| -<span class="no"> 2</span> ?[ -<span class="no"> 3</span> eq[{{0}}|0]|1| -<span class="no"> 4</span> multiply[ -<span class="no"> 5</span> {{0}} | factorial[subtract[{{0}}|1]] -<span class="no"> 6</span> ] -<span class="no"> 7</span> ] -<span class="no"> 8</span> ] -<span class="no"> 9</span> factorial[5]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>def:[factorial| +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> ?[ +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> eq[{{0}}|0]|1| +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> multiply[ +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> {{0}} | factorial[subtract[{{0}}|1]] +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> ] +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> ] +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span>] +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span>factorial[5] +</pre></div> </div> </div>

@@ -966,7 +968,7 @@

<section class="section"> -<header><h1 id="h_196">Parameters</h1></header> +<header><h1 id="h_195">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -988,7 +990,7 @@ </section>

<section class="section"> -<header><h1 id="h_197">Remarks</h1></header> +<header><h1 id="h_196">Remarks</h1></header> <ul> <li>The new macro can only be used <em>after</em> its declaration.</li> <li>

@@ -1011,12 +1013,12 @@

<div class="examples"> <p><strong>Examples:</strong></p> -<code>%[Time.now]</code><br /><code>%[Glyph::VERSION]</code><br /> +["<code>%\[Time.now\]</code><br />", "<code>%\[Glyph::VERSION\]</code><br />"] </div> <section class="section"> -<header><h1 id="h_199">Parameters</h1></header> +<header><h1 id="h_198">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -1032,7 +1034,7 @@ </section>

<section class="section"> -<header><h1 id="h_200">Remarks</h1></header> +<header><h1 id="h_199">Remarks</h1></header> <p>This macro cannot be used in <a href="/glyph/book/compiling/programmatic_usage.html#modes">safe mode</a>.</p> </section>

@@ -1050,7 +1052,7 @@

<div class="examples"> <p><strong>Examples:</strong></p> -<code>s/match[This is a test string|/test/]</code><br /><code>s/sub[This is a test string|/a test/|another test]</code><br /> +["<code>s/match\[This is a test string\|/test/\]</code><br />", "<code>s/sub\[This is a test string\|/a test/\|another test\]</code><br />"] </div> </section>

@@ -1066,7 +1068,7 @@

<section class="section"> -<header><h1 id="h_203">Parameters</h1></header> +<header><h1 id="h_202">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -1093,7 +1095,7 @@

<section class="section"> -<header><h1 id="h_205">Parameters</h1></header> +<header><h1 id="h_204">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -1115,7 +1117,7 @@ </section>

<section class="section"> -<header><h1 id="h_206">Remarks</h1></header> +<header><h1 id="h_205">Remarks</h1></header> <p>The new snippet can only be used <em>after</em> its declaration.</p> </section>

@@ -1133,7 +1135,7 @@

<section class="section"> -<header><h1 id="h_208">Parameters</h1></header> +<header><h1 id="h_207">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -1169,15 +1171,16 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> let[ -<span class="no"> 2</span> @count[5] -<span class="no"> 3</span> @text[-] -<span class="no"> 4</span> while[gt[@[count]|0]| -<span class="no"> 5</span> @:[text|s/concat[@[text]|@[count]-]] -<span class="no"> 6</span> @:[count|subtract[@[count]|1]] -<span class="no"> 7</span> ] -<span class="no"> 8</span> @[text] --[Outputs: -5-4-3-2-1-] -<span class="no"> 9</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>let[ +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> @count[5] +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> @text[-] +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> while[gt[@[count]|0]| +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> @:[text|s/concat[@[text]|@[count]-]] +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> @:[count|subtract[@[count]|1]] +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> ] +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> @[text] --[Outputs: -5-4-3-2-1-] +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span>] +</pre></div> </div> </div>

@@ -1185,7 +1188,7 @@

<section class="section"> -<header><h1 id="h_211">Parameters</h1></header> +<header><h1 id="h_210">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>
M content/glyph/book/macros/macros_filters.htmlcontent/glyph/book/macros/macros_filters.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -107,11 +107,12 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> markdown_section[ -<span class="no">2</span> @title[Test Section] -<span class="no">3</span> @id[test] -<span class="no">4</span> Some *markdown* text. -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>markdown_section[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @title[Test Section] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @id[test] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>Some *markdown* text. +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> </div>

@@ -205,11 +206,12 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> textile_section[ -<span class="no">2</span> @title[Test Section] -<span class="no">3</span> @id[test] -<span class="no">4</span> Some *textile* text. -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>textile_section[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @title[Test Section] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @id[test] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>Some *textile* text. +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> </div>

@@ -274,11 +276,12 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> highlight[ruby| -<span class="no">2</span> def hello -<span class="no">3</span> puts &quot;Hello World&quot; -<span class="no">4</span> end -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>highlight[ruby| +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> def hello +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> puts &quot;Hello World&quot; +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> end +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> </div>
M content/glyph/book/macros/macros_inline.htmlcontent/glyph/book/macros/macros_inline.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/macros/macros_structure.htmlcontent/glyph/book/macros/macros_structure.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -322,11 +322,12 @@ <p>

<strong>Example</strong> </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> section[ -<span class="no">2</span> @title[Test Section] -<span class="no">3</span> @id[test] -<span class="no">4</span> ... -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>section[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @title[Test Section] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @id[test] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>... +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> </div>
M content/glyph/book/ref_commands.htmlcontent/glyph/book/ref_commands.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -73,7 +73,7 @@ <li><em>global_options</em> and <em>options</em> are in the form: <code>-n</code> <em>value</em> or <code>--name=</code><em>value</em>, e.g. <code>-f pdf</code> or <code>--format=pdf</code></li>

<li><em>parameters</em> are separated by whitespaces, and can be wrapped in quotes.</li> </ul> <section class="section"> -<header><h1 id="h_116">Global Options</h1></header> +<header><h1 id="h_115">Global Options</h1></header> <section class="section"> <header><h1 id="debug_switch"><code>-d</code>, <code>--debug</code></h1></header> <p>If specified, the command is executed in debug mode and additional diagnostic information is printed on the screen.</p>

@@ -92,7 +92,7 @@ <p>Creates a new text file in the <code>text/</code> folder.</p>

<p><strong>Example:</strong> <code>glyph add introduction.textile</code></p> <section class="section"> -<header><h1 id="h_120">Parameters</h1></header> +<header><h1 id="h_119">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -113,7 +113,7 @@ <p>Compiles a Glyph document into an output file. If no options are specified, the <code>document.glyph</code> file is used as source to produce a standalone HTML file.</p>

<p><strong>Example:</strong> <code>glyph compile -f pdf</code></p> <section class="section"> -<header><h1 id="h_122">Parameters</h1></header> +<header><h1 id="h_121">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -135,7 +135,7 @@ </section>

<section class="section"> -<header><h1 id="h_123">Options</h1></header> +<header><h1 id="h_122">Options</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Option</th>

@@ -177,12 +177,12 @@ Gets or sets a configuration setting in the project or global configuration file (<span class="fmi">for more information on <mark>configuration files</mark>, see <a href="/glyph/book/getting_started/configuration.html#cfg">Project Configuration</a></span>).

<div class="examples"> <p><strong>Examples:</strong></p> -<code>glyph config document.filename</code><br /><code>glyph config -g document.author "Fabio Cevasco"</code><br /> +["<code>glyph config document.filename</code><br />", "<code>glyph config -g document.author \"Fabio Cevasco\"</code><br />"] </div> <section class="section"> -<header><h1 id="h_125">Options</h1></header> +<header><h1 id="h_124">Options</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Option</th>

@@ -201,7 +201,7 @@ </section>

<section class="section"> -<header><h1 id="h_126">Parameters</h1></header> +<header><h1 id="h_125">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -228,12 +228,12 @@ Prints information about all Glyph commands or about one specific command.

<div class="examples"> <p><strong>Examples:</strong></p> -<code>glyph help</code><br /><code>glyph help compile</code><br /> +["<code>glyph help</code><br />", "<code>glyph help compile</code><br />"] </div> <section class="section"> -<header><h1 id="h_128">Parameters</h1></header> +<header><h1 id="h_127">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -259,7 +259,7 @@ <header><h1 id="c_outline">outline</h1></header>

Display an outline of the current document. <section class="section"> -<header><h1 id="h_131">Options</h1></header> +<header><h1 id="h_130">Options</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Option</th>

@@ -302,7 +302,7 @@

<div class="examples"> <p><strong>Examples:</strong></p> -<code>glyph outline -it -l 1</code><br /><code>glyph outline -l 2</code><br /><code>glyph outline -f</code><br /> +["<code>glyph outline -it -l 1</code><br />", "<code>glyph outline -l 2</code><br />", "<code>glyph outline -f</code><br />"] </div> </section>

@@ -312,12 +312,12 @@ <p>Displays project statistics (<span class="fmi">for more information on <mark>this command</mark>, see <a href="/glyph/book/document.html#stats">Document Statistics</a></span>).</p>

<div class="examples"> <p><strong>Examples:</strong></p> -<code>glyph stats -m </code><br /><code>glyph stats --link=h3rald.com</code><br /> +["<code>glyph stats -m </code><br />", "<code>glyph stats --link=h3rald.com</code><br />"] </div> <section class="section"> -<header><h1 id="h_133">Options</h1></header> +<header><h1 id="h_132">Options</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Option</th>
M content/glyph/book/stats/bookmarks.htmlcontent/glyph/book/stats/bookmarks.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -67,36 +67,37 @@

<nav class="navigation"><a href="/glyph/book/stats/snippets.html">Snippet Statistics</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/stats/links.html">Link Statistics</a></nav> <section class="section"> -<header><h1 id="h_73">Displaying stats about all bookmarks</h1></header> +<header><h1 id="h_72">Displaying stats about all bookmarks</h1></header> <p>To display statistics about all bookmarks, execute <code>glyph stats --bookmarks</code>. Glyph displays something like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> ===== Bookmarks -<span class="no"> 2</span> -- Total Bookmarks: 241 -<span class="no"> 3</span> -- Total Referenced Bookmarks: 89 -<span class="no"> 4</span> -- Total Unreferenced Bookmarks: 155 -<span class="no"> 5</span> -- Bookmarks: -<span class="no"> 6</span> attribute_intro auto_regeneration c_add c_compile c_config -<span class="no"> 7</span> c_help c_init c_outline c_todo cfg -<span class="no"> 8</span> cfg_document cfg_filters cfg_ref cmd_ref compile -<span class="no"> 9</span> [...] -<span class="no"><strong>10</strong></span> -- Referenced Bookmarks: -<span class="no">11</span> - attribute_intro (1) -<span class="no">12</span> - auto_regeneration (2) -<span class="no">13</span> - c_add (2) -<span class="no">14</span> - c_compile (10) -<span class="no">15</span> - c_config (6) -<span class="no">16</span> - c_init (1) -<span class="no">17</span> - c_outline (1) -<span class="no">18</span> [...] -<span class="no">19</span> -- Unreferenced Bookmarks: -<span class="no"><strong>20</strong></span> c_help cmd_ref expanded_values extending h_1 -<span class="no">21</span> h_10 h_102 h_105 h_107 h_109 -<span class="no">22</span> h_111 h_112 h_114 h_115 h_117 -<span class="no">23</span> [...]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>===== Bookmarks +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>-- Total Bookmarks: 241 +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>-- Total Referenced Bookmarks: 89 +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span>-- Total Unreferenced Bookmarks: 155 +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span>-- Bookmarks: +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> attribute_intro auto_regeneration c_add c_compile c_config +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> c_help c_init c_outline c_todo cfg +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> cfg_document cfg_filters cfg_ref cmd_ref compile +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span>[...] +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span>-- Referenced Bookmarks: +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> - attribute_intro (1) +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> - auto_regeneration (2) +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> - c_add (2) +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> - c_compile (10) +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> - c_config (6) +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> - c_init (1) +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> - c_outline (1) +<span class="line-numbers"><a href="#n18" name="n18">18</a></span>[...] +<span class="line-numbers"><a href="#n19" name="n19">19</a></span>-- Unreferenced Bookmarks: +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> c_help cmd_ref expanded_values extending h_1 +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> h_10 h_102 h_105 h_107 h_109 +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> h_111 h_112 h_114 h_115 h_117 +<span class="line-numbers"><a href="#n23" name="n23">23</a></span>[...] +</pre></div> </div> <section class="section"> -<header><h1 id="h_74">Remarks</h1></header> +<header><h1 id="h_73">Remarks</h1></header> <ul> <li>All the automatically-generated bookmarks (like headers, starting with <code>h_</code>) are included as well.</li> </ul>

@@ -106,19 +107,20 @@

</section> <section class="section"> -<header><h1 id="h_75">Displaying stats about a single bookmark</h1></header> +<header><h1 id="h_74">Displaying stats about a single bookmark</h1></header> <p>To display statistics about a single bookmark (e.g. <code>rubydoc</code>), execute <code>glyph stats --bookmark=c_config</code>. Glyph displays something like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> ===== Bookmark 'c_config' (header) -<span class="no">2</span> -- Defined in: text/ref_commands.glyph -<span class="no">3</span> -- Referenced in: -<span class="no">4</span> - text/changelog.glyph (2) -<span class="no">5</span> - text/getting_started/configuration.glyph (1) -<span class="no">6</span> - text/troubleshooting/errors_command.glyph (3)</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>===== Bookmark 'c_config' (header) +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>-- Defined in: text/ref_commands.glyph +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>-- Referenced in: +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> - text/changelog.glyph (2) +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> - text/getting_started/configuration.glyph (1) +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> - text/troubleshooting/errors_command.glyph (3) +</pre></div> </div> <section class="section"> -<header><h1 id="h_76">Remarks</h1></header> +<header><h1 id="h_75">Remarks</h1></header> <ul> <li>Do not prepend the bookmark ID with <code>#</code>.</li> </ul>
M content/glyph/book/stats/links.htmlcontent/glyph/book/stats/links.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -67,45 +67,46 @@

<nav class="navigation"><a href="/glyph/book/stats/bookmarks.html">Bookmark Statistics</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/extending/internals.html">A quick look at Glyph's internals</a></nav> <section class="section"> -<header><h1 id="h_78">Displaying stats about all links</h1></header> +<header><h1 id="h_77">Displaying stats about all links</h1></header> <p>To display statistics about all links, execute <code>glyph stats --links</code>. Glyph displays something like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> ===== Links -<span class="no"> 2</span> -- Total Internal Links: 89 -<span class="no"> 3</span> -- Internal Links -<span class="no"> 4</span> - #attribute_intro -<span class="no"> 5</span> - #auto_regeneration -<span class="no"> 6</span> - #c_add -<span class="no"> 7</span> - #c_compile -<span class="no"> 8</span> - #c_config -<span class="no"> 9</span> - #c_init -<span class="no"><strong>10</strong></span> - #c_outline -<span class="no">11</span> - #c_stats -<span class="no">12</span> - #c_todo -<span class="no">13</span> - #cfg -<span class="no">14</span> - #cfg_document -<span class="no">15</span> - #cfg_filters -<span class="no">16</span> [...] -<span class="no">17</span> -- Total External Links: 95 -<span class="no">18</span> -- External Links -<span class="no">19</span> - <span class="er">&amp;</span>[rubydoc]/Glyph -<span class="no"><strong>20</strong></span> - <span class="er">&amp;</span>[rubydoc]/Glyph/Document -<span class="no">21</span> - <span class="er">&amp;</span>[rubydoc]/Glyph/Interpreter -<span class="no">22</span> - <span class="er">&amp;</span>[rubydoc]/Glyph/Macro -<span class="no">23</span> - <span class="er">&amp;</span>[rubydoc]/Glyph/Macro/Validators -<span class="no">24</span> - <span class="er">&amp;</span>[rubydoc]/Glyph/Macro:update_source -<span class="no">25</span> - <span class="er">&amp;</span>[rubydoc]/Glyph/MacroNode -<span class="no">26</span> - <span class="er">&amp;</span>[rubydoc]/Glyph/Parser -<span class="no">27</span> - <span class="er">&amp;</span>[rubydoc]/Glyph/SyntaxNode -<span class="no">28</span> - <span class="er">&amp;</span>[rubydoc]/Macro -<span class="no">29</span> - http://code.google.com/p/wkhtmltopdf/ -<span class="no"><strong>30</strong></span> - http://coderay.rubychan.de/ -<span class="no">31</span> - http://coderay.rubychan.de/doc/classes/CodeRay/Encoders/HTML.html -<span class="no">32</span> [...]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>===== Links +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>-- Total Internal Links: 89 +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>-- Internal Links +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> - #attribute_intro +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> - #auto_regeneration +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> - #c_add +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> - #c_compile +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> - #c_config +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> - #c_init +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> - #c_outline +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> - #c_stats +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> - #c_todo +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> - #cfg +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> - #cfg_document +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> - #cfg_filters +<span class="line-numbers"><a href="#n16" name="n16">16</a></span>[...] +<span class="line-numbers"><a href="#n17" name="n17">17</a></span>-- Total External Links: 95 +<span class="line-numbers"><a href="#n18" name="n18">18</a></span>-- External Links +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> - <span class="error">&amp;</span>[rubydoc]/Glyph +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> - <span class="error">&amp;</span>[rubydoc]/Glyph/Document +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> - <span class="error">&amp;</span>[rubydoc]/Glyph/Interpreter +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> - <span class="error">&amp;</span>[rubydoc]/Glyph/Macro +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> - <span class="error">&amp;</span>[rubydoc]/Glyph/Macro/Validators +<span class="line-numbers"><a href="#n24" name="n24">24</a></span> - <span class="error">&amp;</span>[rubydoc]/Glyph/Macro:update_source +<span class="line-numbers"><a href="#n25" name="n25">25</a></span> - <span class="error">&amp;</span>[rubydoc]/Glyph/MacroNode +<span class="line-numbers"><a href="#n26" name="n26">26</a></span> - <span class="error">&amp;</span>[rubydoc]/Glyph/Parser +<span class="line-numbers"><a href="#n27" name="n27">27</a></span> - <span class="error">&amp;</span>[rubydoc]/Glyph/SyntaxNode +<span class="line-numbers"><a href="#n28" name="n28">28</a></span> - <span class="error">&amp;</span>[rubydoc]/Macro +<span class="line-numbers"><a href="#n29" name="n29">29</a></span> - http://code.google.com/p/wkhtmltopdf/ +<span class="line-numbers"><strong><a href="#n30" name="n30">30</a></strong></span> - http://coderay.rubychan.de/ +<span class="line-numbers"><a href="#n31" name="n31">31</a></span> - http://coderay.rubychan.de/doc/classes/CodeRay/Encoders/HTML.html +<span class="line-numbers"><a href="#n32" name="n32">32</a></span>[...] +</pre></div> </div> <section class="section"> -<header><h1 id="h_79">Remarks</h1></header> +<header><h1 id="h_78">Remarks</h1></header> <ul> <li>The only criteria used to determine if a link is internal is whether it starts with a <code>#</code> or not.</li> </ul>

@@ -115,51 +116,52 @@

</section> <section class="section"> -<header><h1 id="h_80">Displaying stats about links matching a regular expression</h1></header> +<header><h1 id="h_79">Displaying stats about links matching a regular expression</h1></header> <p>To display statistics about links matching a regular expression (e.g. <code>/c_/</code>), execute <code>glyph stats --link=c_</code>. Glyph displays something like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> ===== Links matching /c_/ -<span class="no"> 2</span> -- Total Links: 8 -<span class="no"> 3</span> -- Link Targets: -<span class="no"> 4</span> - #c_add -<span class="no"> 5</span> - #c_compile -<span class="no"> 6</span> - #c_config -<span class="no"> 7</span> - #c_init -<span class="no"> 8</span> - #c_outline -<span class="no"> 9</span> - #c_stats -<span class="no"><strong>10</strong></span> - #c_todo -<span class="no">11</span> - #esc_quot -<span class="no">12</span> -- Details: -<span class="no">13</span> - #c_add (2) -<span class="no">14</span> - text/troubleshooting/errors_command.glyph (1) -<span class="no">15</span> - text/troubleshooting/errors_generic.glyph (1) -<span class="no">16</span> - #c_compile (10) -<span class="no">17</span> - text/changelog.glyph (1) -<span class="no">18</span> - text/compiling/compiling.glyph (2) -<span class="no">19</span> - text/compiling/lite_mode.glyph (1) -<span class="no"><strong>20</strong></span> - text/compiling/programmatic_usage.glyph (2) -<span class="no">21</span> - text/getting_started/create_project.glyph (1) -<span class="no">22</span> - text/ref_config.glyph (1) -<span class="no">23</span> - text/troubleshooting/errors_command.glyph (2) -<span class="no">24</span> - #c_config (6) -<span class="no">25</span> - text/changelog.glyph (2) -<span class="no">26</span> - text/getting_started/configuration.glyph (1) -<span class="no">27</span> - text/troubleshooting/errors_command.glyph (3) -<span class="no">28</span> - #c_init (1) -<span class="no">29</span> - text/troubleshooting/errors_generic.glyph (1) -<span class="no"><strong>30</strong></span> - #c_outline (1) -<span class="no">31</span> - text/changelog.glyph (1) -<span class="no">32</span> - #c_stats (1) -<span class="no">33</span> - text/stats/stats.glyph (1) -<span class="no">34</span> - #c_todo (1) -<span class="no">35</span> - text/macros/macros_inline.glyph (1) -<span class="no">36</span> - #esc_quot (2) -<span class="no">37</span> - text/extending/macro_def.glyph (1) -<span class="no">38</span> - text/text_editing/macro_intro.glyph (1)</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>===== Links matching /c_/ +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>-- Total Links: 8 +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>-- Link Targets: +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> - #c_add +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> - #c_compile +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> - #c_config +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> - #c_init +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> - #c_outline +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> - #c_stats +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> - #c_todo +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> - #esc_quot +<span class="line-numbers"><a href="#n12" name="n12">12</a></span>-- Details: +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> - #c_add (2) +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> - text/troubleshooting/errors_command.glyph (1) +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> - text/troubleshooting/errors_generic.glyph (1) +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> - #c_compile (10) +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> - text/changelog.glyph (1) +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> - text/compiling/compiling.glyph (2) +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> - text/compiling/lite_mode.glyph (1) +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> - text/compiling/programmatic_usage.glyph (2) +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> - text/getting_started/create_project.glyph (1) +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> - text/ref_config.glyph (1) +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> - text/troubleshooting/errors_command.glyph (2) +<span class="line-numbers"><a href="#n24" name="n24">24</a></span> - #c_config (6) +<span class="line-numbers"><a href="#n25" name="n25">25</a></span> - text/changelog.glyph (2) +<span class="line-numbers"><a href="#n26" name="n26">26</a></span> - text/getting_started/configuration.glyph (1) +<span class="line-numbers"><a href="#n27" name="n27">27</a></span> - text/troubleshooting/errors_command.glyph (3) +<span class="line-numbers"><a href="#n28" name="n28">28</a></span> - #c_init (1) +<span class="line-numbers"><a href="#n29" name="n29">29</a></span> - text/troubleshooting/errors_generic.glyph (1) +<span class="line-numbers"><strong><a href="#n30" name="n30">30</a></strong></span> - #c_outline (1) +<span class="line-numbers"><a href="#n31" name="n31">31</a></span> - text/changelog.glyph (1) +<span class="line-numbers"><a href="#n32" name="n32">32</a></span> - #c_stats (1) +<span class="line-numbers"><a href="#n33" name="n33">33</a></span> - text/stats/stats.glyph (1) +<span class="line-numbers"><a href="#n34" name="n34">34</a></span> - #c_todo (1) +<span class="line-numbers"><a href="#n35" name="n35">35</a></span> - text/macros/macros_inline.glyph (1) +<span class="line-numbers"><a href="#n36" name="n36">36</a></span> - #esc_quot (2) +<span class="line-numbers"><a href="#n37" name="n37">37</a></span> - text/extending/macro_def.glyph (1) +<span class="line-numbers"><a href="#n38" name="n38">38</a></span> - text/text_editing/macro_intro.glyph (1) +</pre></div> </div> <section class="section"> -<header><h1 id="h_81">Remarks</h1></header> +<header><h1 id="h_80">Remarks</h1></header> <ul> <li>No distinction between external and internal targets is made.</li> </ul>
M content/glyph/book/stats/macros.htmlcontent/glyph/book/stats/macros.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -67,46 +67,47 @@

<nav class="navigation"><a href="/glyph/book/stats/stats.html">Using the stats command</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/stats/snippets.html">Snippet Statistics</a></nav> <section class="section"> -<header><h1 id="h_63">Displaying stats about all macros</h1></header> +<header><h1 id="h_62">Displaying stats about all macros</h1></header> <p>To display statistics about all macros, execute <code>glyph stats --macros</code>. Glyph displays something like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> ===== Macros -<span class="no"> 2</span> -- Total Macro Instances: 2497 -<span class="no"> 3</span> -- Total Macro Definitions: 65 -<span class="no"> 4</span> -- Total Macro Aliases: 57 -<span class="no"> 5</span> -- Total Used Macro Definitions: 56 -<span class="no"> 6</span> -- Macro Definitions: -<span class="no"> 7</span> #<span class="er">&gt;</span> $<span class="er">&gt;</span> %<span class="er">&gt;</span> alias: aliases -<span class="no"> 8</span> anchor and article author block_example -<span class="no"> 9</span> book box class codeblock comment -<span class="no"><strong>10</strong></span> condition config config: config_table default -<span class="no">11</span> document draftcomment eq error_table escape -<span class="no">12</span> example examples features figure fmi -<span class="no">13</span> head highlight image include issue -<span class="no">14</span> link macro: markdown match navigation -<span class="no">15</span> not note option or parameters -<span class="no">16</span> pubdate ref_config ref_error ref_macro release -<span class="no">17</span> revision rewrite: ruby section snippet -<span class="no">18</span> snippet: stats_for style subtitle textile -<span class="no">19</span> title toc todo values |xml| -<span class="no"><strong>20</strong></span> -<span class="no">21</span> -- Used Macro Definitions: -<span class="no">22</span> #<span class="er">&gt;</span> $<span class="er">&gt;</span> %<span class="er">&gt;</span> aliases anchor -<span class="no">23</span> and author block_example book box -<span class="no">24</span> class codeblock comment condition config -<span class="no">25</span> config_table default document eq error_table -<span class="no">26</span> escape example examples features figure -<span class="no">27</span> fmi head highlight image include -<span class="no">28</span> issue link note option or -<span class="no">29</span> parameters pubdate ref_config ref_error ref_macro -<span class="no"><strong>30</strong></span> release revision rewrite: ruby section -<span class="no">31</span> snippet snippet: stats_for style subtitle -<span class="no">32</span> textile title toc todo values -<span class="no">33</span> |xml|</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>===== Macros +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>-- Total Macro Instances: 2497 +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>-- Total Macro Definitions: 65 +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span>-- Total Macro Aliases: 57 +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span>-- Total Used Macro Definitions: 56 +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span>-- Macro Definitions: +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> #<span class="error">&gt;</span> $<span class="error">&gt;</span> %<span class="error">&gt;</span> alias: aliases +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> anchor and article author block_example +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> book box class codeblock comment +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> condition config config: config_table default +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> document draftcomment eq error_table escape +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> example examples features figure fmi +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> head highlight image include issue +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> link macro: markdown match navigation +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> not note option or parameters +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> pubdate ref_config ref_error ref_macro release +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> revision rewrite: ruby section snippet +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> snippet: stats_for style subtitle textile +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> title toc todo values |xml| +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> +<span class="line-numbers"><a href="#n21" name="n21">21</a></span>-- Used Macro Definitions: +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> #<span class="error">&gt;</span> $<span class="error">&gt;</span> %<span class="error">&gt;</span> aliases anchor +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> and author block_example book box +<span class="line-numbers"><a href="#n24" name="n24">24</a></span> class codeblock comment condition config +<span class="line-numbers"><a href="#n25" name="n25">25</a></span> config_table default document eq error_table +<span class="line-numbers"><a href="#n26" name="n26">26</a></span> escape example examples features figure +<span class="line-numbers"><a href="#n27" name="n27">27</a></span> fmi head highlight image include +<span class="line-numbers"><a href="#n28" name="n28">28</a></span> issue link note option or +<span class="line-numbers"><a href="#n29" name="n29">29</a></span> parameters pubdate ref_config ref_error ref_macro +<span class="line-numbers"><strong><a href="#n30" name="n30">30</a></strong></span> release revision rewrite: ruby section +<span class="line-numbers"><a href="#n31" name="n31">31</a></span> snippet snippet: stats_for style subtitle +<span class="line-numbers"><a href="#n32" name="n32">32</a></span> textile title toc todo values +<span class="line-numbers"><a href="#n33" name="n33">33</a></span> |xml| +</pre></div> </div> <section class="section"> -<header><h1 id="h_64">Remarks</h1></header> +<header><h1 id="h_63">Remarks</h1></header> <ul> <li>Only macro <em>definitions</em> (not their <em>aliases</em>) are displayed, both default and user-defined.</li> <li>The <code>|xml|</code> macro is a special macro used if the <a href="/glyph/book/config/options.html#s_options_xml_fallback"><code>options.xml_fallback</code></a> setting is enabled.</li>

@@ -118,29 +119,30 @@

</section> <section class="section"> -<header><h1 id="h_65">Displaying stats about a single macro</h1></header> +<header><h1 id="h_64">Displaying stats about a single macro</h1></header> <p>To display statistics about a single macro (e.g. <code>note</code>), execute <code>glyph stats --macro=note</code>. Glyph displays something like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> ===== Macro 'note' -<span class="no"> 2</span> -- Total Instances: 18 -<span class="no"> 3</span> -- Occurrences: -<span class="no"> 4</span> - text/compiling/compiling.glyph (2) -<span class="no"> 5</span> - text/compiling/programmatic_usage.glyph (1) -<span class="no"> 6</span> - text/extending/params_attrs.glyph (1) -<span class="no"> 7</span> - text/getting_started/configuration.glyph (1) -<span class="no"> 8</span> - text/stats/macros.glyph (2) -<span class="no"> 9</span> - text/text_editing/attribute_intro.glyph (1) -<span class="no"><strong>10</strong></span> - text/text_editing/esc_quot.glyph (1) -<span class="no">11</span> - text/text_editing/images.glyph (1) -<span class="no">12</span> - text/text_editing/inclusions.glyph (3) -<span class="no">13</span> - text/text_editing/links.glyph (1) -<span class="no">14</span> - text/text_editing/raw_html.glyph (1) -<span class="no">15</span> - text/text_editing/section_aliases.glyph (1) -<span class="no">16</span> - text/text_editing/xml_fallback.glyph (2)</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>===== Macro 'note' +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>-- Total Instances: 18 +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>-- Occurrences: +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> - text/compiling/compiling.glyph (2) +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> - text/compiling/programmatic_usage.glyph (1) +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> - text/extending/params_attrs.glyph (1) +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> - text/getting_started/configuration.glyph (1) +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> - text/stats/macros.glyph (2) +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> - text/text_editing/attribute_intro.glyph (1) +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> - text/text_editing/esc_quot.glyph (1) +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> - text/text_editing/images.glyph (1) +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> - text/text_editing/inclusions.glyph (3) +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> - text/text_editing/links.glyph (1) +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> - text/text_editing/raw_html.glyph (1) +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> - text/text_editing/section_aliases.glyph (1) +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> - text/text_editing/xml_fallback.glyph (2) +</pre></div> </div> <section class="section"> -<header><h1 id="h_66">Remarks</h1></header> +<header><h1 id="h_65">Remarks</h1></header> <ul> <li>All the instances of the specified macro definition <em>and all its aliases</em> are collected, regardless whether a definition or an alias is specified.</li> <li>If you use custom macros, make sure they call the <a href="http://rubydoc.info/gems/glyph/Glyph/Macro:update_source">Macro#update_source</a> appropriately method if necessary.</li>
M content/glyph/book/stats/snippets.htmlcontent/glyph/book/stats/snippets.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -67,29 +67,30 @@

<nav class="navigation"><a href="/glyph/book/stats/macros.html">Macro Statistics</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/stats/bookmarks.html">Bookmark Statistics</a></nav> <section class="section"> -<header><h1 id="h_68">Displaying stats about all snippets</h1></header> +<header><h1 id="h_67">Displaying stats about all snippets</h1></header> <p>To display statistics about all snippets, execute <code>glyph stats --snippets</code>. Glyph displays something like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> ===== Snippets -<span class="no"> 2</span> -- Total Snippets: 21 -<span class="no"> 3</span> -- Total Used Snippets: 21 -<span class="no"> 4</span> -- Total Unused Snippets: 0 -<span class="no"> 5</span> -- Snippets: -<span class="no"> 6</span> bin_params called_on_files coderay filter_by_ext -<span class="no"> 7</span> glang htmlcode img_attrs img_file -<span class="no"> 8</span> markups only_after_declaration only_defined_through opt -<span class="no"> 9</span> referenced_with_path sq_esc unsafe uv -<span class="no"><strong>10</strong></span> rubydoc -<span class="no">11</span> -- Used Snippets: -<span class="no">12</span> bin_params called_on_files coderay filter_by_ext -<span class="no">13</span> glang htmlcode img_attrs img_file -<span class="no">14</span> markups only_after_declaration only_defined_through opt -<span class="no">15</span> referenced_with_path sq_esc unsafe uv -<span class="no">16</span> rubydoc</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>===== Snippets +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>-- Total Snippets: 21 +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>-- Total Used Snippets: 21 +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span>-- Total Unused Snippets: 0 +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span>-- Snippets: +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> bin_params called_on_files coderay filter_by_ext +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> glang htmlcode img_attrs img_file +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> markups only_after_declaration only_defined_through opt +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> referenced_with_path sq_esc unsafe uv +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> rubydoc +<span class="line-numbers"><a href="#n11" name="n11">11</a></span>-- Used Snippets: +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> bin_params called_on_files coderay filter_by_ext +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> glang htmlcode img_attrs img_file +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> markups only_after_declaration only_defined_through opt +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> referenced_with_path sq_esc unsafe uv +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> rubydoc +</pre></div> </div> <section class="section"> -<header><h1 id="h_69">Remarks</h1></header> +<header><h1 id="h_68">Remarks</h1></header> <ul> <li>Information on snippet usage and definitions is available only when displaying statistics for a single snippet.</li> </ul>

@@ -99,27 +100,28 @@

</section> <section class="section"> -<header><h1 id="h_70">Displaying stats about a single snippet</h1></header> +<header><h1 id="h_69">Displaying stats about a single snippet</h1></header> <p>To display statistics about a single snippet (e.g. <code>rubydoc</code>), execute <code>glyph stats --snippet=rubydoc</code>. Glyph displays something like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> ===== Snippet 'rubydoc' -<span class="no"> 2</span> -- Definition: -<span class="no"> 3</span> ------------------- -<span class="no"> 4</span> http://rubydoc.info/gems/glyph -<span class="no"> 5</span> ------------------- -<span class="no"> 6</span> -- Total Used Instances: 18 -<span class="no"> 7</span> -- Usage Details: -<span class="no"> 8</span> - text/extending/bookmarks_headers.glyph (1) -<span class="no"> 9</span> - text/extending/further_reading.glyph (5) -<span class="no"><strong>10</strong></span> - text/extending/internals.glyph (5) -<span class="no">11</span> - text/extending/macro_def.glyph (3) -<span class="no">12</span> - text/extending/validators.glyph (1) -<span class="no">13</span> - text/macros/macros_core.glyph (2) -<span class="no">14</span> - text/stats/macros.glyph (1)</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>===== Snippet 'rubydoc' +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>-- Definition: +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>------------------- +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span>http://rubydoc.info/gems/glyph +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span>------------------- +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span>-- Total Used Instances: 18 +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span>-- Usage Details: +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> - text/extending/bookmarks_headers.glyph (1) +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> - text/extending/further_reading.glyph (5) +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> - text/extending/internals.glyph (5) +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> - text/extending/macro_def.glyph (3) +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> - text/extending/validators.glyph (1) +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> - text/macros/macros_core.glyph (2) +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> - text/stats/macros.glyph (1) +</pre></div> </div> <section class="section"> -<header><h1 id="h_71">Remarks</h1></header> +<header><h1 id="h_70">Remarks</h1></header> <ul> <li>Nested snippets appear as within the file containing the top-level snippet.</li> </ul>
M content/glyph/book/stats/stats.htmlcontent/glyph/book/stats/stats.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -69,22 +69,23 @@

<p>Glyph includes a <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command that can be used to display useful statistics about your Glyph project. If you try running Glyph's command help, you'll see that this command can take quite a few options: </p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> $ glyph help stats -<span class="no"> 2</span> Glyph v0.5.0 -<span class="no"> 3</span> -<span class="no"> 4</span> stats [options] -<span class="no"> 5</span> Display statistics -<span class="no"> 6</span> -<span class="no"> 7</span> Options: -<span class="no"> 8</span> -b, --bookmarks - Display stats about bookmarks -<span class="no"> 9</span> --bookmark=arg - Display stats about a single bookmark -<span class="no"><strong>10</strong></span> -f, --files - Display stats about project files -<span class="no">11</span> -l, --links - Display stats about links -<span class="no">12</span> --link=arg - Display stats about links matching a regular expression -<span class="no">13</span> -m, --macros - Display stats about macros -<span class="no">14</span> --macro=arg - Display stats about a single macro -<span class="no">15</span> -s, --snippets - Display stats about snippets -<span class="no">16</span> --snippet=arg - Display stats about a single snippet</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>$ glyph help stats +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>Glyph v0.5.0 +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span>stats [options] +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> Display statistics +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span>Options: +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> -b, --bookmarks - Display stats about bookmarks +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> --bookmark=arg - Display stats about a single bookmark +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> -f, --files - Display stats about project files +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> -l, --links - Display stats about links +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> --link=arg - Display stats about links matching a regular expression +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> -m, --macros - Display stats about macros +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> --macro=arg - Display stats about a single macro +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> -s, --snippets - Display stats about snippets +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> --snippet=arg - Display stats about a single snippet +</pre></div> </div> <p>If no options are specified, the command returns a summary containing different element totals, i.e.:</p>

@@ -97,37 +98,38 @@ <li>Links and references</li>

</ul> <p>Example:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> ===================================== -<span class="no"> 2</span> Glyph - Statistics -<span class="no"> 3</span> ===================================== -<span class="no"> 4</span> -<span class="no"> 5</span> ===== Files -<span class="no"> 6</span> -- Total Files: 50 -<span class="no"> 7</span> -- /text -- 46 -<span class="no"> 8</span> -- /images -- 3 -<span class="no"> 9</span> -- /styles -- 0 -<span class="no"><strong>10</strong></span> -- /layouts -- 0 -<span class="no">11</span> -- /lib -- 1 -<span class="no">12</span> -<span class="no">13</span> ===== Macros -<span class="no">14</span> -- Total Macro Instances: 2950 -<span class="no">15</span> -- Total Macro Definitions: 22 -<span class="no">16</span> -- Total Macro Aliases: 57 -<span class="no">17</span> -- Total Used Macro Definitions: 60 -<span class="no">18</span> -<span class="no">19</span> ===== Snippets -<span class="no"><strong>20</strong></span> -- Total Snippets: 21 -<span class="no">21</span> -- Total Used Snippets: 21 -<span class="no">22</span> -- Total Unused Snippets: 0 -<span class="no">23</span> -<span class="no">24</span> ===== Bookmarks -<span class="no">25</span> -- Total Bookmarks: 221 -<span class="no">26</span> -- Total Referenced Bookmarks: 87 -<span class="no">27</span> -- Total Unreferenced Bookmarks: 135 -<span class="no">28</span> -<span class="no">29</span> ===== Links -<span class="no"><strong>30</strong></span> -- Total Internal Links: 87 -<span class="no">31</span> -- Total External Links: 97</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>===================================== +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span>Glyph - Statistics +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span>===================================== +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span>===== Files +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span>-- Total Files: 50 +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span>-- /text -- 46 +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span>-- /images -- 3 +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span>-- /styles -- 0 +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span>-- /layouts -- 0 +<span class="line-numbers"><a href="#n11" name="n11">11</a></span>-- /lib -- 1 +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> +<span class="line-numbers"><a href="#n13" name="n13">13</a></span>===== Macros +<span class="line-numbers"><a href="#n14" name="n14">14</a></span>-- Total Macro Instances: 2950 +<span class="line-numbers"><a href="#n15" name="n15">15</a></span>-- Total Macro Definitions: 22 +<span class="line-numbers"><a href="#n16" name="n16">16</a></span>-- Total Macro Aliases: 57 +<span class="line-numbers"><a href="#n17" name="n17">17</a></span>-- Total Used Macro Definitions: 60 +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> +<span class="line-numbers"><a href="#n19" name="n19">19</a></span>===== Snippets +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span>-- Total Snippets: 21 +<span class="line-numbers"><a href="#n21" name="n21">21</a></span>-- Total Used Snippets: 21 +<span class="line-numbers"><a href="#n22" name="n22">22</a></span>-- Total Unused Snippets: 0 +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> +<span class="line-numbers"><a href="#n24" name="n24">24</a></span>===== Bookmarks +<span class="line-numbers"><a href="#n25" name="n25">25</a></span>-- Total Bookmarks: 221 +<span class="line-numbers"><a href="#n26" name="n26">26</a></span>-- Total Referenced Bookmarks: 87 +<span class="line-numbers"><a href="#n27" name="n27">27</a></span>-- Total Unreferenced Bookmarks: 135 +<span class="line-numbers"><a href="#n28" name="n28">28</a></span> +<span class="line-numbers"><a href="#n29" name="n29">29</a></span>===== Links +<span class="line-numbers"><strong><a href="#n30" name="n30">30</a></strong></span>-- Total Internal Links: 87 +<span class="line-numbers"><a href="#n31" name="n31">31</a></span>-- Total External Links: 97 +</pre></div> </div> <nav class="navigation"><a href="/glyph/book/compiling/programmatic_usage.html">Using Glyph programmatically</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/stats/macros.html">Macro Statistics</a></nav>
M content/glyph/book/styles/default.csscontent/glyph/book/styles/default.css

@@ -38,21 +38,20 @@ margin: auto;

text-align: center; } .titlepage h1 { font-size: 2.5em; - line-height: 1.2em; font-weight: bold; + line-height: 1.5em; margin-bottom: 0.2em; } .halftitlepage h1 { font-size: 2.5em; font-weight: bold; + line-height: 1.5em; margin-bottom: 0.2em; } .halftitlepage h2 { font-size: 1.1em; font-style: italic; font-weight: bold; - padding-top: 0; - margin-top: 0; - line-height: 2.5em; + line-height: 1.2em; margin-bottom: 0.5em; prince-bookmark-level: none; }

@@ -60,9 +59,7 @@ .titlepage h2 {

font-size: 1.1em; font-style: italic; font-weight: bold; - padding-top: 0; - margin-top: 0; - line-height: 2.5em; + line-height: 1.2em; margin-bottom: 0.5em; prince-bookmark-level: none; }

@@ -129,16 +126,11 @@ .right {

margin: auto; text-align: center; } -code { - font-size: 0.8em; -} - .note, .important, .tip, .caution, .box { - border: 1px solid #CCC; + border: 1px solid #e6e6e6; display: block; margin: 0.5em auto; - padding: 1em; - padding-top: 0em; + padding: 0 0.5em; width: 600px; background: #EEE; color: #1F1F1F; }

@@ -154,10 +146,7 @@

.box-title { display: block; text-align: center; - font-weight: bold; - font-size: 120%; - margin: 0.5em; -} + font-weight: bold; } .comment { display: block;

@@ -212,6 +201,18 @@ text-decoration: none; }

a:hover { color: #005b91; } +.code > pre { + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + color: #222; + padding: 20px; + overflow: auto hidden; + margin: 20px 0 20px 0; } + +code, .CodeRay { + font-size: 0.8em; } + span.line-numbers { margin: 0; padding: 3px; }

@@ -248,7 +249,7 @@ margin: 2em auto; }

/* FONTS */ body { - font-family: 'Crimson Text', 'Palatino', 'Bookman', 'Georgia', 'Times'; } + font-family: "Gentium Book Basic", "Book Antiqua", "Times New Roman", "Serif"; } code, pre { font-family: "Droid Sans Mono", "Consolas", "Monaco", "Courier", "Monospace"; }
M content/glyph/book/text_editing/attribute_intro.htmlcontent/glyph/book/text_editing/attribute_intro.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -69,7 +69,8 @@ <p>Although a macro can take any number of parameters, they are often no more than two or three, for readibility reasons: parameters have no name, but their position within a macro is significant.</p>

<p>If you have something like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> custom_image[test.png|50%|50%|Test Image]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>custom_image[test.png|50%|50%|Test Image] +</pre></div> </div> <p>it may still be easy enough to understand what each parameter is used for, but:</p>

@@ -79,11 +80,12 @@ <li>if you don&#8217;t want to resize the image, you still have to pass <em>empty parameters</em> to the macro, like this: <code>custom_image[test2.png|||Test Image]</code></li>

</ul> <p>To avoid these situations, some macros which would normally take three or four parameters take optional attributes instead, so you can write:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> image[test.png -<span class="no">2</span> @width[50%] -<span class="no">3</span> @alt[Test Image] -<span class="no">4</span> @height[50%] -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>image[test.png +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @width[50%] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @alt[Test Image] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> @height[50%] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> <p>More verbose, of course, but definitely more readable. In this way, if you won't want to scale an image, you can safely omit the <code>@width</code> and <code>@height</code> attributes.</p>
M content/glyph/book/text_editing/code.htmlcontent/glyph/book/text_editing/code.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -68,40 +68,43 @@ <nav class="navigation"><a href="/glyph/book/text_editing/images.html">Images and Figures</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/text_editing/raw_html.html">Textile or Markdown</a></nav>

<p>If you&#8217;re a programmer, chances are that you&#8217;re going to include some source code in your articles and books. Glyph offers two ways to format code blocks effortlessly: the <a href="/glyph/book/macros/macros_block.html#m_codeblock"><code>codeblock</code></a> macro, which simply wraps text into <code>&lt;pre&gt;</code> and <code>&lt;code&gt;</code> tags, or the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro. The last one requires either <a href="http://coderay.rubychan.de/">Coderay</a> or <a href="http://ultraviolet.rubyforge.org/">Ultraviolet</a>, but it provides syntax highlighting for the most common programming languages.</p> <p>Cosider the following piece of ruby code:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> def find_child(&amp;block) -<span class="no">2</span> children.each do |c| -<span class="no">3</span> c.descend do |node, level| -<span class="no">4</span> return node if block.call(node) -<span class="no">5</span> end -<span class="no">6</span> end -<span class="no">7</span> nil -<span class="no">8</span> end</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>def find_child(&amp;block) +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> children.each do |c| +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> c.descend do |node, level| +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> return node if block.call(node) +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> end +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> end +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> nil +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>end +</pre></div> </div> <p>It can be wrapped in a highlight macro, like so:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> highlight[=ruby| -<span class="no"> 2</span> def find_child(&amp;block) -<span class="no"> 3</span> children.each do |c| -<span class="no"> 4</span> c.descend do |node, level| -<span class="no"> 5</span> return node if block.call(node) -<span class="no"> 6</span> end -<span class="no"> 7</span> end -<span class="no"> 8</span> nil -<span class="no"> 9</span> end -<span class="no"><strong>10</strong></span> =]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>highlight[=ruby| +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> def find_child(&amp;block) +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> children.each do |c| +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> c.descend do |node, level| +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> return node if block.call(node) +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> end +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> end +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> nil +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> end +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span>=] +</pre></div> </div> <p>...to produce the following, using the coderay highlighter:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> <span class="r">def</span> <span class="fu">find_child</span>(&amp;block) -<span class="no">2</span> children.each <span class="r">do</span> |c| -<span class="no">3</span> c.descend <span class="r">do</span> |node, level| -<span class="no">4</span> <span class="r">return</span> node <span class="r">if</span> block.call(node) -<span class="no">5</span> <span class="r">end</span> -<span class="no">6</span> <span class="r">end</span> -<span class="no">7</span> <span class="pc">nil</span> -<span class="no">8</span> <span class="r">end</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="keyword">def</span> <span class="function">find_child</span>(&amp;block) +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> children.each <span class="keyword">do</span> |c| +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> c.descend <span class="keyword">do</span> |node, level| +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> <span class="keyword">return</span> node <span class="keyword">if</span> block.call(node) +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> <span class="keyword">end</span> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> <span class="predefined-constant">nil</span> +<span class="line-numbers"><a href="#n8" name="n8">8</a></span><span class="keyword">end</span> +</pre></div> </div> <aside class="box">
M content/glyph/book/text_editing/conditionals.htmlcontent/glyph/book/text_editing/conditionals.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -75,9 +75,10 @@ <li><a href="/glyph/book/macros/macros_core.html#m_or"><code>or</code></a> macro</li>

</ul> <p>Consider the following code:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> ?[$[document.draft]| -<span class="no">2</span> This is a first draft of the Glyph Book| -<span class="no">3</span> This is the official version of the Glyph Book]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[$[document.draft]| +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>This is a first draft of the Glyph Book| +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>This is the official version of the Glyph Book] +</pre></div> </div> <p>In this case, if <code>document.draft</code> is set to <code>true</code>, &#8220;This is a first draft of the Glyph Book&#8221; will be displayed; if not, &#8220;This is the official version of the Glyph Book&#8221; will be displayed instead.</p>

@@ -89,18 +90,19 @@ <li><em>(Optional)</em> the text to include in the document if the condition is <em>not</em> satisfied.</li>

</ol> <p>Note that <em>all</em> parameters can contain macros, of course, so you can write things like:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> ?[and[ -<span class="no">2</span> eq[$[document.output]|pdf] -<span class="no">3</span> | -<span class="no">4</span> eq[$[tools.pdf_generator]|prince] -<span class="no">5</span> ] -<span class="no">6</span> | -<span class="no">7</span> style[pagination.css]]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[and[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> eq[$[document.output]|pdf] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> | +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> eq[$[tools.pdf_generator]|prince] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> ] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> | +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> style[pagination.css]] +</pre></div> </div> <p>In this case, the <code>pagination.css</code> stylesheet is included only when you're generating a PDF document using Prince XML.</p> <section class="section"> -<header><h1 id="h_43">Results of conditional expressions</h1></header> +<header><h1 id="h_42">Results of conditional expressions</h1></header> <p>The <a href="/glyph/book/macros/macros_core.html#m_condition"><code>condition</code></a> macro in Glyph works in a similar way as conditionals in programming languages: if the conditional expression (supplied as first parameter) is satisfied then the second parameter is executed or displayed. But when is a conditional expression satisfied? Glyph is a simple mini-language to perform text manipulation, and has no types, it can only understand text, therefore:</p> <ul> <li>A conditional expression is satisfied if it evaluates to a non-empty string except &#8220;false&#8221;.</li>
M content/glyph/book/text_editing/esc_quot.htmlcontent/glyph/book/text_editing/esc_quot.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -70,17 +70,18 @@ <p>If a portion of your text contains an excessive amount of square brackets, you may consider using the <a href="/glyph/book/macros/macros_core.html#m_escape"><code>escape</code></a> macro (or its alias <code>.</code>) with the <code>[=</code> and <code>=]</code> delimiters. By itself, the escape macro doesn&#8217;t do anything: it just evaluates to its contents, but the special delimiters act as an escape for any square bracket within them. As a consequence, any macro within <code>[=</code> and <code>=]</code> will <em>not</em> be evaluated.</p>

<p>You can use the quoting delimiters with <em>any</em> macro identifier. Obviously, using them as delimiters for things like <a href="/glyph/book/macros/macros_structure.html#m_section"><code>section</code></a> macros may not be a good idea, but they should be more or less mandatory with the <a href="/glyph/book/macros/macros_block.html#m_codeblock"><code>codeblock</code></a> macro or the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro, especially when it contains square brackets or even Glyph code, like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> codeblock[= -<span class="no"> 2</span> section[ -<span class="no"> 3</span> @title[A section] -<span class="no"> 4</span> @id[test] -<span class="no"> 5</span> This is a section. -<span class="no"> 6</span> section[ -<span class="no"> 7</span> @title[A nested section] -<span class="no"> 8</span> This is another section. -<span class="no"> 9</span> ] -<span class="no"><strong>10</strong></span> ] -<span class="no">11</span> =]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>codeblock[= +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> section[ +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> @title[A section] +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> @id[test] +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span>This is a section. +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> section[ +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> @title[A nested section] +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span>This is another section. +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> ] +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> ] +<span class="line-numbers"><a href="#n11" name="n11">11</a></span>=] +</pre></div> </div>
M content/glyph/book/text_editing/evaluation.htmlcontent/glyph/book/text_editing/evaluation.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -66,7 +66,7 @@ <section id="body-text" class="hyphenate glyph-book">

<nav class="navigation"><a href="/glyph/book/text_editing/conditionals.html">Conditional Macros</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/compiling/compiling.html">Compiling a project</a></nav> <section class="section"> -<header><h1 id="h_45">Turing-completeness</h1></header> +<header><h1 id="h_44">Turing-completeness</h1></header> <p>As of version 0.5.0, Glyph can be considered <em>Turing-complete</em>, as it satisfies the following <a href="http://c2.com/cgi/wiki?LanguageRequirementsForTuringCompleteness">requirements for Turing-completeness</a>:</p> <ul> <li>A conditional construct, implemented via the <a href="/glyph/book/macros/macros_core.html#m_condition"><code>condition</code></a> macro.</li>

@@ -78,48 +78,50 @@

</section> <section class="section"> -<header><h1 id="h_46">Operations on integer values</h1></header> +<header><h1 id="h_45">Operations on integer values</h1></header> <p>Glyph can be used to perform operation on integer values (additions, subtractions and multiplications). For example, <code>add[2|3|7]</code> will evaluate to <code>12</code>, and <code>multiply[add[3|7]|subtract[5|1|2]]</code> will return 20.</p> <p>As a more complex example, consider the following <code>factorial</code> macro, which is able to calculate the factorial of a number recursively:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> def:[factorial|<br /> -<span class="no">2</span> ?[<br /> -<span class="no">3</span> eq[|0]|1|<br /> -<span class="no">4</span> multiply[<br /> -<span class="no">5</span> | factorial[subtract[|1]]<br /> -<span class="no">6</span> ]<br /> -<span class="no">7</span> ]<br /> -<span class="no">8</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>def:[factorial|<br /> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> ?[<br /> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> eq[|0]|1|<br /> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> multiply[<br /> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> | factorial[subtract[|1]]<br /> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> ]<br /> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> ]<br /> +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>]<br /> +</pre></div> </div> <p>If you try executing <code>factorial[5]</code>, it will evaluate to <code>120</code>.</p> </section> <section class="section"> -<header><h1 id="h_47">Lexically-scoped attribute assignment</h1></header> +<header><h1 id="h_46">Lexically-scoped attribute assignment</h1></header> <p><a href="/glyph/book/text_editing/inclusions.html#snippets">Snippets</a> can be used in a similar way as <em>variables</em> are used in programming languages. Or better, they can be used as <em>global variables</em>, as they are visible from anywhere in the Glyph document. If you need something more restricted to, say, a section and all its subsections, you can define your own attributes and use them in a very similar way.</p> <p>Consider the following Glyph code:</p> </section> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> let[ -<span class="no">2</span> @:[a|bits] -<span class="no">3</span> @:[b|bobs] -<span class="no">4</span> section[ -<span class="no">5</span> @title[Something more about attributes] -<span class="no">6</span> Attributes are like lexically scoped variables. You can use them to store @[a] and @[b]. -<span class="no">7</span> ] -<span class="no">8</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>let[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @:[a|bits] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @:[b|bobs] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> section[ +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> @title[Something more about attributes] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>Attributes are like lexically scoped variables. You can use them to store @[a] and @[b]. +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> ] +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>] +</pre></div> </div> <p>The <a href="/glyph/book/macros/macros_core.html#m_let"><code>let</code></a> macro here only acts as a dummy macro (it does nothing really) to bind attributes using the <a href="/glyph/book/macros/macros_core.html#m_attribute_"><code>attribute:</code></a> macro (aliased by <code>@:</code>). Attributes can then be used anywhere within the <code>let</code> macro, so the content of the section reads: &#8220;Attributes are like lexically-scoped variables. You can use them to store bits and bobs&#8221;.</p> <p>Note that attributes defined through the <a href="/glyph/book/macros/macros_core.html#m_attribute_"><code>attribute:</code></a> macro are&#8230; well, attributes! Feel free to use the <a href="/glyph/book/macros/macros_core.html#m_attribute"><code>attribute</code></a> macro to access standard attributes like <code>title</code>, etc.</p> <section class="section"> -<header><h1 id="h_48">Evaluating Ruby code</h1></header> +<header><h1 id="h_47">Evaluating Ruby code</h1></header> <p>For anything more complex than what described in the previous sections you can also evaluate simple ruby code snippets using the <code>ruby</code> macro (aliased to <code>%</code>), like this:</p> <ul> <li><code>%[2 + 2]</code> &rarr; 4</li> - <li><code>%[Time.now]</code> &rarr; Sun Aug 28 20:18:00 +0200 2011</li> - <li><code>%[Glyph::VERSION]</code> &rarr; 0.5.0</li> + <li><code>%[Time.now]</code> &rarr; 2011-12-04 15:00:43 +0100</li> + <li><code>%[Glyph::VERSION]</code> &rarr; 0.5.1</li> </ul> <p>The scope for the code evaluation is the Kernel module, (with all inclusions required by Glyph itself).</p> <p>Although it is possible to retrieve Glyph configuration settings in this way (e.g. <code>%[cfg('document.author')]</code>), the <a href="/glyph/book/macros/macros_core.html#m_config"><code>config</code></a> macro (aliased to <code>$</code>) makes things slightly simpler (e.g. <code>$[document.author]</code>).</p>
M content/glyph/book/text_editing/glyph_files.htmlcontent/glyph/book/text_editing/glyph_files.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/text_editing/images.htmlcontent/glyph/book/text_editing/images.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -73,24 +73,26 @@ <p>

The following Glyph code: </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> image[glyph.svg -<span class="no">2</span> @with[20%] -<span class="no">3</span> @height[20%] -<span class="no">4</span> ] -<span class="no">5</span> figure[example.png|An example figure. -<span class="no">6</span> @alt[Example Figure] -<span class="no">7</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>image[glyph.svg +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @with[20%] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @height[20%] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>figure[example.png|An example figure. +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> @alt[Example Figure] +<span class="line-numbers"><a href="#n7" name="n7">7</a></span>] +</pre></div> </div> <p> Is translated into the following HTML code: </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> <span class="ta">&lt;img</span> <span class="an">src</span>=<span class="s"><span class="dl">&quot;</span><span class="k">images/glyph.svg</span><span class="dl">&quot;</span></span> <span class="an">width</span>=<span class="s"><span class="dl">&quot;</span><span class="k">20%</span><span class="dl">&quot;</span></span> <span class="an">height</span>=<span class="s"><span class="dl">&quot;</span><span class="k">20%</span><span class="dl">&quot;</span></span> <span class="ta">/&gt;</span> -<span class="no">2</span> <span class="ta">&lt;div</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">figure</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span> -<span class="no">3</span> <span class="ta">&lt;img</span> <span class="an">src</span>=<span class="s"><span class="dl">&quot;</span><span class="k">images/example.png</span><span class="dl">&quot;</span></span> <span class="an">alt</span>=<span class="s"><span class="dl">&quot;</span><span class="k">Example Figure</span><span class="dl">&quot;</span></span><span class="ta">/&gt;</span> -<span class="no">4</span> <span class="ta">&lt;div</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">caption</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>An example figure.<span class="ta">&lt;/div&gt;</span> -<span class="no">5</span> <span class="ta">&lt;/div&gt;</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag">&lt;img</span> <span class="attribute-name">src</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">images/glyph.svg</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">width</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">20%</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">height</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">20%</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span><span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">figure</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> <span class="tag">&lt;img</span> <span class="attribute-name">src</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">images/example.png</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">alt</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">Example Figure</span><span class="delimiter">&quot;</span></span><span class="tag">/&gt;</span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">caption</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>An example figure.<span class="tag">&lt;/div&gt;</span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span><span class="tag">&lt;/div&gt;</span> +</pre></div> </div> <p>Any attribute passed to the <a href="/glyph/book/macros/macros_block.html#m_image"><code>image</code></a> macro or the <a href="/glyph/book/macros/macros_block.html#m_figure"><code>figure</code></a> macro is automatically passed to the underlying <code>&lt;img&gt;</code> tag.</p>
M content/glyph/book/text_editing/inclusions.htmlcontent/glyph/book/text_editing/inclusions.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -91,27 +91,20 @@ <header><h1 id="snippets">Snippets</h1></header>

<p>While including the context of an entire file is definitely a useful feature for content reuse, sometimes it can be an overkill. What if, for example, you just want to reuse a short procedure or even a sentence or a single word? In this case, you may want to consider using a <em>snippet</em> instead.</p> <p>Snippets can be defined using the <a href="/glyph/book/macros/macros_core.html#m_snippet_"><code>snippet:</code></a> macro (aliased by <code>&amp;:</code>) and called by using the <a href="/glyph/book/macros/macros_core.html#m_snippet"><code>snippet</code></a> macro (aliased by <code>&amp;</code>). Consider the following simple example:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> <span class="er">&amp;</span>:[markups|Textile or Markdown] -<span class="no">2</span> -<span class="no">3</span> Glyph supports <span class="er">&amp;</span>[markups].</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="error">&amp;</span>:[markups|Textile or Markdown] +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>Glyph supports <span class="error">&amp;</span>[markups]. +</pre></div> </div> <p>You can use <code>&amp;[markups]</code> anywhere in your document instead of having to type "Textile or Markdown" every time. Additionally, later on you can change the value of the <code>markups</code> to change it everywhere else in the document.</p> + +</section> <aside class="tip"> <span class="note-title">Tip</span>Snippets (or any other macro) can be nested within other snippets. Glyph takes care of checking if you nested snippets or macros mutually and warns you as necessary. </aside> - -</section> - <section class="section"> -<header><h1 id="fragments">Fragments</h1></header> -<p>As an even simpler alternative to snippets, consider using <em>fragments</em>. The <a href="/glyph/book/macros/macros_core.html#m_fragment"><code>fragment</code></a> macro (aliased by <code>##</code>) can be used to mark a section of Glyph code as a fragment that can then be <em>embedded</em> using the <a href="/glyph/book/macros/macros_core.html#m_embed"><code>embed</code></a> macro (aliased by <code>&lt;=</code>), like this:</p> - - <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> Snippets and fragments ##[good_way|are a good way to reuse] small chunks of content, while the include and load macros <span class="er">&lt;</span>=[good_way] entire files.</pre></div> -</div> - -</section> + <nav class="navigation"><a href="/glyph/book/text_editing/stylesheets.html">Adding Stylesheets</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/text_editing/conditionals.html">Conditional Macros</a></nav> <nav id="sharing-buttons"> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="h3rald">Tweet</a>
M content/glyph/book/text_editing/links.htmlcontent/glyph/book/text_editing/links.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -81,27 +81,30 @@ <p>

The following Glyph code: </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> This is a link to link[#test]. -<span class="no">2</span> ... -<span class="no">3</span> This is link[#wrong]. -<span class="no">4</span> This is a #[test|test anchor].</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>This is a link to link[#test]. +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>... +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>This is link[#wrong]. +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>This is a #[test|test anchor]. +</pre></div> </div> <p> Is translated into the following HTML code: </p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> <span class="ta">&lt;p&gt;</span>This is a link to <span class="ta">&lt;a</span> <span class="an">href</span>=<span class="s"><span class="dl">&quot;</span><span class="k">#test</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>test anchor<span class="ta">&lt;/a&gt;</span>.<span class="ta">&lt;/p&gt;</span> -<span class="no">2</span> <span class="ta">&lt;p&gt;</span>...<span class="ta">&lt;/p&gt;</span> -<span class="no">3</span> <span class="ta">&lt;p&gt;</span>This is <span class="ta">&lt;a</span> <span class="an">href</span>=<span class="s"><span class="dl">&quot;</span><span class="k">#wrong</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>#wrong<span class="ta">&lt;/a&gt;</span>.<span class="ta">&lt;/p&gt;</span> -<span class="no">4</span> <span class="ta">&lt;p&gt;</span>This is a <span class="ta">&lt;a</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">test</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>test anchor<span class="ta">&lt;/a&gt;</span>.<span class="ta">&lt;/p&gt;</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag">&lt;p&gt;</span>This is a link to <span class="tag">&lt;a</span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">#test</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>test anchor<span class="tag">&lt;/a&gt;</span>.<span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span><span class="tag">&lt;p&gt;</span>...<span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span><span class="tag">&lt;p&gt;</span>This is <span class="tag">&lt;a</span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">#wrong</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>#wrong<span class="tag">&lt;/a&gt;</span>.<span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span><span class="tag">&lt;p&gt;</span>This is a <span class="tag">&lt;a</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">test</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>test anchor<span class="tag">&lt;/a&gt;</span>.<span class="tag">&lt;/p&gt;</span> +</pre></div> </div> <p>Additionally, the following warning message is displayed when <a href="/glyph/book/compiling/compiling.html#compile">compiling</a>:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> warning: Bookmark 'wrong' does not exist -<span class="no">2</span> -<span class="er">&gt;</span> source: @: authoring.textile -<span class="no">3</span> -<span class="er">&gt;</span> path: document/body/bodymatter/chapter/@/textile/section/section/box/link</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>warning: Bookmark 'wrong' does not exist +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> -<span class="error">&gt;</span> source: @: authoring.textile +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> -<span class="error">&gt;</span> path: document/body/bodymatter/chapter/@/textile/section/section/box/link +</pre></div> </div> </aside>

@@ -113,11 +116,12 @@ <li>if no title is specified as second parameter for the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro, the anchor&#8217;s name is used as such.</li>

</ul> <p>Besides using the <a href="/glyph/book/macros/macros_inline.html#m_anchor"><code>anchor</code></a> macro, you can also create an anchor for a header by passing an <code>@id</code> attribute the the <a href="/glyph/book/macros/macros_structure.html#m_section"><code>section</code></a> macro, like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> section[ -<span class="no">2</span> @title[My Section] -<span class="no">3</span> @id[my_section] -<span class="no">4</span> ... -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>section[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @title[My Section] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @id[my_section] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>... +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> <p>By default, validation is only enabled for internal links (i.e. the check occurs if the first parameter of the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro starts with a <code>#</code>). You can enable it for external links as well by setting the <a href="/glyph/book/config/options.html#s_options_url_validation"><code>options.url_validation</code></a> setting to <code>true</code>. If URL validation is enabled, an error is returned if a link returns an HTTP status greater than 302.</p>
M content/glyph/book/text_editing/macro_composition.htmlcontent/glyph/book/text_editing/macro_composition.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -68,20 +68,22 @@ <nav class="navigation"><a href="/glyph/book/text_editing/attribute_intro.html">Macro attributes</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/text_editing/esc_quot.html">Escaping and Quoting</a></nav>

<p>Glyph macros can be <em>composed</em> with other using the <code>/</code> character. Macro composition can be used instead of nesting, provided that macro containers (also called <em>dispatchers</em> in certain situations) take only one parameter and no attributes.</p> <p>For example, the following code:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> ?[ -<span class="no">2</span> not[output?[pdf]]| -<span class="no">3</span> ... -<span class="no">4</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> not[output?[pdf]]| +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> ... +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>] +</pre></div> </div> <p>Can be written like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> ?[ -<span class="no">2</span> not/output?[pdf]| -<span class="no">3</span> ... -<span class="no">4</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> not/output?[pdf]| +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> ... +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>] +</pre></div> </div>
M content/glyph/book/text_editing/macro_intro.htmlcontent/glyph/book/text_editing/macro_intro.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/text_editing/raw_html.htmlcontent/glyph/book/text_editing/raw_html.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -72,25 +72,27 @@ <aside class="box">

<div class="box-title">Example</div> <p>The following Glyph code:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> textile[ -<span class="no">2</span> This is a paragraph with some _emphasized_ text. -<span class="no">3</span> -<span class="no">4</span> This is another paragraph with some -deleted- text. -<span class="no">5</span> * This is -<span class="no">6</span> * a bulletted -<span class="no">7</span> * list -<span class="no">8</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>textile[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>This is a paragraph with some _emphasized_ text. +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>This is another paragraph with some -deleted- text. +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>* This is +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>* a bulletted +<span class="line-numbers"><a href="#n7" name="n7">7</a></span>* list +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>] +</pre></div> </div> <p>produces the following HTML code:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> <span class="ta">&lt;p&gt;</span>This is a paragraph with some <span class="ta">&lt;em&gt;</span>emphasized<span class="ta">&lt;/em&gt;</span> text.<span class="ta">&lt;/p&gt;</span> -<span class="no">2</span> <span class="ta">&lt;p&gt;</span>This is a paragraph with some <span class="ta">&lt;del&gt;</span>deleted<span class="ta">&lt;/del&gt;</span> text.<span class="ta">&lt;/p&gt;</span> -<span class="no">3</span> <span class="ta">&lt;ul&gt;</span> -<span class="no">4</span> <span class="ta">&lt;li&gt;</span>This is<span class="ta">&lt;/li&gt;</span> -<span class="no">5</span> <span class="ta">&lt;li&gt;</span>a bulletted<span class="ta">&lt;/li&gt;</span> -<span class="no">6</span> <span class="ta">&lt;li&gt;</span>list<span class="ta">&lt;/li&gt;</span> -<span class="no">7</span> <span class="ta">&lt;/ul&gt;</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag">&lt;p&gt;</span>This is a paragraph with some <span class="tag">&lt;em&gt;</span>emphasized<span class="tag">&lt;/em&gt;</span> text.<span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span><span class="tag">&lt;p&gt;</span>This is a paragraph with some <span class="tag">&lt;del&gt;</span>deleted<span class="tag">&lt;/del&gt;</span> text.<span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span><span class="tag">&lt;ul&gt;</span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> <span class="tag">&lt;li&gt;</span>This is<span class="tag">&lt;/li&gt;</span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> <span class="tag">&lt;li&gt;</span>a bulletted<span class="tag">&lt;/li&gt;</span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> <span class="tag">&lt;li&gt;</span>list<span class="tag">&lt;/li&gt;</span> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span><span class="tag">&lt;/ul&gt;</span> +</pre></div> </div> </aside>
M content/glyph/book/text_editing/section_aliases.htmlcontent/glyph/book/text_editing/section_aliases.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/text_editing/sections.htmlcontent/glyph/book/text_editing/sections.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -69,14 +69,15 @@

<p>Glyph documents are normally organized as a hierarchical tree of nested chapters, appendixes, sections, etc. To define a section, use the <a href="/glyph/book/macros/macros_structure.html#m_section"><code>section</code></a> macro (aliased by <code>§</code>), like so:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> section[ -<span class="no">2</span> @title[Section #1] -<span class="no">3</span> Write the section contents here... -<span class="no">4</span> section[ -<span class="no">5</span> @title[Section #2] -<span class="no">6</span> This section is nested into the previous one. -<span class="no">7</span> ] --[End of Section #2] -<span class="no">8</span> ] --[End of Section #1]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>section[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @title[Section #1] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>Write the section contents here... +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> section[ +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> @title[Section #2] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>This section is nested into the previous one. +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> ] --[End of Section #2] +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>] --[End of Section #1] +</pre></div> </div>

@@ -84,14 +85,15 @@ <p>This example defines two nested sections. If the <code>@title</code> attribute is specified like in this case, it will be converted to a proper <span class="caps">HTML</span> header and it will appear in the Table of Contents (see the <a href="/glyph/book/macros/macros_structure.html#m_toc"><code>toc</code></a> macro).</p>

<p>Note an important difference from <span class="caps">HTML</span>: there is no need for an explicit level for the headers, as it will be determined at runtime when the document is compiled, based on how sections are nested. The previous code snippet (taken as it is), for example, will be transformed into the following <span class="caps">HTML</span> code:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> <span class="ta">&lt;div</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">section</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span> -<span class="no">2</span> <span class="ta">&lt;h2&gt;</span>Section #1<span class="ta">&lt;/h2&gt;</span> -<span class="no">3</span> <span class="ta">&lt;p&gt;</span>Write the section contents here...<span class="ta">&lt;/p&gt;</span> -<span class="no">4</span> <span class="ta">&lt;div</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">section</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span> -<span class="no">5</span> <span class="ta">&lt;h3&gt;</span>Section #2<span class="ta">&lt;/h3&gt;</span> -<span class="no">6</span> <span class="ta">&lt;p&gt;</span>This section is nested in the previous one<span class="ta">&lt;/p&gt;</span> -<span class="no">7</span> <span class="ta">&lt;/div&gt;</span> -<span class="no">8</span> <span class="ta">&lt;/div&gt;</span></pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> <span class="tag">&lt;h2&gt;</span>Section #1<span class="tag">&lt;/h2&gt;</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> <span class="tag">&lt;p&gt;</span>Write the section contents here...<span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> <span class="tag">&lt;h3&gt;</span>Section #2<span class="tag">&lt;/h3&gt;</span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> <span class="tag">&lt;p&gt;</span>This section is nested in the previous one<span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> <span class="tag">&lt;/div&gt;</span> +<span class="line-numbers"><a href="#n8" name="n8">8</a></span><span class="tag">&lt;/div&gt;</span> +</pre></div> </div>

@@ -101,20 +103,22 @@ <header><h1 id="h_25">Markup-aware sections</h1></header>

<p>Although Glyph can be used on its own to produce valid <span class="caps">HTML</span> or <span class="caps">XML</span> code, you may often want to use Textile or Markdown to save some typing. Typically, you&#8217;ll end up writing a lot of code like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> section[ -<span class="no">2</span> @title[My Textile section] -<span class="no">3</span> textile[ -<span class="no">4</span> Textile markup can be used _here_. -<span class="no">5</span> ] -<span class="no">6</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>section[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @title[My Textile section] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> textile[ +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>Textile markup can be used _here_. +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> ] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>] +</pre></div> </div> <p>To save you even more typing, you can use the <a href="/glyph/book/macros/macros_filters.html#m_textile_section"><code>textile_section</code></a> macro (aliased by <code>txt_section</code> and <code>§txt</code>) and the <a href="/glyph/book/macros/macros_filters.html#m_markdown_section"><code>markdown_section</code></a> macro (aliased by <code>md_section</code> and <code>§md</code>). By doing so, the previous code snippet can be written like this:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> §txt[ -<span class="no">2</span> @title[My Textile section] -<span class="no">3</span> Textile markup can be used _here_. -<span class="no">4</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>§txt[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @title[My Textile section] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span>Textile markup can be used _here_. +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>] +</pre></div> </div> <aside class="tip">
M content/glyph/book/text_editing/stylesheets.htmlcontent/glyph/book/text_editing/stylesheets.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/text_editing/topics.htmlcontent/glyph/book/text_editing/topics.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -73,20 +73,22 @@ <li>be divided into meaningful sections like <em>Introduction</em>, <em>Procedure</em>, <em>Result</em></li>

</ul> <p>Glyph does not formally enforce the correctness of topic composition and usage, but it does enable authors to create them as a sort of external sections. Consider the following Glyph code:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> section[ -<span class="no">2</span> @title[My First Topic] -<span class="no">3</span> @id[first_topic] -<span class="no">4</span> @src[test/first_topic.glyph] -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>section[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @title[My First Topic] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @id[first_topic] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> @src[test/first_topic.glyph] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> <p>This is an ordinary section with a title and an explicit ID, but it has no contents. Instead, its <code>@src</code> attribute references an external file. If you are generating a single-file document, like a standalone <span class="caps">HTML</span> file or a <span class="caps">PDF</span> file, the code snippet above is exactly the same as the following:</p> <div class="CodeRay"> - <div class="code"><pre><span class="no">1</span> section[ -<span class="no">2</span> @title[My First Topic] -<span class="no">3</span> @id[first_topic] -<span class="no">4</span> include[test/first_topic.glyph] -<span class="no">5</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>section[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @title[My First Topic] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @id[first_topic] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> include[test/first_topic.glyph] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>] +</pre></div> </div> <p>On the other hand, if you are planning on producing a document comprised of multiple files (see <a href="/glyph/book/compiling/compiling.html#web_output">Web/Web5 Output</a>), the <code>@src</code> attribute tells Glyph to create a <em>topic</em> for the section. In this case:</p>
M content/glyph/book/text_editing/xml_fallback.htmlcontent/glyph/book/text_editing/xml_fallback.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>

@@ -74,60 +74,62 @@ <p>

The following Glyph code: </p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> table[@class[features] -<span class="no"> 2</span> tr[ -<span class="no"> 3</span> th[ID] -<span class="no"> 4</span> th[Priority] -<span class="no"> 5</span> th[Description] -<span class="no"> 6</span> ] -<span class="no"> 7</span> tr[ -<span class="no"> 8</span> td[27] -<span class="no"> 9</span> td[span[@style[color:red;font-weight:bold;] HIGH]] -<span class="no"><strong>10</strong></span> td[HTML output] -<span class="no">11</span> ] -<span class="no">12</span> tr[ -<span class="no">13</span> td[42] -<span class="no">14</span> td[span[@style[color:green;font-weight:bols;] LOW]] -<span class="no">15</span> td[ -<span class="no">16</span> p[Support for less-used tags:] -<span class="no">17</span> ul[ -<span class="no">18</span> li[cite] -<span class="no">19</span> li[sup] -<span class="no"><strong>20</strong></span> li[...] -<span class="no">21</span> ] -<span class="no">22</span> ] -<span class="no">23</span> ] -<span class="no">24</span> ]</pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>table[@class[features] +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> tr[ +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> th[ID] +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> th[Priority] +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> th[Description] +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> ] +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> tr[ +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> td[27] +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> td[span[@style[color:red;font-weight:bold;] HIGH]] +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> td[HTML output] +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> ] +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> tr[ +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> td[42] +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> td[span[@style[color:green;font-weight:bols;] LOW]] +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> td[ +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> p[Support for less-used tags:] +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> ul[ +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> li[cite] +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> li[sup] +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> li[...] +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> ] +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> ] +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> ] +<span class="line-numbers"><a href="#n24" name="n24">24</a></span>] +</pre></div> </div> <p> Is translated into the following HTML code: </p> <div class="CodeRay"> - <div class="code"><pre><span class="no"> 1</span> <span class="ta">&lt;table</span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">features</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span> -<span class="no"> 2</span> <span class="ta">&lt;tr&gt;</span> -<span class="no"> 3</span> <span class="ta">&lt;th&gt;</span>ID<span class="ta">&lt;/th&gt;</span> -<span class="no"> 4</span> <span class="ta">&lt;th&gt;</span>Priority<span class="ta">&lt;/th&gt;</span> -<span class="no"> 5</span> <span class="ta">&lt;th&gt;</span>Description<span class="ta">&lt;/th&gt;</span> -<span class="no"> 6</span> <span class="ta">&lt;/tr&gt;</span> -<span class="no"> 7</span> <span class="ta">&lt;tr&gt;</span> -<span class="no"> 8</span> <span class="ta">&lt;td&gt;</span>27<span class="ta">&lt;/td&gt;</span> -<span class="no"> 9</span> <span class="ta">&lt;td&gt;</span><span class="ta">&lt;span</span> <span class="an">style</span>=<span class="s"><span class="dl">&quot;</span><span class="k">color:red;font-weight:bold;</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>HIGH<span class="ta">&lt;/span&gt;</span><span class="ta">&lt;/td&gt;</span> -<span class="no"><strong>10</strong></span> <span class="ta">&lt;td&gt;</span>HTML output<span class="ta">&lt;/td&gt;</span> -<span class="no">11</span> <span class="ta">&lt;/tr&gt;</span> -<span class="no">12</span> <span class="ta">&lt;tr&gt;</span> -<span class="no">13</span> <span class="ta">&lt;td&gt;</span>42<span class="ta">&lt;/td&gt;</span> -<span class="no">14</span> <span class="ta">&lt;td&gt;</span><span class="ta">&lt;span</span> <span class="an">style</span>=<span class="s"><span class="dl">&quot;</span><span class="k">color:green;font-weight:bold;</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>LOW<span class="ta">&lt;/span&gt;</span><span class="ta">&lt;/td&gt;</span> -<span class="no">15</span> <span class="ta">&lt;td&gt;</span> -<span class="no">16</span> <span class="ta">&lt;p&gt;</span>Support for less-used tags:<span class="ta">&lt;/p&gt;</span> -<span class="no">17</span> <span class="ta">&lt;ul&gt;</span> -<span class="no">18</span> <span class="ta">&lt;li&gt;</span>cite<span class="ta">&lt;/li&gt;</span> -<span class="no">19</span> <span class="ta">&lt;li&gt;</span>sup<span class="ta">&lt;/li&gt;</span> -<span class="no"><strong>20</strong></span> <span class="ta">&lt;li&gt;</span>...<span class="ta">&lt;/li&gt;</span> -<span class="no">21</span> <span class="ta">&lt;/ul&gt;</span> -<span class="no">22</span> <span class="ta">&lt;/td&gt;</span> -<span class="no">23</span> <span class="ta">&lt;/tr&gt;</span> -<span class="no">24</span> <span class="ta">&lt;/table&gt;</span></pre></div> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="tag">&lt;table</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">features</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> <span class="tag">&lt;tr&gt;</span> +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> <span class="tag">&lt;th&gt;</span>ID<span class="tag">&lt;/th&gt;</span> +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> <span class="tag">&lt;th&gt;</span>Priority<span class="tag">&lt;/th&gt;</span> +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> <span class="tag">&lt;th&gt;</span>Description<span class="tag">&lt;/th&gt;</span> +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> <span class="tag">&lt;/tr&gt;</span> +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> <span class="tag">&lt;tr&gt;</span> +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> <span class="tag">&lt;td&gt;</span>27<span class="tag">&lt;/td&gt;</span> +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> <span class="tag">&lt;td&gt;</span><span class="tag">&lt;span</span> <span class="attribute-name">style</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">color:red;font-weight:bold;</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>HIGH<span class="tag">&lt;/span&gt;</span><span class="tag">&lt;/td&gt;</span> +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> <span class="tag">&lt;td&gt;</span>HTML output<span class="tag">&lt;/td&gt;</span> +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> <span class="tag">&lt;/tr&gt;</span> +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> <span class="tag">&lt;tr&gt;</span> +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> <span class="tag">&lt;td&gt;</span>42<span class="tag">&lt;/td&gt;</span> +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> <span class="tag">&lt;td&gt;</span><span class="tag">&lt;span</span> <span class="attribute-name">style</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">color:green;font-weight:bold;</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>LOW<span class="tag">&lt;/span&gt;</span><span class="tag">&lt;/td&gt;</span> +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> <span class="tag">&lt;td&gt;</span> +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> <span class="tag">&lt;p&gt;</span>Support for less-used tags:<span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> <span class="tag">&lt;ul&gt;</span> +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> <span class="tag">&lt;li&gt;</span>cite<span class="tag">&lt;/li&gt;</span> +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> <span class="tag">&lt;li&gt;</span>sup<span class="tag">&lt;/li&gt;</span> +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> <span class="tag">&lt;li&gt;</span>...<span class="tag">&lt;/li&gt;</span> +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> <span class="tag">&lt;/ul&gt;</span> +<span class="line-numbers"><a href="#n22" name="n22">22</a></span> <span class="tag">&lt;/td&gt;</span> +<span class="line-numbers"><a href="#n23" name="n23">23</a></span> <span class="tag">&lt;/tr&gt;</span> +<span class="line-numbers"><a href="#n24" name="n24">24</a></span><span class="tag">&lt;/table&gt;</span> +</pre></div> </div> </aside>
M content/glyph/book/troubleshooting/errors_command.htmlcontent/glyph/book/troubleshooting/errors_command.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/troubleshooting/errors_generic.htmlcontent/glyph/book/troubleshooting/errors_generic.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/troubleshooting/errors_macro.htmlcontent/glyph/book/troubleshooting/errors_macro.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/glyph/book/troubleshooting/errors_parser.htmlcontent/glyph/book/troubleshooting/errors_parser.html

@@ -27,7 +27,7 @@

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M content/home.erbcontent/home.erb

@@ -25,7 +25,7 @@ <li><a href="http://www.twitter.com/h3rald" rel="external"><img src="/images/social/twitter.png" alt="RSS" /></a></li>

<li><a href="http://it.linkedin.com/in/fabiocevasco" rel="external"><img src="/images/social/linkedin.png" alt="LinkedIn" /></a></li> <li><a href="https://github.com/h3rald" rel="external"><img src="/images/social/github.png" alt="GitHub" /></a></li> <li><a href="http://reddit.com/user/h3rald" rel="external"><img src="/images/social/reddit.png" alt="Reddit" /></a></li> - <li><a href="http://gplus.to/h3rald" rel="external"><img src="/images/social/google-plus.png" alt="Google+" /></a></li> + <li><a href="https://plus.google.com/105908178940572826669/posts" rel="external"><img src="/images/social/google-plus.png" alt="Google+" /></a></li> </ul> </nav> <aside id="search">
M content/js/hyphenator.jscontent/js/hyphenator.js

@@ -1,4 +1,5 @@

-/** @license Hyphenator 3.3.0 - client side hyphenation for webbrowsers +/* + * Hyphenator 4.0.0 - client side hyphenation for webbrowsers * Copyright (C) 2011 Mathias Nater, Zürich (mathias at mnn dot ch) * Project and Source hosted on http://code.google.com/p/hyphenator/ *

@@ -15,2149 +16,41 @@ * may distribute non-source (e.g., minimized or compacted) forms of

* that code without the copy of the GNU GPL normally required by * section 4, provided you include this license notice and a URL * through which recipients can access the Corresponding Source. - */ - -/* - * Comments are jsdoctoolkit formatted. See http://code.google.com/p/jsdoc-toolkit/ - */ - -/* The following comment is for JSLint: */ -/*global window, ActiveXObject, unescape */ -/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, regexp: true, sub: true, newcap: true, immed: true, evil: true, eqeqeq: false */ - - -/** - * @constructor - * @description Provides all functionality to do hyphenation, except the patterns that are loaded - * externally. - * @author Mathias Nater, <a href = "mailto:mathias@mnn.ch">mathias@mnn.ch</a> - * @version 3.3.0 - * @namespace Holds all methods and properties - * @example - * &lt;script src = "Hyphenator.js" type = "text/javascript"&gt;&lt;/script&gt; - * &lt;script type = "text/javascript"&gt; - *   Hyphenator.run(); - * &lt;/script&gt; + * + * + * Hyphenator.js contains code from Bram Steins hypher.js-Project: + * https://github.com/bramstein/Hypher + * + * Code from this project is marked in the source and belongs + * to the following license: + * + * Copyright (c) 2011, Bram Stein + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * */ -var Hyphenator = (function (window) { - var - /** - * @name Hyphenator-supportedLang - * @description - * A key-value object that stores supported languages. - * The key is the bcp47 code of the language and the value - * is the (abbreviated) filename of the pattern file. - * @type {Object.<string, string>} - * @private - * @example - * Check if language lang is supported: - * if (supportedLang.hasOwnProperty(lang)) - */ - supportedLang = { - 'be': 'be.js', - 'ca': 'ca.js', - 'cs': 'cs.js', - 'da': 'da.js', - 'bn': 'bn.js', - 'de': 'de.js', - 'el': 'el-monoton.js', - 'el-monoton': 'el-monoton.js', - 'el-polyton': 'el-polyton.js', - 'en': 'en-us.js', - 'en-gb': 'en-gb.js', - 'en-us': 'en-us.js', - 'es': 'es.js', - 'fi': 'fi.js', - 'fr': 'fr.js', - 'grc': 'grc.js', - 'gu': 'gu.js', - 'hi': 'hi.js', - 'hu': 'hu.js', - 'hy': 'hy.js', - 'it': 'it.js', - 'kn': 'kn.js', - 'la': 'la.js', - 'lt': 'lt.js', - 'lv': 'lv.js', - 'ml': 'ml.js', - 'no': 'no-nb.js', - 'no-nb': 'no-nb.js', - 'nl': 'nl.js', - 'or': 'or.js', - 'pa': 'pa.js', - 'pl': 'pl.js', - 'pt': 'pt.js', - 'ru': 'ru.js', - 'sl': 'sl.js', - 'sv': 'sv.js', - 'ta': 'ta.js', - 'te': 'te.js', - 'tr': 'tr.js', - 'uk': 'uk.js' - }, - - /** - * @name Hyphenator-languageHint - * @description - * An automatically generated string to be displayed in a prompt if the language can't be guessed. - * The string is generated using the supportedLang-object. - * @see Hyphenator-supportedLang - * @type {string} - * @private - * @see Hyphenator-autoSetMainLanguage - */ - - languageHint = (function () { - var k, r = ''; - for (k in supportedLang) { - if (supportedLang.hasOwnProperty(k)) { - r += k + ', '; - } - } - r = r.substring(0, r.length - 2); - return r; - }()), - - /** - * @name Hyphenator-prompterStrings - * @description - * A key-value object holding the strings to be displayed if the language can't be guessed - * If you add hyphenation patterns change this string. - * @type {Object.<string,string>} - * @private - * @see Hyphenator-autoSetMainLanguage - */ - prompterStrings = { - 'be': 'Мова гэтага сайта не можа быць вызначаны аўтаматычна. Калі ласка пакажыце мову:', - 'cs': 'Jazyk této internetové stránky nebyl automaticky rozpoznán. Určete prosím její jazyk:', - 'da': 'Denne websides sprog kunne ikke bestemmes. Angiv venligst sprog:', - 'de': 'Die Sprache dieser Webseite konnte nicht automatisch bestimmt werden. Bitte Sprache angeben:', - 'en': 'The language of this website could not be determined automatically. Please indicate the main language:', - 'es': 'El idioma del sitio no pudo determinarse autom%E1ticamente. Por favor, indique el idioma principal:', - 'fi': 'Sivun kielt%E4 ei tunnistettu automaattisesti. M%E4%E4rit%E4 sivun p%E4%E4kieli:', - 'fr': 'La langue de ce site n%u2019a pas pu %EAtre d%E9termin%E9e automatiquement. Veuillez indiquer une langue, s.v.p.%A0:', - 'hu': 'A weboldal nyelvét nem sikerült automatikusan megállapítani. Kérem adja meg a nyelvet:', - 'hy': 'Չհաջողվեց հայտնաբերել այս կայքի լեզուն։ Խնդրում ենք նշեք հիմնական լեզուն՝', - 'it': 'Lingua del sito sconosciuta. Indicare una lingua, per favore:', - 'kn': 'ಜಾಲ ತಾಣದ ಭಾಷೆಯನ್ನು ನಿರ್ಧರಿಸಲು ಸಾಧ್ಯವಾಗುತ್ತಿಲ್ಲ. ದಯವಿಟ್ಟು ಮುಖ್ಯ ಭಾಷೆಯನ್ನು ಸೂಚಿಸಿ:', - 'lt': 'Nepavyko automatiškai nustatyti šios svetainės kalbos. Prašome įvesti kalbą:', - 'lv': 'Šīs lapas valodu nevarēja noteikt automātiski. Lūdzu norādiet pamata valodu:', - 'ml': 'ഈ വെ%u0D2C%u0D4D%u200Cസൈറ്റിന്റെ ഭാഷ കണ്ടുപിടിയ്ക്കാ%u0D28%u0D4D%u200D കഴിഞ്ഞില്ല. ഭാഷ ഏതാണെന്നു തിരഞ്ഞെടുക്കുക:', - 'nl': 'De taal van deze website kan niet automatisch worden bepaald. Geef de hoofdtaal op:', - 'no': 'Nettstedets språk kunne ikke finnes automatisk. Vennligst oppgi språk:', - 'pt': 'A língua deste site não pôde ser determinada automaticamente. Por favor indique a língua principal:', - 'ru': 'Язык этого сайта не может быть определен автоматически. Пожалуйста укажите язык:', - 'sl': 'Jezika te spletne strani ni bilo mogoče samodejno določiti. Prosim navedite jezik:', - 'sv': 'Spr%E5ket p%E5 den h%E4r webbplatsen kunde inte avg%F6ras automatiskt. V%E4nligen ange:', - 'tr': 'Bu web sitesinin dili otomatik olarak tespit edilememiştir. Lütfen dökümanın dilini seçiniz%A0:', - 'uk': 'Мова цього веб-сайту не може бути визначена автоматично. Будь ласка, вкажіть головну мову:' - }, - - /** - * @name Hyphenator-basePath - * @description - * A string storing the basepath from where Hyphenator.js was loaded. - * This is used to load the patternfiles. - * The basepath is determined dynamically by searching all script-tags for Hyphenator.js - * If the path cannot be determined http://hyphenator.googlecode.com/svn/trunk/ is used as fallback. - * @type {string} - * @private - * @see Hyphenator-loadPatterns - */ - basePath = (function () { - var s = document.getElementsByTagName('script'), i = 0, p, src, t; - while (!!(t = s[i++])) { - if (!t.src) { - continue; - } - src = t.src; - p = src.indexOf('Hyphenator.js'); - if (p !== -1) { - return src.substring(0, p); - } - } - return 'http://hyphenator.googlecode.com/svn/trunk/'; - }()), - - /** - * @name Hyphenator-isLocal - * @description - * isLocal is true, if Hyphenator is loaded from the same domain, as the webpage, but false, if - * it's loaded from an external source (i.e. directly from google.code) - */ - isLocal = (function () { - var re = false; - if (window.location.href.indexOf(basePath) !== -1) { - re = true; - } - return re; - }()), - - /** - * @name Hyphenator-documentLoaded - * @description - * documentLoaded is true, when the DOM has been loaded. This is set by runOnContentLoaded - */ - documentLoaded = false, - documentCount = 0, - - /** - * @name Hyphenator-persistentConfig - * @description - * if persistentConfig is set to true (defaults to false), config options and the state of the - * toggleBox are stored in DOM-storage (according to the storage-setting). So they haven't to be - * set for each page. - */ - persistentConfig = false, - - /** - * @name Hyphenator-contextWindow - * @description - * contextWindow stores the window for the document to be hyphenated. - * If there are frames this will change. - * So use contextWindow instead of window! - */ - contextWindow = window, - - /** - * @name Hyphenator-doFrames - * @description - * switch to control if frames/iframes should be hyphenated, too - * defaults to false (frames are a bag of hurt!) - */ - doFrames = false, - - /** - * @name Hyphenator-dontHyphenate - * @description - * A key-value object containing all html-tags whose content should not be hyphenated - * @type {Object.<string,boolean>} - * @private - * @see Hyphenator-hyphenateElement - */ - dontHyphenate = {'script': true, 'code': true, 'pre': true, 'img': true, 'br': true, 'samp': true, 'kbd': true, 'var': true, 'abbr': true, 'acronym': true, 'sub': true, 'sup': true, 'button': true, 'option': true, 'label': true, 'textarea': true, 'input': true}, - - /** - * @name Hyphenator-enableCache - * @description - * A variable to set if caching is enabled or not - * @type boolean - * @default true - * @private - * @see Hyphenator.config - * @see hyphenateWord - */ - enableCache = true, - - /** - * @name Hyphenator-storageType - * @description - * A variable to define what html5-DOM-Storage-Method is used ('none', 'local' or 'session') - * @type {string} - * @default 'none' - * @private - * @see Hyphenator.config - */ - storageType = 'local', - - /** - * @name Hyphenator-storage - * @description - * An alias to the storage-Method defined in storageType. - * Set by Hyphenator.run() - * @type {Object|undefined} - * @default null - * @private - * @see Hyphenator.run - */ - storage, - - /** - * @name Hyphenator-enableReducedPatternSet - * @description - * A variable to set if storing the used patterns is set - * @type boolean - * @default false - * @private - * @see Hyphenator.config - * @see hyphenateWord - * @see Hyphenator.getRedPatternSet - */ - enableReducedPatternSet = false, - - /** - * @name Hyphenator-enableRemoteLoading - * @description - * A variable to set if pattern files should be loaded remotely or not - * @type boolean - * @default true - * @private - * @see Hyphenator.config - * @see Hyphenator-loadPatterns - */ - enableRemoteLoading = true, - - /** - * @name Hyphenator-displayToggleBox - * @description - * A variable to set if the togglebox should be displayed or not - * @type boolean - * @default false - * @private - * @see Hyphenator.config - * @see Hyphenator-toggleBox - */ - displayToggleBox = false, - - /** - * @name Hyphenator-hyphenateClass - * @description - * A string containing the css-class-name for the hyphenate class - * @type {string} - * @default 'hyphenate' - * @private - * @example - * &lt;p class = "hyphenate"&gt;Text&lt;/p&gt; - * @see Hyphenator.config - */ - hyphenateClass = 'hyphenate', - - /** - * @name Hyphenator-dontHyphenateClass - * @description - * A string containing the css-class-name for elements that should not be hyphenated - * @type {string} - * @default 'donthyphenate' - * @private - * @example - * &lt;p class = "donthyphenate"&gt;Text&lt;/p&gt; - * @see Hyphenator.config - */ - dontHyphenateClass = 'donthyphenate', - - /** - * @name Hyphenator-min - * @description - * A number wich indicates the minimal length of words to hyphenate. - * @type {number} - * @default 6 - * @private - * @see Hyphenator.config - */ - min = 6, - - /** - * @name Hyphenator-orphanControl - * @description - * Control how the last words of a line are handled: - * level 1 (default): last word is hyphenated - * level 2: last word is not hyphenated - * level 3: last word is not hyphenated and last space is non breaking - * @type {number} - * @default 1 - * @private - */ - orphanControl = 1, - - /** - * @name Hyphenator-isBookmarklet - * @description - * Indicates if Hyphanetor runs as bookmarklet or not. - * @type boolean - * @default false - * @private - */ - isBookmarklet = (function () { - var loc = null, re = false, jsArray = document.getElementsByTagName('script'), i, l; - for (i = 0, l = jsArray.length; i < l; i++) { - if (!!jsArray[i].getAttribute('src')) { - loc = jsArray[i].getAttribute('src'); - } - if (!loc) { - continue; - } else if (loc.indexOf('Hyphenator.js?bm=true') !== -1) { - re = true; - } - } - return re; - }()), - - /** - * @name Hyphenator-mainLanguage - * @description - * The general language of the document. In contrast to {@link Hyphenator-defaultLanguage}, - * mainLanguage is defined by the client (i.e. by the html or by a prompt). - * @type {string|null} - * @private - * @see Hyphenator-autoSetMainLanguage - */ - mainLanguage = null, - - /** - * @name Hyphenator-defaultLanguage - * @description - * The language defined by the developper. This language setting is defined by a config option. - * It is overwritten by any html-lang-attribute and only taken in count, when no such attribute can - * be found (i.e. just before the prompt). - * @type {string|null} - * @private - * @see Hyphenator-autoSetMainLanguage - */ - defaultLanguage = '', - - /** - * @name Hyphenator-elements - * @description - * An array holding all elements that have to be hyphenated. This var is filled by - * {@link Hyphenator-gatherDocumentInfos} - * @type {Array} - * @private - */ - elements = [], - - /** - * @name Hyphenator-exceptions - * @description - * An object containing exceptions as comma separated strings for each language. - * When the language-objects are loaded, their exceptions are processed, copied here and then deleted. - * @see Hyphenator-prepareLanguagesObj - * @type {Object} - * @private - */ - exceptions = {}, - - countObjProps = function (obj) { - var k, l = 0; - for (k in obj) { - if (obj.hasOwnProperty(k)) { - l++; - } - } - return l; - }, - /** - * @name Hyphenator-docLanguages - * @description - * An object holding all languages used in the document. This is filled by - * {@link Hyphenator-gatherDocumentInfos} - * @type {Object} - * @private - */ - docLanguages = {}, - - - /** - * @name Hyphenator-state - * @description - * A number that inidcates the current state of the script - * 0: not initialized - * 1: loading patterns - * 2: ready - * 3: hyphenation done - * 4: hyphenation removed - * @type {number} - * @private - */ - state = 0, - - /** - * @name Hyphenator-url - * @description - * A string containing a RegularExpression to match URL's - * @type {string} - * @private - */ - url = '(\\w*:\/\/)?((\\w*:)?(\\w*)@)?((([\\d]{1,3}\\.){3}([\\d]{1,3}))|((www\\.|[a-zA-Z]\\.)?[a-zA-Z0-9\\-\\.]+\\.([a-z]{2,4})))(:\\d*)?(\/[\\w#!:\\.?\\+=&%@!\\-]*)*', - // protocoll usr pwd ip or host tld port path - /** - * @name Hyphenator-mail - * @description - * A string containing a RegularExpression to match mail-adresses - * @type {string} - * @private - */ - mail = '[\\w-\\.]+@[\\w\\.]+', - - /** - * @name Hyphenator-urlRE - * @description - * A RegularExpressions-Object for url- and mail adress matching - * @type {RegExp} - * @private - */ - urlOrMailRE = new RegExp('(' + url + ')|(' + mail + ')', 'i'), - - /** - * @name Hyphenator-zeroWidthSpace - * @description - * A string that holds a char. - * Depending on the browser, this is the zero with space or an empty string. - * zeroWidthSpace is used to break URLs - * @type {string} - * @private - */ - zeroWidthSpace = (function () { - var zws, ua = navigator.userAgent.toLowerCase(); - zws = String.fromCharCode(8203); //Unicode zero width space - if (ua.indexOf('msie 6') !== -1) { - zws = ''; //IE6 doesn't support zws - } - if (ua.indexOf('opera') !== -1 && ua.indexOf('version/10.00') !== -1) { - zws = ''; //opera 10 on XP doesn't support zws - } - return zws; - }()), - - /** - * @name Hyphenator-createElem - * @description - * A function alias to document.createElementNS or document.createElement - * @type {function(string, Object)} - * @private - */ - createElem = function (tagname, context) { - context = context || contextWindow; - if (document.createElementNS) { - return context.document.createElementNS('http://www.w3.org/1999/xhtml', tagname); - } else if (document.createElement) { - return context.document.createElement(tagname); - } - }, - - /** - * @name Hyphenator-onHyphenationDone - * @description - * A method to be called, when the last element has been hyphenated or the hyphenation has been - * removed from the last element. - * @see Hyphenator.config - * @type {function()} - * @private - */ - onHyphenationDone = function () {}, - - /** - * @name Hyphenator-onError - * @description - * A function that can be called upon an error. - * @see Hyphenator.config - * @type {function(Object)} - * @private - */ - onError = function (e) { - window.alert("Hyphenator.js says:\n\nAn Error ocurred:\n" + e.message); - }, - - /** - * @name Hyphenator-selectorFunction - * @description - * A function that has to return a HTMLNodeList of Elements to be hyphenated. - * By default it uses the classname ('hyphenate') to select the elements. - * @see Hyphenator.config - * @type {function()} - * @private - */ - selectorFunction = function () { - var tmp, el = [], i, l; - if (document.getElementsByClassName) { - el = contextWindow.document.getElementsByClassName(hyphenateClass); - } else { - tmp = contextWindow.document.getElementsByTagName('*'); - l = tmp.length; - for (i = 0; i < l; i++) - { - if (tmp[i].className.indexOf(hyphenateClass) !== -1 && tmp[i].className.indexOf(dontHyphenateClass) === -1) { - el.push(tmp[i]); - } - } - } - return el; - }, - - /** - * @name Hyphenator-intermediateState - * @description - * The value of style.visibility of the text while it is hyphenated. - * @see Hyphenator.config - * @type {string} - * @private - */ - intermediateState = 'hidden', - - /** - * @name Hyphenator-hyphen - * @description - * A string containing the character for in-word-hyphenation - * @type {string} - * @default the soft hyphen - * @private - * @see Hyphenator.config - */ - hyphen = String.fromCharCode(173), - - /** - * @name Hyphenator-urlhyphen - * @description - * A string containing the character for url/mail-hyphenation - * @type {string} - * @default the zero width space - * @private - * @see Hyphenator.config - * @see Hyphenator-zeroWidthSpace - */ - urlhyphen = zeroWidthSpace, - - /** - * @name Hyphenator-safeCopy - * @description - * Defines wether work-around for copy issues is active or not - * Not supported by Opera (no onCopy handler) - * @type boolean - * @default true - * @private - * @see Hyphenator.config - * @see Hyphenator-registerOnCopy - */ - safeCopy = true, - - /** - * @name Hyphenator-Expando - * @description - * This custom object stores data for elements: storing data directly in elements - * (DomElement.customData = foobar;) isn't a good idea. It would lead to conflicts - * in form elements, when the form has a child with name="foobar". Therefore, this - * solution follows the approach of jQuery: the data is stored in an object and - * referenced by a unique attribute of the element. The attribute has a name that - * is built by the prefix "HyphenatorExpando_" and a random number, so if the very - * very rare case occurs, that there's already an attribute with the same name, a - * simple reload is enough to make it function. - * @private - */ - Expando = (function () { - var container = {}, - name = "HyphenatorExpando_" + Math.random(), - uuid = 0; - return { - getDataForElem : function (elem) { - return container[elem[name].id]; - }, - setDataForElem : function (elem, data) { - var id; - if (elem[name] && elem[name].id !== '') { - id = elem[name].id; - } else { - id = uuid++; - elem[name] = {'id': id}; //object needed, otherways it is reflected in HTML in IE - } - container[id] = data; - }, - appendDataForElem : function (elem, data) { - var k; - for (k in data) { - if (data.hasOwnProperty(k)) { - container[elem[name].id][k] = data[k]; - } - } - }, - delDataOfElem : function (elem) { - delete container[elem[name]]; - } - }; - }()), - - /* - * runOnContentLoaded is based od jQuery.bindReady() - * see - * jQuery JavaScript Library v1.3.2 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) - * Revision: 6246 - */ - /** - * @name Hyphenator-runOnContentLoaded - * @description - * A crossbrowser solution for the DOMContentLoaded-Event based on jQuery - * <a href = "http://jquery.com/</a> - * I added some functionality: e.g. support for frames and iframes… - * @param {Object} w the window-object - * @param {function()} f the function to call onDOMContentLoaded - * @private - */ - runOnContentLoaded = function (w, f) { - var DOMContentLoaded = function () {}, toplevel, hyphRunForThis = {}; - if (documentLoaded && !hyphRunForThis[w.location.href]) { - f(); - hyphRunForThis[w.location.href] = true; - return; - } - function init(context) { - contextWindow = context || window; - if (!hyphRunForThis[contextWindow.location.href] && (!documentLoaded || contextWindow != window.parent)) { - documentLoaded = true; - f(); - hyphRunForThis[contextWindow.location.href] = true; - } - } - - function doScrollCheck() { - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch (error) { - setTimeout(doScrollCheck, 1); - return; - } - - // and execute any waiting functions - init(window); - } - - function doOnLoad() { - var i, haveAccess, fl = window.frames.length; - if (doFrames && fl > 0) { - for (i = 0; i < fl; i++) { - haveAccess = undefined; - //try catch isn't enough for webkit - try { - //opera throws only on document.toString-access - haveAccess = window.frames[i].document.toString(); - } catch (e) { - haveAccess = undefined; - } - if (!!haveAccess) { - init(window.frames[i]); - } - } - contextWindow = window; - f(); - hyphRunForThis[window.location.href] = true; - } else { - init(window); - } - } - - // Cleanup functions for the document ready method - if (document.addEventListener) { - DOMContentLoaded = function () { - document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false); - if (doFrames && window.frames.length > 0) { - //we are in a frameset, so do nothing but wait for onload to fire - return; - } else { - init(window); - } - }; - - } else if (document.attachEvent) { - DOMContentLoaded = function () { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if (document.readyState === "complete") { - document.detachEvent("onreadystatechange", DOMContentLoaded); - if (doFrames && window.frames.length > 0) { - //we are in a frameset, so do nothing but wait for onload to fire - return; - } else { - init(window); - } - } - }; - } - - // Mozilla, Opera and webkit nightlies currently support this event - if (document.addEventListener) { - // Use the handy event callback - document.addEventListener("DOMContentLoaded", DOMContentLoaded, false); - - // A fallback to window.onload, that will always work - window.addEventListener("load", doOnLoad, false); - - // If IE event model is used - } else if (document.attachEvent) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent("onreadystatechange", DOMContentLoaded); - - // A fallback to window.onload, that will always work - window.attachEvent("onload", doOnLoad); - - // If IE and not a frame - // continually check to see if the document is ready - toplevel = false; - try { - toplevel = window.frameElement === null; - } catch (e) {} - - if (document.documentElement.doScroll && toplevel) { - doScrollCheck(); - } - } - - }, - - - - /** - * @name Hyphenator-getLang - * @description - * Gets the language of an element. If no language is set, it may use the {@link Hyphenator-mainLanguage}. - * @param {Object} el The first parameter is an DOM-Element-Object - * @param {boolean} fallback The second parameter is a boolean to tell if the function should return the {@link Hyphenator-mainLanguage} - * if there's no language found for the element. - * @private - */ - getLang = function (el, fallback) { - if (!!el.getAttribute('lang')) { - return el.getAttribute('lang').toLowerCase(); - } - // The following doesn't work in IE due to a bug when getAttribute('xml:lang') in a table - /*if (!!el.getAttribute('xml:lang')) { - return el.getAttribute('xml:lang').substring(0, 2); - }*/ - //instead, we have to do this (thanks to borgzor): - try { - if (!!el.getAttribute('xml:lang')) { - return el.getAttribute('xml:lang').toLowerCase(); - } - } catch (ex) {} - if (el.tagName !== 'HTML') { - return getLang(el.parentNode, true); - } - if (fallback) { - return mainLanguage; - } - return null; - }, - - /** - * @name Hyphenator-autoSetMainLanguage - * @description - * Retrieves the language of the document from the DOM. - * The function looks in the following places: - * <ul> - * <li>lang-attribute in the html-tag</li> - * <li>&lt;meta http-equiv = "content-language" content = "xy" /&gt;</li> - * <li>&lt;meta name = "DC.Language" content = "xy" /&gt;</li> - * <li>&lt;meta name = "language" content = "xy" /&gt;</li> - * </li> - * If nothing can be found a prompt using {@link Hyphenator-languageHint} and {@link Hyphenator-prompterStrings} is displayed. - * If the retrieved language is in the object {@link Hyphenator-supportedLang} it is copied to {@link Hyphenator-mainLanguage} - * @private - */ - autoSetMainLanguage = function (w) { - w = w || contextWindow; - var el = w.document.getElementsByTagName('html')[0], - m = w.document.getElementsByTagName('meta'), - i, text, e, ul; - mainLanguage = getLang(el, false); - if (!mainLanguage) { - for (i = 0; i < m.length; i++) { - //<meta http-equiv = "content-language" content="xy"> - if (!!m[i].getAttribute('http-equiv') && (m[i].getAttribute('http-equiv').toLowerCase() === 'content-language')) { - mainLanguage = m[i].getAttribute('content').toLowerCase(); - } - //<meta name = "DC.Language" content="xy"> - if (!!m[i].getAttribute('name') && (m[i].getAttribute('name').toLowerCase() === 'dc.language')) { - mainLanguage = m[i].getAttribute('content').toLowerCase(); - } - //<meta name = "language" content = "xy"> - if (!!m[i].getAttribute('name') && (m[i].getAttribute('name').toLowerCase() === 'language')) { - mainLanguage = m[i].getAttribute('content').toLowerCase(); - } - } - } - //get lang for frame from enclosing document - if (!mainLanguage && doFrames && contextWindow != window.parent) { - autoSetMainLanguage(window.parent); - } - //fallback to defaultLang if set - if (!mainLanguage && defaultLanguage !== '') { - mainLanguage = defaultLanguage; - } - //ask user for lang - if (!mainLanguage) { - text = ''; - ul = navigator.language ? navigator.language : navigator.userLanguage; - ul = ul.substring(0, 2); - if (prompterStrings.hasOwnProperty(ul)) { - text = prompterStrings[ul]; - } else { - text = prompterStrings.en; - } - text += ' (ISO 639-1)\n\n' + languageHint; - mainLanguage = window.prompt(unescape(text), ul).toLowerCase(); - } - if (!supportedLang.hasOwnProperty(mainLanguage)) { - if (supportedLang.hasOwnProperty(mainLanguage.split('-')[0])) { //try subtag - mainLanguage = mainLanguage.split('-')[0]; - } else { - e = new Error('The language "' + mainLanguage + '" is not yet supported.'); - throw e; - } - } - }, - - /** - * @name Hyphenator-gatherDocumentInfos - * @description - * This method runs through the DOM and executes the process()-function on: - * - every node returned by the {@link Hyphenator-selectorFunction}. - * The process()-function copies the element to the elements-variable, sets its visibility - * to intermediateState, retrieves its language and recursivly descends the DOM-tree until - * the child-Nodes aren't of type 1 - * @private - */ - gatherDocumentInfos = function () { - var elToProcess, tmp, i = 0, - process = function (el, hide, lang) { - var n, i = 0, hyphenatorSettings = {}; - if (hide && intermediateState === 'hidden') { - if (!!el.getAttribute('style')) { - hyphenatorSettings.hasOwnStyle = true; - } else { - hyphenatorSettings.hasOwnStyle = false; - } - hyphenatorSettings.isHidden = true; - el.style.visibility = 'hidden'; - } - if (el.lang && typeof(el.lang) === 'string') { - hyphenatorSettings.language = el.lang.toLowerCase(); //copy attribute-lang to internal lang - } else if (lang) { - hyphenatorSettings.language = lang.toLowerCase(); - } else { - hyphenatorSettings.language = getLang(el, true); - } - lang = hyphenatorSettings.language; - if (supportedLang[lang]) { - docLanguages[lang] = true; - } else { - if (supportedLang.hasOwnProperty(lang.split('-')[0])) { //try subtag - lang = lang.split('-')[0]; - hyphenatorSettings.language = lang; - } else if (!isBookmarklet) { - onError(new Error('Language ' + lang + ' is not yet supported.')); - } - } - Expando.setDataForElem(el, hyphenatorSettings); - - elements.push(el); - while (!!(n = el.childNodes[i++])) { - if (n.nodeType === 1 && !dontHyphenate[n.nodeName.toLowerCase()] && - n.className.indexOf(dontHyphenateClass) === -1 && !(n in elToProcess)) { - process(n, false, lang); - } - } - }; - if (isBookmarklet) { - elToProcess = contextWindow.document.getElementsByTagName('body')[0]; - process(elToProcess, false, mainLanguage); - } else { - elToProcess = selectorFunction(); - while (!!(tmp = elToProcess[i++])) - { - process(tmp, true, ''); - } - } - if (!Hyphenator.languages.hasOwnProperty(mainLanguage)) { - docLanguages[mainLanguage] = true; - } else if (!Hyphenator.languages[mainLanguage].prepared) { - docLanguages[mainLanguage] = true; - } - if (elements.length > 0) { - Expando.appendDataForElem(elements[elements.length - 1], {isLast : true}); - } - }, - - /** - * @name Hyphenator-convertPatterns - * @description - * Converts the patterns from string '_a6' to object '_a':'_a6'. - * The result is stored in the {@link Hyphenator-patterns}-object. - * @private - * @param {string} lang the language whose patterns shall be converted - */ - convertPatterns = function (lang) { - var plen, anfang, ende, pats, pat, key, tmp = {}; - pats = Hyphenator.languages[lang].patterns; - for (plen in pats) { - if (pats.hasOwnProperty(plen)) { - plen = parseInt(plen, 10); - anfang = 0; - ende = plen; - while (!!(pat = pats[plen].substring(anfang, ende))) { - key = pat.replace(/\d/g, ''); - tmp[key] = pat; - anfang = ende; - ende += plen; - } - } - } - Hyphenator.languages[lang].patterns = tmp; - Hyphenator.languages[lang].patternsConverted = true; - }, - - /** - * @name Hyphenator-convertExceptionsToObject - * @description - * Converts a list of comma seprated exceptions to an object: - * 'Fortran,Hy-phen-a-tion' -> {'Fortran':'Fortran','Hyphenation':'Hy-phen-a-tion'} - * @private - * @param {string} exc a comma separated string of exceptions (without spaces) - */ - convertExceptionsToObject = function (exc) { - var w = exc.split(', '), - r = {}, - i, l, key; - for (i = 0, l = w.length; i < l; i++) { - key = w[i].replace(/-/g, ''); - if (!r.hasOwnProperty(key)) { - r[key] = w[i]; - } - } - return r; - }, - - /** - * @name Hyphenator-loadPatterns - * @description - * Adds a &lt;script&gt;-Tag to the DOM to load an externeal .js-file containing patterns and settings for the given language. - * If the given language is not in the {@link Hyphenator-supportedLang}-Object it returns. - * One may ask why we are not using AJAX to load the patterns. The XMLHttpRequest-Object - * has a same-origin-policy. This makes the isBookmarklet-functionality impossible. - * @param {string} lang The language to load the patterns for - * @private - * @see Hyphenator-basePath - */ - loadPatterns = function (lang) { - var url, xhr, head, script; - if (supportedLang[lang] && !Hyphenator.languages[lang]) { - url = basePath + 'patterns/' + supportedLang[lang]; - } else { - return; - } - if (isLocal && !isBookmarklet) { - //check if 'url' is available: - xhr = null; - if (typeof XMLHttpRequest !== 'undefined') { - xhr = new XMLHttpRequest(); - } - if (!xhr) { - try { - xhr = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - xhr = null; - } - } - if (xhr) { - xhr.open('HEAD', url, false); - xhr.setRequestHeader('Cache-Control', 'no-cache'); - xhr.send(null); - if (xhr.status === 404) { - onError(new Error('Could not load\n' + url)); - delete docLanguages[lang]; - return; - } - } - } - if (createElem) { - head = window.document.getElementsByTagName('head').item(0); - script = createElem('script', window); - script.src = url; - script.type = 'text/javascript'; - head.appendChild(script); - } - }, - - /** - * @name Hyphenator-prepareLanguagesObj - * @description - * Adds a cache to each language and converts the exceptions-list to an object. - * If storage is active the object is stored there. - * @private - * @param {string} lang the language ob the lang-obj - */ - prepareLanguagesObj = function (lang) { - var lo = Hyphenator.languages[lang], wrd; - if (!lo.prepared) { - if (enableCache) { - lo.cache = {}; - //Export - lo['cache'] = lo.cache; - } - if (enableReducedPatternSet) { - lo.redPatSet = {}; - } - //add exceptions from the pattern file to the local 'exceptions'-obj - if (lo.hasOwnProperty('exceptions')) { - Hyphenator.addExceptions(lang, lo.exceptions); - delete lo.exceptions; - } - //copy global exceptions to the language specific exceptions - if (exceptions.hasOwnProperty('global')) { - if (exceptions.hasOwnProperty(lang)) { - exceptions[lang] += ', ' + exceptions.global; - } else { - exceptions[lang] = exceptions.global; - } - } - //move exceptions from the the local 'exceptions'-obj to the 'language'-object - if (exceptions.hasOwnProperty(lang)) { - lo.exceptions = convertExceptionsToObject(exceptions[lang]); - delete exceptions[lang]; - } else { - lo.exceptions = {}; - } - convertPatterns(lang); - wrd = '[\\w' + lo.specialChars + '@' + String.fromCharCode(173) + String.fromCharCode(8204) + '-]{' + min + ',}'; - lo.genRegExp = new RegExp('(' + url + ')|(' + mail + ')|(' + wrd + ')', 'gi'); - lo.prepared = true; - } - if (!!storage) { - try { - storage.setItem('Hyphenator_' + lang, window.JSON.stringify(lo)); - } catch (e) { - //onError(e); - } - } - - }, - - /** - * @name Hyphenator-prepare - * @description - * This funtion prepares the Hyphenator-Object: If RemoteLoading is turned off, it assumes - * that the patternfiles are loaded, all conversions are made and the callback is called. - * If storage is active the object is retrieved there. - * If RemoteLoading is on (default), it loads the pattern files and waits until they are loaded, - * by repeatedly checking Hyphenator.languages. If a patterfile is loaded the patterns are - * converted to their object style and the lang-object extended. - * Finally the callback is called. - * @param {function()} callback to call, when all patterns are loaded - * @private - */ - prepare = function (callback) { - var lang, interval, tmp1, tmp2; - if (!enableRemoteLoading) { - for (lang in Hyphenator.languages) { - if (Hyphenator.languages.hasOwnProperty(lang)) { - prepareLanguagesObj(lang); - } - } - state = 2; - callback(); - return; - } - // get all languages that are used and preload the patterns - state = 1; - for (lang in docLanguages) { - if (docLanguages.hasOwnProperty(lang)) { - if (!!storage && storage.getItem('Hyphenator_' + lang)) { - Hyphenator.languages[lang] = window.JSON.parse(storage.getItem('Hyphenator_' + lang)); - if (exceptions.hasOwnProperty('global')) { - tmp1 = convertExceptionsToObject(exceptions.global); - for (tmp2 in tmp1) { - if (tmp1.hasOwnProperty(tmp2)) { - Hyphenator.languages[lang].exceptions[tmp2] = tmp1[tmp2]; - } - } - } - //Replace exceptions since they may have been changed: - if (exceptions.hasOwnProperty(lang)) { - tmp1 = convertExceptionsToObject(exceptions[lang]); - for (tmp2 in tmp1) { - if (tmp1.hasOwnProperty(tmp2)) { - Hyphenator.languages[lang].exceptions[tmp2] = tmp1[tmp2]; - } - } - delete exceptions[lang]; - } - //Replace genRegExp since it may have been changed: - tmp1 = '[\\w' + Hyphenator.languages[lang].specialChars + '@' + String.fromCharCode(173) + String.fromCharCode(8204) + '-]{' + min + ',}'; - Hyphenator.languages[lang].genRegExp = new RegExp('(' + url + ')|(' + mail + ')|(' + tmp1 + ')', 'gi'); - - delete docLanguages[lang]; - continue; - } else { - loadPatterns(lang); - } - } - } - // if all patterns are loaded from storage: callback - if (countObjProps(docLanguages) === 0) { - state = 2; - callback(); - return; - } - // else async wait until patterns are loaded, then callback - interval = window.setInterval(function () { - var finishedLoading = true, lang; - for (lang in docLanguages) { - if (docLanguages.hasOwnProperty(lang)) { - finishedLoading = false; - if (!!Hyphenator.languages[lang]) { - delete docLanguages[lang]; - //do conversion while other patterns are loading: - prepareLanguagesObj(lang); - } - } - } - if (finishedLoading) { - //console.log('callig callback for ' + contextWindow.location.href); - window.clearInterval(interval); - state = 2; - callback(); - } - }, 100); - }, - - /** - * @name Hyphenator-switchToggleBox - * @description - * Creates or hides the toggleBox: a small button to turn off/on hyphenation on a page. - * @see Hyphenator.config - * @private - */ - toggleBox = function () { - var myBox, bdy, myIdAttribute, myTextNode, myClassAttribute, - text = (Hyphenator.doHyphenation ? 'Hy-phen-a-tion' : 'Hyphenation'); - if (!!(myBox = contextWindow.document.getElementById('HyphenatorToggleBox'))) { - myBox.firstChild.data = text; - } else { - bdy = contextWindow.document.getElementsByTagName('body')[0]; - myBox = createElem('div', contextWindow); - myIdAttribute = contextWindow.document.createAttribute('id'); - myIdAttribute.nodeValue = 'HyphenatorToggleBox'; - myClassAttribute = contextWindow.document.createAttribute('class'); - myClassAttribute.nodeValue = dontHyphenateClass; - myTextNode = contextWindow.document.createTextNode(text); - myBox.appendChild(myTextNode); - myBox.setAttributeNode(myIdAttribute); - myBox.setAttributeNode(myClassAttribute); - myBox.onclick = Hyphenator.toggleHyphenation; - myBox.style.position = 'absolute'; - myBox.style.top = '0px'; - myBox.style.right = '0px'; - myBox.style.margin = '0'; - myBox.style.backgroundColor = '#AAAAAA'; - myBox.style.color = '#FFFFFF'; - myBox.style.font = '6pt Arial'; - myBox.style.letterSpacing = '0.2em'; - myBox.style.padding = '3px'; - myBox.style.cursor = 'pointer'; - myBox.style.WebkitBorderBottomLeftRadius = '4px'; - myBox.style.MozBorderRadiusBottomleft = '4px'; - bdy.appendChild(myBox); - } - }, - - /** - * @name Hyphenator-hyphenateWord - * @description - * This function is the heart of Hyphenator.js. It returns a hyphenated word. - * - * If there's already a {@link Hyphenator-hypen} in the word, the word is returned as it is. - * If the word is in the exceptions list or in the cache, it is retrieved from it. - * If there's a '-' put a zeroWidthSpace after the '-' and hyphenate the parts. - * @param {string} lang The language of the word - * @param {string} word The word - * @returns string The hyphenated word - * @public - */ - hyphenateWord = function (lang, word) { - var lo = Hyphenator.languages[lang], - parts, i, l, w, wl, s, hypos, p, maxwins, win, pat = false, patk, c, t, n, numb3rs, inserted, hyphenatedword, val, subst, ZWNJpos = []; - if (word === '') { - return ''; - } - if (word.indexOf(hyphen) !== -1) { - //word already contains shy; -> leave at it is! - return word; - } - if (enableCache && lo.cache.hasOwnProperty(word)) { //the word is in the cache - return lo.cache[word]; - } - if (lo.exceptions.hasOwnProperty(word)) { //the word is in the exceptions list - return lo.exceptions[word].replace(/-/g, hyphen); - } - if (word.indexOf('-') !== -1) { - //word contains '-' -> hyphenate the parts separated with '-' - parts = word.split('-'); - for (i = 0, l = parts.length; i < l; i++) { - parts[i] = hyphenateWord(lang, parts[i]); - } - return parts.join('-'); - } - w = '_' + word + '_'; - if (word.indexOf(String.fromCharCode(8204)) !== -1) { - parts = w.split(String.fromCharCode(8204)); - w = parts.join(''); - for (i = 0, l = parts.length; i < l; i++) { - parts[i] = parts[i].length.toString(); - } - parts.pop(); - ZWNJpos = parts; - } - wl = w.length; - s = w.split(''); - if (!!lo.charSubstitution) { - for (subst in lo.charSubstitution) { - if (lo.charSubstitution.hasOwnProperty(subst)) { - w = w.replace(new RegExp(subst, 'g'), lo.charSubstitution[subst]); - } - } - } - if (word.indexOf("'") !== -1) { - w = w.toLowerCase().replace("'", "’"); //replace APOSTROPHE with RIGHT SINGLE QUOTATION MARK (since the latter is used in the patterns) - } else { - w = w.toLowerCase(); - } - //finally the core hyphenation algorithm - hypos = []; - numb3rs = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9}; //check for member is faster then isFinite() - n = wl - lo.shortestPattern; - for (p = 0; p <= n; p++) { - maxwins = Math.min((wl - p), lo.longestPattern); - for (win = lo.shortestPattern; win <= maxwins; win++) { - if (lo.patterns.hasOwnProperty(patk = w.substring(p, p + win))) { - pat = lo.patterns[patk]; - if (enableReducedPatternSet && (typeof pat === 'string')) { - lo.redPatSet[patk] = pat; - } - if (typeof pat === 'string') { - //convert from string 'a5b' to array [1,5] (pos,value) - t = 0; - val = []; - for (i = 0; i < pat.length; i++) { - if (!!(c = numb3rs[pat.charAt(i)])) { - val.push(i - t, c); - t++; - } - } - pat = lo.patterns[patk] = val; - } - } else { - continue; - } - for (i = 0; i < pat.length; i++) { - c = p - 1 + pat[i]; - if (!hypos[c] || hypos[c] < pat[i + 1]) { - hypos[c] = pat[i + 1]; - } - i++; - } - } - } - inserted = 0; - for (i = lo.leftmin; i <= (wl - 2 - lo.rightmin); i++) { - if (ZWNJpos.length > 0 && ZWNJpos[0] === i) { - ZWNJpos.shift(); - s.splice(i + inserted - 1, 0, String.fromCharCode(8204)); - inserted++; - } - if (!!(hypos[i] & 1)) { - s.splice(i + inserted + 1, 0, hyphen); - inserted++; - } - } - hyphenatedword = s.slice(1, -1).join(''); - if (enableCache) { - lo.cache[word] = hyphenatedword; - } - return hyphenatedword; - }, - - /** - * @name Hyphenator-hyphenateURL - * @description - * Puts {@link Hyphenator-urlhyphen} after each no-alphanumeric char that my be in a URL. - * @param {string} url to hyphenate - * @returns string the hyphenated URL - * @public - */ - hyphenateURL = function (url) { - return url.replace(/([:\/\.\?#&_,;!@]+)/gi, '$&' + urlhyphen); - }, - - /** - * @name Hyphenator-removeHyphenationFromElement - * @description - * Removes all hyphens from the element. If there are other elements, the function is - * called recursively. - * Removing hyphens is usefull if you like to copy text. Some browsers are buggy when the copy hyphenated texts. - * @param {Object} el The element where to remove hyphenation. - * @public - */ - removeHyphenationFromElement = function (el) { - var h, i = 0, n; - switch (hyphen) { - case '|': - h = '\\|'; - break; - case '+': - h = '\\+'; - break; - case '*': - h = '\\*'; - break; - default: - h = hyphen; - } - while (!!(n = el.childNodes[i++])) { - if (n.nodeType === 3) { - n.data = n.data.replace(new RegExp(h, 'g'), ''); - n.data = n.data.replace(new RegExp(zeroWidthSpace, 'g'), ''); - } else if (n.nodeType === 1) { - removeHyphenationFromElement(n); - } - } - }, - - - /** - * @name Hyphenator-registerOnCopy - * @description - * Huge work-around for browser-inconsistency when it comes to - * copying of hyphenated text. - * The idea behind this code has been provided by http://github.com/aristus/sweet-justice - * sweet-justice is under BSD-License - * @private - */ - registerOnCopy = function (el) { - var body = el.ownerDocument.getElementsByTagName('body')[0], - shadow, - selection, - range, - rangeShadow, - restore, - oncopyHandler = function (e) { - e = e || window.event; - var target = e.target || e.srcElement, - currDoc = target.ownerDocument, - body = currDoc.getElementsByTagName('body')[0], - targetWindow = 'defaultView' in currDoc ? currDoc.defaultView : currDoc.parentWindow; - if (target.tagName && dontHyphenate[target.tagName.toLowerCase()]) { - //Safari needs this - return; - } - //create a hidden shadow element - shadow = currDoc.createElement('div'); - shadow.style.overflow = 'hidden'; - shadow.style.position = 'absolute'; - shadow.style.top = '-5000px'; - shadow.style.height = '1px'; - body.appendChild(shadow); - if (!!window.getSelection) { - //FF3, Webkit - selection = targetWindow.getSelection(); - range = selection.getRangeAt(0); - shadow.appendChild(range.cloneContents()); - removeHyphenationFromElement(shadow); - selection.selectAllChildren(shadow); - restore = function () { - shadow.parentNode.removeChild(shadow); - selection.addRange(range); - }; - } else { - // IE - selection = targetWindow.document.selection; - range = selection.createRange(); - shadow.innerHTML = range.htmlText; - removeHyphenationFromElement(shadow); - rangeShadow = body.createTextRange(); - rangeShadow.moveToElementText(shadow); - rangeShadow.select(); - restore = function () { - shadow.parentNode.removeChild(shadow); - if (range.text !== "") { - range.select(); - } - }; - } - window.setTimeout(restore, 0); - }; - if (!body) { - return; - } - el = el || body; - if (window.addEventListener) { - el.addEventListener("copy", oncopyHandler, false); - } else { - el.attachEvent("oncopy", oncopyHandler); - } - }, - - - /** - * @name Hyphenator-hyphenateElement - * @description - * Takes the content of the given element and - if there's text - replaces the words - * by hyphenated words. If there's another element, the function is called recursively. - * When all words are hyphenated, the visibility of the element is set to 'visible'. - * @param {Object} el The element to hyphenate - * @private - */ - hyphenateElement = function (el) { - var hyphenatorSettings = Expando.getDataForElem(el), - lang = hyphenatorSettings.language, hyphenate, n, i, - controlOrphans = function (part) { - var h, r; - switch (hyphen) { - case '|': - h = '\\|'; - break; - case '+': - h = '\\+'; - break; - case '*': - h = '\\*'; - break; - default: - h = hyphen; - } - if (orphanControl >= 2) { - //remove hyphen points from last word - r = part.split(' '); - r[1] = r[1].replace(new RegExp(h, 'g'), ''); - r[1] = r[1].replace(new RegExp(zeroWidthSpace, 'g'), ''); - r = r.join(' '); - } - if (orphanControl === 3) { - //replace spaces by non breaking spaces - r = r.replace(/[ ]+/g, String.fromCharCode(160)); - } - return r; - }; - if (Hyphenator.languages.hasOwnProperty(lang)) { - hyphenate = function (word) { - if (!Hyphenator.doHyphenation) { - return word; - } else if (urlOrMailRE.test(word)) { - return hyphenateURL(word); - } else { - return hyphenateWord(lang, word); - } - }; - if (safeCopy && (el.tagName.toLowerCase() !== 'body')) { - registerOnCopy(el); - } - i = 0; - while (!!(n = el.childNodes[i++])) { - if (n.nodeType === 3 && n.data.length >= min) { //type 3 = #text -> hyphenate! - n.data = n.data.replace(Hyphenator.languages[lang].genRegExp, hyphenate); - if (orphanControl !== 1) { - n.data = n.data.replace(/[\S]+ [\S]+$/, controlOrphans); - } - } - } - } - if (hyphenatorSettings.isHidden && intermediateState === 'hidden') { - el.style.visibility = 'visible'; - if (!hyphenatorSettings.hasOwnStyle) { - el.setAttribute('style', ''); // without this, removeAttribute doesn't work in Safari (thanks to molily) - el.removeAttribute('style'); - } else { - if (el.style.removeProperty) { - el.style.removeProperty('visibility'); - } else if (el.style.removeAttribute) { // IE - el.style.removeAttribute('visibility'); - } - } - } - if (hyphenatorSettings.isLast) { - state = 3; - documentCount--; - if (documentCount > (-1000) && documentCount <= 0) { - documentCount = (-2000); - onHyphenationDone(); - } - } - }, - - - /** - * @name Hyphenator-hyphenateDocument - * @description - * Calls hyphenateElement() for all members of elements. This is done with a setTimout - * to prevent a "long running Script"-alert when hyphenating large pages. - * Therefore a tricky bind()-function was necessary. - * @private - */ - hyphenateDocument = function () { - function bind(fun, arg) { - return function () { - return fun(arg); - }; - } - var i = 0, el; - while (!!(el = elements[i++])) { - if (el.ownerDocument.location.href === contextWindow.location.href) { - window.setTimeout(bind(hyphenateElement, el), 0); - } - } - }, - - /** - * @name Hyphenator-removeHyphenationFromDocument - * @description - * Does what it says ;-) - * @private - */ - removeHyphenationFromDocument = function () { - var i = 0, el; - while (!!(el = elements[i++])) { - removeHyphenationFromElement(el); - } - state = 4; - }, - - /** - * @name Hyphenator-createStorage - * @description - * inits the private var storage depending of the setting in storageType - * and the supported features of the system. - * @private - */ - createStorage = function () { - try { - if (storageType !== 'none' && - typeof(window.localStorage) !== 'undefined' && - typeof(window.sessionStorage) !== 'undefined' && - typeof(window.JSON.stringify) !== 'undefined' && - typeof(window.JSON.parse) !== 'undefined') { - switch (storageType) { - case 'session': - storage = window.sessionStorage; - break; - case 'local': - storage = window.localStorage; - break; - default: - storage = undefined; - break; - } - } - } catch (f) { - //FF throws an error if DOM.storage.enabled is set to false - } - }, - - /** - * @name Hyphenator-storeConfiguration - * @description - * Stores the current config-options in DOM-Storage - * @private - */ - storeConfiguration = function () { - if (!storage) { - return; - } - var settings = { - 'STORED': true, - 'classname': hyphenateClass, - 'donthyphenateclassname': dontHyphenateClass, - 'minwordlength': min, - 'hyphenchar': hyphen, - 'urlhyphenchar': urlhyphen, - 'togglebox': toggleBox, - 'displaytogglebox': displayToggleBox, - 'remoteloading': enableRemoteLoading, - 'enablecache': enableCache, - 'onhyphenationdonecallback': onHyphenationDone, - 'onerrorhandler': onError, - 'intermediatestate': intermediateState, - 'selectorfunction': selectorFunction, - 'safecopy': safeCopy, - 'doframes': doFrames, - 'storagetype': storageType, - 'orphancontrol': orphanControl, - 'dohyphenation': Hyphenator.doHyphenation, - 'persistentconfig': persistentConfig, - 'defaultlanguage': defaultLanguage - }; - storage.setItem('Hyphenator_config', window.JSON.stringify(settings)); - }, - - /** - * @name Hyphenator-restoreConfiguration - * @description - * Retrieves config-options from DOM-Storage and does configuration accordingly - * @private - */ - restoreConfiguration = function () { - var settings; - if (storage.getItem('Hyphenator_config')) { - settings = window.JSON.parse(storage.getItem('Hyphenator_config')); - Hyphenator.config(settings); - } - }; - - return { - - /** - * @name Hyphenator.version - * @memberOf Hyphenator - * @description - * String containing the actual version of Hyphenator.js - * [major release].[minor releas].[bugfix release] - * major release: new API, new Features, big changes - * minor release: new languages, improvements - * @public - */ - version: '3.3.0', - - /** - * @name Hyphenator.doHyphenation - * @description - * If doHyphenation is set to false (defaults to true), hyphenateDocument() isn't called. - * All other actions are performed. - */ - doHyphenation: true, - - /** - * @name Hyphenator.languages - * @memberOf Hyphenator - * @description - * Objects that holds key-value pairs, where key is the language and the value is the - * language-object loaded from (and set by) the pattern file. - * The language object holds the following members: - * <table> - * <tr><th>key</th><th>desc></th></tr> - * <tr><td>leftmin</td><td>The minimum of chars to remain on the old line</td></tr> - * <tr><td>rightmin</td><td>The minimum of chars to go on the new line</td></tr> - * <tr><td>shortestPattern</td><td>The shortes pattern (numbers don't count!)</td></tr> - * <tr><td>longestPattern</td><td>The longest pattern (numbers don't count!)</td></tr> - * <tr><td>specialChars</td><td>Non-ASCII chars in the alphabet.</td></tr> - * <tr><td>patterns</td><td>the patterns</td></tr> - * </table> - * And optionally (or after prepareLanguagesObj() has been called): - * <table> - * <tr><td>exceptions</td><td>Excpetions for the secified language</td></tr> - * </table> - * @public - */ - languages: {}, - - - /** - * @name Hyphenator.config - * @description - * Config function that takes an object as an argument. The object contains key-value-pairs - * containig Hyphenator-settings. This is a shortcut for calling Hyphenator.set...-Methods. - * @param {Object} obj <table> - * <tr><th>key</th><th>values</th><th>default</th></tr> - * <tr><td>classname</td><td>string</td><td>'hyphenate'</td></tr> - * <tr><td>donthyphenateclassname</td><td>string</td><td>''</td></tr> - * <tr><td>minwordlength</td><td>integer</td><td>6</td></tr> - * <tr><td>hyphenchar</td><td>string</td><td>'&amp;shy;'</td></tr> - * <tr><td>urlhyphenchar</td><td>string</td><td>'zero with space'</td></tr> - * <tr><td>togglebox</td><td>function</td><td>see code</td></tr> - * <tr><td>displaytogglebox</td><td>boolean</td><td>false</td></tr> - * <tr><td>remoteloading</td><td>boolean</td><td>true</td></tr> - * <tr><td>enablecache</td><td>boolean</td><td>true</td></tr> - * <tr><td>enablereducedpatternset</td><td>boolean</td><td>false</td></tr> - * <tr><td>onhyphenationdonecallback</td><td>function</td><td>empty function</td></tr> - * <tr><td>onerrorhandler</td><td>function</td><td>alert(onError)</td></tr> - * <tr><td>intermediatestate</td><td>string</td><td>'hidden'</td></tr> - * <tr><td>selectorfunction</td><td>function</td><td>[…]</td></tr> - * <tr><td>safecopy</td><td>boolean</td><td>true</td></tr> - * <tr><td>doframes</td><td>boolean</td><td>false</td></tr> - * <tr><td>storagetype</td><td>string</td><td>'none'</td></tr> - * </table> - * @public - * @example &lt;script src = "Hyphenator.js" type = "text/javascript"&gt;&lt;/script&gt; -  * &lt;script type = "text/javascript"&gt; -  * Hyphenator.config({'minwordlength':4,'hyphenchar':'|'}); - * Hyphenator.run(); -  * &lt;/script&gt; - */ - config: function (obj) { - var assert = function (name, type) { - if (typeof obj[name] === type) { - return true; - } else { - onError(new Error('Config onError: ' + name + ' must be of type ' + type)); - return false; - } - }, - key; - - if (obj.hasOwnProperty('storagetype')) { - if (assert('storagetype', 'string')) { - storageType = obj.storagetype; - } - if (!storage) { - createStorage(); - } - } - if (!obj.hasOwnProperty('STORED') && storage && obj.hasOwnProperty('persistentconfig') && obj.persistentconfig === true) { - restoreConfiguration(); - } - - for (key in obj) { - if (obj.hasOwnProperty(key)) { - switch (key) { - case 'STORED': - break; - case 'classname': - if (assert('classname', 'string')) { - hyphenateClass = obj[key]; - } - break; - case 'donthyphenateclassname': - if (assert('donthyphenateclassname', 'string')) { - dontHyphenateClass = obj[key]; - } - break; - case 'minwordlength': - if (assert('minwordlength', 'number')) { - min = obj[key]; - } - break; - case 'hyphenchar': - if (assert('hyphenchar', 'string')) { - if (obj.hyphenchar === '&shy;') { - obj.hyphenchar = String.fromCharCode(173); - } - hyphen = obj[key]; - } - break; - case 'urlhyphenchar': - if (obj.hasOwnProperty('urlhyphenchar')) { - if (assert('urlhyphenchar', 'string')) { - urlhyphen = obj[key]; - } - } - break; - case 'togglebox': - if (assert('togglebox', 'function')) { - toggleBox = obj[key]; - } - break; - case 'displaytogglebox': - if (assert('displaytogglebox', 'boolean')) { - displayToggleBox = obj[key]; - } - break; - case 'remoteloading': - if (assert('remoteloading', 'boolean')) { - enableRemoteLoading = obj[key]; - } - break; - case 'enablecache': - if (assert('enablecache', 'boolean')) { - enableCache = obj[key]; - } - break; - case 'enablereducedpatternset': - if (assert('enablereducedpatternset', 'boolean')) { - enableReducedPatternSet = obj[key]; - } - break; - case 'onhyphenationdonecallback': - if (assert('onhyphenationdonecallback', 'function')) { - onHyphenationDone = obj[key]; - } - break; - case 'onerrorhandler': - if (assert('onerrorhandler', 'function')) { - onError = obj[key]; - } - break; - case 'intermediatestate': - if (assert('intermediatestate', 'string')) { - intermediateState = obj[key]; - } - break; - case 'selectorfunction': - if (assert('selectorfunction', 'function')) { - selectorFunction = obj[key]; - } - break; - case 'safecopy': - if (assert('safecopy', 'boolean')) { - safeCopy = obj[key]; - } - break; - case 'doframes': - if (assert('doframes', 'boolean')) { - doFrames = obj[key]; - } - break; - case 'storagetype': - if (assert('storagetype', 'string')) { - storageType = obj[key]; - } - break; - case 'orphancontrol': - if (assert('orphancontrol', 'number')) { - orphanControl = obj[key]; - } - break; - case 'dohyphenation': - if (assert('dohyphenation', 'boolean')) { - Hyphenator.doHyphenation = obj[key]; - } - break; - case 'persistentconfig': - if (assert('persistentconfig', 'boolean')) { - persistentConfig = obj[key]; - } - break; - case 'defaultlanguage': - if (assert('defaultlanguage', 'string')) { - defaultLanguage = obj[key]; - } - break; - default: - onError(new Error('Hyphenator.config: property ' + key + ' not known.')); - } - } - } - if (storage && persistentConfig) { - storeConfiguration(); - } - }, - - /** - * @name Hyphenator.run - * @description - * Bootstrap function that starts all hyphenation processes when called. - * @public - * @example &lt;script src = "Hyphenator.js" type = "text/javascript"&gt;&lt;/script&gt; -  * &lt;script type = "text/javascript"&gt; -  *   Hyphenator.run(); -  * &lt;/script&gt; - */ - run: function () { - documentCount = 0; - var process = function () { - try { - if (contextWindow.document.getElementsByTagName('frameset').length > 0) { - return; //we are in a frameset - } - documentCount++; - autoSetMainLanguage(undefined); - gatherDocumentInfos(); - //console.log('preparing for ' + contextWindow.location.href); - prepare(hyphenateDocument); - if (displayToggleBox) { - toggleBox(); - } - } catch (e) { - onError(e); - } - }, i, haveAccess, fl = window.frames.length; - - if (!storage) { - createStorage(); - } - if (!documentLoaded && !isBookmarklet) { - runOnContentLoaded(window, process); - } - if (isBookmarklet || documentLoaded) { - if (doFrames && fl > 0) { - for (i = 0; i < fl; i++) { - haveAccess = undefined; - //try catch isn't enough for webkit - try { - //opera throws only on document.toString-access - haveAccess = window.frames[i].document.toString(); - } catch (e) { - haveAccess = undefined; - } - if (!!haveAccess) { - contextWindow = window.frames[i]; - process(); - } - } - } - contextWindow = window; - process(); - } - }, - - /** - * @name Hyphenator.addExceptions - * @description - * Adds the exceptions from the string to the appropriate language in the - * {@link Hyphenator-languages}-object - * @param {string} lang The language - * @param {string} words A comma separated string of hyphenated words WITH spaces. - * @public - * @example &lt;script src = "Hyphenator.js" type = "text/javascript"&gt;&lt;/script&gt; -  * &lt;script type = "text/javascript"&gt; -  *   Hyphenator.addExceptions('de','ziem-lich, Wach-stube'); - * Hyphenator.run(); -  * &lt;/script&gt; - */ - addExceptions: function (lang, words) { - if (lang === '') { - lang = 'global'; - } - if (exceptions.hasOwnProperty(lang)) { - exceptions[lang] += ", " + words; - } else { - exceptions[lang] = words; - } - }, - - /** - * @name Hyphenator.hyphenate - * @public - * @description - * Hyphenates the target. The language patterns must be loaded. - * If the target is a string, the hyphenated string is returned, - * if it's an object, the values are hyphenated directly. - * @param {string|Object} target the target to be hyphenated - * @param {string} lang the language of the target - * @returns string - * @example &lt;script src = "Hyphenator.js" type = "text/javascript"&gt;&lt;/script&gt; - * &lt;script src = "patterns/en.js" type = "text/javascript"&gt;&lt;/script&gt; -  * &lt;script type = "text/javascript"&gt; - * var t = Hyphenator.hyphenate('Hyphenation', 'en'); //Hy|phen|ation - * &lt;/script&gt; - */ - hyphenate: function (target, lang) { - var hyphenate, n, i; - if (Hyphenator.languages.hasOwnProperty(lang)) { - if (!Hyphenator.languages[lang].prepared) { - prepareLanguagesObj(lang); - } - hyphenate = function (word) { - if (urlOrMailRE.test(word)) { - return hyphenateURL(word); - } else { - return hyphenateWord(lang, word); - } - }; - if (typeof target === 'string' || target.constructor === String) { - return target.replace(Hyphenator.languages[lang].genRegExp, hyphenate); - } else if (typeof target === 'object') { - i = 0; - while (!!(n = target.childNodes[i++])) { - if (n.nodeType === 3 && n.data.length >= min) { //type 3 = #text -> hyphenate! - n.data = n.data.replace(Hyphenator.languages[lang].genRegExp, hyphenate); - } else if (n.nodeType === 1) { - if (n.lang !== '') { - Hyphenator.hyphenate(n, n.lang); - } else { - Hyphenator.hyphenate(n, lang); - } - } - } - } - } else { - onError(new Error('Language "' + lang + '" is not loaded.')); - } - }, - - /** - * @name Hyphenator.getRedPatternSet - * @description - * Returns {@link Hyphenator-isBookmarklet}. - * @param {string} lang the language patterns are stored for - * @returns object {'patk': pat} - * @public - */ - getRedPatternSet: function (lang) { - return Hyphenator.languages[lang].redPatSet; - }, - - /** - * @name Hyphenator.isBookmarklet - * @description - * Returns {@link Hyphenator-isBookmarklet}. - * @returns boolean - * @public - */ - isBookmarklet: function () { - return isBookmarklet; - }, - - getConfigFromURI: function () { - var loc = null, re = {}, jsArray = document.getElementsByTagName('script'), i, j, l, s, gp, option; - for (i = 0, l = jsArray.length; i < l; i++) { - if (!!jsArray[i].getAttribute('src')) { - loc = jsArray[i].getAttribute('src'); - } - if (!loc) { - continue; - } else { - s = loc.indexOf('Hyphenator.js?'); - if (s === -1) { - continue; - } - gp = loc.substring(s + 14).split('&'); - for (j = 0; j < gp.length; j++) { - option = gp[j].split('='); - if (option[0] === 'bm') { - continue; - } - if (option[1] === 'true') { - re[option[0]] = true; - continue; - } - if (option[1] === 'false') { - re[option[0]] = false; - continue; - } - if (isFinite(option[1])) { - re[option[0]] = parseInt(option[1], 10); - continue; - } - if (option[0] === 'onhyphenationdonecallback') { - re[option[0]] = new Function('', option[1]); - continue; - } - re[option[0]] = option[1]; - } - break; - } - } - return re; - }, - - /** - * @name Hyphenator.toggleHyphenation - * @description - * Checks the current state of the ToggleBox and removes or does hyphenation. - * @public - */ - toggleHyphenation: function () { - if (Hyphenator.doHyphenation) { - removeHyphenationFromDocument(); - Hyphenator.doHyphenation = false; - storeConfiguration(); - toggleBox(); - } else { - hyphenateDocument(); - Hyphenator.doHyphenation = true; - storeConfiguration(); - toggleBox(); - } - } - }; -}(window)); - -//Export properties/methods (for google closure compiler) -Hyphenator['languages'] = Hyphenator.languages; -Hyphenator['config'] = Hyphenator.config; -Hyphenator['run'] = Hyphenator.run; -Hyphenator['addExceptions'] = Hyphenator.addExceptions; -Hyphenator['hyphenate'] = Hyphenator.hyphenate; -Hyphenator['getRedPatternSet'] = Hyphenator.getRedPatternSet; -Hyphenator['isBookmarklet'] = Hyphenator.isBookmarklet; -Hyphenator['getConfigFromURI'] = Hyphenator.getConfigFromURI; -Hyphenator['toggleHyphenation'] = Hyphenator.toggleHyphenation; -window['Hyphenator'] = Hyphenator; - -if (Hyphenator.isBookmarklet()) { - Hyphenator.config({displaytogglebox: true, intermediatestate: 'visible', doframes: true}); - Hyphenator.config(Hyphenator.getConfigFromURI()); - Hyphenator.run(); -}+var Hyphenator=(function(window){var +supportedLang={'be':'be.js','ca':'ca.js','cs':'cs.js','da':'da.js','bn':'bn.js','de':'de.js','el':'el-monoton.js','el-monoton':'el-monoton.js','el-polyton':'el-polyton.js','en':'en-us.js','en-gb':'en-gb.js','en-us':'en-us.js','es':'es.js','fi':'fi.js','fr':'fr.js','grc':'grc.js','gu':'gu.js','hi':'hi.js','hu':'hu.js','hy':'hy.js','it':'it.js','kn':'kn.js','la':'la.js','lt':'lt.js','lv':'lv.js','ml':'ml.js','nb':'nb-no.js','no':'nb-no.js','nb-no':'nb-no.js','nl':'nl.js','or':'or.js','pa':'pa.js','pl':'pl.js','pt':'pt.js','ru':'ru.js','sk':'sk.js','sl':'sl.js','sv':'sv.js','ta':'ta.js','te':'te.js','tr':'tr.js','uk':'uk.js'},languageHint=(function(){var k,r='';for(k in supportedLang){if(supportedLang.hasOwnProperty(k)){r+=k+', ';}}r=r.substring(0,r.length-2);return r;}()),prompterStrings={'be':'Мова гэтага сайта не можа быць вызначаны аўтаматычна. Калі ласка пакажыце мову:','cs':'Jazyk této internetové stránky nebyl automaticky rozpoznán. Určete prosím její jazyk:','da':'Denne websides sprog kunne ikke bestemmes. Angiv venligst sprog:','de':'Die Sprache dieser Webseite konnte nicht automatisch bestimmt werden. Bitte Sprache angeben:','en':'The language of this website could not be determined automatically. Please indicate the main language:','es':'El idioma del sitio no pudo determinarse autom%E1ticamente. Por favor, indique el idioma principal:','fi':'Sivun kielt%E4 ei tunnistettu automaattisesti. M%E4%E4rit%E4 sivun p%E4%E4kieli:','fr':'La langue de ce site n%u2019a pas pu %EAtre d%E9termin%E9e automatiquement. Veuillez indiquer une langue, s.v.p.%A0:','hu':'A weboldal nyelvét nem sikerült automatikusan megállapítani. Kérem adja meg a nyelvet:','hy':'Չհաջողվեց հայտնաբերել այս կայքի լեզուն։ Խնդրում ենք նշեք հիմնական լեզուն՝','it':'Lingua del sito sconosciuta. Indicare una lingua, per favore:','kn':'ಜಾಲ ತಾಣದ ಭಾಷೆಯನ್ನು ನಿರ್ಧರಿಸಲು ಸಾಧ್ಯವಾಗುತ್ತಿಲ್ಲ. ದಯವಿಟ್ಟು ಮುಖ್ಯ ಭಾಷೆಯನ್ನು ಸೂಚಿಸಿ:','lt':'Nepavyko automatiškai nustatyti šios svetainės kalbos. Prašome įvesti kalbą:','lv':'Šīs lapas valodu nevarēja noteikt automātiski. Lūdzu norādiet pamata valodu:','ml':'ഈ വെ%u0D2C%u0D4D%u200Cസൈറ്റിന്റെ ഭാഷ കണ്ടുപിടിയ്ക്കാ%u0D28%u0D4D%u200D കഴിഞ്ഞില്ല. ഭാഷ ഏതാണെന്നു തിരഞ്ഞെടുക്കുക:','nl':'De taal van deze website kan niet automatisch worden bepaald. Geef de hoofdtaal op:','no':'Nettstedets språk kunne ikke finnes automatisk. Vennligst oppgi språk:','pt':'A língua deste site não pôde ser determinada automaticamente. Por favor indique a língua principal:','ru':'Язык этого сайта не может быть определен автоматически. Пожалуйста укажите язык:','sl':'Jezika te spletne strani ni bilo mogoče samodejno določiti. Prosim navedite jezik:','sv':'Spr%E5ket p%E5 den h%E4r webbplatsen kunde inte avg%F6ras automatiskt. V%E4nligen ange:','tr':'Bu web sitesinin dili otomatik olarak tespit edilememiştir. Lütfen dökümanın dilini seçiniz%A0:','uk':'Мова цього веб-сайту не може бути визначена автоматично. Будь ласка, вкажіть головну мову:'},basePath=(function(){var s=document.getElementsByTagName('script'),i=0,p,src,t;while(!!(t=s[i++])){if(!t.src){continue;}src=t.src;p=src.indexOf('Hyphenator.js');if(p!==-1){return src.substring(0,p);}}return'http://hyphenator.googlecode.com/svn/trunk/';}()),isLocal=(function(){var re=false;if(window.location.href.indexOf(basePath)!==-1){re=true;}return re;}()),documentLoaded=false,documentCount=0,persistentConfig=false,contextWindow=window,doFrames=false,dontHyphenate={'script':true,'code':true,'pre':true,'img':true,'br':true,'samp':true,'kbd':true,'var':true,'abbr':true,'acronym':true,'sub':true,'sup':true,'button':true,'option':true,'label':true,'textarea':true,'input':true,'math':true,'svg':true},enableCache=true,storageType='local',storage,enableReducedPatternSet=false,enableRemoteLoading=true,displayToggleBox=false,css3=false,css3_h9n,css3_gethsupport=function(){var s,ua=navigator.userAgent,r={support:false,property:'',languages:{}};if(window.getComputedStyle){s=window.getComputedStyle(window.document.getElementsByTagName('body')[0]);}else{css3_h9n=r;return;}if(ua.indexOf('Chrome')!==-1){r.support=false;}else if((ua.indexOf('Safari')!==-1)&&(s['-webkit-hyphens']!==undefined)){r.support=true;r.property='-webkit-hyphens';if(ua.indexOf('Mobile')!==-1){r.languages[navigator.language.split('-')[0]]=true;}else{r.languages={de:true,en:true,es:true,fr:true,it:true,nl:true,ru:true,zh:true};}}else if((ua.indexOf('Firefox')!==-1)&&(s['MozHyphens']!==undefined)){r.support=true;r.property='MozHyphens';r.languages={en:true};}css3_h9n=r;},hyphenateClass='hyphenate',dontHyphenateClass='donthyphenate',min=6,orphanControl=1,isBookmarklet=(function(){var loc=null,re=false,jsArray=document.getElementsByTagName('script'),i,l;for(i=0,l=jsArray.length;i<l;i++){if(!!jsArray[i].getAttribute('src')){loc=jsArray[i].getAttribute('src');}if(!loc){continue;}else if(loc.indexOf('Hyphenator.js?bm=true')!==-1){re=true;}}return re;}()),mainLanguage=null,defaultLanguage='',elements=(function(){var Element=function(element,data){this.element=element;this.hyphenated=false;this.treated=false;this.data=data;},ElementCollection=function(){this.count=0;this.hyCount=0;this.list={};};ElementCollection.prototype={add:function(el,lang,data){if(!this.list.hasOwnProperty(lang)){this.list[lang]=[];}this.list[lang].push(new Element(el,data));this.count+=1;},each:function(fn){var k;for(k in this.list){if(this.list.hasOwnProperty(k)){fn(k,this.list[k]);}}}};return new ElementCollection();}()),exceptions={},docLanguages={},state=0,url='(\\w*:\/\/)?((\\w*:)?(\\w*)@)?((([\\d]{1,3}\\.){3}([\\d]{1,3}))|((www\\.|[a-zA-Z]\\.)?[a-zA-Z0-9\\-\\.]+\\.([a-z]{2,4})))(:\\d*)?(\/[\\w#!:\\.?\\+=&%@!\\-]*)*',mail='[\\w-\\.]+@[\\w\\.]+',urlOrMailRE=new RegExp('('+url+')|('+mail+')','i'),zeroWidthSpace=(function(){var zws,ua=navigator.userAgent.toLowerCase();zws=String.fromCharCode(8203);if(ua.indexOf('msie 6')!==-1){zws='';}if(ua.indexOf('opera')!==-1&&ua.indexOf('version/10.00')!==-1){zws='';}return zws;}()),createElem=function(tagname,context){context=context||contextWindow;if(document.createElementNS){return context.document.createElementNS('http://www.w3.org/1999/xhtml',tagname);}else if(document.createElement){return context.document.createElement(tagname);}},onHyphenationDone=function(){},onError=function(e){window.alert("Hyphenator.js says:\n\nAn Error ocurred:\n"+e.message);},selectorFunction=function(){var tmp,el=[],i,l;if(document.getElementsByClassName){el=contextWindow.document.getElementsByClassName(hyphenateClass);}else{tmp=contextWindow.document.getElementsByTagName('*');l=tmp.length;for(i=0;i<l;i++){if(tmp[i].className.indexOf(hyphenateClass)!==-1&&tmp[i].className.indexOf(dontHyphenateClass)===-1){el.push(tmp[i]);}}}return el;},intermediateState='hidden',unhide='wait',hyphen=String.fromCharCode(173),urlhyphen=zeroWidthSpace,safeCopy=true,runOnContentLoaded=function(w,f){var DOMContentLoaded=function(){},toplevel,hyphRunForThis={};if(documentLoaded&&!hyphRunForThis[w.location.href]){f();hyphRunForThis[w.location.href]=true;return;}function init(context){contextWindow=context||window;if(!hyphRunForThis[contextWindow.location.href]&&(!documentLoaded||contextWindow!=window.parent)){documentLoaded=true;f();hyphRunForThis[contextWindow.location.href]=true;}}function doScrollCheck(){try{document.documentElement.doScroll("left");}catch(error){setTimeout(doScrollCheck,1);return;}init(window);}function doOnLoad(){var i,haveAccess,fl=window.frames.length;if(doFrames&&fl>0){for(i=0;i<fl;i++){haveAccess=undefined;try{haveAccess=window.frames[i].document.toString();}catch(e){haveAccess=undefined;}if(!!haveAccess){init(window.frames[i]);}}contextWindow=window;f();hyphRunForThis[window.location.href]=true;}else{init(window);}}if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);if(doFrames&&window.frames.length>0){return;}else{init(window);}};}else if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);if(doFrames&&window.frames.length>0){return;}else{init(window);}}};}if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",doOnLoad,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",doOnLoad);toplevel=false;try{toplevel=window.frameElement===null;}catch(e){}if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}},getLang=function(el,fallback){if(!!el.getAttribute('lang')){return el.getAttribute('lang').toLowerCase();}try{if(!!el.getAttribute('xml:lang')){return el.getAttribute('xml:lang').toLowerCase();}}catch(ex){}if(el.tagName!=='HTML'){return getLang(el.parentNode,true);}if(fallback){return mainLanguage;}return null;},autoSetMainLanguage=function(w){w=w||contextWindow;var el=w.document.getElementsByTagName('html')[0],m=w.document.getElementsByTagName('meta'),i,text,e,ul;mainLanguage=getLang(el,false);if(!mainLanguage){for(i=0;i<m.length;i++){if(!!m[i].getAttribute('http-equiv')&&(m[i].getAttribute('http-equiv').toLowerCase()==='content-language')){mainLanguage=m[i].getAttribute('content').toLowerCase();}if(!!m[i].getAttribute('name')&&(m[i].getAttribute('name').toLowerCase()==='dc.language')){mainLanguage=m[i].getAttribute('content').toLowerCase();}if(!!m[i].getAttribute('name')&&(m[i].getAttribute('name').toLowerCase()==='language')){mainLanguage=m[i].getAttribute('content').toLowerCase();}}}if(!mainLanguage&&doFrames&&contextWindow!=window.parent){autoSetMainLanguage(window.parent);}if(!mainLanguage&&defaultLanguage!==''){mainLanguage=defaultLanguage;}if(!mainLanguage){text='';ul=navigator.language?navigator.language:navigator.userLanguage;ul=ul.substring(0,2);if(prompterStrings.hasOwnProperty(ul)){text=prompterStrings[ul];}else{text=prompterStrings.en;}text+=' (ISO 639-1)\n\n'+languageHint;mainLanguage=window.prompt(unescape(text),ul).toLowerCase();}if(!supportedLang.hasOwnProperty(mainLanguage)){if(supportedLang.hasOwnProperty(mainLanguage.split('-')[0])){mainLanguage=mainLanguage.split('-')[0];}else{e=new Error('The language "'+mainLanguage+'" is not yet supported.');throw e;}}},gatherDocumentInfos=function(){var elToProcess,tmp,i=0,process=function(el,hide,lang){var n,i=0,hyphenatorSettings={};if(el.lang&&typeof(el.lang)==='string'){lang=el.lang.toLowerCase();}else if(lang){lang=lang.toLowerCase();}else{lang=getLang(el,true);}if(css3&&css3_h9n.support&&!!css3_h9n.languages[lang]){el.style[css3_h9n.property]="auto";el.style['-webkit-locale']="'"+lang+"'";}else{if(intermediateState==='hidden'){if(!!el.getAttribute('style')){hyphenatorSettings.hasOwnStyle=true;}else{hyphenatorSettings.hasOwnStyle=false;}hyphenatorSettings.isHidden=true;el.style.visibility='hidden';}if(supportedLang[lang]){docLanguages[lang]=true;}else{if(supportedLang.hasOwnProperty(lang.split('-')[0])){lang=lang.split('-')[0];hyphenatorSettings.language=lang;}else if(!isBookmarklet){onError(new Error('Language '+lang+' is not yet supported.'));}}elements.add(el,lang,hyphenatorSettings);}while(!!(n=el.childNodes[i++])){if(n.nodeType===1&&!dontHyphenate[n.nodeName.toLowerCase()]&&n.className.indexOf(dontHyphenateClass)===-1&&!(n in elToProcess)){process(n,false,lang);}}};if(css3){css3_gethsupport();}if(isBookmarklet){elToProcess=contextWindow.document.getElementsByTagName('body')[0];process(elToProcess,false,mainLanguage);}else{elToProcess=selectorFunction();while(!!(tmp=elToProcess[i++])){process(tmp,true,'');}}if(elements.count===0){state=3;onHyphenationDone();}},convertPatterns=function(lang){var size=0,tree={tpoints:[]},patterns,pattern,i,j,k,patternObject=Hyphenator.languages[lang].patterns,c,chars,points,t,p,codePoint,getPoints=(function(){if('in3se'.split(/\D/).length===1){return function(pattern){var chars=pattern.split(''),c,i,r=[],numb3rs={'0':0,'1':1,'2':2,'3':3,'4':4,'5':5,'6':6,'7':7,'8':8,'9':9},lastWasNum=false;i=0;while(!!(c=chars[i])){if(numb3rs.hasOwnProperty(c)){r.push(c);i+=2;lastWasNum=true;}else{r.push('');i+=1;lastWasNum=false;}}if(!lastWasNum){r.push('');}return r;};}else{return function(pattern){return pattern.split(/\D/);};}}());for(size in patternObject){if(patternObject.hasOwnProperty(size)){patterns=patternObject[size].match(new RegExp('.{1,'+(+size)+'}','g'));i=0;while(!!(pattern=patterns[i++])){chars=pattern.replace(/[\d]/g,'').split('');points=getPoints(pattern);t=tree;j=0;while(!!(c=chars[j++])){codePoint=c.charCodeAt(0);if(!t[codePoint]){t[codePoint]={};}t=t[codePoint];}t.tpoints=[];for(k=0;k<points.length;k++){p=points[k];t.tpoints.push((p=="")?0:p);}}}}Hyphenator.languages[lang].patterns=tree;},recreatePattern=function(pattern,nodePoints){var r=[],c=pattern.split(''),i;for(i=0;i<nodePoints.length;i++){if(nodePoints[i]!==0){r.push(nodePoints[i]);}if(c[i]){r.push(c[i]);}}return r.join('');},convertExceptionsToObject=function(exc){var w=exc.split(', '),r={},i,l,key;for(i=0,l=w.length;i<l;i++){key=w[i].replace(/-/g,'');if(!r.hasOwnProperty(key)){r[key]=w[i];}}return r;},loadPatterns=function(lang){var url,xhr,head,script;if(supportedLang[lang]&&!Hyphenator.languages[lang]){url=basePath+'patterns/'+supportedLang[lang];}else{return;}if(isLocal&&!isBookmarklet){xhr=null;if(typeof XMLHttpRequest!=='undefined'){xhr=new XMLHttpRequest();}if(!xhr){try{xhr=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){xhr=null;}}if(xhr){xhr.open('HEAD',url,false);xhr.setRequestHeader('Cache-Control','no-cache');xhr.send(null);if(xhr.status===404){onError(new Error('Could not load\n'+url));delete docLanguages[lang];return;}}}if(createElem){head=window.document.getElementsByTagName('head').item(0);script=createElem('script',window);script.src=url;script.type='text/javascript';head.appendChild(script);}},prepareLanguagesObj=function(lang){var lo=Hyphenator.languages[lang],wrd;if(!lo.prepared){if(enableCache){lo.cache={};lo['cache']=lo.cache;}if(enableReducedPatternSet){lo.redPatSet={};}if(lo.hasOwnProperty('exceptions')){Hyphenator.addExceptions(lang,lo.exceptions);delete lo.exceptions;}if(exceptions.hasOwnProperty('global')){if(exceptions.hasOwnProperty(lang)){exceptions[lang]+=', '+exceptions.global;}else{exceptions[lang]=exceptions.global;}}if(exceptions.hasOwnProperty(lang)){lo.exceptions=convertExceptionsToObject(exceptions[lang]);delete exceptions[lang];}else{lo.exceptions={};}convertPatterns(lang);wrd='[\\w'+lo.specialChars+'@'+String.fromCharCode(173)+String.fromCharCode(8204)+'-]{'+min+',}';lo.genRegExp=new RegExp('('+url+')|('+mail+')|('+wrd+')','gi');lo.prepared=true;}if(!!storage){try{storage.setItem('Hyphenator_'+lang,window.JSON.stringify(lo));}catch(e){}}},prepare=function(callback){var lang,interval,tmp1,tmp2;if(!enableRemoteLoading){for(lang in Hyphenator.languages){if(Hyphenator.languages.hasOwnProperty(lang)){prepareLanguagesObj(lang);}}state=2;callback('*');return;}state=1;for(lang in docLanguages){if(docLanguages.hasOwnProperty(lang)){if(!!storage&&storage.getItem('Hyphenator_'+lang)){Hyphenator.languages[lang]=window.JSON.parse(storage.getItem('Hyphenator_'+lang));if(exceptions.hasOwnProperty('global')){tmp1=convertExceptionsToObject(exceptions.global);for(tmp2 in tmp1){if(tmp1.hasOwnProperty(tmp2)){Hyphenator.languages[lang].exceptions[tmp2]=tmp1[tmp2];}}}if(exceptions.hasOwnProperty(lang)){tmp1=convertExceptionsToObject(exceptions[lang]);for(tmp2 in tmp1){if(tmp1.hasOwnProperty(tmp2)){Hyphenator.languages[lang].exceptions[tmp2]=tmp1[tmp2];}}delete exceptions[lang];}tmp1='[\\w'+Hyphenator.languages[lang].specialChars+'@'+String.fromCharCode(173)+String.fromCharCode(8204)+'-]{'+min+',}';Hyphenator.languages[lang].genRegExp=new RegExp('('+url+')|('+mail+')|('+tmp1+')','gi');delete docLanguages[lang];callback(lang);continue;}else{loadPatterns(lang);}}}interval=window.setInterval(function(){var finishedLoading=true,lang;for(lang in docLanguages){if(docLanguages.hasOwnProperty(lang)){finishedLoading=false;if(!!Hyphenator.languages[lang]){delete docLanguages[lang];prepareLanguagesObj(lang);callback(lang);}}}if(finishedLoading){window.clearInterval(interval);state=2;}},100);},toggleBox=function(){var myBox,bdy,myIdAttribute,myTextNode,myClassAttribute,text=(Hyphenator.doHyphenation?'Hy-phen-a-tion':'Hyphenation');if(!!(myBox=contextWindow.document.getElementById('HyphenatorToggleBox'))){myBox.firstChild.data=text;}else{bdy=contextWindow.document.getElementsByTagName('body')[0];myBox=createElem('div',contextWindow);myIdAttribute=contextWindow.document.createAttribute('id');myIdAttribute.nodeValue='HyphenatorToggleBox';myClassAttribute=contextWindow.document.createAttribute('class');myClassAttribute.nodeValue=dontHyphenateClass;myTextNode=contextWindow.document.createTextNode(text);myBox.appendChild(myTextNode);myBox.setAttributeNode(myIdAttribute);myBox.setAttributeNode(myClassAttribute);myBox.onclick=Hyphenator.toggleHyphenation;myBox.style.position='absolute';myBox.style.top='0px';myBox.style.right='0px';myBox.style.margin='0';myBox.style.backgroundColor='#AAAAAA';myBox.style.color='#FFFFFF';myBox.style.font='6pt Arial';myBox.style.letterSpacing='0.2em';myBox.style.padding='3px';myBox.style.cursor='pointer';myBox.style.WebkitBorderBottomLeftRadius='4px';myBox.style.MozBorderRadiusBottomleft='4px';bdy.appendChild(myBox);}},hyphenateWord=function(lang,word){var lo=Hyphenator.languages[lang],parts,l,subst,w,characters,originalCharacters,wordLength,i,j,k,node,points=[],characterPoints=[],nodePoints,nodePointsLength,m=Math.max,trie,result=[''],pattern;if(word===''){return'';}if(word.indexOf(hyphen)!==-1){return word;}if(enableCache&&lo.cache.hasOwnProperty(word)){return lo.cache[word];}if(lo.exceptions.hasOwnProperty(word)){return lo.exceptions[word].replace(/-/g,hyphen);}if(word.indexOf('-')!==-1){parts=word.split('-');for(i=0,l=parts.length;i<l;i++){parts[i]=hyphenateWord(lang,parts[i]);}return parts.join('-');}w=word='_'+word+'_';if(!!lo.charSubstitution){for(subst in lo.charSubstitution){if(lo.charSubstitution.hasOwnProperty(subst)){w=w.replace(new RegExp(subst,'g'),lo.charSubstitution[subst]);}}}if(word.indexOf("'")!==-1){w=w.replace("'","’");}characters=w.toLowerCase().split('');originalCharacters=word.split('');wordLength=characters.length;trie=lo.patterns;for(i=0;i<wordLength;i+=1){points[i]=0;characterPoints[i]=characters[i].charCodeAt(0);}for(i=0;i<wordLength;i+=1){pattern='';node=trie;for(j=i;j<wordLength;j+=1){node=node[characterPoints[j]];if(node){if(enableReducedPatternSet){pattern+=String.fromCharCode(characterPoints[j]);}nodePoints=node.tpoints;if(nodePoints){if(enableReducedPatternSet){if(!lo.redPatSet){lo.redPatSet={};}lo.redPatSet[pattern]=recreatePattern(pattern,nodePoints);}for(k=0,nodePointsLength=nodePoints.length;k<nodePointsLength;k+=1){points[i+k]=m(points[i+k],nodePoints[k]);}}}else{break;}}}for(i=1;i<wordLength-1;i+=1){if(i>lo.leftmin&&i<(wordLength-lo.rightmin)&&points[i]%2){result.push(originalCharacters[i]);}else{result[result.length-1]+=originalCharacters[i];}}return result.join(hyphen);},hyphenateURL=function(url){return url.replace(/([:\/\.\?#&_,;!@]+)/gi,'$&'+urlhyphen);},removeHyphenationFromElement=function(el){var h,i=0,n;switch(hyphen){case'|':h='\\|';break;case'+':h='\\+';break;case'*':h='\\*';break;default:h=hyphen;}while(!!(n=el.childNodes[i++])){if(n.nodeType===3){n.data=n.data.replace(new RegExp(h,'g'),'');n.data=n.data.replace(new RegExp(zeroWidthSpace,'g'),'');}else if(n.nodeType===1){removeHyphenationFromElement(n);}}},registerOnCopy=function(el){var body=el.ownerDocument.getElementsByTagName('body')[0],shadow,selection,range,rangeShadow,restore,oncopyHandler=function(e){e=e||window.event;var target=e.target||e.srcElement,currDoc=target.ownerDocument,body=currDoc.getElementsByTagName('body')[0],targetWindow='defaultView'in currDoc?currDoc.defaultView:currDoc.parentWindow;if(target.tagName&&dontHyphenate[target.tagName.toLowerCase()]){return;}shadow=currDoc.createElement('div');shadow.style.color=window.getComputedStyle?targetWindow.getComputedStyle(body).backgroundColor:'#FFFFFF';shadow.style.fontSize='0px';body.appendChild(shadow);if(!!window.getSelection){e.stopPropagation();selection=targetWindow.getSelection();range=selection.getRangeAt(0);shadow.appendChild(range.cloneContents());removeHyphenationFromElement(shadow);selection.selectAllChildren(shadow);restore=function(){shadow.parentNode.removeChild(shadow);selection.removeAllRanges();selection.addRange(range);};}else{e.cancelBubble=true;selection=targetWindow.document.selection;range=selection.createRange();shadow.innerHTML=range.htmlText;removeHyphenationFromElement(shadow);rangeShadow=body.createTextRange();rangeShadow.moveToElementText(shadow);rangeShadow.select();restore=function(){shadow.parentNode.removeChild(shadow);if(range.text!==""){range.select();}};}window.setTimeout(restore,0);};if(!body){return;}el=el||body;if(window.addEventListener){el.addEventListener("copy",oncopyHandler,true);}else{el.attachEvent("oncopy",oncopyHandler);}},unhideElement=function(elo){var el=elo.element,hyphenatorSettings=elo.data;el.style.visibility='visible';elo.data.isHidden=false;if(!hyphenatorSettings.hasOwnStyle){el.setAttribute('style','');el.removeAttribute('style');}else{if(el.style.removeProperty){el.style.removeProperty('visibility');}else if(el.style.removeAttribute){el.style.removeAttribute('visibility');}}},checkIfAllDone=function(){var allDone=true;elements.each(function(lang,list){var i,l=list.length;for(i=0;i<l;i++){allDone=allDone&&list[i].hyphenated;if(intermediateState==='hidden'&&unhide==='wait'){unhideElement(list[i]);}}});if(allDone){state=3;onHyphenationDone();}},hyphenateElement=function(lang,elo){var hyphenatorSettings=elo.data,el=elo.element,hyphenate,n,i,controlOrphans=function(part){var h,r;switch(hyphen){case'|':h='\\|';break;case'+':h='\\+';break;case'*':h='\\*';break;default:h=hyphen;}if(orphanControl>=2){r=part.split(' ');r[1]=r[1].replace(new RegExp(h,'g'),'');r[1]=r[1].replace(new RegExp(zeroWidthSpace,'g'),'');r=r.join(' ');}if(orphanControl===3){r=r.replace(/[ ]+/g,String.fromCharCode(160));}return r;};if(Hyphenator.languages.hasOwnProperty(lang)){hyphenate=function(word){if(!Hyphenator.doHyphenation){return word;}else if(urlOrMailRE.test(word)){return hyphenateURL(word);}else{return hyphenateWord(lang,word);}};if(safeCopy&&(el.tagName.toLowerCase()!=='body')){registerOnCopy(el);}i=0;while(!!(n=el.childNodes[i++])){if(n.nodeType===3&&n.data.length>=min){n.data=n.data.replace(Hyphenator.languages[lang].genRegExp,hyphenate);if(orphanControl!==1){n.data=n.data.replace(/[\S]+ [\S]+$/,controlOrphans);}}}}if(hyphenatorSettings.isHidden&&intermediateState==='hidden'&&unhide==='progressive'){unhideElement(elo);}elo.hyphenated=true;elements.hyCount+=1;if(elements.count<=elements.hyCount){checkIfAllDone();}},hyphenateLanguageElements=function(lang){function bind(fun,arg1,arg2){return function(){return fun(arg1,arg2);};}var el,i,l;if(lang==='*'){elements.each(function(lang,langels){var i,l=langels.length;for(i=0;i<l;i++){window.setTimeout(bind(hyphenateElement,lang,langels[i]),0);}});}else{if(elements.list.hasOwnProperty(lang)){l=elements.list[lang].length;for(i=0;i<l;i++){window.setTimeout(bind(hyphenateElement,lang,elements.list[lang][i]),0);}}}},removeHyphenationFromDocument=function(){elements.each(function(lang,elo){var i,l=elo.length,el;for(i=0;i<l;i++){removeHyphenationFromElement(elo[i].element);elo[i].hyphenated=false;}});state=4;},createStorage=function(){try{if(storageType!=='none'&&typeof(window.localStorage)!=='undefined'&&typeof(window.sessionStorage)!=='undefined'&&typeof(window.JSON.stringify)!=='undefined'&&typeof(window.JSON.parse)!=='undefined'){switch(storageType){case'session':storage=window.sessionStorage;break;case'local':storage=window.localStorage;break;default:storage=undefined;break;}}}catch(f){}},storeConfiguration=function(){if(!storage){return;}var settings={'STORED':true,'classname':hyphenateClass,'donthyphenateclassname':dontHyphenateClass,'minwordlength':min,'hyphenchar':hyphen,'urlhyphenchar':urlhyphen,'togglebox':toggleBox,'displaytogglebox':displayToggleBox,'remoteloading':enableRemoteLoading,'enablecache':enableCache,'onhyphenationdonecallback':onHyphenationDone,'onerrorhandler':onError,'intermediatestate':intermediateState,'selectorfunction':selectorFunction,'safecopy':safeCopy,'doframes':doFrames,'storagetype':storageType,'orphancontrol':orphanControl,'dohyphenation':Hyphenator.doHyphenation,'persistentconfig':persistentConfig,'defaultlanguage':defaultLanguage};storage.setItem('Hyphenator_config',window.JSON.stringify(settings));},restoreConfiguration=function(){var settings;if(storage.getItem('Hyphenator_config')){settings=window.JSON.parse(storage.getItem('Hyphenator_config'));Hyphenator.config(settings);}};return{version:'4.0.0',doHyphenation:true,languages:{},config:function(obj){var assert=function(name,type){if(typeof obj[name]===type){return true;}else{onError(new Error('Config onError: '+name+' must be of type '+type));return false;}},key;if(obj.hasOwnProperty('storagetype')){if(assert('storagetype','string')){storageType=obj.storagetype;}if(!storage){createStorage();}}if(!obj.hasOwnProperty('STORED')&&storage&&obj.hasOwnProperty('persistentconfig')&&obj.persistentconfig===true){restoreConfiguration();}for(key in obj){if(obj.hasOwnProperty(key)){switch(key){case'STORED':break;case'classname':if(assert('classname','string')){hyphenateClass=obj[key];}break;case'donthyphenateclassname':if(assert('donthyphenateclassname','string')){dontHyphenateClass=obj[key];}break;case'minwordlength':if(assert('minwordlength','number')){min=obj[key];}break;case'hyphenchar':if(assert('hyphenchar','string')){if(obj.hyphenchar==='&shy;'){obj.hyphenchar=String.fromCharCode(173);}hyphen=obj[key];}break;case'urlhyphenchar':if(obj.hasOwnProperty('urlhyphenchar')){if(assert('urlhyphenchar','string')){urlhyphen=obj[key];}}break;case'togglebox':if(assert('togglebox','function')){toggleBox=obj[key];}break;case'displaytogglebox':if(assert('displaytogglebox','boolean')){displayToggleBox=obj[key];}break;case'remoteloading':if(assert('remoteloading','boolean')){enableRemoteLoading=obj[key];}break;case'enablecache':if(assert('enablecache','boolean')){enableCache=obj[key];}break;case'enablereducedpatternset':if(assert('enablereducedpatternset','boolean')){enableReducedPatternSet=obj[key];}break;case'onhyphenationdonecallback':if(assert('onhyphenationdonecallback','function')){onHyphenationDone=obj[key];}break;case'onerrorhandler':if(assert('onerrorhandler','function')){onError=obj[key];}break;case'intermediatestate':if(assert('intermediatestate','string')){intermediateState=obj[key];}break;case'selectorfunction':if(assert('selectorfunction','function')){selectorFunction=obj[key];}break;case'safecopy':if(assert('safecopy','boolean')){safeCopy=obj[key];}break;case'doframes':if(assert('doframes','boolean')){doFrames=obj[key];}break;case'storagetype':if(assert('storagetype','string')){storageType=obj[key];}break;case'orphancontrol':if(assert('orphancontrol','number')){orphanControl=obj[key];}break;case'dohyphenation':if(assert('dohyphenation','boolean')){Hyphenator.doHyphenation=obj[key];}break;case'persistentconfig':if(assert('persistentconfig','boolean')){persistentConfig=obj[key];}break;case'defaultlanguage':if(assert('defaultlanguage','string')){defaultLanguage=obj[key];}break;case'useCSS3hyphenation':if(assert('useCSS3hyphenation','boolean')){css3=obj[key];}break;case'unhide':if(assert('unhide','string')){unhide=obj[key];}break;default:onError(new Error('Hyphenator.config: property '+key+' not known.'));}}}if(storage&&persistentConfig){storeConfiguration();}},run:function(){documentCount=0;var process=function(){try{if(contextWindow.document.getElementsByTagName('frameset').length>0){return;}documentCount++;autoSetMainLanguage(undefined);gatherDocumentInfos();prepare(hyphenateLanguageElements);if(displayToggleBox){toggleBox();}}catch(e){onError(e);}},i,haveAccess,fl=window.frames.length;if(!storage){createStorage();}if(!documentLoaded&&!isBookmarklet){runOnContentLoaded(window,process);}if(isBookmarklet||documentLoaded){if(doFrames&&fl>0){for(i=0;i<fl;i++){haveAccess=undefined;try{haveAccess=window.frames[i].document.toString();}catch(e){haveAccess=undefined;}if(!!haveAccess){contextWindow=window.frames[i];process();}}}contextWindow=window;process();}},addExceptions:function(lang,words){if(lang===''){lang='global';}if(exceptions.hasOwnProperty(lang)){exceptions[lang]+=", "+words;}else{exceptions[lang]=words;}},hyphenate:function(target,lang){var hyphenate,n,i;if(Hyphenator.languages.hasOwnProperty(lang)){if(!Hyphenator.languages[lang].prepared){prepareLanguagesObj(lang);}hyphenate=function(word){if(urlOrMailRE.test(word)){return hyphenateURL(word);}else{return hyphenateWord(lang,word);}};if(typeof target==='string'||target.constructor===String){return target.replace(Hyphenator.languages[lang].genRegExp,hyphenate);}else if(typeof target==='object'){i=0;while(!!(n=target.childNodes[i++])){if(n.nodeType===3&&n.data.length>=min){n.data=n.data.replace(Hyphenator.languages[lang].genRegExp,hyphenate);}else if(n.nodeType===1){if(n.lang!==''){Hyphenator.hyphenate(n,n.lang);}else{Hyphenator.hyphenate(n,lang);}}}}}else{onError(new Error('Language "'+lang+'" is not loaded.'));}},getRedPatternSet:function(lang){return Hyphenator.languages[lang].redPatSet;},isBookmarklet:function(){return isBookmarklet;},getConfigFromURI:function(){var loc=null,re={},jsArray=document.getElementsByTagName('script'),i,j,l,s,gp,option;for(i=0,l=jsArray.length;i<l;i++){if(!!jsArray[i].getAttribute('src')){loc=jsArray[i].getAttribute('src');}if(!loc){continue;}else{s=loc.indexOf('Hyphenator.js?');if(s===-1){continue;}gp=loc.substring(s+14).split('&');for(j=0;j<gp.length;j++){option=gp[j].split('=');if(option[0]==='bm'){continue;}if(option[1]==='true'){re[option[0]]=true;continue;}if(option[1]==='false'){re[option[0]]=false;continue;}if(isFinite(option[1])){re[option[0]]=parseInt(option[1],10);continue;}if(option[0]==='onhyphenationdonecallback'){re[option[0]]=new Function('',option[1]);continue;}re[option[0]]=option[1];}break;}}return re;},toggleHyphenation:function(){if(Hyphenator.doHyphenation){removeHyphenationFromDocument();Hyphenator.doHyphenation=false;storeConfiguration();toggleBox();}else{hyphenateLanguageElements('*');Hyphenator.doHyphenation=true;storeConfiguration();toggleBox();}}};}(window));Hyphenator['languages']=Hyphenator.languages;Hyphenator['config']=Hyphenator.config;Hyphenator['run']=Hyphenator.run;Hyphenator['addExceptions']=Hyphenator.addExceptions;Hyphenator['hyphenate']=Hyphenator.hyphenate;Hyphenator['getRedPatternSet']=Hyphenator.getRedPatternSet;Hyphenator['isBookmarklet']=Hyphenator.isBookmarklet;Hyphenator['getConfigFromURI']=Hyphenator.getConfigFromURI;Hyphenator['toggleHyphenation']=Hyphenator.toggleHyphenation;window['Hyphenator']=Hyphenator;if(Hyphenator.isBookmarklet()){Hyphenator.config({displaytogglebox:true,intermediatestate:'visible',doframes:true});Hyphenator.config(Hyphenator.getConfigFromURI());Hyphenator.run();}Hyphenator.languages['en-us']=Hyphenator.languages['en']={leftmin:2,rightmin:3,specialChars:"",patterns:{3:"x1qei2e1je1f1to2tlou2w3c1tue1q4tvtw41tyo1q4tz4tcd2yd1wd1v1du1ta4eu1pas4y1droo2d1psw24sv1dod1m1fad1j1su4fdo2n4fh1fi4fm4fn1fopd42ft3fu1fy1ga2sss1ru5jd5cd1bg3bgd44uk2ok1cyo5jgl2g1m4pf4pg1gog3p1gr1soc1qgs2oi2g3w1gysk21coc5nh1bck1h1fh1h4hk1zo1ci4zms2hh1w2ch5zl2idc3c2us2igi3hi3j4ik1cab1vsa22btr1w4bp2io2ipu3u4irbk4b1j1va2ze2bf4oar1p4nz4zbi1u2iv4iy5ja1jeza1y1wk1bk3fkh4k1ikk4k1lk1mk5tk1w2ldr1mn1t2lfr1lr3j4ljl1l2lm2lp4ltn1rrh4v4yn1q1ly1maw1brg2r1fwi24ao2mhw4kr1cw5p4mkm1m1mo4wtwy4x1ar1ba2nn5mx1ex1h4mtx3i1muqu2p3wx3o4mwa1jx3p1naai2x1ua2fxx4y1ba2dn1jy1cn3fpr2y1dy1i",4:"4dryn2itni4on1inn1im_up3nik4ni4dy5giye4tyes4_ye44ab_nhe4nha4abe2n2gyn1guy1ery5eep2pe4abry3lay3lone4wne4v1nesy3chn1erne2q3neo1nenp2seps4hy2cey5lu2nedne2cyme44nk2y5at2adine2b2ne_y5ac2p1tp2ten1den1cun1cryn5dp2th4adup4twpub3ae4rxu3ayn5gaff4pue4n2au4p1ppuf4n2atag1ipu4mag1na2gon4asx3tix1t2pu2na4gya3haa3heah4la3ho_ti2a5ian2an5puspu2tnak4_th2n1kl_te4_ta4mu4u4mupmun23mum2alex4ob_sy25ynxal1i_st4y1o4xi5cxi5a4alm_si2_sh2m5sixhu4m4sh4m3r4amam2py2rabm2pixhi2yo5dr2ai4m1pmo2vmos2x2edmo2r4n1la2mor2asx3c2xas5yom4x4apxam3nme44mokrbi2nne44andy4osp4ot3noemn4omn4a4m1n4nog4m1l2angws4l1posw3shwri4wra4yp3iwom11wo2m2izrb4ow4nopo4pr2cem2isrd2iano4mig4y3pomi3awiz55mi_no4n4m1fme4v2re_wir42mes1menme2mme2gre1o2med4me_4nop4m5c4m1bwil21noureu2whi4w3ev4maprev2w1era2plpo4crfu4r4fyy5pu2maha3pu2mab2a2rn1p4npi44lyb4lya2p3nwam42l1w1lut4luplu3or1glluf4lu5a2wacltu2y3rol1tr4vv4r3guyr4rl1te4rh_nru4ar1il2sel4sc4l1rl5prl4plys4c4lovri3ar4ib4lof3lo_ar2par3q_os3ll4oll2i4as_ri1o3vokl2levoi44p1mlka35vo_ns4cas4ll1izr4iqr2is3vivl1it3lika2tan2sen2slrle42l3hlgo3l5gal5frns3mvi4p3ley_od2r2meles24athr4myle2al3drv1inldi4l2de2vilnt2il3civik4lce42l1b4lavv3ifrno4r3nua1trr2ocnt4sy4sok4syks4la2tuk4sck3ouko5ryss4a2tyau4b4klyys1tnu1akis4au3rki4pro4ek4ima2va5ki_nu4dn4umn3uokes4k1erav1irok2ke4g1keek2ed_me2aw3ikal4aws4k5agk3ab3ka_aye4ays4veg3jo4p5ba_4vedjew3n1v24ve_ja4pzar23vatizi4n1w41batba4z2b1bb2beix4o4i5w4b1d4be_rox5nym4nyp4n3za4ittr3por1r4i1ti1bel2ith2itei2su4rs2r1sars4cr2seis1p3betvag4i2sor1shbe3wr1sioad34b3hbi2bbi4d3bie3isf4ise2is_1bilr1sp5va_r5sw_le2uz4eir1ibi2tuxu3r1tiu1v2i1raze4nze4pb2l2uu4mo1biip3iz1eripe4b4louts44b1m4b3no3br3bodi4osbo4eru3aio4mi1ol4io_3booo1ce4inyin1u2insru2n2inn4inl4inkrv4e2inioch42iner3vo4indpi2np4idbt4lb4tob3trry4cry3t2in_o4elbu4ni2muim1i5saiil3v4ilnil1iil5fs1apo3er4b5w5by_bys4_in1sau4i1lazet4u2suo3ev2z1ii2go4igius1p5saw4s5bo2fi4ifti3fl4if_i3etsch2usc22ie4i2dui4dri2diid5dpi3au3ruz4ils1cuz4is4s5d4se_se4a2ce_2ici4ich3ceii1bri5bo1ceni1blse2g5seiibe43cepi2aniam4ur2li2al2i1acet4hy2scew41phy4ch_5phuhu4thu4gche2h4tyh4shur1durc44hr44h5p5sev5sexu1ra4s3fup3p2s3gph3t2sh_ho4g2h1n_he23ciau3pl4h1mci5ch2lozo4m4ciihi2vhi4p2cim2cin4phsu1peu1ouo1geu5osheu4sho4he4th1es4shwun5zun5ysi1bunu45cizo4glck3ihep5he2nh4ed1sioph2l5hazsi2rcly4zte4_ge21siscoe22cog5siu1siv5siz_ga24skes1l2s2leha4m2s1ms3ma1ogyo1h2u1ni3gus3gun2guegu4acov1gth3_eu3g4ros1n4_es3u2nez4zyum2pu1mi3som_ev2oig4cri2gov15goos4opgon2ul5v5goeu3lugob53go_2c1t4ph_g1nog1nic2te4sov4ulsgn4ag4myc4twcud5c4ufc4uipe2t3glo1gleul2igla4_eg23giz3cun5givgi4u3gir5gio1cusul4e2spagil4g1ic5gi__eb4cze41d2a5da_u1laggo44daf2dagg2gege4v1geo1gen2ged3dato1la2ge_ol2dol2i5daypek4p4eed1d42de_4gazol2tuiv3ol2vo2lys1sa2gamgaf4o2meui4n2ui2pe2cd4em4fugi4jku3fl3ufaf2tyf4to1denu4du4pe_2f3sfri2de1ps1si4f5pfos5d3eqs4sls4snfo2rss2tdes25fon4p1b_ci23payss5w2st_de1tf4l2de1v2fin4dey4d1fd4gast2idg1id2gyd1h25di_ud5dfi3au4cy_ch4pav43didu3cud1iff2fyu3crd1inst4r4f1ffev4fer11dio2fedfe4bdir2s2ty4fe_dis1on1au3ca4f5bon1c2ondd5k25far4fagpa1peys45eyc1exps4ul2dlyp4ale3whon3s3do_e1wa5doee5vud4oge1visu2msu2nub4euav4su2rp4ai6rk_d4or3dosu1atdo4v3doxp4adoo4k4swoo2padre4eus4e3upe5un2ophet5z4syc3syl4y3hoy1ads4pd4swd4syd2tho4wo3ta_du2c4etn2tabta2luac4es4wdu4g2ess4uabdu4n4duptav4st5bow1io1pr5dyn2tawe1sp2t1bop1uead1tz4et4chopy5ea4l4t1d4te_2tyle1si4esh1tee4tyat1cr4twoteg4es2c4eru1teoer1s2eroea2tte4po1rat1wh3tusea2v3teu3texer1i2e1ber1h4tey2t1f4t1ge3br2th_th2e4thle1ce3tumec2i2ths2erb1tia4tueer1aou5vtud2tif22tige1potu1aou4lttu41timt5toos4le1cre2pat4swe5owe1cue4ottsh4eos4e1ort4sce3ol4edieo2ge5of1tio4eno4enn5tiq4edoti4u1tive3my1tiz4othee2ct5laee2ft5lo4t1mee2mtme4e1meem5bcoi4to3be5exo1ry2tof1effel2iel2ftos24t1pe1la1traos2ceig2ei5de5ico2soe1h45egyeg5n",5:"_ach4e4go_e4goseg1ule5gurtre5feg4iceher4eg5ibeger44egaltre4mei5gle3imbe3infe1ingtra3beir4deit3eei3the5ity5triae4jud3efiteki4nek4la2trime4la_e4lactri4v4toute4law5toure3leaefil45elece4ledto2rae5len4tonye1lestro3ve4fic4tonoto3mytom4bto2mato5ice5limto2gre3lioe2listru5i4todo4ellaee4tyello4e5locel5ogeest4el2shel4tae5ludel5uge4mace4mage5man2t1n2ee2s4ee4p1e2mele4metee4naemi4eee4lyeel3i3tled3tle_e4mistlan4eed3iem3iztrus4emo4gti3zaem3pie4mule4dulemu3ne4dritiv4aedon2e4dolti3tle5neae5neeen3emtis4pti5sotis4m3tisee3newti3sae5niee5nile3nioedi5zen3ite5niu5enized1ited3imeno4ge4nosen3oven4swti5oc4t1s2en3uaen5ufe3ny_4en3zed3ibe3diae4oi4ede4s3tini4ed3deo3ret2ina2e2dae4culeo4toe5outec4te4t3t2t4tes2t1ine5pel4timpe2corephe4e4plie2col5tigutu3arti5fytu4bie3pro3tienep4sh5tidie4putt4icoeci4t4tick2ti2bec3imera4bti4aber3ar4tuf45tu3ier4bler3che4cib2ere_4thooecca54thil3thet4thea3turethan4e4cade4bitere4qe4ben5turieret4tur5oeav5oeav5itu5ry4tess4tes_ter5ve1rio4eriter4iueri4v1terier3m4ter3cte5pe4t1waer3noeast3er5obe5rocero4rer1oue3assea5sp1tent4ertler3twtwis4eru4t3tende1s4a3tenc5telsear2te2scateli4e3scres5cue1s2ee2sec3tel_te5giear5kear4cte5diear3ae3sha2t1ede5ande2sice2sid5tecttece44teattype3ty5phesi4uea4gees4mie2sole3acte2sone1a4bdys5pdy4sedu4petaun4d3uleta5sytas4e4tare4tarctar4ata5pl2estrta5mo4talke2surtal3idu5eleta4bta5lae3teoua5naet1ic4taf4etin4ta5doe5tir4taciuan4id1ucad1u1ae3trae3tre2d1s2syn5ouar2d4drowet3uaet5ymdro4pdril4dri4b5dreneu3rouar3ieute44draieu5truar3te2vasdop4pe5veadoo3ddoni4u4belsum3iev1erdoli4do4laev3idevi4le4vinevi4ve5voc2d5ofdo5dee4wage5wee4d1n4ewil54d5lue3wit2d3lou3ber5eye_u1b4i3dledfa3blfab3rfa4ce3dle_fain4suit3su5issu2g34d5lasu4b3fa3tasu1al4fato1di1vd2iti5disiuci4bfeas4di1redi4pl4feca5fectdio5gfe3life4mofen2d4st3wuc4it5ferr5diniucle3f4fesf4fie4stry1dinaf4flydi3ge3dictd4icedia5bs4tops1tle5stirs3tifs4ties1ticfic4is5tias4ti_4ficsfi3cuud3ers3thefil5iste2w4filyudev45finas4tedfi2nes2talfin4ns2tagde2tode4suflin4u1dicf2ly5ud5isu5ditde1scd2es_der5sfon4tu4don5dermss4lid4erhfor4is4siede2pudepi4fra4tf5reade3pade3nufril4frol5ud4side3nou4eneuens4ug5infu5el5dem_s5setfu5nefu3rifusi4fus4s4futade5lode5if4dee_5gal_3galiga3lo2d1eds3selg5amos2s5cssas3u1ing4ganouir4mgass4gath3uita4deaf5dav5e5dav44dato4darygeez44spotspor4s4pon4gelydark5s4ply4spio4geno4genydard5ge3omg4ery5gesigeth54getoge4tydan3g4g1g2da2m2g3gergglu5dach4gh3inspil4gh4to4cutr1gi4agia5rula5bspho5g4icogien5s2pheulch42sperspa4n5spai3c4utu1lenul4gigir4lg3islcu5pycu3picu4mic3umecu2maso5vi5glasu5liagli4bg3lig5culiglo3r4ul3mctu4ru1l4og4na_c3terul1tig2ning4nio4ultug4noncta4b4c3s2cru4dul5ulsor5dgo3isum5absor5ccris4go3nic4rinson4gsona45gos_cri5fcre4vum4bi5credg4raigran25solvsoft3so4ceunat44graygre4nco5zi4gritcoz5egruf4cow5ag5stecove4cos4es5menun4ersmel44corbco4pl4gu4tco3pacon5tsman3gy5racon3ghach4hae4mhae4th5aguha3lac4onecon4aun4ims3latu2ninhan4gs3ket5colocol5ihan4kuni3vhap3lhap5ttras4co4grhar2dco5agsir5aclim45sionhas5shaun44clichaz3acle4m1head3hearun3s4s3ingun4sws2ina2s1in4silysil4eh5elohem4p4clarhena45sidiheo5r1c4l4h4eras5icc2c1itu4orsh3ernshor4h3eryci3phshon34cipecion45cinoc1ingc4inahi5anhi4cohigh5h4il2shiv5h4ina3ship3cilihir4lhi3rohir4phir4rsh3iohis4ssh1inci4lau5pia4h1l4hlan44cier5shevcia5rhmet4ch4tish1erh5ods3cho2hoge4chi2z3chitho4mahome3hon4aho5ny3hoodhoon45chiouptu44ura_ho5ruhos4esew4ihos1p1housu4ragses5tu4rasur4behree5se5shs1e4s4h1s24chedh4tarht1enht5esur4fru3rifser4os4erlhun4tsen5gur1inu3riosen4dhy3pehy3phu1ritces5tur3iz4cesa4sencur4no4iancian3i4semeia5peiass45selv5selfi4atu3centse1le4ceniib5iaib3inseg3ruros43cencib3li3cell5cel_s5edli5bun4icam5icap4icar4s4ed3secticas5i4cayiccu44iceour4pe4ced_i5cidsea5wi2cipseas4i4clyur4pi4i1cr5icrai4cryic4teictu2ccon4urti4ic4umic5uoi3curcci4ai4daiccha5ca4thscof4ide4s4casys4cliscle5i5dieid3ios4choid1itid5iui3dlei4domid3owu5sadu5sanid5uous4apied4ecany4ield3s4cesien4ei5enn4sceii1er_i3esci1estus3ciuse5as4cedscav5if4frsca4pi3fieu5siau3siccan4eiga5bcan5d4calous5sli3gibig3ilig3inig3iti4g4lus1trig3orig5oti5greigu5iig1ur2c5ah4i5i44cag4cach4ca1blusur4sat3usa5tab5utoi3legil1erilev4uta4b4butail3iail2ibil3io3sanc2ilitil2izsal4t5bustil3oqil4tyil5uru3tati4magsa5losal4m4ute_4imetbu3res3act5sack2s1ab4imitim4nii3mon4utelbumi4bu3libu4ga4inav4utenbsor42b5s2u4tis4briti3neervi4vr3vic4inga4inger3vey4ingir3ven4ingo4inguu4t1li5ni_i4niain3ioin1isbo4tor5uscrunk5both5b5ota5bos42i1no5boriino4si4not5borein3seru3in2int_ru4glbor5di5nusut5of5bor_uto5gioge4io2grbon4au5tonru3enu4touion3iio5phior3ibod3iio5thi5otiio4toi4ourbne5gb3lisrt4shblen4ip4icr3triip3uli3quar4tivr3tigrti4db4le_b5itzira4bi4racird5ert5ibi4refbi3tri4resir5gibi5ourte5oir4isr3tebr4tagbin4diro4gvac3uir5ul2b3ifis5agis3arisas52is1cis3chbi4eris3erbi5enrson3be5yor5shais3ibisi4di5sisbe3tw4is4krs3es4ismsbe5trr3secva4geis2piis4py4is1sbe3sp4bes4be5nuval5ois1teis1tirrys4rros44be5mis5us4ita_rron4i4tagrri4vi3tani3tatbe3lorri4or4reoit4esbe1libe5gu4itiarre4frre4cbe3giit3igbe3dii2tim2itio4itisrp4h4r3pet4itonr4peait5rybe3debe3dai5tudit3ul4itz_4be2dbeat3beak4ro4varo4tyros4sro5roiv5ioiv1itror3i5root1roomval1ub3berva5mo4izarva5piron4eban3ijac4qban4ebal1ajer5srom4prom4iba4geazz5i5judgay5alax4idax4ickais4aw4ly3awaya1vorav5ocav3igke5liv3el_ve4lov4elyro1feke4tyv4erdv4e2sa5vanav3ag5k2ick4illkilo5au1thk4in_4ves_ro3crkin4gve4teaun5dk5ishau4l2au3gu4kleyaugh3ve4tyk5nes1k2noat3ulkosh4at5uekro5n4k1s2at5uaat4that5te5vianat4sk5vidil4abolaci4l4adela3dylag4nlam3o3landrob3la4tosr4noular4glar3ilas4ea4topr3nivr3nita2tomr5nica4toglbin44l1c2vi5gnat3ifat1ica5tiar3neyr5net4ati_ld5isat4hol4driv2incle4bileft55leg_5leggr4nerr3nel4len_3lencr4nar1lentle3phle4prvin5dler4e3lergr3mitl4eroat5evr4mio5lesq3lessr3menl3eva4vingrma5cvio3lvi1ou4leyevi5rovi3so4l1g4vi3sulgar3l4gesate5cat5apli4agli2amr3lo4li4asr4lisli5bir4ligr2led4lics4vitil4icul3icyl3idaat5ac3lidirk4lel4iffli4flr3ket3lighvit3r4vityriv3iri2tulim3ili4moris4pl4inar3ishris4clin3ir4is_li5og4l4iqlis4pas1trl2it_as4shas5phri2pla4socask3ia3sicl3kallka4ta3sibl4lawashi4l5leal3lecl3legl3lel5riphas4abar2shrin4grin4ear4sarin4dr2inal5lowarre4l5met3rimol4modlmon42l1n2a3roorim5ilo4civo4la5rigil5ogo3loguri5et5longlon4iri1erlood5r4icolop3il3opmlora44ricir4icerib3a5los_v5oleri4agria4blos4tlo4taar2mi2loutar2izar3iolpa5bl3phal5phi4rhall3pit5voltar4im3volv2l1s2vom5ivori4l4siear4fllt5agar4fivo4rylten4vo4talth3ia3reeltis4ar4drw5ablrgo4naraw4lu3brluch4lu3cilu3enwag5olu5idlu4ma5lumia5raur5gitwait5luo3rw5al_luss4r5gisar4atl5venrgi4nara3pwar4tar3alwas4tly5mely3no2lys4l5ysewa1teaque5ma2car3gicma4clr3get5magnwed4nmaid54maldrg3erweet3wee5vwel4lapoc5re4whwest3ap3in4aphires2tr4es_mar3vre5rumas4emas1t5matemath3rero4r4eriap5atr1er4m5bilre1pumbi4vapar4a5nuran3ul4med_an3uare5lure1lian4twre5itmel4tan2trre4fy4antomen4are3fire2fe4menemen4imens4re1de3ment2r2edme5onre4awwin4g5reavme4tare3anme1tere1alm4etr3wiserdin4rdi4aan4stwith3an2span4snan2samid4amid4gan5otwl4esr4dalm4illmin4a3mindrcum3rc4itr3charcen4min4tm4inumiot4wl3ina3niumis5lan3ita3nip4mithan3ioan1gla3neuws4per2bina3nena5neem4ninw5s4tan1dl4mocrrbi4fmo2d1mo4gomois2xac5ex4agor4bagmo3mer4baba3narrau4ta5monrare4rar5cra5nor4aniam1inr2amiam5ifra4lomo3spmoth3m5ouf3mousam3icxer4ixe5roraf4tr5aclm3petra3bixhil5mpi4aam3ag3quetm5pirmp5is3quer2que_qua5vmpov5mp4tram5ab3alyz4m1s25alyt4alysa4ly_ali4exi5di5multx4ime4aldia4laral3adal5abak1enain5opu3trn4abu4nac_na4can5act5putexpe3dna4lia4i4n4naltai5lya3ic_pur4rag5ulnank4nar3c4narenar3inar4ln5arm3agognas4c4ag4l4ageupul3cage4oaga4na4gab3nautnav4e4n1b4ncar5ad5umn3chaa3ducptu4rpti3mnc1innc4itad4suad3owad4len4dain5dana5diua3ditndi4ba3dion1ditn3dizn5ducndu4rnd2we3yar4n3eara3dianeb3uac4um5neckac3ulp4siba3cio5negene4laac1inne5mine4moa3cie4nene4a2cine4poyc5erac1er2p1s2pro1tn2erepro3lner4rych4e2nes_4nesp2nest4neswpri4sycom4n5evea4carab3uln4gabn3gelpre3vpre3rycot4ng5han3gibng1inn5gitn4glangov4ng5shabi5an4gumy4erf4n1h4a5bannhab3a5bal3n4iani3anni4apni3bani4bl_us5ani5dini4erni2fip3petn5igr_ure3_un3up3per_un5op3pennin4g_un5k5nis_p5pel_un1en4ithp4ped_un1ani3tr_to4pympa3_til4n3ketnk3inyn5ic_se2ny4o5gy4onsnmet44n1n2_ru4d5pounnni4vnob4lpo4tan5ocly4ped_ro4qyper5noge4pos1s_ri4gpo4ry1p4or_res2no4mono3my_ree2po4ninon5ipoin2y4poc5po4gpo5em5pod_4noscnos4enos5tno5tayp2ta3noun_ra4cnowl3_pi2tyra5m_pi4eyr5ia_out3_oth32n1s2ns5ab_or3t_or1d_or3cplu4mnsid1nsig4y3s2eys3ion4socns4pen5spiploi4_odd5nta4bpli4n_ni4cn5tib4plignti2fpli3a3plannti4p1p2l23ysis2p3k2ys3ta_mis1nu5enpi2tun3uinp3ithysur4nu1men5umi3nu4nyt3icnu3trz5a2b_li4t_li3o_li2n_li4g_lev1_lep5_len4pion4oard3oas4e3pi1ooat5ip4inoo5barobe4l_la4mo2binpind4_ju3rob3ul_is4i_ir5rp4in_ocif3o4cil_in3so4codpi3lopi3enocre33piec5pidipi3dep5ida_in2kod3icodi3oo2do4odor3pi4cypian4_ine2o5engze3rooe4ta_im3m_id4l_hov5_hi3b_het3_hes3_go4r_gi4bpho4ro5geoo4gero3gie3phobog3it_gi5azo5ol3phizo4groogu5i4z1z22ogyn_fes3ohab5_eye55phieph1icoiff4_en3sph4ero3ing_en3go5ism_to2qans3v_el5d_eer4bbi4to3kenok5iebio5mo4lanper1v4chs_old1eol3erpe5ruo3letol4fi_du4co3liaper3op4ernp4erio5lilpe5ono5liop4encpe4la_do4tpee4do5livcin2q3pediolo4rol5pld3tabol3ub3pedeol3uno5lusedg1le1loaom5ahoma5l2p2edom2beom4bl_de3o3fich3pe4ao4met_co4ro3mia_co3ek3shao5midom1inll1fll3teapa2teo4monom3pi3pare_ca4tlue1pon4aco3nanm2an_pa4pum2en_on5doo3nenng1hoon4guon1ico3nioon1iso5niupa3nypan4ao3nou_bri2pain4ra1oronsu4rk1hopac4tpa4ceon5umonva5_ber4ood5eood5i6rks_oop3io3ordoost5rz1scope5dop1erpa4ca_ba4g_awn4_av4i_au1down5io3pito5pon1sync_as1s_as1p_as3ctch1c_ar5so5ra_ow3elo3visov4enore5auea1mor3eioun2d_ant4orew4or4guou5etou3blo5rilor1ino1rio_ang4o3riuor2miorn2eo5rofoto5sor5pe3orrhor4seo3tisorst4o3tif_an5cor4tyo5rum_al3tos3al_af1tos4ceo4teso4tano5scros2taos4poos4paz2z3wosi4ue3pai",6:"os3ityos3itoz3ian_os4i4ey1stroos5tilos5titxquis3_am5atot3er_ot5erso3scopor3thyweek1noth3i4ot3ic_ot5icao3ticeor3thiors5enor3ougor3ityor3icaouch5i4o5ria_ani5mv1ativore5sho5realus2er__an3teover3sov4erttot3icoviti4o5v4olow3dero4r3agow5esto4posiop3ingo5phero5phanthy3sc3operaontif5on3t4ionten45paganp3agattele2gonspi4on3omyon4odipan3elpan4tyon3keyon5est3oncil_ar4tyswimm6par5diompro5par5elp4a4ripar4isomo4gepa5terst5scrpa5thy_atom5sta1tio5miniom3icaom3ic_ss3hatsky1scpear4lom3ena_ba5naol3umer1veilpedia4ped4icolli4er1treuo5liteol3ishpeli4epe4nano5lis_pen4thol3ingp4era_r1thoup4erago3li4f_bas4er1krauperme5ol5id_o3liceper3tio3lescolass4oi3terpe5tenpe5tiz_be5raoi5son_be3smphar5iphe3nooi5letph4es_oi3deroic3esph5ingr3ial_3ognizo5g2ly1o1gis3phone5phonio5geneo4gatora3mour2amenofit4tof5itera3chupi4ciepoly1eod5dedo5cureoc3ula1pole_5ocritpee2v1param4oc3raco4clamo3chetob5ingob3a3boast5eoke1st3nu3itpi5thanuf4fentu3meoerst2o3chasplas5tn3tinepli5ernti4ernter3sntre1pn4s3esplum4bnsati4npre4cns4moonon1eqnor5abpo3et5n5lessn5oniz5pointpoly5tnon4agnk3rup3nomicng1sprno5l4inois5i4n3o2dno3blenni3aln5keroppa5ran3itor3nitionis4ta5nine_ni3miznd3thrmu2dron3geripray4e5precipre5copre3emm3ma1bpre4lan5gerep3rese3press_can5cmedi2c5pri4e_ce4la3neticpris3op3rocal3chain4er5ipros3en4erarnera5bnel5iz_cit5rne4gatn5d2ifpt5a4bjanu3aign4itn3chisn5chiln5cheon4ces_nau3seid4iosna3talnas5tinan4itnanci4na5mitna5liahnau3zput3er2n1a2bhex2a3hatch1multi3hair1sm4pousg1utanmpo3rim4p1inmp5iesmphas4rach4empar5iraf5figriev1mpara5mo5seyram3et4mora_rane5oran4gemo3ny_monol4rap3er3raphymo3nizgno5morar5ef4raril1g2nacg1leadmoni3ara5vairav3elra5ziemon5gemon5etght1wemoi5sege3o1dmma5ryr5bine3fluoren1dixmis4ti_de3ra_de3rie3chasrch4err4ci4bm4inglm5ineedu2al_3miliame3tryrdi4er_des4crd3ingdi2rerme5thimet3alre5arr3mestim5ersadi2rende2ticdes3icre4cremen4temensu5re3disred5itre4facmen4dede2mosmen5acmem1o3reg3ismel5onm5e5dyme3died2d5ibren4te5mediare5pindd5a5bdata1bmba4t5cle4arma3tisma5scemar4lyre4spichs3huma5riz_dumb5re3strre4terbrus4qre3tribio1rhre5utiman3izre4valrev3elbi1orbbe2vie_eas3ire5vilba1thyman5is5maniamal4tymal4lima5linma3ligmag5inav3ioul5vet4rg3inglus3teanti1dl5umn_ltur3a_el3emltera4ltane5lp5ingloun5dans5gra2cabllos5etlor5ouric5aslo5rie_enam35ricidri4cie5lope_rid5erri3encri3ent_semi5lom3errig5an3logicril3iz5rimanlob5allm3ingrim4pell5out5rina__er4ril5linal2lin4l3le4tl3le4nriph5eliv3er_ge5og_han5k_hi3er_hon3olin3ea1l4inel4im4p_idol3_in3ci_la4cy_lath5rit3iclim4blrit5urriv5elriv3et4l4i4lli4gra_leg5elif3errk4linlid5er4lict_li4cor5licioli4atorl5ish_lig5a_mal5o_man5a_mer3c5less_rm5ersrm3ingy3thinle5sco3l4erilera5b5lene__mon3ele4matld4erild4erela4v4ar1nis44lativ_mo3rola5tanlan4telan5etlan4dllab3ic_mu5takin4dek3est_ro5filk3en4dro5ker5role__of5te4jestyys3icaron4al5izont_os4tlron4tai4v3ot_pe5tero3pelrop3ici5voreiv5il__pio5n_pre3mro4the_ran4tiv3en_rov5eliv3ellit3uati4tramr5pentrp5er__rit5ui4tismrp3ingit5ill_ros5tit3ica4i2tici5terirre4stit3era4ita5mita4bi_row5dist4lyis4ta_is4sesrsa5tiissen4is4sal_sci3erse4crrs5er_islan4rse5v2yo5netish5opis3honr4si4bis5han5iron_ir4minrtach4_self5iri3turten4diri5dei4rel4ire4de_sell5r4tieriq3uidrtil3irtil4lr4tilyr4tistiq5uefip4re4_sing4_ting4yn3chrru3e4lion3at2in4th_tin5krum3pli4no4cin3ityrun4ty_ton4aruti5nymbol5rvel4i_top5irv5er_r5vestin5geni5ness_tou5s_un3cein3cerincel45ryngei4n3auim3ulai5miniimi5lesac3riim5ida_ve5rasalar4ima5ryim3ageill5abil4istsan4deila5rai2l5am_wil5ii4ladeil3a4bsa5voright3iig3eraab5erd4ific_iff5enif5eroi3entiien5a45ie5gaidi5ou3s4cieab5latidi4arid5ianide3al4scopyab5rogid5ancic3ulaac5ardi2c5ocic3ipaic5inase2c3oi4carai4car_se4d4ei2b5riib5iteib5it_ib5ertib3eraac5aroi4ativ4ian4tse4molsen5ata5ceouh4warts5enedhus3t4s5enin4sentd4sentlsep3a34s1er_hun5kehu4min4servohro3poa5chethov5el5se5umhouse3sev3enho5senhort3eho5rishor5at3hol4ehol5arh5odizhlo3riac5robhis3elhion4ehimer4het4edsh5oldhe2s5ph5eroushort5here5aher4bahera3p3side_5sideshen5atsi5diz4signahel4lyact5ifhe3l4ihe5do55sine_h5ecathe4canad4dinsion5aad5er_har4lehard3e3sitioha5rasha3ranhan4tead3icahang5oadi4ersk5inesk5ing5hand_han4cyhan4cislith5hala3mh3ab4lsmall32g5y3n5gui5t3guard5smithad5ranaeri4eag5ellag3onia5guerso4labsol3d2so3licain5in4grada3s4on_gor5ougo5rizgondo5xpan4dait5ens5ophyal3end3g4o4ggnet4tglad5i5g4insgin5ge3g4in_spen4d2s5peog3imen5gies_3spher5giciagh5outsp5ingge5nizge4natge5lizge5lisgel4inxi5miz4gativgar5n4a5le5oga3nizgan5isga5mets5sengs4ses_fu4minfres5cfort5assi4erss5ilyfore5tfor5ayfo5ratal4ia_fon4dessur5aflo3ref5lessfis4tif1in3gstam4i5stands4ta4p5stat_fin2d5al5levs5tero4allicstew5afight5fi5del5ficie5ficiafi3cer5stickf3icena5log_st3ingf3icanama5ra5stockstom3a5stone2f3ic_3storef2f5iss4tradam5ascs4trays4tridf5fin_fend5efeath3fault5fa3thefar5thfam5is4fa4mafall5eew3inge5verbeven4ie5vengevel3oev3ellev5asteva2p5euti5let5roset3roget5rifsy5rinet3ricet5onaam5eraam5ilyami4noamor5ieti4noe5tidetai5loethod3eten4dtal5enes5urramp5enan3ageta5loge5strotan4detanta3ta5pere3ston4es2toes5times3tigta3rizestan43analy4taticta4tures4prean3arces3pertax4ises5onaes3olue5skintch5etanar4ies4i4ntead4ie2s5ima3natiande4sesh5enan3disan4dowang5iete5geres5ences5ecres5cana4n1icte2ma2tem3at3tenanwrita45erwau4tenesert3era3nieser3set5erniz4erniter4nis5ter3de4rivaan3i3fter3isan4imewo5vener3ineeri4ere3rient3ess_teth5e5ericke1ria4er3ester5esser3ent4erenea5nimier5enaer3emoth3easthe5atthe3iser5el_th5ic_th5icaere3in5thinkere5coth5odea5ninee3realan3ishan4klier4che5anniz4erandti4atoanoth5equi3lep5utat4ic1uan4scoe4probep3rehe4predans3poe4precan4surantal4e3penttim5ulep5anceo5rol3tine_eop3aran4tiewin4deap5eroen3ishen5icsen3etren5esten5esien5eroa3pheren3dicap3itae4nanten5amoem5ulaa3pituti3zen5emnize5missem5ishap5olaem5ine3tles_t5let_em1in2apor5iem3icaem5anael3op_el4labapos3te3liv3el5ishaps5esweath3e3lierel3icaar3actwa5verto3nate3libee4l1erel3egato3rietor5iza5radeelaxa4aran4gto3warelan4dej5udie5insttra5chtraci4ar5av4wa5gere5git5arbal4ar5easeg5ing4voteetrem5iar3enta5ressar5ial4tricsvor5abe3finetro5mitron5i4tronyar3iantro3sp5eficia3rieted5uloed3icae4d1erec3ulaec4tane4cremeco5roec3orae4concar5o5de4comme4cluse4clame5citeec5ifya5ronias3anta5sia_tu4nis2t3up_ecan5ce4belstur3ise4bel_eav3ene4a3tue5atifeath3ieat5eneart3eear4ilear4icear5eseam3ereal3oueal5erea5geread5iedum4be4ducts4duct_duc5eras3tenasur5adrea5rat3abl4d5outdo3natdom5izdo5lor4dlessu4bero3dles_at3alou3ble_d4is3tdirt5idi5niz3dine_at5ech5di3endi4cam1d4i3ad3ge4tud5estdev3ilde3strud3iedud3iesdes3tide2s5oat3egovis3itde4nardemor5at3en_uen4teuer4ilde5milat3eraugh3en3demicater5nuil5izdeli4ede5comde4cildecan4de4bonv3io4rdeb5it4dativ2d3a4bat3estu5laticu4tie5ulcheul3dercuss4icu5riaath5em3cultua5thenul3ingul5ishul4lar4vi4naul4liscu5ityctim3ic4ticuuls5esc5tantultra3ct5angcros4ecrop5ocro4pl5critiath5omum4blycre3at5vilitumor5oat5i5b5crat_cras5tcoro3ncop3iccom5ercol3orun5ishco3inc5clareat3ituunt3abat5ropun4tescit3iz4cisti4cista4cipicc5ing_cin3em3cinatuper5s5videsup3ingci2a5b5chini5videdupt5ib5vide_at4tag4ch1inch3ersch3er_ch5ene3chemiche5loure5atur4fercheap3vi5aliat3uravet3er4ch3abc5e4taau5sib3cessives4tece5ram2cen4e4cedenccou3turs5erur5tesur3theaut5enur4tiecav5al4cativave4nover3thcar5omca5percan4tycan3izcan5iscan4icus4lin3versecal4laver3ieca3latca5dencab3in3butiobuss4ebus5iebunt4iv4eresuten4i4u1t2iv3erenu3tineut3ingv4erelbroth35u5tizbound34b1orabon5at5vere_bom4bibol3icblun4t5blespblath5av3erav5enuebi3ogrbi5netven3om2v1a4bvac5ilbi3lizbet5izbe5strva5liebe5nigbbi4nabas4siva5nizbari4aav5ernbarbi5av5eryvel3liazi4eravi4er",7:"_dri5v4ban5dagvar5iedbina5r43bi3tio3bit5ua_ad4derution5auti5lizver5encbuf4ferus5terevermi4ncall5incast5ercas5tigccompa5z3o1phros5itiv5chanicuri4fico5stati5chine_y5che3dupport54v3iden5cific_un4ter_at5omiz4oscopiotele4g5craticu4m3ingv3i3liz4c3retaul4li4bcul4tiscur5a4b4c5utiva5ternauiv4er_del5i5qdem5ic_de4monsdenti5fdern5izdi4latou4b5ingdrag5on5drupliuar5ant5a5si4tec5essawo4k1enec5ifiee4compear5inate4f3eretro5phewide5sp5triciatri5cesefor5ese4fuse_oth5esiar5dinear4chantra5ventrac4tetrac4itar5ativa5ratioel5ativor5est_ar5adisel5ebraton4alie4l5ic_wea5rieel5igibe4l3ingto5cratem5igraem3i3niemoni5oench4erwave1g4a4pillavoice1ption5eewill5inent5age4enthesvaude3vtill5inep5recaep5ti5bva6guer4erati_tho5rizthor5it5thodicer5ence5ternitteri5zater5iesten4tage4sage_e4sagese4sert_an5est_e4sertse4servaes5idenes5ignaesis4tees5piraes4si4btal4lisestruc5e5titioounc5erxe4cutota5bleset5itiva4m5atoa4matis5stratu4f3ical5a5lyst4ficatefill5instern5isspend4gani5zasqual4la4lenti4g3o3nas5ophiz5sophicxpecto55graph_or5angeuri4al_4graphy4gress_smol5d4hang5erh5a5nizharp5enhar5terhel4lishith5erhro5niziam5eteia4tricic4t3uascour5au2r1al_5scin4dover4nescan4t55sa3tiou5do3ny_ven4de_under5ty2p5al_anti5sylla5bliner4arturn3ari5nite_5initioinsur5aion4eryiphras4_tim5o5_ten5an_sta5blrtroph4_se5rieiq3ui3t5i5r2izis5itiviso5mer4istral5i5ticki2t5o5mtsch3ie_re5mittro3fiti4v3er_i4vers_ros5per_pe5titiv3o3ro_ped5alro5n4is_or5ato4jestierom5ete_muta5bk5iness4latelitr4ial__mist5i_me5terr4ming_lev4er__mar5tilev4eralev4ers_mag5a5liar5iz5ligaterit5ers_lat5errit5er_r5ited__im5pinri3ta3blink5er_hon5ey5litica_hero5ior5aliz_hand5irip5lic_gen3t4tolo2gylloqui5_con5grt1li2erbad5ger4operag_eu4lertho3donter2ic__ar4tie_ge4ome_ge5ot1_he3mo1_he3p6a_he3roe_in5u2tpara5bl5tar2rht1a1mintalk1a5ta3gon_par5age_aster5_ne6o3f_noe1thstyl1is_poly1s5pathic_pre1ampa4tricl3o3niz_sem4ic_semid6_semip4_semir45ommend_semiv4lea4s1a_spin1oom5etryspher1o_to6poglo4ratospe3cio3s2paceso2lute_we2b1l_re1e4ca5bolicom5erseaf6fishside5swanal6ysano5a2cside5stl5ties_5lumniasid2ed_anti1reshoe1stscy4th1s4chitzsales5wsales3cat6tes_augh4tlau5li5fom5atizol5ogizo5litiorev5olure5vertre5versbi5d2ifbil2lab_earth5pera5blro1tronro3meshblan2d1blin2d1blon2d2bor1no5ro1bot1re4ti4zr5le5quperi5stper4malbut2ed_but4tedcad5e1moist5enre5stalress5ibchie5vocig3a3roint5er4matizariv1o1lcous2ticri3tie5phisti_be5stoog5ativo2g5a5rr3a3digm4b3ingre4posir4en4tade4als_od5uctsquasis6quasir6re5fer_p5trol3rec5olldic1aiddif5fra3pseu2dr5ebrat5metric2d1lead2d1li2epro2g1epre1neuod5uct_octor5apoin3came5triem5i5liepli5narpara3memin5glim5inglypi4grappal6matmis4er_m5istryeo3graporth1riop1ism__but4tio3normaonom1icfeb1ruafermi1o_de4moio5a5lesodit1icodel3lirb5ing_gen2cy_n4t3ingmo5lestration4get2ic_4g1lishobli2g1mon4ismnsta5blmon4istg2n1or_nov3el3ns5ceivno1vembmpa5rabno4rarymula5r4nom1a6lput4tinput4tedn5o5miz_cam4penag5er_nge5nesh2t1eoun1dieck2ne1skiifac1etncour5ane3backmono1s6mono3chmol1e5cpref5ac3militapre5tenith5i2lnge4n4end5est__capa5bje1re1mma1la1ply5styr1kovian_car5olprin4t3lo2ges_l2l3ishprof5it1s2tamp",8:"lead6er_url5ing_ces5si5bch5a5nis1le1noidlith1o5g_chill5ilar5ce1nym5e5trych5inessation5arload4ed_load6er_la4c3i5elth5i2lyneg5ativ1lunk3erwrit6er_wrap3arotrav5es51ke6linga5rameteman3u1scmar1gin1ap5illar5tisticamedio6c1me3gran3i1tesima3mi3da5bves1titemil2l1agv1er1eigmi6n3is_1verely_e4q3ui3s5tabolizg5rapher5graphicmo5e2lasinfra1s2mon4ey1lim3ped3amo4no1enab5o5liz_cor5nermoth4et2m1ou3sinm5shack2ppo5sitemul2ti5uab5it5abimenta5rignit1ernato5mizhypo1thani5ficatuad1ratu4n5i4an_ho6r1ic_ua3drati5nologishite3sidin5dling_trib5utin5glingnom5e1non1o1mistmpos5itenon1i4so_re5stattro1p2istrof4ic_g2norespgnet1ism5glo5binlem5aticflow2er_fla1g6elntrol5lifit5ted_treach1etra1versl5i5ticso3mecha6_for5mer_de5rivati2n3o1me3spac6i2t3i4an_thy4l1antho1k2er_eq5ui5to4s3phertha4l1amt3ess2es3ter1geiou3ba3dotele1r6ooxi6d1iceli2t1isonspir5apar4a1leed1ulingea4n3iesoc5ratiztch3i1er_kil2n3ipi2c1a3dpli2c1abt6ap6athdrom3e5d_le6icesdrif2t1a_me4ga1l1prema3cdren1a5lpres2plipro2cess_met4ala3do5word1syth3i2_non1e2m_post1ampto3mat4rec5ompepu5bes5cstrib5utqu6a3si31stor1ab_sem6is4star3tliqui3v4arr1abolic_sph6in1de5clar12d3aloneradi1o6gs3qui3tosports3wsports3cra5n2hascro5e2cor3bin1gespokes5wspi2c1il_te3legrcroc1o1d_un3at5t_dictio5cat1a1s2buss4ingbus6i2esbus6i2erbo2t1u1lro5e2las1s2pacinb1i3tivema5rine_r3pau5li_un5err5r5ev5er__vi2c3arback2er_ma5chinesi5resid5losophyan3ti1n2sca6p1ersca2t1olar2rangesep3temb1sci2uttse3mes1tar3che5tsem1a1ph",9:"re4t1ribuuto5maticl3chil6d1a4pe5able1lec3ta6bas5ymptotyes5ter1yl5mo3nell5losophizlo1bot1o1c5laratioba6r1onierse1rad1iro5epide1co6ph1o3nscrap4er_rec5t6angre2c3i1prlai6n3ess1lum5bia_3lyg1a1miec5ificatef5i5nites2s3i4an_1ki5neticjapan1e2smed3i3cinirre6v3ocde2c5linao3les3termil5li5listrat1a1gquain2t1eep5etitiostu1pi4d1v1oir5du1su2per1e6_mi1s4ers3di1methy_mim5i2c1i5nitely_5maph1ro15moc1ra1tmoro6n5isdu1op1o1l_ko6r1te1n3ar4chs_phi2l3ant_ga4s1om1teach4er_parag6ra4o6v3i4an_oth3e1o1sn3ch2es1to5tes3toro5test1eror5tively5nop5o5liha2p3ar5rttrib1ut1_eth1y6l1e2r3i4an_5nop1oly_graph5er_5eu2clid1o1lo3n4omtrai3tor1_ratio5na5mocratiz_rav5en1o",10:"se1mi6t5ic3tro1le1um5sa3par5iloli3gop1o1am1en3ta5bath3er1o1s3slova1kia3s2og1a1myo3no2t1o3nc2tro3me6c1cu2r1ance5noc3er1osth1o5gen1ih3i5pel1a4nfi6n3ites_ever5si5bs2s1a3chu1d1ri3pleg5_ta5pes1trproc3i3ty_s5sign5a3b3rab1o1loiitin5er5arwaste3w6a2mi1n2ut1erde3fin3itiquin5tes5svi1vip3a3r",11:"pseu3d6o3f2s2t1ant5shimi1n2ut1estpseu3d6o3d25tab1o1lismpo3lyph1onophi5lat1e3ltravers3a3bschro1ding12g1o4n3i1zat1ro1pol3it3trop1o5lis3trop1o5lesle3g6en2dreeth1y6l1eneor4tho3ni4t",12:"3ra4m5e1triz1e6p3i3neph1"}};Hyphenator.run();
M content/styles/_code.scsscontent/styles/_code.scss

@@ -27,15 +27,16 @@ padding: 1em 0.5em;

vertical-align: top; } -.CodeRay .line_numbers, .CodeRay .no { +.CodeRay .line-numbers, .CodeRay .no { border: 1px solid #ECECEC; margin: 0 inherit; background-color: #ECECEC; color: #AAA; + padding: 0px 7px; text-align: right; } -.CodeRay .line_numbers tt { font-weight: bold } -.CodeRay .line_numbers .highlighted { color: red } +.CodeRay .line-numbers tt { font-weight: bold } +.CodeRay .line-numbers .highlighted { color: red } .CodeRay .line { display: block; float: left; width: 100%; } .CodeRay .no { padding: 0px 4px } .CodeRay .code { width: 100% }

@@ -47,101 +48,99 @@ .CodeRay .code pre { overflow: auto }

.CodeRay .debug { color:white ! important; background:blue ! important; } -.CodeRay .af { color:#00C } -.CodeRay .an { color:#007 } -.CodeRay .at { color:#f08 } -.CodeRay .av { color:#700 } -.CodeRay .aw { color:#C00 } -.CodeRay .bi { color:#509; font-weight:bold } -.CodeRay .c { color:#998; font-style: italic;} +.CodeRay .attribute-name-fat { color:#00C } +.CodeRay .attribute-name { color:#007 } +.CodeRay .annotation { color:#f08 } +.CodeRay .attribute-value { color:#700 } +.CodeRay .attribute-value-fat { color:#C00 } +.CodeRay .binary { color:#509; font-weight:bold } +.CodeRay .comment { color:#998; font-style: italic;} -.CodeRay .ch { color:#04D } -.CodeRay .ch .k { color:#04D } -.CodeRay .ch .dl { color:#039 } +.CodeRay .char { color:#04D } +.CodeRay .ch .content { color:#04D } +.CodeRay .ch .delimiter { color:#039 } -.CodeRay .cl { color:#458; font-weight:bold } -.CodeRay .cm { color:#A08; font-weight:bold } -.CodeRay .co { color:teal; } -.CodeRay .cr { color:#0A0 } -.CodeRay .cv { color:#369 } -.CodeRay .de { color:#B0B; } -.CodeRay .df { color:#099; font-weight:bold } -.CodeRay .di { color:#088; font-weight:bold } -.CodeRay .dl { color:black } -.CodeRay .do { color:#970 } -.CodeRay .dt { color:#34b } -.CodeRay .ds { color:#D42; font-weight:bold } -.CodeRay .e { color:#666; font-weight:bold } -.CodeRay .en { color:#800; font-weight:bold } -.CodeRay .er { color:#F00; background-color:#FAA } -.CodeRay .ex { color:#C00; font-weight:bold } -.CodeRay .fl { color:#099; } -.CodeRay .fu { color:#900; font-weight:bold } -.CodeRay .gv { color:teal; font-weight:bold } -.CodeRay .hx { color:#058; font-weight:bold } -.CodeRay .i { color:#099; } -.CodeRay .ic { color:#B44; font-weight:bold } +.CodeRay .class { color:#458; font-weight:bold } +.CodeRay .complex { color:#A08; font-weight:bold } +.CodeRay .constant { color:teal; } +.CodeRay .color { color:#0A0 } +.CodeRay .class-variable { color:#369 } +.CodeRay .decorator { color:#B0B; } +.CodeRay .definition { color:#099; font-weight:bold } +.CodeRay .directive { color:#088; font-weight:bold } +.CodeRay .delimiter { color:black } +.CodeRay .doc { color:#970 } +.CodeRay .doc-type { color:#34b } +.CodeRay .doc-string { color:#D42; font-weight:bold } +.CodeRay .escape { color:#666; font-weight:bold } +.CodeRay .entity { color:#800; font-weight:bold } +.CodeRay .error { color:#F00; background-color:#FAA } +.CodeRay .exception { color:#C00; font-weight:bold } +.CodeRay .float { color:#099; } +.CodeRay .function { color:#900; font-weight:bold } +.CodeRay .global-variable { color:teal; font-weight:bold } +.CodeRay .hex { color:#058; font-weight:bold } +.CodeRay .imaginary { color:#099; } +.CodeRay .include { color:#B44; font-weight:bold } -.CodeRay .il { color: black } -.CodeRay .il .il { background: #ccc } -.CodeRay .il .il .il { background: #bbb } -.CodeRay .il .idl { color: #D14; } -.CodeRay .idl { color: #D14; } +.CodeRay .inline { color: black } +.CodeRay .inline .inline { background: #ccc } +.CodeRay .inline .inline .inline { background: #bbb } +.CodeRay .inline .inline-delimiter { color: #D14; } +.CodeRay .inline-delimiter { color: #D14; } -.CodeRay .im { color:#f00; } -.CodeRay .in { color:#B2B; font-weight:bold } -.CodeRay .iv { color:teal } -.CodeRay .la { color:#970; font-weight:bold } -.CodeRay .lv { color:#963 } -.CodeRay .oc { color:#40E; font-weight:bold } -.CodeRay .of { color:#000; font-weight:bold } -.CodeRay .op { } -.CodeRay .pc { font-weight:bold } -.CodeRay .pd { color:#369; font-weight:bold } -.CodeRay .pp { color:#579; } -.CodeRay .ps { color:#00C; font-weight:bold } -.CodeRay .pt { color:#074; font-weight:bold } -.CodeRay .r, .kw { color:#000; font-weight:bold } +.CodeRay .imaginary { color:#f00; } +.CodeRay .include { color:#B2B; font-weight:bold } +.CodeRay .instance-variable { color:teal } +.CodeRay .label { color:#970; font-weight:bold } +.CodeRay .local-variable { color:#963 } +.CodeRay .octal { color:#40E; font-weight:bold } +.CodeRay .operator-fat { color:#000; font-weight:bold } +.CodeRay .operator { } +.CodeRay .predefined-constant { font-weight:bold } +.CodeRay .predefined { color:#369; font-weight:bold } +.CodeRay .preprocessor { color:#579; } +.CodeRay .pseudo-class { color:#00C; font-weight:bold } +.CodeRay .predefined-type { color:#074; font-weight:bold } +.CodeRay .reserved, .keyword { color:#000; font-weight:bold } -.CodeRay .ke { color: #808; } -.CodeRay .ke .dl { color: #606; } -.CodeRay .ke .ch { color: #80f; } -.CodeRay .vl { color: #088; } +.CodeRay .key { color: #808; } +.CodeRay .key .delimiter { color: #606; } +.CodeRay .key .char { color: #80f; } +.CodeRay .value { color: #088; } -.CodeRay .rx { background-color:#fff0ff } -.CodeRay .rx .k { color:#808 } -.CodeRay .rx .dl { color:#404 } -.CodeRay .rx .mod { color:#C2C } -.CodeRay .rx .fu { color:#404; font-weight: bold } +.CodeRay .regexp { background-color:#fff0ff } +.CodeRay .regexp .content { color:#808 } +.CodeRay .regexp .delimiter { color:#404 } +.CodeRay .regexp .modifier { color:#C2C } +.CodeRay .regexp .function { color:#404; font-weight: bold } -.CodeRay .s { color: #D20; } -.CodeRay .s .s { } -.CodeRay .s .s .s { background-color:#ffd0d0 } -.CodeRay .s .k { color: #D14; } -.CodeRay .s .ch { color: #D14; } -.CodeRay .s .dl { color: #D14; } +.CodeRay .string { color: #D20; } +.CodeRay .string .content { color: #D14; } +.CodeRay .string .char { color: #D14; } +.CodeRay .string .delimiter { color: #D14; } -.CodeRay .sh { color:#D14 } -.CodeRay .sh .k { } -.CodeRay .sh .dl { color:#D14 } +.CodeRay .shell { color:#D14 } +.CodeRay .shell .content { } +.CodeRay .shell .delimiter { color:#D14 } -.CodeRay .sy { color:#990073 } -.CodeRay .sy .k { color:#A60 } -.CodeRay .sy .dl { color:#630 } +.CodeRay .symbol { color:#990073 } +.CodeRay .symbol .content { color:#A60 } +.CodeRay .symbol .delimiter { color:#630 } -.CodeRay .ta { color:#070 } -.CodeRay .tf { color:#070; font-weight:bold } -.CodeRay .ts { color:#D70; font-weight:bold } -.CodeRay .ty { color:#339; font-weight:bold } -.CodeRay .v { color:#036 } -.CodeRay .xt { color:#444 } +.CodeRay .tag { color:#070 } +.CodeRay .tag-fat { color:#070; font-weight:bold } +.CodeRay .tag-special { color:#D70; font-weight:bold } +.CodeRay .type { color:#339; font-weight:bold } +.CodeRay .variable { color:#036 } +.CodeRay .xml-text { color:#444 } -.CodeRay .ins { background: #afa; } -.CodeRay .del { background: #faa; } -.CodeRay .chg { color: #aaf; background: #007; } +.CodeRay .insert { background: #afa; } +.CodeRay .delete { background: #faa; } +.CodeRay .change { color: #aaf; background: #007; } .CodeRay .head { color: #f8f; background: #505 } -.CodeRay .ins .ins { color: #080; font-weight:bold } -.CodeRay .del .del { color: #800; font-weight:bold } -.CodeRay .chg .chg { color: #66f; } +.CodeRay .insert .insert { color: #080; font-weight:bold } +.CodeRay .delete .delete { color: #800; font-weight:bold } +.CodeRay .change .change { color: #66f; } .CodeRay .head .head { color: #f4f; }
M content/styles/_layout.scsscontent/styles/_layout.scss

@@ -3,6 +3,7 @@

body { @include standard-font; background: #000; + background-image: url("../images/textures/dark_leather.png"); } #container {

@@ -11,6 +12,7 @@ margin: 20px auto;

padding: 5px; color: $dark-gray; background: #fff; + background-image: url("../images/textures/handmadepaper.png"); @include border-radius(10px); }
M layouts/default.erblayouts/default.erb

@@ -47,7 +47,7 @@ <script src="/js/head.js" type="text/javascript"></script>

<script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> <script src="/js/sevenup.js" type="text/javascript"></script> <script src="/js/sevenup_black.js" type="text/javascript"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1");</script> <script src="/js/jquery-timeago.js" type="text/javascript"></script> <script src="/js/jquery-easing.js" type="text/javascript"></script> <script src="/js/jquery-fancybox.js" type="text/javascript"></script>
M lib/data.glyphlib/data.glyph

@@ -3,7 +3,6 @@ &:[G|Glyph]

--[-------------------- Macros --------------------------] def:[h3rald.article| article[ - @pubdate[$[document.date]] @head[ style[default.css] style[pagination.css]
M lib/glyph_context.rblib/glyph_context.rb

@@ -1,6 +1,6 @@

class Nanoc3::RuleContext - require 'glyph' + require 'glyph' def glyph_config(item) Glyph['document.intro'] = RedCloth.new("#{item[:intro]}\n\n#{item[:extended_intro]}").to_html

@@ -26,7 +26,8 @@ }

# Write the new raw file using Glyph's file_write method Glyph.file_write f, doc # Now compile the PDF (works if Prince is installed) - Glyph.compile f.to_s + Glyph.debug_mode = true + Glyph.compile f.to_s begin f.unlink Pathname.new(f.to_s.gsub(/\.glyph$/, '.html')).unlink
M tasks/site.raketasks/site.rake

@@ -32,7 +32,6 @@ end

task :tags do site = Nanoc3::Site.new('.') - site.load_data dir = Pathname(Dir.pwd)/'content/tags' tags = {} # Collect tag and page data

@@ -67,7 +66,6 @@ end

task :archives do site = Nanoc3::Site.new('.') - site.load_data dir = Pathname(Dir.pwd)/'content/archives' dir.rmtree if dir.exist? dir.mkpath