all repos — h3rald @ 584dc768555a890c50ae175d619f8e660987cb70

The sources of https://h3rald.com

Regenerated Glyph book.
h3rald h3rald@h3rald.com
Mon, 20 Sep 2010 16:20:21 +0200
commit

584dc768555a890c50ae175d619f8e660987cb70

parent

ebdbcaa44e287bc1f0a6935cfdfae58104be9246

72 files changed, 8667 insertions(+), 10250 deletions(-)

jump to
M content/glyph.textilecontent/glyph.textile

@@ -9,29 +9,25 @@ github: glyph

links: - "Repository": http://www.github.com/h3rald/glyph/ - "Bug Tracking": http://www.github.com/h3rald/glyph/issues -- "Development Wiki": http://wiki.github.com/h3rald/glyph - "Download": http://www.rubygems.org/gems/glyph -- "Book (PDF)": http://github.com/downloads/h3rald/glyph/glyph.pdf -- "Book (Web)": http://www.h3rald.com/glyph/book/ +- "Book": http://www.h3rald.com/glyph/book/ - "Docs": http://rubydoc.info/gems/glyph/ - "User Group": http://groups.google.com/group/glyph-framework status: Active -version: 0.4.0 +version: 0.4.1 ----- <%= render 'project_data', :tag => 'glyph' %> -<div class="section"> +<section class="section"> Glyph is a _Rapid Document Authoring Framework_. With Glyph, creating and maintaining any kind of document becomes as easy as... _programming_. Glyph enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards customization and extensibility. - <br style="clear:both" /> - - <div class="section"> -<h3 id="h_1">Main Features</h3> -<div class="section"> -<h4 id="h_2">Command Line Interface</h4> + <section class="section"> +<header><h1 id="h_1">Main Features</h1></header> +<section class="section"> +<header><h1 id="h_2">Command Line Interface</h1></header> Glyph is 100% command line. Its interface resambles <a href="http://git-scm.com/">Git's</a> for its simplicity and power (thanks to the <a href="http://github.com/davetron5000/gli">gli</a> gem). Here are some example commands: * @glyph init@ -- to initialize a new Glyph project in the current (empty) directory.

@@ -43,10 +39,10 @@ * @glyph compile readme.glyph@ -- to compile a _readme.glyph_ located in the current directory into a single HTML file.

* @glyph outline -l 2@ -- Display the document outline, up to second-level headers. * @glyph stats@ -- Display project statistics. -</div> +</section> - <div class="section"> -<h4 id="h_3">Minimalist Syntax</h4> + <section class="section"> +<header><h1 id="h_3">Minimalist Syntax</h1></header> Glyph syntax rules can be explained using Glyph itself: <div class="code">

@@ -106,10 +102,10 @@ </code>

</pre> </div> -</div> +</section> - <div class="section"> -<h4 id="h_4">Content Reuse</h4> + <section class="section"> +<header><h1 id="h_4">Content Reuse</h1></header> Finding yourself repeating the same sentence over an over? Glyph allows you to create snippets. Within snippets. Within other snippets (and so on, for a long long time...) as long as you don't define a snippet by defining itself, which would be kinda nasty (and Glyph would complain!): <div class="code">

@@ -134,42 +130,42 @@ </pre>

</div> If yourself dreaming about _parametric_ snippets, just create your own macros (see the <a href="http://github.com/h3rald/glyph/blob/master/book/text/changelog.glyph">source</a> of Glyph's changelog, just to have an idea). -</div> - <div class="section"> -<h4 id="h_5">Automation of Common Tasks</h4> +</section> + <section class="section"> +<header><h1 id="h_5">Automation of Common Tasks</h1></header> If you're writing a book, you shouldn't have to worry about pagination, headers, footers, table of contents, section numbering or similar. Glyph understands you, and will take care of everything for you (with a little help from CSS3, sometimes). -</div> - <div class="section"> -<h4 id="h_6">Reference Validation</h4> +</section> + <section class="section"> +<header><h1 id="h_6">Reference Validation</h1></header> Feel free to add plenty of links, snippets, bookmarks, ... if Glyph doesn't find something, it will definitely complain. Broken references are a thing on the past, and you don't need to worry about it. -</div> - <div class="section"> -<h4 id="h_7">Extreme Extensibility</h4> +</section> + <section class="section"> +<header><h1 id="h_7">Extreme Extensibility</h1></header> * You miss a <code>!!!</code> macro to format really, _really_ important things? Create it. In under 3 seconds, in Ruby or Glyph itself. And yes, you can use special characters, too. * You want your own, very special special @glyph create --everything@ command to create all _you_ need in a Glyph project? You can do it. Using your own Rake tasks, too. * You want Glyph to output ODF files? You can do it, and you'll be able to run @glyph generate -f odf@. This would probably require a little more time, but it's trivial, from a technical point of view. -</div> - <div class="section"> -<h4 id="h_8">Convention over Configuration</h4> +</section> + <section class="section"> +<header><h1 id="h_8">Convention over Configuration</h1></header> Put your text files in @/text@, your images in @/images@, add custom macros in a @macro@ folder within your @/lib@ folder... you get the picture: Glyph has its special places. Nonetheless, you also have 1 (_one_) configuration file to customize to your heart's content (with smart defaults). -</div> - <div class="section"> -<h4 id="h_9">Free and Open Source</h4> +</section> + <section class="section"> +<header><h1 id="h_9">Free and Open Source</h1></header> Glyph is 100% Open Source Software, developed using the Ruby Programming Language and licensed under the very permissive terms of the <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>. If you have Ruby installed, just run @gem install glyph@. That's all it takes. -</div> +</section> -</div> - <div class="section"> -<h3 id="h_10">Resources</h3> +</section> + <section class="section"> +<header><h1 id="h_10">Resources</h1></header> * Home Page: <a href="http://www.h3rald.com/glyph/">http://www.h3rald.com/glyph/</a> * Repository: <a href="http://www.github.com/h3rald/glyph/">http://www.github.com/h3rald/glyph/</a> * Bug Tracking: <a href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a>

@@ -180,8 +176,8 @@ * Book (Web): <a href="http://www.h3rald.com/glyph/book/">http://www.h3rald.com/glyph/book/</a>

* Reference Documentation: <a href="http://rubydoc.info/gems/glyph/">http://rubydoc.info/gems/glyph/</a> * User Group: <a href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a> -</div> +</section> -</div> +</section> <%= render 'project_updates', :tag => 'glyph' %>
M content/glyph/book/acknowledgements.htmlcontent/glyph/book/acknowledgements.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Acknowledgements</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Acknowledgements</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>Acknowledgements</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Acknowledgements</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/license.html">License &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/create_project.html">&rarr; Creating your first Glyph Project</a></div> + <nav><a href="/glyph/book/license.html">License &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/create_project.html">&rarr; Creating your first Glyph Project</a></nav> <p>Glyph was designed and developed by <a href="http://www.h3rald.com">Fabio Cevasco</a> (h3rald).</p> <p>Special thanks to the following individuals who contributed to Glyph by reporting and fixing issues and/or proposing and implementing new features:</p> <ul>

@@ -68,86 +69,64 @@ <li><a href="http://balcone.eveel.ru">Dmitry A. Ustalov</a> (eveel)</li>

<li><a href="http://www.stuartellis.eu">Stuart Ellis</a> (stuartellis)</li> </ul> - <div class="navigation"><a href="/glyph/book/license.html">License &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/create_project.html">&rarr; Creating your first Glyph Project</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_2.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/license.html">License &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/create_project.html">&rarr; Creating your first Glyph Project</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/changelog.htmlcontent/glyph/book/changelog.html

@@ -1,73 +1,95 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Changelog</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Changelog</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Changelog</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Changelog</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/config/output.html">output.* &larr;</a><a href="/glyph/book/index.html">Contents</a></div> + <nav><a href="/glyph/book/config/output.html">output.* &larr;</a><a href="/glyph/book/index.html">Contents</a></nav> - <div class="section"> -<h3 id="h_231">v0.4.0 &ndash; September 3th 2010</h3> -<div class="section"> -<h4 id="h_232">13 Features Implemented</h4> + <section class="section"> +<header><h1 id="h_231">v0.4.1 &ndash; September 25th 2010</h1></header> +<section class="section"> +<header><h1 id="h_232">3 Bugs Fixed</h1></header> +<table><tr><th>ID</th> + <th>Description</th></tr> + + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/169">#169</a></td> + <td><p>*.scss files are now supported by the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/170">#170</a></td> + <td><p>Improved default CodeRay stylesheet.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/171">#171</a></td> + <td><p><span class="caps">SCSS</span> now used internally by Glyph to generate default <span class="caps">CSS</span> files.</p></td></tr></table> + +</section> + +</section> + + <section class="section"> +<header><h1 id="h_233">v0.4.0 &ndash; September 3th 2010</h1></header> +<section class="section"> +<header><h1 id="h_234">13 Features Implemented</h1></header> <table><tr><th>ID</th> <th>Description</th></tr>

@@ -111,11 +133,11 @@

<tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/148">#148</a></td> <td><p>It is now possible to create custom tasks and commands to extend Glyph functionality.</p></td></tr></table> -</div> +</section> - <div class="section"> -<h4 id="h_233">7 Bugs Fixed</h4> + <section class="section"> +<header><h1 id="h_235">7 Bugs Fixed</h1></header> <table><tr><th>ID</th> <th>Description</th></tr>

@@ -141,14 +163,14 @@

<tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/167">#167</a></td> <td><p>Fixed <span class="caps">PDF</span> book download links.</p></td></tr></table> -</div> +</section> -</div> +</section> - <div class="section"> -<h3 id="h_234">v0.3.0 &ndash; June 13th 2010</h3> -<div class="section"> -<h4 id="h_235">13 Features Implemented</h4> + <section class="section"> +<header><h1 id="h_236">v0.3.0 &ndash; June 13th 2010</h1></header> +<section class="section"> +<header><h1 id="h_237">13 Features Implemented</h1></header> <table><tr><th>ID</th> <th>Description</th></tr>

@@ -192,11 +214,11 @@

<tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/130">#130</a></td> <td><p>A new &#8220;safe mode&#8221; has been implemented to explicitly forbid certain potentially unsafe macros.</p></td></tr></table> -</div> +</section> - <div class="section"> -<h4 id="h_236">3 Bugs Fixed</h4> + <section class="section"> +<header><h1 id="h_238">3 Bugs Fixed</h1></header> <table><tr><th>ID</th> <th>Description</th></tr>

@@ -210,14 +232,14 @@

<tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/125">#125</a></td> <td><p>Warning messages have been streamlined.</p></td></tr></table> -</div> +</section> -</div> +</section> - <div class="section"> -<h3 id="h_237">v0.2.0 &ndash; May 9th 2010</h3> -<div class="section"> -<h4 id="h_238">11 Features Implemented</h4> + <section class="section"> +<header><h1 id="h_239">v0.2.0 &ndash; May 9th 2010</h1></header> +<section class="section"> +<header><h1 id="h_240">11 Features Implemented</h1></header> <table><tr><th>ID</th> <th>Description</th></tr>

@@ -255,11 +277,11 @@

<tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/108">#108</a></td> <td><p>It is now possible to define Glyph macros within Glyph source files using the <a href="/glyph/book/macros/macros_core.html#m_macro_"><code>macro:</code></a> macro.</p></td></tr></table> -</div> +</section> - <div class="section"> -<h4 id="h_239">8 Bugs Fixed</h4> + <section class="section"> +<header><h1 id="h_241">8 Bugs Fixed</h1></header> <table><tr><th>ID</th> <th>Description</th></tr>

@@ -288,95 +310,73 @@

<tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/107">#107</a></td> <td><p>Added the possibility to encode (using the <code>encode</code> macro) and decode (using the <code>decode</code> macro) macros so that they can be interpreted later.</p></td></tr></table> -</div> +</section> -</div> +</section> - <div class="section"> -<h3 id="h_240">v0.1.0 &ndash; April 8th 2010</h3> + <section class="section"> +<header><h1 id="h_242">v0.1.0 &ndash; April 8th 2010</h1></header> Initial release. -</div> - <div class="navigation"><a href="/glyph/book/config/output.html">output.* &larr;</a><a href="/glyph/book/index.html">Contents</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_57.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/config/output.html">output.* &larr;</a><a href="/glyph/book/index.html">Contents</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/compiling/compiling.htmlcontent/glyph/book/compiling/compiling.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Compiling a project</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Compiling a project</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>Compiling a project</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Compiling a project</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/text_editing/conditionals.html">Conditional Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/lite_mode.html">&rarr; Compiling single Glyph files</a></div> + <nav><a href="/glyph/book/text_editing/conditionals.html">Conditional Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/lite_mode.html">&rarr; Compiling single Glyph files</a></nav> <p>By default, a Glyph project can be &#8220;compiled&#8221; into an <span class="caps">HTML</span> document. Additionally, Glyph can also be used to produce documents in the following formats:</p> <ul> <li>HTML5</li>

@@ -66,8 +67,8 @@ <li><span class="caps">PDF</span> (generated from <span class="caps">HTML</span> using a third-party generator like <a href="http://www.princexml.com/">Prince</a> or <a href="http://code.google.com/p/wkhtmltopdf/">wkhtmltopdf</a>)</li>

<li>Web (i.e. multiple <span class="caps">HTML</span> files)</li> <li>Web5 (i.e. multiple HTML5 files)</li> </ul> -<div class="section"> -<h4 id="h_41">HTML/HTML5 output</h4> +<section class="section"> +<header><h1 id="h_41">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>

@@ -75,9 +76,9 @@ <p>

<code>glyph compile -f html5</code> </p> -</div> -<div class="section"> -<h4 id="h_42">PDF Output</h4> +</section> +<section class="section"> +<header><h1 id="h_42">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>

@@ -89,18 +90,18 @@ <li><a href="http://www.princexml.com/">Prince</a> (version 7.0 or higher) &#8212; a commercial generator that can be used freely for personal use. Prince produces high-quality <span class="caps">PDF</span> files and implement most of the new features introduced in CSS3, used heavily in Glyph&#8217;s <a href="/glyph/book/text_editing/stylesheets.html#default_stylesheets"><code>pagination.css</code></a> default stylesheet.</li>

<li><a href="http://code.google.com/p/wkhtmltopdf/">wkhtmltopdf</a> (version 1.0 beta4 or higher) &#8212; an open source generator that uses the WebKit rendering engine to transform <span class="caps">HTML</span> files into <span class="caps">PDF</span>. Although not as advanced as Prince, it produces very satisfactory results.</li> </ul> <p>By default, Glyph attempts to use wkhtmltopdf. To change this, set the <a href="/glyph/book/config/output.html#s_output_pdf_generator"><code>output_pdf_generator</code></a> setting to <code>prince</code>.</p> - <div class="note"> + <aside class="note"> <span class="note-title">Note</span>Glyph expects PDF generators to be installed on the local machine and callable via command line using the <code>wkhtmltopdf</code> or the <code>prince</code> commands. Just install them as you would with any other program, depending on your operating system (yes, they both offer Windows installers). -</div> - <div class="tip"> +</aside> + <aside class="tip"> <span class="note-title">Tip</span>Glyph's default CSS file use the free <em>Gentium</em> font for all text. You can download it from <a href="http://www.sil.org/~gaultney/gentium/">here</a>. -</div> +</aside> -</div> -<div class="section"> -<h4 id="web_output">Web/Web5 Output</h4> +</section> +<section class="section"> +<header><h1 id="web_output">Web/Web5 Output</h1></header> <p>To generate a Web or Web5 output, specify <code>web</code> or <code>web5</code> as format. These two output formats behave different way from the others, and require that your project uses <a href="/glyph/book/text_editing/topics.html#topics">topics</a> and <a href="/glyph/book/extending/layouts.html#layouts">layouts</a>.</p> <p>Basically, here&#8217;s what happens when you compile your project in web or web5 format:</p> <ol>

@@ -109,96 +110,74 @@ <li>Separate topic files are generated according to the <code>@src</code> attributes of your sections</li>

<li>The <code>document.glyph</code> (or whatever file you&#8217;re using as document source) is <em>not</em> rendered. Instead, an <code>index.html</code> file will be created in the output folder based on the contents of your <a href="/glyph/book/extending/layouts.html#index_layout">index layout</a>.</li> </ol> -</div> -<div class="section"> -<h4 id="auto_regeneration">Auto Regeneration</h4> +</section> +<section class="section"> +<header><h1 id="auto_regeneration">Auto Regeneration</h1></header> <p>You can also call the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command with a <code>--auto</code> switch. If you do so, your project will be recompiled automatically every time any source file is changed.</p> - <div class="note"> + <aside class="note"> <span class="note-title">Note</span>Auto regeneration requires the <a href="http://rubygems.org/gems/directory_watcher">directory_watcher</a> gem to be installed. -</div> +</aside> -</div> - <div class="navigation"><a href="/glyph/book/text_editing/conditionals.html">Conditional Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/lite_mode.html">&rarr; Compiling single Glyph files</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/compile.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/text_editing/conditionals.html">Conditional Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/lite_mode.html">&rarr; Compiling single Glyph files</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/compiling/lite_mode.htmlcontent/glyph/book/compiling/lite_mode.html

@@ -1,72 +1,73 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Compiling single Glyph files</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Compiling single Glyph files</title> + - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> - <h2>Compiling single Glyph files</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/compiling/compiling.html">Compiling a project &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/programmatic_usage.html">&rarr; Using Glyph programmatically</a></div> + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Compiling single Glyph files</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/compiling/compiling.html">Compiling a project &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/programmatic_usage.html">&rarr; Using Glyph programmatically</a></nav> <p>Glyph's primary goal is to author complex documents like books or manuals. In order to do so, a Glyph project is required to keep everything organized and automated via a set of predefined conventions, exactly like Ruby on Rails or other similar frameworks do.</p> <p>If you want to write a one-page article or a short draft, however, creating and managing Glyph projects can be an unnecessary burden. Luckily, you don't have to: you can use Glyph to compile single files containing Glyph code, by adding one parameter (or two if you want to specify a custom destination file) to the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command, like this:</p> <p> <code>glyph compile source.glyph destination.htm</code> </p> <p>This command will process a file called <code>source.glyph</code> and produce an HTML file called <code>destination.htm</code>.</p> - <div class="section"> -<h4 id="lite_limitations">Limitations</h4> + <section class="section"> +<header><h1 id="lite_limitations">Limitations</h1></header> <p>This sort of &#8220;lite&#8221; mode comes with a few minor limitations:</p> <ul> <li>Snippets can only be defined inside the source file, using the <a href="/glyph/book/macros/macros_core.html#m_snippet_"><code>snippet:</code></a> macro.</li>

@@ -77,87 +78,65 @@ <li>Stylesheets must be referenced with their absolute path, or a path relative to the current directory, or the name of an existing Glyph <a href="/glyph/book/text_editing/stylesheets.html#default_stylesheets">system stylesheet</a>.</li>

<li>The files included through the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro must be referenced with their absolute path, or a path relative to the current directory.</li> </ul> -</div> - <div class="navigation"><a href="/glyph/book/compiling/compiling.html">Compiling a project &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/programmatic_usage.html">&rarr; Using Glyph programmatically</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/lite_mode.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/compiling/compiling.html">Compiling a project &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/programmatic_usage.html">&rarr; Using Glyph programmatically</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/compiling/programmatic_usage.htmlcontent/glyph/book/compiling/programmatic_usage.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Using Glyph programmatically</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Using Glyph programmatically</title> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + - <h2>Using Glyph programmatically</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/compiling/lite_mode.html">Compiling single Glyph files &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/stats.html">&rarr; Using the stats command</a></div> + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Using Glyph programmatically</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/compiling/lite_mode.html">Compiling single Glyph files &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/stats.html">&rarr; Using the stats command</a></nav> <p>Besides using Glyph from the command line, you can also use it straight from your code. Glyph&#8217;s public <a href="http://yardoc.org/docs/glyph/Glyph"><span class="caps">API</span></a> is simple and can be used to:</p> <ul> <li>Retrieve and update configuration settings (using <code>Glyph[]</code> and <code>Glyph[]=</code>)</li>

@@ -66,16 +67,16 @@ <li>Filter text to <span class="caps">HTML</span> (using <code>Glyph#filter</code>)</li>

<li>Compile Glyph source files into <span class="caps">HTML</span> or <span class="caps">PDF</span> files (using <code>Glyph#compile</code>)</li> </ul> <p>That&#8217;s pretty much it. Of course, both the <code>filter</code> and <code>compile</code> method cause Glyph to run in <a href="/glyph/book/compiling/lite_mode.html#lite_mode"><em>lite</em> mode</a>, so the same <a href="/glyph/book/compiling/lite_mode.html#lite_limitations">limitations</a> apply.</p> - <div class="tip"> + <aside class="tip"> <span class="note-title">Tip</span><p>For an example on how to use Glyph programmatically (specifically in conjunction with the <a href="http://nanoc.stoneship.org/">nanoc</a> static site generator), see <a href="http://github.com/h3rald/h3rald">h3rald.com source code</a>, in particular:</p> <ul> <li><a href="http://github.com/h3rald/h3rald/blob/master/lib/glyph_filter.rb">lib/glyph_filter.rb</a> &#8212; using the <code>Glyph#filter</code> method.</li> <li><a href="http://github.com/h3rald/h3rald/blob/master/Rules">Rules</a> &#8212; using the <code>Glyph#compile</code> method to generate <span class="caps">PDF</span> files.</li> </ul> -</div> - <div class="section"> -<h4 id="modes">Modes</h4> +</aside> + <section class="section"> +<header><h1 id="modes">Modes</h1></header> <p>It is possible to specify some flags (or "modes") to make Glyph behave slightly different than normal, as shown in the following table (by default, none of these is used).</p> <table><tr><th>Name</th> <th>Writer Method</th>

@@ -133,87 +134,65 @@ <li><a href="/glyph/book/macros/macros_core.html#m_rewrite_"><code>rewrite:</code></a> macro</li>

<li><a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> macro</li> </ul></td></tr></table> -</div> - <div class="navigation"><a href="/glyph/book/compiling/lite_mode.html">Compiling single Glyph files &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/stats.html">&rarr; Using the stats command</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_24.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/compiling/lite_mode.html">Compiling single Glyph files &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/stats.html">&rarr; Using the stats command</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/config/document.htmlcontent/glyph/book/config/document.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - document.*</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - document.*</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>document.*</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>document.*</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/macros/macros_structure.html">Structure Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/filters.html">&rarr; filters.*</a></div> + <nav><a href="/glyph/book/macros/macros_structure.html">Structure Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/filters.html">&rarr; filters.*</a></nav> The following configuration settings are related to the current Glyph document. Therefore, you should update them right after creating a project. <table><tr><th>Name</th>

@@ -121,86 +122,64 @@ <code>document.title</code> <a id="s_document_title"></a>

</td> <td><p>The title of the document, displayed using the <a href="/glyph/book/macros/macros_block.html#m_title"><code>title</code></a> macro.</p></td> <td><code>""</code></td></tr></table> - <div class="navigation"><a href="/glyph/book/macros/macros_structure.html">Structure Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/filters.html">&rarr; filters.*</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/cfg_document.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/macros/macros_structure.html">Structure Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/filters.html">&rarr; filters.*</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/config/filters.htmlcontent/glyph/book/config/filters.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - filters.*</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - filters.*</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>filters.*</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>filters.*</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/config/document.html">document.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/options.html">&rarr; options.*</a></div> + <nav><a href="/glyph/book/config/document.html">document.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/options.html">&rarr; options.*</a></nav> These settings are used to configure some special options related to output filters and highlighters. <table><tr><th>Name</th>

@@ -101,86 +102,64 @@ <code>filters.ultraviolet.theme</code> <a id="s_filters_ultraviolet_theme"></a>

</td> <td><p>The theme used by the <a href="http://ultraviolet.rubyforge.org/">Ultraviolet</a> highlighter.</p></td> <td><code>"lazy"</code></td></tr></table> - <div class="navigation"><a href="/glyph/book/config/document.html">document.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/options.html">&rarr; options.*</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/cfg_filters.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/config/document.html">document.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/options.html">&rarr; options.*</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/config/options.htmlcontent/glyph/book/config/options.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - options.*</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - options.*</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>options.*</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>options.*</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/config/filters.html">filters.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/output.html">&rarr; output.*</a></div> + <nav><a href="/glyph/book/config/filters.html">filters.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/output.html">&rarr; output.*</a></nav> The following configuration settings are used to enable or disable specific Glyph functionalities and behaviors. <table><tr><th>Name</th>

@@ -67,7 +68,7 @@ <th>Default</th></tr>

<tr><td> <code>options.filters_by_file_extension</code> <a id="s_options_filters_by_file_extension"></a> </td> - <td><p>If set to <code>true</code>, a filter macro is applied to included files, based on their extensions (<span class="fmi">for more information on including files, see <a href="/glyph/book/text_editing/inclusions.html#incl">Including Files and Snippets</a></span>).</p></td> + <td><p>If set to <code>true</code>, a filter macro is applied to included files, based on their extensions (<span class="fmi">for more information on <mark>including files</mark>, see <a href="/glyph/book/text_editing/inclusions.html#incl">Including Files and Snippets</a></span>).</p></td> <td><code>nil</code></td></tr> <tr><td> <code>options.macro_set</code> <a id="s_options_macro_set"></a>

@@ -82,7 +83,7 @@ <td><code>"glyph"</code></td></tr>

<tr><td> <code>options.safe_mode</code> <a id="s_options_safe_mode"></a> </td> - <td><p>Enables Safe Mode (<span class="fmi">for more information on Glyph modes, see <a href="/glyph/book/compiling/programmatic_usage.html#modes">Modes</a></span>).</p></td> + <td><p>Enables Safe Mode (<span class="fmi">for more information on <mark>Glyph modes</mark>, see <a href="/glyph/book/compiling/programmatic_usage.html#modes">Modes</a></span>).</p></td> <td><code>false</code></td></tr> <tr><td> <code>options.url_validation</code> <a id="s_options_url_validation"></a>

@@ -99,86 +100,64 @@ <code>options.xml_fallback</code> <a id="s_options_xml_fallback"></a>

</td> <td><p>If set to true, any unknown macro name will considered an <span class="caps">XML</span> element (see <a href="/glyph/book/document.html#other_elements">Other <span class="caps">HTML</span> Elements</a>).</p></td> <td><code>true</code></td></tr></table> - <div class="navigation"><a href="/glyph/book/config/filters.html">filters.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/output.html">&rarr; output.*</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/cfg_options.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/config/filters.html">filters.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/output.html">&rarr; output.*</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/config/output.htmlcontent/glyph/book/config/output.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - output.*</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - output.*</title> + - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> - <h2>output.*</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/config/options.html">options.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/changelog.html">&rarr; Changelog</a></div> + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>output.*</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/config/options.html">options.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/changelog.html">&rarr; Changelog</a></nav>

@@ -70,8 +71,8 @@

These settings are used to configure output-specific options. -<div class="section"> -<h4 id="h_225">output.pdf.*</h4> +<section class="section"> +<header><h1 id="h_225">output.pdf.*</h1></header> <table><tr><th>Name</th> <th>Description</th> <th>Default</th></tr>

@@ -101,9 +102,9 @@ </td>

<td><p>If set to <em>true_, the document will be rendered in multiple files, according to the specified </em>editing/topics.html#topics&quot;&gt;topics</a>.</p></td> <td><code>false</code></td></tr></table> -</div> -<div class="section"> -<h4 id="h_226">output.html.*</h4> +</section> +<section class="section"> +<header><h1 id="h_226">output.html.*</h1></header> <table><tr><th>Name</th> <th>Description</th> <th>Default</th></tr>

@@ -128,9 +129,9 @@ </td>

<td><p>If set to <em>true_, the document will be rendered in multiple files, according to the specified </em>editing/topics.html#topics&quot;&gt;topics</a>.</p></td> <td><code>false</code></td></tr></table> -</div> -<div class="section"> -<h4 id="h_227">output.html5.*</h4> +</section> +<section class="section"> +<header><h1 id="h_227">output.html5.*</h1></header> <table><tr><th>Name</th> <th>Description</th> <th>Default</th></tr>

@@ -155,9 +156,9 @@ </td>

<td><p>If set to <em>true_, the document will be rendered in multiple files, according to the specified </em>editing/topics.html#topics&quot;&gt;topics</a>.</p></td> <td><code>false</code></td></tr></table> -</div> -<div class="section"> -<h4 id="h_228">output.web.*</h4> +</section> +<section class="section"> +<header><h1 id="h_228">output.web.*</h1></header> <table><tr><th>Name</th> <th>Description</th> <th>Default</th></tr>

@@ -202,9 +203,9 @@ </td>

<td><p>If set to <em>true_, the document will be rendered in multiple files, according to the specified </em>editing/topics.html#topics&quot;&gt;topics</a>.</p></td> <td><code>true</code></td></tr></table> -</div> -<div class="section"> -<h4 id="h_229">output.web5.*</h4> +</section> +<section class="section"> +<header><h1 id="h_229">output.web5.*</h1></header> <table><tr><th>Name</th> <th>Description</th> <th>Default</th></tr>

@@ -249,87 +250,65 @@ </td>

<td><p>If set to <em>true_, the document will be rendered in multiple files, according to the specified </em>editing/topics.html#topics&quot;&gt;topics</a>.</p></td> <td><code>true</code></td></tr></table> -</div> - <div class="navigation"><a href="/glyph/book/config/options.html">options.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/changelog.html">&rarr; Changelog</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/cfg_output.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/config/options.html">options.* &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/changelog.html">&rarr; Changelog</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/bookmarks_headers.htmlcontent/glyph/book/extending/bookmarks_headers.html

@@ -1,155 +1,136 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Bookmarks and Headers</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Bookmarks and Headers</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Bookmarks and Headers</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Bookmarks and Headers</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/params_attrs.html">Parameters and Attributes &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/placeholders.html">&rarr; Using Placeholders</a></div> + <nav><a href="/glyph/book/extending/params_attrs.html">Parameters and Attributes &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/placeholders.html">&rarr; Using Placeholders</a></nav> <p>The <a href="http://yardoc.org/docs/h3rald-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> - <pre class="lazy"><span class="line-numbers"> 1 </span> macro <span class="Constant"><span class="Constant">:</span>anchor</span> <span class="Keyword">do </span> -<span class="line-numbers"> 2 </span> ident, title <span class="Keyword">=</span> <span class="Variable"><span class="Variable">@</span>params</span> -<span class="line-numbers"> 3 </span> macro_error <span class="String"><span class="String">&quot;</span>Bookmark '<span class="String"><span class="String">#{</span>ident<span class="String">}</span></span>' already exists<span class="String">&quot;</span></span> <span class="Keyword">if</span> bookmark? ident -<span class="line-numbers"> 4 </span> bookmark <span class="Constant"><span class="Constant">:</span>id</span> =&gt; ident, <span class="Constant"><span class="Constant">:</span>title</span> =&gt; title -<span class="line-numbers"> 5 </span> <span class="String"><span class="String">%{</span>&lt;a id=&quot;<span class="String"><span class="String">#{</span>ident<span class="String">}</span></span>&quot;&gt;<span class="String"><span class="String">#{</span>title<span class="String">}</span></span>&lt;/a&gt;<span class="String">}</span></span> -<span class="line-numbers"> 6 </span> <span class="Keyword">end</span> -</pre> + <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> ident, title = <span class="iv">@params</span> +<span class="no">3</span> macro_error <span class="s"><span class="dl">&quot;</span><span class="k">Bookmark '</span><span class="il"><span class="idl">#{</span>ident<span class="idl">}</span></span><span class="k">' already exists</span><span class="dl">&quot;</span></span> <span class="r">if</span> bookmark? ident +<span class="no">4</span> bookmark <span class="sy">:id</span> =&gt; ident, <span class="sy">:title</span> =&gt; title +<span class="no">5</span> <span class="s"><span class="dl">%{</span><span class="k">&lt;a id=&quot;</span><span class="il"><span class="idl">#{</span>ident<span class="idl">}</span></span><span class="k">&quot;&gt;</span><span class="il"><span class="idl">#{</span>title<span class="idl">}</span></span><span class="k">&lt;/a&gt;</span><span class="dl">}</span></span> +<span class="no">6</span> <span class="r">end</span></pre></div> +</div> + <p>The <code>bookmark?</code> method can be used to check the existance of a particular ID within the whole document, while the <code>bookmark</code> method is used to store bookmark IDs and titles. In a similar way, you can use <code>header?</code> and <code>header</code> methods to check the existance of headers within the documents or store new ones.</p> - <div class="navigation"><a href="/glyph/book/extending/params_attrs.html">Parameters and Attributes &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/placeholders.html">&rarr; Using Placeholders</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_33.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/extending/params_attrs.html">Parameters and Attributes &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/placeholders.html">&rarr; Using Placeholders</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/command.htmlcontent/glyph/book/extending/command.html

@@ -1,190 +1,174 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Defining Custom Commands</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Defining Custom Commands</title> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> - <h2>Defining Custom Commands</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/output_format.html">Custom Output Formats &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_generic.html">&rarr; Generic Errors</a></div> + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Defining Custom Commands</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/extending/output_format.html">Custom Output Formats &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_generic.html">&rarr; 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> -<div class="section"> -<h5 id="h_96">Creating a 'glyph generate' command</h5> +<section class="section"> +<header><h1 id="h_96">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> - <pre class="lazy"><span class="line-numbers"> 1 </span> <span class="Variable">GLI</span>.<span class="Entity">desc</span> <span class="String"><span class="String">'</span>Generates a specific file required for Glyph releases<span class="String">'</span></span> -<span class="line-numbers"> 2 </span> arg_name <span class="String"><span class="String">&quot;</span>file_name<span class="String">&quot;</span></span> -<span class="line-numbers"> 3 </span> command <span class="Constant"><span class="Constant">:</span>generate</span> <span class="Keyword">do </span>|<span class="Variable">c</span>| -<span class="line-numbers"> 4 </span> c.<span class="Entity">action</span> <span class="Keyword">do </span>|<span class="Variable">global_options</span>,<span class="Variable">options</span>,<span class="Variable">args</span>| -<span class="line-numbers"> 5 </span> <span class="Keyword">if</span> args.<span class="Entity">blank?</span> <span class="Keyword">then</span> -<span class="line-numbers"> 6 </span> <span class="Keyword">raise</span> <span class="Variable">RuntimeError</span>, <span class="String"><span class="String">&quot;</span>You must specify a file to generate<span class="String">&quot;</span></span> -<span class="line-numbers"> 7 </span> <span class="Keyword">else</span> -<span class="line-numbers"> 8 </span> <span class="Support">Glyph</span>.<span class="Entity">run</span> <span class="String"><span class="String">'</span>custom:generate<span class="String">'</span></span>, args[<span class="Constant">0</span>] -<span class="line-numbers"> 9 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 10 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 11 </span> <span class="Keyword">end</span> -</pre> + <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> + <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> - <pre class="lazy"><span class="line-numbers"> 1 </span> $ glyph help -<span class="line-numbers"> 2 </span> ===================================== -<span class="line-numbers"> 3 </span> Glyph v.0.4.0 -<span class="line-numbers"> 4 </span> ===================================== -<span class="line-numbers"> 5 </span> usage: glyph command [options] -<span class="line-numbers"> 6 </span> -<span class="line-numbers"> 7 </span> Options: -<span class="line-numbers"> 8 </span> -d, --debug - Enable debugging -<span class="line-numbers"> 9 </span> -<span class="line-numbers"> 10 </span> Commands: -<span class="line-numbers"> 11 </span> add - Add a new text file to the project -<span class="line-numbers"> 12 </span> compile - Compile the project -<span class="line-numbers"> 13 </span> config - Get/set configuration settings -<span class="line-numbers"> 14 </span> generate - Generates a specific file required for Glyph releases -<span class="line-numbers"> 15 </span> help - Shows list of commands or help for one command -<span class="line-numbers"> 16 </span> init - Create a new Glyph project -<span class="line-numbers"> 17 </span> outline - Display the document outline -<span class="line-numbers"> 18 </span> stats - Display statistics -<span class="line-numbers"> 19 </span> todo - Display all project TODO items -</pre> - <p>You can now run the Glyph command as expected:</p> - <pre class="lazy"><span class="line-numbers"> 1 </span> $ glyph -d generate changelog -<span class="line-numbers"> 2 </span> -- Generating CHANGELOG... -<span class="line-numbers"> 3 </span> -- Done. -</pre> + <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.4.1 +<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> + <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> - <div class="navigation"><a href="/glyph/book/extending/output_format.html">Custom Output Formats &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_generic.html">&rarr; Generic Errors</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/custom_command.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + +</section> + <nav><a href="/glyph/book/extending/output_format.html">Custom Output Formats &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_generic.html">&rarr; Generic Errors</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/commands_tasks.htmlcontent/glyph/book/extending/commands_tasks.html

@@ -1,72 +1,73 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Defining Custom Commands and Tasks</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Defining Custom Commands and Tasks</title> + - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> - <h2>Defining Custom Commands and Tasks</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/further_reading.html">Further Reading &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/task.html">&rarr; Defining Custom Tasks</a></div> + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Defining Custom Commands and Tasks</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/extending/further_reading.html">Further Reading &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/task.html">&rarr; Defining Custom Tasks</a></nav> <p>In most cases, you can extend Glyph just by creating your own <a href="/glyph/book/extending/macro_def.html#macro_def">custom macros</a>. In some cases though, you may want to further customize Glyph to fit the needs of your project, in terms of creating <a href="/glyph/book/extending/command.html#custom_command">custom commands</a> and <a href="/glyph/book/extending/task.html#custom_task">custom tasks</a>.</p> <p>Glyph&#8217;s modular architecture (and the Ruby language itself) lets you to add <em>arbitrary</em> functionality to its core, simply by creating a few Ruby files and putting them in the right places.</p> -<div class="section"> -<h4 id="cmd_tasks_arch">How Commands and Tasks work</h4> +<section class="section"> +<header><h1 id="cmd_tasks_arch">How Commands and Tasks work</h1></header> <p>Before creating custom Glyph commands and tasks, you should have a basic understanding on how they work, and which commands &#8212; or better, which tasks &#8212; are already available.</p> <p>The following diagram outlines the relationships between commands and tasks:</p> - <div class="figure"><img alt="-" src="/glyph/book/images/glyph/commands_tasks.png" /> - <div class="caption">Glyph default commands and tasks</div></div> + <figure><img alt="-" src="images/glyph/commands_tasks.png" /> + <figcaption>Glyph default commands and tasks</figcaption></figure> <p>As you can see:</p> <ul> <li>All commands call at at least one task.</li>

@@ -77,7 +78,7 @@ <li><code>load:</code> &#8212; used to load all kinds of files.</li>

<li><code>generate:</code> &#8212; used to generate files or copy files from source to output directories</li> </ul></li> </ul> - <div class="box"> + <aside class="box"> <div class="box-title">Example</div> <p>Suppose you want to generate a <span class="caps">PDF</span> file by issuing the <code>glyph compile -f pdf</code> command. Under the hood, Glyph calls the following tasks:</p> <ol>

@@ -94,89 +95,67 @@ <li><code>generate:html</code> &#8212; Generate a standalone <span class="caps">HTML</span> file</li>

<li><code>generate:pdf</code> &#8212; Generate a <span class="caps">PDF</span> file from a standalone <span class="caps">HTML</span> file</li> </ol> -</div> +</aside> -</div> - <div class="navigation"><a href="/glyph/book/extending/further_reading.html">Further Reading &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/task.html">&rarr; Defining Custom Tasks</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_39.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/extending/further_reading.html">Further Reading &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/task.html">&rarr; Defining Custom Tasks</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/further_reading.htmlcontent/glyph/book/extending/further_reading.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Further Reading</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Further Reading</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>Further Reading</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Further Reading</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/layouts.html">Layouts &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/commands_tasks.html">&rarr; Defining Custom Commands and Tasks</a></div> + <nav><a href="/glyph/book/extending/layouts.html">Layouts &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/commands_tasks.html">&rarr; Defining Custom Commands and Tasks</a></nav> <p>For more examples on how to create more complex macros, have a look at the <a href="http://github.com/h3rald/glyph/tree/master/macros/">source code</a> of the existing ones.</p> <p>To gain a deeper understanding on how macros are executed, have a look at the following Glyph classes:</p> <ul>

@@ -68,86 +69,64 @@ <li><a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Interpreter"><code>Glyph::Interpreter</code></a></li>

<li><a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Document"><code>Glyph::Document</code></a></li> <li><a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Macro"><code>Glyph::Macro</code></a></li> </ul> - <div class="navigation"><a href="/glyph/book/extending/layouts.html">Layouts &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/commands_tasks.html">&rarr; Defining Custom Commands and Tasks</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_38.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/extending/layouts.html">Layouts &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/commands_tasks.html">&rarr; Defining Custom Commands and Tasks</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/internals.htmlcontent/glyph/book/extending/internals.html

@@ -1,218 +1,204 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - A quick look at Glyph's internals</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - A quick look at Glyph's internals</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <section id="container"> - <h2>A quick look at Glyph's internals</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/stats/links.html">Link Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/macro_def.html">&rarr; Defining Custom Macros</a></div> + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>A quick look at Glyph's internals</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/stats/links.html">Link Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/macro_def.html">&rarr; Defining Custom Macros</a></nav> <p>If you plan on extending Glyph, knowing how it works inside helps. It is not mandatory by any means, but it definitely helps, especially when creating complex macros.</p> <p>What happens behind the scenes when you call <code>glyph compile</code>? Glyph's code is parsed, analyzed and then translated into text, and here's how:</p> - <div class="figure"><img alt="-" src="/glyph/book/images/glyph/document_generation.png" /> - <div class="caption">A sequence diagram for document generation</div></div> + <figure><img alt="-" src="images/glyph/document_generation.png" /> + <figcaption>A sequence diagram for document generation</figcaption></figure> <p>From the diagram, it is possible to divide the document generation process into three phases:</p> <ul> <li>The <em>Parsing Phase</em> starts when a chunk of Glyph code is passed (by the <code>generate:document</code> Rake task, for example) to a <a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Interpreter"><code>Glyph::Interpreter</code></a>. The interpreter initializes a <a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Parser"><code>Glyph::Parser</code></a> that parses the code and returns an <em>Abstract Syntax Tree</em> (<span class="caps">AST</span>) of <a href="http://yardoc.org/docs/h3rald-glyph/Glyph/SyntaxNode"><code>Glyph::SyntaxNode</code></a> objects.</li> <li>The <em>Analysis Phase</em> (Processing) starts when the interpreter method calls the <code>analyze</code> method, instantiating a new <a href="http://yardoc.org/docs/h3rald-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> - <div class="section"> -<h4 id="h_73">Example: A short note</h4> + <section class="section"> +<header><h1 id="h_73">Example: A short note</h1></header> <p>As an example, consider the following Glyph code:</p> - <pre class="lazy"><span class="line-numbers"> 1 </span> fmi[something|#test] -<span class="line-numbers"> 2 </span> ... -<span class="line-numbers"> 3 </span> section[ -<span class="line-numbers"> 4 </span> @title[Test Section] -<span class="line-numbers"> 5 </span> @id[test] -<span class="line-numbers"> 6 </span> ... -<span class="line-numbers"> 7 </span> ] -</pre> + <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> + <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> - <pre class="lazy"><span class="line-numbers"> 1 </span> {<span class="Constant"><span class="Constant">:</span>name</span>=&gt;<span class="Constant"><span class="Constant">:&quot;</span>--<span class="Constant">&quot;</span></span>} -<span class="line-numbers"> 2 </span> {<span class="Constant"><span class="Constant">:</span>name</span>=&gt;<span class="Constant"><span class="Constant">:</span>fmi</span>, <span class="Constant"><span class="Constant">:</span>escape</span>=&gt;<span class="Constant">false</span>} -<span class="line-numbers"> 3 </span> {<span class="Constant"><span class="Constant">:</span>name</span>=&gt;<span class="Constant"><span class="Constant">:&quot;</span>0<span class="Constant">&quot;</span></span>} -<span class="line-numbers"> 4 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span>something<span class="String">&quot;</span></span>} -<span class="line-numbers"> 5 </span> {<span class="Constant"><span class="Constant">:</span>name</span>=&gt;<span class="Constant"><span class="Constant">:&quot;</span>1<span class="Constant">&quot;</span></span>} -<span class="line-numbers"> 6 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span>#test<span class="String">&quot;</span></span>} -<span class="line-numbers"> 7 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\n</span><span class="String">&quot;</span></span>} -<span class="line-numbers"> 8 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\</span>[<span class="String">&quot;</span></span>, <span class="Constant"><span class="Constant">:</span>escaped</span>=&gt;<span class="Constant">true</span>} -<span class="line-numbers"> 9 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span>...<span class="String">&quot;</span></span>} -<span class="line-numbers"> 10 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\</span>]<span class="String">&quot;</span></span>, <span class="Constant"><span class="Constant">:</span>escaped</span>=&gt;<span class="Constant">true</span>} -<span class="line-numbers"> 11 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\n</span><span class="String">&quot;</span></span>} -<span class="line-numbers"> 12 </span> {<span class="Constant"><span class="Constant">:</span>name</span>=&gt;<span class="Constant"><span class="Constant">:</span>section</span>, <span class="Constant"><span class="Constant">:</span>escape</span>=&gt;<span class="Constant">false</span>} -<span class="line-numbers"> 13 </span> {<span class="Constant"><span class="Constant">:</span>name</span>=&gt;<span class="Constant"><span class="Constant">:&quot;</span>0<span class="Constant">&quot;</span></span>} -<span class="line-numbers"> 14 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\n</span><span class="Constant">\t</span><span class="String">&quot;</span></span>} -<span class="line-numbers"> 15 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\n</span><span class="Constant">\t</span><span class="String">&quot;</span></span>} -<span class="line-numbers"> 16 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\n</span><span class="String">&quot;</span></span>} -<span class="line-numbers"> 17 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\</span>[<span class="String">&quot;</span></span>, <span class="Constant"><span class="Constant">:</span>escaped</span>=&gt;<span class="Constant">true</span>} -<span class="line-numbers"> 18 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span>...<span class="String">&quot;</span></span>} -<span class="line-numbers"> 19 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\</span>]<span class="String">&quot;</span></span>, <span class="Constant"><span class="Constant">:</span>escaped</span>=&gt;<span class="Constant">true</span>} -<span class="line-numbers"> 20 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span><span class="Constant">\n</span><span class="String">&quot;</span></span>} -<span class="line-numbers"> 21 </span> {<span class="Constant"><span class="Constant">:</span>name</span>=&gt;<span class="Constant"><span class="Constant">:</span>title</span>, <span class="Constant"><span class="Constant">:</span>escape</span>=&gt;<span class="Constant">false</span>} -<span class="line-numbers"> 22 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span>Test Section<span class="String">&quot;</span></span>} -<span class="line-numbers"> 23 </span> {<span class="Constant"><span class="Constant">:</span>name</span>=&gt;<span class="Constant"><span class="Constant">:</span>id</span>, <span class="Constant"><span class="Constant">:</span>escape</span>=&gt;<span class="Constant">false</span>} -<span class="line-numbers"> 24 </span> {<span class="Constant"><span class="Constant">:</span>value</span>=&gt;<span class="String"><span class="String">&quot;</span>test<span class="String">&quot;</span></span>} -</pre> + <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> + <p>This output is produced by calling the <code>inspect</code> method on the AST. Each <a href="http://yardoc.org/docs/h3rald-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> - <pre class="lazy"><span class="line-numbers"> 1 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">span</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>fmi<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span>for more information on something, see ‡‡‡‡‡PLACEHOLDER ¤ 1‡‡‡‡‡ -<span class="line-numbers"> 2 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">span</span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 3 </span> [...] -<span class="line-numbers"> 4 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">div</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>section<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 5 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">h2</span> <span class="MetaTag"><span class="MetaTag">id</span><span class="MetaTag">=</span><span class="String"><span class="String">&quot;</span><span class="String">test</span><span class="String">&quot;</span></span></span><span class="MetaTag">&gt;</span></span>Test Section<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">h2</span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 6 </span> [...] -<span class="line-numbers"> 7 </span> -<span class="line-numbers"> 8 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">div</span><span class="MetaTag">&gt;</span></span> -</pre> + <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> + <p>This looks almost perfect, except that:</p> <ul><li>There's a nasty placeholder instead of a link: this is due to the fact that when the link is processed, there is no <code>#text</code> anchor in the document, but there may be one afterwards (and there will be).</li> <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> - <pre class="lazy"><span class="line-numbers"> 1 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">span</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>fmi<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span>for more information on something, -<span class="line-numbers"> 2 </span> see <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">a</span> <span class="MetaTag">href</span>=<span class="String"><span class="String">&quot;</span>#test<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span>Test Section<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">a</span><span class="MetaTag">&gt;</span></span><span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">span</span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 3 </span> [...] -<span class="line-numbers"> 4 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">div</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>section<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 5 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">h2</span> <span class="MetaTag"><span class="MetaTag">id</span><span class="MetaTag">=</span><span class="String"><span class="String">&quot;</span><span class="String">test</span><span class="String">&quot;</span></span></span><span class="MetaTag">&gt;</span></span>Test Section<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">h2</span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 6 </span> [...] -<span class="line-numbers"> 7 </span> -<span class="line-numbers"> 8 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">div</span><span class="MetaTag">&gt;</span></span> -</pre> - + <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> - <div class="navigation"><a href="/glyph/book/stats/links.html">Link Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/macro_def.html">&rarr; Defining Custom Macros</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_30.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + +</section> + <nav><a href="/glyph/book/stats/links.html">Link Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/macro_def.html">&rarr; Defining Custom Macros</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/interpreting.htmlcontent/glyph/book/extending/interpreting.html

@@ -1,75 +1,78 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Interpreting Glyph Code</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Interpreting Glyph Code</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Interpreting Glyph Code</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Interpreting Glyph Code</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/validators.html">Using Validators &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/layouts.html">&rarr; Layouts</a></div> + <nav><a href="/glyph/book/extending/validators.html">Using Validators &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/layouts.html">&rarr; Layouts</a></nav> <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> - <pre class="lazy"><span class="line-numbers"> 1 </span> macro <span class="Constant"><span class="Constant">:</span>fmi</span> <span class="Keyword">do</span> -<span class="line-numbers"> 2 </span> topic, href <span class="Keyword">=</span> <span class="Variable"><span class="Variable">@</span>params</span> -<span class="line-numbers"> 3 </span> link <span class="Keyword">=</span> placeholder <span class="Keyword">do </span>|<span class="Variable">document</span>| -<span class="line-numbers"> 4 </span> interpret <span class="String"><span class="String">&quot;</span>link[<span class="String"><span class="String">#{</span>href<span class="String">}</span></span>]<span class="String">&quot;</span></span> -<span class="line-numbers"> 5 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 6 </span> <span class="String"><span class="String">%{</span>&lt;span class=&quot;fmi&quot;&gt;for more information on <span class="String"><span class="String">#{</span>topic<span class="String">}</span></span>, see <span class="String"><span class="String">#{</span>link<span class="String">}</span></span>&lt;/span&gt;<span class="String">}</span></span> -<span class="line-numbers"> 7 </span> <span class="Keyword">end</span> -</pre> + <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> + <p>When the <code>interpret</code> method is called, the following happens:</p> <ol>

@@ -78,111 +81,93 @@ <li>The bookmarks, headers and placeholders are passed from the main document to the new one. Because they are stored in arrays and hashes, they are passed by reference, so for example any new bookmark stored in the new document will also become available in the main document.</li>

<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> - <div class="section"> -<h5 id="rewriting">Rewriting</h5> + <section class="section"> +<header><h1 id="rewriting">Rewriting</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_rewrite_"><code>rewrite:</code></a> macro within youy Glyph document</p> <p>Consider the following macro definition:</p> - <pre class="lazy"><span class="line-numbers"> 1 </span> macro <span class="Constant"><span class="Constant">:</span>issue</span> <span class="Keyword">do</span> -<span class="line-numbers"> 2 </span> interpret <span class="String"><span class="String">%{</span></span> -<span class="line-numbers"> 3 </span> <span class="String"> tr[</span> -<span class="line-numbers"> 4 </span> <span class="String"> td[.=&gt;[http://github.com/h3rald/glyph/issues/closed#issue/<span class="String"><span class="String">#{</span>param<span class="String">[</span><span class="Constant">0</span><span class="String">]</span><span class="String">}</span></span>|#<span class="String"><span class="String">#{</span><span class="String"><span class="Entity">param</span></span><span class="String">(</span><span class="Constant">0</span><span class="String">)</span><span class="String">}</span></span>]]</span> -<span class="line-numbers"> 5 </span> <span class="String"> td[txt[<span class="String"><span class="String">#{</span><span class="String"><span class="Entity">param</span></span><span class="String">(</span><span class="Constant">1</span><span class="String">)</span><span class="String">}</span></span>]]</span> -<span class="line-numbers"> 6 </span> <span class="String"> ]</span> -<span class="line-numbers"> 7 </span> <span class="String"> <span class="String">}</span></span> -<span class="line-numbers"> 8 </span> <span class="Keyword">end</span> -</pre> + <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> + <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_rewrite_"><code>rewrite:</code></a> macro:</p> - <pre class="lazy"><span class="line-numbers"> 1 </span> rewrite:[issue| -<span class="line-numbers"> 2 </span> tr[ -<span class="line-numbers"> 3 </span> td[.=&gt;[http://github.com/h3rald/glyph/issues/closed#issue/{{0}}|#{{0}}]] -<span class="line-numbers"> 4 </span> td[txt[{{1}}]] -<span class="line-numbers"> 5 </span> ] -<span class="line-numbers"> 6 </span> ] -</pre> + <div class="CodeRay"> + <div class="code"><pre><span class="no">1</span> rewrite:[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> + <p>Within the <a href="/glyph/book/macros/macros_core.html#m_rewrite_"><code>rewrite:</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 /> <code>{{</code><em>parameter_number</em> or <em>attribute_name</em><code>}}</code></p> -</div> - <div class="navigation"><a href="/glyph/book/extending/validators.html">Using Validators &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/layouts.html">&rarr; Layouts</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/interpreting.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/extending/validators.html">Using Validators &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/layouts.html">&rarr; Layouts</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> </script> - </body> - </html>+ <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> + </script> + </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/layouts.htmlcontent/glyph/book/extending/layouts.html

@@ -1,89 +1,92 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Layouts</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Layouts</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Layouts</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Layouts</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/interpreting.html">Interpreting Glyph Code &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/further_reading.html">&rarr; Further Reading</a></div> + <nav><a href="/glyph/book/extending/interpreting.html">Interpreting Glyph Code &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/further_reading.html">&rarr; Further Reading</a></nav> <p>When generating <a href="/glyph/book/text_editing/topics.html#topics">topic</a>-based outputs, Glyph uses <em>layouts</em> to render topics as standalone documents. By default, the following two layout are used:</p> <ul> <li><code>topic</code> &#8212; used to render standard topics.</li> <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> -<div class="section"> -<h5 id="h_84">Topic Layout</h5> +<section class="section"> +<header><h1 id="h_84">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> - <pre class="lazy"><span class="line-numbers"> 1 </span> document[ -<span class="line-numbers"> 2 </span> head[ -<span class="line-numbers"> 3 </span> style[default.css] -<span class="line-numbers"> 4 </span> ] -<span class="line-numbers"> 5 </span> body[ -<span class="line-numbers"> 6 </span> @class[topic] -<span class="line-numbers"> 7 </span> section[ -<span class="line-numbers"> 8 </span> @title[{{title}}] -<span class="line-numbers"> 9 </span> @id[{{id}}] -<span class="line-numbers"> 10 </span> navigation[{{id}}] -<span class="line-numbers"> 11 </span> {{contents}} -<span class="line-numbers"> 12 </span> navigation[{{id}}] -<span class="line-numbers"> 13 </span> ] -<span class="line-numbers"> 14 </span> ] -<span class="line-numbers"> 15 </span> ] -</pre> + <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> + <p>Note that it takes the following attributes, passed automatically by Glyph when processing each topic:</p> <ul> <li><code>title</code> &#8212; the title of the topic.</li>

@@ -91,125 +94,105 @@ <li><code>id</code> &#8212; the ID of the topic.</li>

<li><code>contents</code> &#8212; the body of the topic.</li> </ul> +</section> +<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> -<div class="section"> -<h5 id="index_layout">Index Layout</h5> -<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> - <pre class="lazy"><span class="line-numbers"> 1 </span> document[ -<span class="line-numbers"> 2 </span> head[ -<span class="line-numbers"> 3 </span> style[default.css] -<span class="line-numbers"> 4 </span> ] -<span class="line-numbers"> 5 </span> body[ -<span class="line-numbers"> 6 </span> @class[topic] -<span class="line-numbers"> 7 </span> halftitlepage[ -<span class="line-numbers"> 8 </span> title[] -<span class="line-numbers"> 9 </span> subtitle[] -<span class="line-numbers"> 10 </span> author[] -<span class="line-numbers"> 11 </span> ] -<span class="line-numbers"> 12 </span> frontmatter[ -<span class="line-numbers"> 13 </span> toc[] -<span class="line-numbers"> 14 </span> ] -<span class="line-numbers"> 15 </span> ] -<span class="line-numbers"> 16 </span> ] -</pre> + <p>Index layouts do not take any attribute or parameter (basically because they are used to produce only one page).</p> -</div> -<div class="section"> -<h5 id="h_86">Creating a Custom Layout</h5> +</section> +<section class="section"> +<header><h1 id="h_86">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> <li>Add the layout code, making sure (for topic layouts) that all the attributes (<code>title</code>, <code>id</code>, <code>contents</code>) are specified correctly.</li> <li>Set the <code>output.*.layouts.topic</code> setting to the name of the new layout (<code>mytopic</code>).</li> </ul> - <div class="tip"> + <aside class="tip"> <span class="note-title">Tip</span>You can override which layout to use on a specific topic by specifying it in a <code>@layout</code> attribute. -</div> +</aside> -</div> +</section> - <div class="navigation"><a href="/glyph/book/extending/interpreting.html">Interpreting Glyph Code &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/further_reading.html">&rarr; Further Reading</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/layouts.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/extending/interpreting.html">Interpreting Glyph Code &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/further_reading.html">&rarr; Further Reading</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/macro_def.htmlcontent/glyph/book/extending/macro_def.html

@@ -1,87 +1,90 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Defining Custom Macros</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Defining Custom Macros</title> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Defining Custom Macros</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Defining Custom Macros</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/internals.html">A quick look at Glyph's internals &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/params_attrs.html">&rarr; Parameters and Attributes</a></div> + <nav><a href="/glyph/book/extending/internals.html">A quick look at Glyph's internals &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/params_attrs.html">&rarr; Parameters and Attributes</a></nav> <p>Glyph was created wih extensibility in mind. You can freely extend Glyph Language by creating or overriding macros, to do whatever you like. Macro definitions are written in pure Ruby code and placed in <code>.rb</code> files within the <code>lib/macros/</code> folder of your project.</p> -<div class="box"> +<aside class="box"> <div class="box-title">Alternative Ways to Define Macros</div> <p>You can also define macros:</p> <ul> <li>inside your document, using the <a href="/glyph/book/macros/macros_core.html#m_macro_"><code>macro:</code></a> macro.</li> <li>Using the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro specifying the path to an <code>.rb</code> file containing macro definitions stored in the <code>lib/</code> directory (useful especially when <a href="/glyph/book/compiling/lite_mode.html#lite_mode">compiling single Glyph files</a>).</li> </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> -<p>This is the source code of a fairly simple macro used to format a note:</p> - <pre class="lazy"><span class="line-numbers"> 1 </span> macro <span class="Constant"><span class="Constant">:</span>note</span> <span class="Keyword">do</span> -<span class="line-numbers"> 2 </span> <span class="String"><span class="String">%{</span>&lt;div class=&quot;<span class="String"><span class="String">#{</span><span class="Variable"><span class="Variable">@</span>name</span><span class="String">}</span></span>&quot;&gt;&lt;span class=&quot;note-title&quot;&gt;<span class="String"><span class="String">#{</span><span class="Variable"><span class="Variable">@</span>name</span><span class="String"><span class="String">.</span><span class="Entity">to_s</span></span><span class="String"><span class="String">.</span><span class="Entity">capitalize</span></span><span class="String">}</span></span>&lt;/span&gt;</span> -<span class="line-numbers"> 3 </span> <span class="String"> <span class="String"><span class="String">#{</span><span class="Variable"><span class="Variable">@</span>value</span><span class="String">}</span></span></span> -<span class="line-numbers"> 4 </span> <span class="String"></span> -<span class="line-numbers"> 5 </span> <span class="String"> &lt;/div&gt;<span class="String">}</span></span> -<span class="line-numbers"> 6 </span> <span class="Keyword">end</span> -</pre> + <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> <p>The body of the macro is evaluated in the context of the <a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Macro"><code>Glyph::Macro</code></a> class, therefore its instance variables (like <code>@name</code> or <code>@value</code>) can be used directly.</p> -<div class="box"> +<aside class="box"> <div class="box-title">Why using <code>@name</code> instead of just &#8220;note&#8221;?</div> <p>For the <code>note</code> macro, it absolutely makes no difference. However, by using <code>@name</code> it is possible to re-use the same code for the <code>tip</code>, <code>important</code> and <code>caution</code> macros as well, which are in fact only aliases of the <code>note</code> macro.</p> -</div> +</aside> <p>The following table lists all the instance variables that can be used inside macros:</p> <table><tr><th>Variable</th> <th>Description</th></tr>

@@ -105,86 +108,64 @@ <tr><td>

<code>@source</code> </td> <td>A <code>String</code> identifying the source of the macro (a file, a snippet, etc.).</td></tr></table> - <div class="navigation"><a href="/glyph/book/extending/internals.html">A quick look at Glyph's internals &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/params_attrs.html">&rarr; Parameters and Attributes</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/macro_def.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/extending/internals.html">A quick look at Glyph's internals &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/params_attrs.html">&rarr; Parameters and Attributes</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> </script> - </body> - </html>+ <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> + </script> + </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/output_format.htmlcontent/glyph/book/extending/output_format.html

@@ -1,82 +1,85 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Custom Output Formats</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Custom Output Formats</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> - <h2>Custom Output Formats</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/task.html">Defining Custom Tasks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/command.html">&rarr; Defining Custom Commands</a></div> + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Custom Output Formats</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/extending/task.html">Defining Custom Tasks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/command.html">&rarr; Defining Custom Commands</a></nav> <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> -<div class="section"> -<h6 id="h_93">Output Configuration</h6> +<section class="section"> +<header><h1 id="h_93">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> - <pre class="lazy"><span class="line-numbers"> 1 </span> :<span class="MetaTag"><span class="MetaTag">output</span><span class="MetaTag">:</span> </span> -<span class="line-numbers"> 2 </span> :<span class="MetaTag"><span class="MetaTag">h3rald</span><span class="MetaTag">:</span> </span> -<span class="line-numbers"> 3 </span> :<span class="String"><span class="Entity">multifile<span class="Entity">:</span></span> <span class="String">true</span></span> -<span class="line-numbers"> 4 </span> :<span class="MetaTag"><span class="MetaTag">extension</span><span class="MetaTag">:</span> </span><span class="String"><span class="String">'</span>.html<span class="String">'</span></span> -<span class="line-numbers"> 5 </span> :<span class="MetaTag"><span class="MetaTag">filter_target</span><span class="MetaTag">:</span> </span><span class="String"><span class="String">'</span>html<span class="String">'</span></span> -<span class="line-numbers"> 6 </span> :<span class="MetaTag"><span class="MetaTag">base</span><span class="MetaTag">:</span> </span><span class="String"><span class="String">'</span>/glyph/book/<span class="String">'</span></span> -<span class="line-numbers"> 7 </span> :<span class="MetaTag"><span class="MetaTag">macro_dirs</span><span class="MetaTag">:</span> </span>[<span class="String"><span class="String">'</span>html<span class="String">'</span></span>] -<span class="line-numbers"> 8 </span> :<span class="MetaTag"><span class="MetaTag">layout_dirs</span><span class="MetaTag">:</span> </span>[<span class="String"><span class="String">'</span>web<span class="String">'</span></span>] -<span class="line-numbers"> 9 </span> :<span class="MetaTag"><span class="MetaTag">layouts</span><span class="MetaTag">:</span> </span> -<span class="line-numbers"> 10 </span> :<span class="String"><span class="Entity">topic<span class="Entity">:</span></span> <span class="String">bookpage</span></span> -<span class="line-numbers"> 11 </span> :<span class="String"><span class="Entity">index<span class="Entity">:</span></span> <span class="String">bookindex</span></span> -</pre> + <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_dirs</span>: [<span class="er">'html', '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> + <p>In particular, the following keys are mandatory:</p> <ul> <li>multifile</li>

@@ -87,128 +90,108 @@ <li>macro_dirs</li>

<li>layout_dirs</li> </ul> +</section> +<section class="section"> +<header><h1 id="h_94">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> +<span class="no"><strong>10</strong></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">11</span> i.to_s.match(<span class="co">Regexp</span>.escape(dir/<span class="s"><span class="dl">'</span><span class="k">images</span><span class="dl">'</span></span>)) || +<span class="no">12</span> i.to_s.match(<span class="co">Regexp</span>.escape(dir/<span class="s"><span class="dl">'</span><span class="k">styles</span><span class="dl">'</span></span>)) +<span class="no">13</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">14</span> src = i.to_s +<span class="no">15</span> <span class="co">Pathname</span>.new(dest).parent.mkpath +<span class="no">16</span> file_copy src, dest +<span class="no">17</span> <span class="r">end</span> +<span class="no">18</span> <span class="r">end</span> +<span class="no">19</span> <span class="c"># Remove files</span> +<span class="no"><strong>20</strong></span> dir.children.each <span class="r">do</span> |c| +<span class="no">21</span> <span class="r">unless</span> [dir/<span class="s"><span class="dl">'</span><span class="k">glyph</span><span class="dl">'</span></span>, dir/<span class="s"><span class="dl">'</span><span class="k">images</span><span class="dl">'</span></span>, dir/<span class="s"><span class="dl">'</span><span class="k">styles</span><span class="dl">'</span></span>].include? c <span class="r">then</span> +<span class="no">22</span> c.directory? ? c.rmtree : c.unlink +<span class="no">23</span> <span class="r">end</span> +<span class="no">24</span> <span class="r">end</span> +<span class="no">25</span> (dir/<span class="s"><span class="dl">'</span><span class="k">images/glyph/glyph.eps</span><span class="dl">'</span></span>).unlink +<span class="no">26</span> (dir/<span class="s"><span class="dl">'</span><span class="k">images/glyph/glyph.svg</span><span class="dl">'</span></span>).unlink +<span class="no">27</span> <span class="c"># Create project page</span> +<span class="no">28</span> project = <span class="co">Glyph</span>.filter <span class="s"><span class="dl">%{</span><span class="k">layout:project[ +<span class="no">29</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"><strong>30</strong></span> ]</span><span class="dl">}</span></span> +<span class="no">31</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">32</span> <span class="r">end</span> +<span class="no">33</span> <span class="r">end</span></pre></div> </div> -<div class="section"> -<h6 id="h_94">Creating a 'generate:h3rald' task</h6> -<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> - <pre class="lazy"><span class="line-numbers"> 1 </span> namespace <span class="Constant"><span class="Constant">:</span>generate</span> <span class="Keyword">do</span> -<span class="line-numbers"> 2 </span> desc <span class="String"><span class="String">&quot;</span>Create output for h3rald.com integration<span class="String">&quot;</span></span> -<span class="line-numbers"> 3 </span> task <span class="Constant"><span class="Constant">:</span>h3rald</span> =&gt; [<span class="Constant"><span class="Constant">:</span>web</span>] <span class="Keyword">do</span> -<span class="line-numbers"> 4 </span> dir <span class="Keyword">=</span> <span class="Support">Glyph</span>::<span class="Entity">PROJECT</span><span class="Keyword">/</span><span class="String"><span class="String">'</span>output/h3rald<span class="String">'</span></span> -<span class="line-numbers"> 5 </span> (dir<span class="Keyword">/</span><span class="String"><span class="String">&quot;</span>glyph/book<span class="String">&quot;</span></span>).<span class="Entity">mkpath</span> -<span class="line-numbers"> 6 </span> <span class="Comment"> <span class="Comment">#</span> Copy files in subdir</span> -<span class="line-numbers"> 7 </span> (dir).<span class="Entity">find</span> <span class="Keyword">do </span>|<span class="Variable">i</span>| -<span class="line-numbers"> 8 </span> <span class="Keyword">if</span> i.<span class="Entity">file?</span> <span class="Keyword">then</span> -<span class="line-numbers"> 9 </span> <span class="Keyword">next</span> <span class="Keyword">if</span> -<span class="line-numbers"> 10 </span> i.<span class="Entity">to_s</span>.<span class="Entity">match</span>(<span class="Support">Regexp</span>.<span class="Entity">escape</span>(dir<span class="Keyword">/</span><span class="String"><span class="String">'</span>glyph<span class="String">'</span></span>)) <span class="Keyword">||</span> -<span class="line-numbers"> 11 </span> i.<span class="Entity">to_s</span>.<span class="Entity">match</span>(<span class="Support">Regexp</span>.<span class="Entity">escape</span>(dir<span class="Keyword">/</span><span class="String"><span class="String">'</span>images<span class="String">'</span></span>)) <span class="Keyword">||</span> -<span class="line-numbers"> 12 </span> i.<span class="Entity">to_s</span>.<span class="Entity">match</span>(<span class="Support">Regexp</span>.<span class="Entity">escape</span>(dir<span class="Keyword">/</span><span class="String"><span class="String">'</span>styles<span class="String">'</span></span>)) -<span class="line-numbers"> 13 </span> dest <span class="Keyword">=</span> dir<span class="Keyword">/</span><span class="String"><span class="String">&quot;</span>glyph/book/<span class="String"><span class="String">#{</span>i<span class="String"><span class="String">.</span><span class="Entity">relative_path_from</span></span><span class="String">(</span><span class="Support">Glyph</span><span class="String"><span class="String">::</span><span class="Entity">PROJECT</span></span><span class="Keyword">/</span>dir<span class="String">)</span><span class="String">}</span></span><span class="String">&quot;</span></span> -<span class="line-numbers"> 14 </span> src <span class="Keyword">=</span> i.<span class="Entity">to_s</span> -<span class="line-numbers"> 15 </span> <span class="Support">Pathname</span>.<span class="Entity">new</span>(dest).<span class="Entity">parent</span>.<span class="Entity">mkpath</span> -<span class="line-numbers"> 16 </span> file_copy src, dest -<span class="line-numbers"> 17 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 18 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 19 </span> <span class="Comment"> <span class="Comment">#</span> Remove files</span> -<span class="line-numbers"> 20 </span> dir.<span class="Entity">children</span>.<span class="Entity">each</span> <span class="Keyword">do </span>|<span class="Variable">c</span>| -<span class="line-numbers"> 21 </span> <span class="Keyword">unless</span> [dir<span class="Keyword">/</span><span class="String"><span class="String">'</span>glyph<span class="String">'</span></span>, dir<span class="Keyword">/</span><span class="String"><span class="String">'</span>images<span class="String">'</span></span>, dir<span class="Keyword">/</span><span class="String"><span class="String">'</span>styles<span class="String">'</span></span>].<span class="Entity">include?</span> c <span class="Keyword">then</span> -<span class="line-numbers"> 22 </span> c.<span class="Entity">directory?</span> <span class="Keyword">?</span> c.<span class="Entity">rmtree</span> : c.<span class="Entity">unlink</span> -<span class="line-numbers"> 23 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 24 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 25 </span> (dir<span class="Keyword">/</span><span class="String"><span class="String">'</span>images/glyph/glyph.eps<span class="String">'</span></span>).<span class="Entity">unlink</span> -<span class="line-numbers"> 26 </span> (dir<span class="Keyword">/</span><span class="String"><span class="String">'</span>images/glyph/glyph.svg<span class="String">'</span></span>).<span class="Entity">unlink</span> -<span class="line-numbers"> 27 </span> <span class="Comment"> <span class="Comment">#</span> Create project page</span> -<span class="line-numbers"> 28 </span> project <span class="Keyword">=</span> <span class="Support">Glyph</span>.<span class="Entity">filter</span> <span class="String"><span class="String">%{</span>layout:project[</span> -<span class="line-numbers"> 29 </span> <span class="String"> @contents[<span class="String"><span class="String">#{</span><span class="String"><span class="Entity">file_load</span></span><span class="String">(</span><span class="Support">Glyph</span><span class="String"><span class="String">::</span><span class="Entity">PROJECT</span></span><span class="Keyword">/</span><span class="String"><span class="String">'</span>text/introduction.glyph<span class="String">'</span></span><span class="String">)</span><span class="String">}</span></span>]</span> -<span class="line-numbers"> 30 </span> <span class="String"> ]<span class="String">}</span></span> -<span class="line-numbers"> 31 </span> file_write dir<span class="Keyword">/</span><span class="String"><span class="String">&quot;</span>glyph.textile<span class="String">&quot;</span></span>, project -<span class="line-numbers"> 32 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 33 </span> <span class="Keyword">end</span> -</pre> - <p>In this case, this task does not actually renders files in a different format, it just moves the files generated by the @generate:web@ task in different subdirectories.</p> + + <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> <p>Additionally, it also generates the <a href="http://www.h3rald.com/glyph/">Glyph project page</a> from the book's introduction (note the usage of a raw custom layout macro).</p> -</div> - <div class="navigation"><a href="/glyph/book/extending/task.html">Defining Custom Tasks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/command.html">&rarr; Defining Custom Commands</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_41.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/extending/task.html">Defining Custom Tasks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/command.html">&rarr; Defining Custom Commands</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/params_attrs.htmlcontent/glyph/book/extending/params_attrs.html

@@ -1,67 +1,68 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Parameters and Attributes</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Parameters and Attributes</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> - <h2>Parameters and Attributes</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/macro_def.html">Defining Custom Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/bookmarks_headers.html">&rarr; Bookmarks and Headers</a></div> + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Parameters and Attributes</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/extending/macro_def.html">Defining Custom Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/bookmarks_headers.html">&rarr; Bookmarks and Headers</a></nav> <p>Perhaps the most common things to do in a macro definition is accessing parameters and attributes. When doing so, it is important to consider whether we want to retrieve the <em>raw value</em> of and attribute or parameter or its <em>expanded value</em>. The difference between the two will become clearer in the following sections and also in the <a href="/glyph/book/extending/interpreting.html#interpreting">Interpreting Glyph Code</a> section.</p> - <div class="section"> -<h5 id="expanded_values">Accessing Expanded Values</h5> + <section class="section"> +<header><h1 id="expanded_values">Accessing Expanded Values</h1></header> <p>Normally, you just want to get the value of an attribute or parameter and use it in the macro. This means, in other words, its <em>expanded</em> value, i.e. the value resulting from the expansion of the macros (if any) within the attribute or parameter.</p> <p>To access expanded values, use the following methods:</p> <ul>

@@ -72,47 +73,53 @@ <li><code>parameters</code> (or <code>params</code>): Returns an array of expanded parameters.</li>

<li><code>attributes</code> (or <code>attrs</code>): Returns a hash of expanded attributes.</li> </ul> +</section> + <section class="section"> +<header><h1 id="h_77">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> - <div class="section"> -<h5 id="h_77">Accessing Raw Values</h5> -<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> - <pre class="lazy"><span class="line-numbers"> 1 </span> macro <span class="Constant"><span class="Constant">:</span>nest_section</span> <span class="Keyword">do</span> -<span class="line-numbers"> 2 </span> interpret <span class="String"><span class="String">%{</span>section[</span> -<span class="line-numbers"> 3 </span> <span class="String"> @title[A]</span> -<span class="line-numbers"> 4 </span> <span class="String"> section[</span> -<span class="line-numbers"> 5 </span> <span class="String"> @title[B]</span> -<span class="line-numbers"> 6 </span> <span class="String"> <span class="String"><span class="String">#{</span>value<span class="String">}</span></span></span> -<span class="line-numbers"> 7 </span> <span class="String"> ]</span> -<span class="line-numbers"> 8 </span> <span class="String"> ]<span class="String">}</span></span> -<span class="line-numbers"> 9 </span> <span class="Keyword">end</span> -</pre> + <p>And suppose to use it as follows:</p> - <pre class="lazy"><span class="line-numbers"> 1 </span> nest_section[ -<span class="line-numbers"> 2 </span> section[ -<span class="line-numbers"> 3 </span> <span class="Variable"><span class="Variable">@</span>title</span>[<span class="Variable">Inner</span> <span class="Variable">Section</span>] -<span class="line-numbers"> 4 </span> ... -<span class="line-numbers"> 5 </span> ] -<span class="line-numbers"> 6 </span> ] -</pre> + <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> + <p>It produces the following HTML code:</p> - <pre class="lazy"><span class="line-numbers"> 1 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">div</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>section<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 2 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">h2</span> <span class="MetaTag"><span class="MetaTag">id</span><span class="MetaTag">=</span><span class="String"><span class="String">&quot;</span><span class="String">h_2</span><span class="String">&quot;</span></span></span><span class="MetaTag">&gt;</span></span>A<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">h2</span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 3 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">div</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>section<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 4 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">h3</span> <span class="MetaTag"><span class="MetaTag">id</span><span class="MetaTag">=</span><span class="String"><span class="String">&quot;</span><span class="String">h_3</span><span class="String">&quot;</span></span></span><span class="MetaTag">&gt;</span></span>B<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">h3</span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 5 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">div</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>section<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 6 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">h2</span> <span class="MetaTag"><span class="MetaTag">id</span><span class="MetaTag">=</span><span class="String"><span class="String">&quot;</span><span class="String">h_1</span><span class="String">&quot;</span></span></span><span class="MetaTag">&gt;</span></span>Inner Section<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">h2</span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 7 </span> ... -<span class="line-numbers"> 8 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">div</span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 9 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">div</span><span class="MetaTag">&gt;</span></span> -<span class="line-numbers"> 10 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">div</span><span class="MetaTag">&gt;</span></span> -</pre> + <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> + <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> <p>This happens because the inner section is evaluated <em>before</em> the <code>nest_section</code> macro: after all, we ask for it ourselves when we call the <code>value</code> method inside the macro definition. When the value is expanded, there are no outer sections <em>yet</em>.</p> <p>To avoid this unwanted behavior, we can use the <code>raw_value</code> method instead, that returns the first parameter converted back to a Glyph code string.</p> - <div class="tip"> + <aside class="tip"> <span class="note-title">Tip</span>To be on the safe side, always use <code>raw_*</code> methods when interpreting. -</div> +</aside> <p>To access raw values, use the following methods:</p> <ul> <li><code>raw_parameter</code> (or <code>raw_param</code>): Returns the raw parameter value of the parameter specified by number.</li>

@@ -120,87 +127,65 @@ <li><code>raw_value</code>: Returns the first raw parameter value (i.e. like <code>raw_parameter(0)</code>).</li>

<li><code>raw_attribute</code> (or <code>raw_attr</code>): Returns the attribute value of the attribute specified by name.</li> </ul> -</div> - <div class="navigation"><a href="/glyph/book/extending/macro_def.html">Defining Custom Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/bookmarks_headers.html">&rarr; Bookmarks and Headers</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_32.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/extending/macro_def.html">Defining Custom Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/bookmarks_headers.html">&rarr; Bookmarks and Headers</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/placeholders.htmlcontent/glyph/book/extending/placeholders.html

@@ -1,167 +1,148 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Using Placeholders</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Using Placeholders</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Using Placeholders</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Using Placeholders</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/bookmarks_headers.html">Bookmarks and Headers &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/validators.html">&rarr; Using Validators</a></div> + <nav><a href="/glyph/book/extending/bookmarks_headers.html">Bookmarks and Headers &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/validators.html">&rarr; 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> - <pre class="lazy"><span class="line-numbers"> 1 </span> macro <span class="Constant"><span class="Constant">:</span>link</span> <span class="Keyword">do</span> -<span class="line-numbers"> 2 </span> href, title <span class="Keyword">=</span> <span class="Variable"><span class="Variable">@</span>params</span> -<span class="line-numbers"> 3 </span> <span class="Keyword">if</span> href.<span class="Entity">match</span> <span class="String"><span class="String">/</span></span><span class="String">^#</span><span class="String"><span class="String">/</span></span> <span class="Keyword">then</span> -<span class="line-numbers"> 4 </span> anc <span class="Keyword">=</span> href.<span class="Entity">gsub</span>(<span class="String"><span class="String">/</span></span><span class="String">^#</span><span class="String"><span class="String">/</span></span>, <span class="String"><span class="String">'</span><span class="String">'</span></span>).<span class="Entity">to_sym</span> -<span class="line-numbers"> 5 </span> bmk <span class="Keyword">=</span> bookmark? anc -<span class="line-numbers"> 6 </span> <span class="Keyword">if</span> bmk <span class="Keyword">then</span> -<span class="line-numbers"> 7 </span> title <span class="Keyword">||=</span> bmk[<span class="Constant"><span class="Constant">:</span>title</span>] -<span class="line-numbers"> 8 </span> <span class="Keyword">else</span> -<span class="line-numbers"> 9 </span> plac <span class="Keyword">=</span> placeholder <span class="Keyword">do </span>|<span class="Variable">document</span>| -<span class="line-numbers"> 10 </span> macro_error <span class="String"><span class="String">&quot;</span>Bookmark '<span class="String"><span class="String">#{</span>anc<span class="String">}</span></span>' does not exist<span class="String">&quot;</span></span> <span class="Keyword">unless</span> document.<span class="Entity">bookmarks</span>[anc] -<span class="line-numbers"> 11 </span> document.<span class="Entity">bookmarks</span>[anc][<span class="Constant"><span class="Constant">:</span>title</span>] -<span class="line-numbers"> 12 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 13 </span> title <span class="Keyword">||=</span> plac -<span class="line-numbers"> 14 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 15 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 16 </span> title <span class="Keyword">||=</span> href -<span class="line-numbers"> 17 </span> <span class="String"><span class="String">%{</span>&lt;a href=&quot;<span class="String"><span class="String">#{</span>href<span class="String">}</span></span>&quot;&gt;<span class="String"><span class="String">#{</span>title<span class="String">}</span></span>&lt;/a&gt;<span class="String">}</span></span> -<span class="line-numbers"> 18 </span> <span class="Keyword">end</span> -</pre> + <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> href, title = <span class="iv">@params</span> +<span class="no"> 3</span> <span class="r">if</span> href.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"> 4</span> anc = href.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>).to_sym +<span class="no"> 5</span> bmk = bookmark? anc +<span class="no"> 6</span> <span class="r">if</span> bmk <span class="r">then</span> +<span class="no"> 7</span> title ||= bmk[<span class="sy">:title</span>] +<span class="no"> 8</span> <span class="r">else</span> +<span class="no"> 9</span> plac = placeholder <span class="r">do</span> |document| +<span class="no"><strong>10</strong></span> macro_error <span class="s"><span class="dl">&quot;</span><span class="k">Bookmark '</span><span class="il"><span class="idl">#{</span>anc<span class="idl">}</span></span><span class="k">' does not exist</span><span class="dl">&quot;</span></span> <span class="r">unless</span> document.bookmarks[anc] +<span class="no">11</span> document.bookmarks[anc][<span class="sy">:title</span>] +<span class="no">12</span> <span class="r">end</span> +<span class="no">13</span> title ||= plac +<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> title ||= href +<span class="no">17</span> <span class="s"><span class="dl">%{</span><span class="k">&lt;a href=&quot;</span><span class="il"><span class="idl">#{</span>href<span class="idl">}</span></span><span class="k">&quot;&gt;</span><span class="il"><span class="idl">#{</span>title<span class="idl">}</span></span><span class="k">&lt;/a&gt;</span><span class="dl">}</span></span> +<span class="no">18</span> <span class="r">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> <p>Within the <code>placeholder</code> block, the <code>document</code> parameter is, by all means, the fully analyzed document.</p> - <div class="navigation"><a href="/glyph/book/extending/bookmarks_headers.html">Bookmarks and Headers &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/validators.html">&rarr; Using Validators</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_34.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/extending/bookmarks_headers.html">Bookmarks and Headers &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/validators.html">&rarr; Using Validators</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> </script> - </body> - </html>+ <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> + </script> + </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/task.htmlcontent/glyph/book/extending/task.html

@@ -1,68 +1,69 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Defining Custom Tasks</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Defining Custom Tasks</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>Defining Custom Tasks</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Defining Custom Tasks</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/commands_tasks.html">Defining Custom Commands and Tasks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/output_format.html">&rarr; Custom Output Formats</a></div> + <nav><a href="/glyph/book/extending/commands_tasks.html">Defining Custom Commands and Tasks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/output_format.html">&rarr; Custom Output Formats</a></nav> <p>Glyph relies on <a href="http://rake.rubyforge.org/">Rake</a> to perform most of its core operations. Typically, Rake tasks are used do define the high level logic that is used by Glyph commands to, for example, compile a project or load configuration files.</p> <p>Furthermore, Rake provides an easy mechanism to create dependencies among tasks: for example, to make sure that Glyph&#8217;s configuration files are loaded before everything else happens.</p> -<div class="section"> -<h5 id="custom_generate_task">Creating a 'custom:generate' task</h5> +<section class="section"> +<header><h1 id="custom_generate_task">Creating a 'custom:generate' task</h1></header> <p>A custom task has been defined for the Glyph project used to produce this document. This custom task is used to compile a few of the documents files into standalone files, deployed in Glyph&#8217;s root folder:</p> <ul> <li><code>book/text/introduction.glyph</code> &rarr; <code>README.textile</code></li>

@@ -72,111 +73,91 @@ <li><code>book/text/acknowledgement.glyph</code> &rarr; <code>AUTHORS.textile</code></li>

</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> - <pre class="lazy"><span class="line-numbers"> 1 </span> namespace <span class="Constant"><span class="Constant">:</span>custom</span> <span class="Keyword">do</span> -<span class="line-numbers"> 2 </span> task <span class="Constant"><span class="Constant">:</span>generate</span>, [<span class="Constant"><span class="Constant">:</span>file</span>] <span class="Keyword">do </span>|<span class="Variable">t</span>, <span class="Variable">args</span>| -<span class="line-numbers"> 3 </span> generate <span class="Keyword">=</span> lambda <span class="Keyword">do </span>|<span class="Variable">source</span>, <span class="Variable">destination</span>| -<span class="line-numbers"> 4 </span> <span class="Support">Glyph</span>.<span class="Entity">info</span> <span class="String"><span class="String">&quot;</span>Generating <span class="String"><span class="String">#{</span>destination<span class="String">}</span></span>...<span class="String">&quot;</span></span> -<span class="line-numbers"> 5 </span> <span class="Support">Glyph</span>.<span class="Entity">compile</span> <span class="Support">Glyph</span>::<span class="Entity">PROJECT</span><span class="Keyword">/</span><span class="String"><span class="String">&quot;</span>text/<span class="String"><span class="String">#{</span>source<span class="String">}</span></span>.glyph<span class="String">&quot;</span></span>, -<span class="line-numbers"> 6 </span> <span class="Support">Glyph</span>::<span class="Entity">PROJECT</span><span class="Keyword">/</span><span class="String"><span class="String">&quot;</span>../<span class="String"><span class="String">#{</span>destination<span class="String">}</span></span>.textile<span class="String">&quot;</span></span> -<span class="line-numbers"> 7 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 8 </span> files <span class="Keyword">=</span> { -<span class="line-numbers"> 9 </span> <span class="Constant"><span class="Constant">:</span>AUTHORS</span> =&gt; <span class="Constant"><span class="Constant">:</span>acknowledgements</span>, -<span class="line-numbers"> 10 </span> <span class="Constant"><span class="Constant">:</span>CHANGELOG</span> =&gt; <span class="Constant"><span class="Constant">:</span>changelog</span>, -<span class="line-numbers"> 11 </span> <span class="Constant"><span class="Constant">:</span>LICENSE</span> =&gt; <span class="Constant"><span class="Constant">:</span>license</span>, -<span class="line-numbers"> 12 </span> <span class="Constant"><span class="Constant">:</span>README</span> =&gt; <span class="Constant"><span class="Constant">:</span>introduction</span> -<span class="line-numbers"> 13 </span> } -<span class="line-numbers"> 14 </span> arg <span class="Keyword">=</span> args[<span class="Constant"><span class="Constant">:</span>file</span>].<span class="Entity">upcase</span>.<span class="Entity">to_sym</span> -<span class="line-numbers"> 15 </span> <span class="Keyword">raise</span> <span class="Variable">RuntimeError</span>, <span class="String"><span class="String">&quot;</span>Unknown file '<span class="String"><span class="String">#{</span>arg<span class="String">}</span></span>.glyph'<span class="String">&quot;</span></span> -<span class="line-numbers"> 16 </span> <span class="Keyword">unless</span> files.<span class="Entity">keys</span>.<span class="Entity">include?</span> arg -<span class="line-numbers"> 17 </span> generate.<span class="Entity">call</span> files[arg], arg -<span class="line-numbers"> 18 </span> <span class="Support">Glyph</span>.<span class="Entity">info</span> <span class="String"><span class="String">&quot;</span>Done.<span class="String">&quot;</span></span> -<span class="line-numbers"> 19 </span> <span class="Keyword">end</span> -<span class="line-numbers"> 20 </span> <span class="Keyword">end</span> -</pre> - <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 creating custom commands, see <a href="/glyph/book/extending/command.html#custom_command">Defining Custom Commands</a></span>.</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> + + <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> + +</section> + + <nav><a href="/glyph/book/extending/commands_tasks.html">Defining Custom Commands and Tasks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/output_format.html">&rarr; Custom Output Formats</a></nav> + </section> + </article> -</div> - <div class="navigation"><a href="/glyph/book/extending/commands_tasks.html">Defining Custom Commands and Tasks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/output_format.html">&rarr; Custom Output Formats</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/custom_task.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/validators.htmlcontent/glyph/book/extending/validators.html

@@ -1,67 +1,68 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Using Validators</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Using Validators</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>Using Validators</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Using Validators</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/extending/placeholders.html">Using Placeholders &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/interpreting.html">&rarr; Interpreting Glyph Code</a></div> + <nav><a href="/glyph/book/extending/placeholders.html">Using Placeholders &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/interpreting.html">&rarr; Interpreting Glyph Code</a></nav> <p>If you need to make sure that a macro is used properly, consider using <a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Macro/Validators">validators</a>. These methods can be used anywhere within the macro code to check whether certain conditions are met or not. Some default validators are provided to check the number of parameters of a macro, and they are actually used in some system macros.</p> <p>If you want to create your own validators, you can call the generic <code>validate</code> method which takes the message to display in case of error, a Hash of options and a block containing the validation to perform.</p> - <div class="box"> + <aside class="box"> <div class="box-title">Validating macro placement</div> <p>You can, of course, create your own validators to check whether a macro is used directly within another. While this may seem a good idea to enforce constraints into the way documents are created, it has one major drawback: if you define a macro with such validation, you&#8217;re effectively limiting its usage, so for example you won&#8217;t be able to use within snippets or other custom macros.</p> <p>Suppose, for example, that the <a href="/glyph/book/macros/macros_block.html#m_box"><code>box</code></a> macro is only allowed directly under a <code>section</code> macro. This means that, for example:</p>

@@ -72,87 +73,65 @@ </ul>

<p>Even if you consider all the possibilities within the scope of the default macros provided with Glyph, this could still make the <code>box</code> macro unusable within custom macros.</p> <p>For the specific cases where a macro does not make sense unless is within another (e.g. the <a href="/glyph/book/macros/macros_core.html#m_eq"><code>eq</code></a> macro), a <code>within</code> validator is used. Note though, that this validator only checks that the macro is used within another, but it is not necessarily its child.</p> -</div> - <div class="navigation"><a href="/glyph/book/extending/placeholders.html">Using Placeholders &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/interpreting.html">&rarr; Interpreting Glyph Code</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_35.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</aside> + <nav><a href="/glyph/book/extending/placeholders.html">Using Placeholders &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/interpreting.html">&rarr; Interpreting Glyph Code</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/getting_started/configuration.htmlcontent/glyph/book/getting_started/configuration.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Project Configuration</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Project Configuration</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>Project Configuration</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Project Configuration</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/getting_started/structure.html">Document Structure &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/glyph_files.html">&rarr; .glyph files</a></div> + <nav><a href="/glyph/book/getting_started/structure.html">Document Structure &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/glyph_files.html">&rarr; .glyph files</a></nav> <p>Glyph stores configuration settings in the following <span class="caps">YAML</span> files:</p> <ol>

@@ -77,12 +78,12 @@ <p><code>glyph config</code> <em>setting</em> <em>[value]</em></p>

<p>If no <em>value</em> is specified, Glyph prints the value of the configuration setting, so typing <code>glyph config document.author</code> right after creating a project (assuming you didn&#8217;t set this in the Global Configuration) will print nothing, because this setting is blank by default.</p> <p>To change the value of a configuration setting, specify a value right after the setting, like this:</p> <p><code>glyph config document.author "John Smith"</code></p> -<div class="tip"> +<aside class="tip"> <p><span class="note-title">Tip</span>It is also possible to change configuration settings inside your document, using the <a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> macro.</p> -</div> +</aside> <p>In this way, the document author will be set to <em>John Smith</em> for the current project. To save this setting globally, add a <code>-g</code> option, like this:</p> <p><code>glyph config -g document.author "John Smith"</code></p> -<div class="box"> +<aside class="box"> <div class="box-title">Regarding configuration values and data types&#8230;</div> <p>Glyph attempts to &#8220;guess&#8221; the data type of a configuration value by evaluation (<code>Kernel#instance_eval</code>) if the value:</p> <ul>

@@ -94,89 +95,67 @@ <li>is <em>true</em> or <em>false</em> &rarr; <code>Boolean</code></li>

<li>is <em>nil</em> &rarr; <code>NilClass</code></li> </ul> <p>Note that this guessing is far from being foolproof: If you type something like <em>{:test, 2}</em>, for example, you&#8217;ll get an error.</p> -</div> +</aside> <p>There are plenty of configuration settings that can be modified, but most of them are best if left alone (and in the System Configuration file).</p> <p>For a complete reference, see <a href="/glyph/book/document.html#cfg_ref">Configuration Reference</a>. For everyday use, you may just want to change the settings defined in the <a href="/glyph/book/config/document.html#cfg_document">document.*</a> namespace.</p> - <div class="navigation"><a href="/glyph/book/getting_started/structure.html">Document Structure &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/glyph_files.html">&rarr; .glyph files</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/cfg.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/getting_started/structure.html">Document Structure &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/glyph_files.html">&rarr; .glyph files</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> </script> - </body> - </html>+ <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> + </script> + </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/getting_started/create_project.htmlcontent/glyph/book/getting_started/create_project.html

@@ -1,70 +1,71 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Creating your first Glyph Project</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Creating your first Glyph Project</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>Creating your first Glyph Project</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Creating your first Glyph Project</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/acknowledgements.html">Acknowledgements &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/structure.html">&rarr; Document Structure</a></div> + <nav><a href="/glyph/book/acknowledgements.html">Acknowledgements &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/structure.html">&rarr; Document Structure</a></nav> <p>To install Glyph, simply run <code>gem install glyph</code>, like with any other Ruby gem. Then, create a new directory and initialize a new Glyph project, like so:</p> <p><code>mkdir</code> <em>test_document</em></p> <p><code>cd</code> <em>test_document</em></p> <p><code>glyph init</code></p> <p>That&#8217;s it. You just created a new Glyph project in the <code>test_document</code> directory.</p> -<div class="box"> +<aside class="box"> <div class="box-title">Glyph&#8217;s dependencies</div> <p>Glyph requires the following gems:</p> <ul>

@@ -80,7 +81,7 @@ <li>Haml (if you want to load .sass files with the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro)</li>

<li>CodeRay <em>or</em> UltraViolet (<a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro)</li> <li>directory_watcher (to use auto-regeneration with the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command)</li> </ul> -</div> +</aside> <p>Every Glyph project is comprised of the following directories:</p> <ul> <li><code>images/</code> &#8212; used to store the image files used in your document.</li>

@@ -95,86 +96,64 @@ <li><code>config.yml</code> &#8212; containing your <a href="/glyph/book/getting_started/configuration.html#cfg">Project Configuration</a>.</li>

<li><code>document.glyph</code> &#8212; containing the <a href="/glyph/book/getting_started/structure.html#struct">structure</a> of your document.</li> <li><code>snippets.yml</code> &#8212; containing your text <a href="/glyph/book/text_editing/inclusions.html#incl">snippets</a>.</li> </ul> - <div class="navigation"><a href="/glyph/book/acknowledgements.html">Acknowledgements &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/structure.html">&rarr; Document Structure</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_3.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/acknowledgements.html">Acknowledgements &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/structure.html">&rarr; Document Structure</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/getting_started/structure.htmlcontent/glyph/book/getting_started/structure.html

@@ -1,97 +1,100 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Document Structure</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Document Structure</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> - <h2>Document Structure</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/getting_started/create_project.html">Creating your first Glyph Project &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/configuration.html">&rarr; Project Configuration</a></div> + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Document Structure</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/getting_started/create_project.html">Creating your first Glyph Project &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/configuration.html">&rarr; Project Configuration</a></nav> <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> - <pre class="lazy"><span class="line-numbers"> 1 </span> book[ -<span class="line-numbers"> 2 </span> @frontmatter[ -<span class="line-numbers"> 3 </span> toc[] -<span class="line-numbers"> 4 </span> preface[ -<span class="line-numbers"> 5 </span> @title[Preface] -<span class="line-numbers"> 6 </span> todo[Write the preface] -<span class="line-numbers"> 7 </span> include[preface] -<span class="line-numbers"> 8 </span> ] -<span class="line-numbers"> 9 </span> ] -<span class="line-numbers"> 10 </span> @bodymatter[ -<span class="line-numbers"> 11 </span> chapter[ -<span class="line-numbers"> 12 </span> @title[Chapter 1] -<span class="line-numbers"> 13 </span> todo[Write chapter 1] -<span class="line-numbers"> 14 </span> include[chapter_1] -<span class="line-numbers"> 15 </span> ] -<span class="line-numbers"> 16 </span> chapter[ -<span class="line-numbers"> 17 </span> @title[Chapter 2] -<span class="line-numbers"> 18 </span> todo[Write chapter 2] -<span class="line-numbers"> 19 </span> include[chapter_2] -<span class="line-numbers"> 20 </span> ] -<span class="line-numbers"> 21 </span> ] -<span class="line-numbers"> 22 </span> @backmatter[ -<span class="line-numbers"> 23 </span> appendix[ -<span class="line-numbers"> 24 </span> @title[Appendix A] -<span class="line-numbers"> 25 </span> todo[Write appendix A] -<span class="line-numbers"> 26 </span> include[appendix_a] -<span class="line-numbers"> 27 </span> ] -<span class="line-numbers"> 28 </span> ] -<span class="line-numbers"> 29 </span> ] -</pre> + <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> + <p>Even without knowing anything about Glyph Language, you can easily figure out that this file defines a document with a Table of Contents, a Preface some Chapters and an Appendix.</p> <p>As you can see, Glyph wraps portions of text within square brackets preceded by an identifier. These identifiers are used for <em><a href="/glyph/book/text_editing/macro_intro.html#macro_intro">macros</a></em> and <em><a href="/glyph/book/text_editing/attribute_intro.html#attribute_intro">attributes</a></em>. The only syntactic difference between macros and attributes is that attributes are preceded by a <code>@</code>.</p>

@@ -108,86 +111,64 @@ <li>The <a href="/glyph/book/macros/macros_structure.html#m_book"><code>book</code></a> macro wraps every other macro and is used to create the document header and default title page.</li>

<li>Then, the <code>@frontmatter</code>, <code>@bodymatter</code>, and <code>@backmatter</code> attributes are used to divide the portions of your document according to the rules of <a href="http://en.wikipedia.org/wiki/Book_design">book design</a>. They are not mandatory, but they can be used, for example, to number your appendixes with letters instead of numbers and similar.</li> <li><code>preface</code>, <code>chapter</code>, <code>appendix</code> are just a way to wrap content in <code>&lt;div&gt;</code> tags, from an <span class="caps">HTML</span> point of view, but they are also necessary to nest the content of your document and generate the Table of Contents automatically, together through <code>@title</code> attributes.</li> </ul> - <div class="navigation"><a href="/glyph/book/getting_started/create_project.html">Creating your first Glyph Project &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/configuration.html">&rarr; Project Configuration</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/struct.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/getting_started/create_project.html">Creating your first Glyph Project &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/getting_started/configuration.html">&rarr; Project Configuration</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/index.htmlcontent/glyph/book/index.html

@@ -1,65 +1,66 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Rapid Document Authoring Framework</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Document Authoring Framework</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> -</head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <h2>Glyph &mdash; Rapid Document Authoring Framework</h2> - <hr /> - <div id="content-body"> - <div class="contents"> -<h2 class="toc-header" id="toc">Table of Contents</h2> + </header> + <article class="page"> + <header> + <hgroup> + <h1>Glyph - Document Authoring Framework</h1> + <h2>Online Help</h2> + </hgroup> + </header> + <section id="body-text"> + <nav class="contents"> +<h1 class="toc-header" id="toc">Table of Contents</h1> <ol class="toc"> <li class="frontmatter introduction"><a href="/glyph/book/introduction.html#h_1">Introduction</a></li><li><ol><li class="frontmatter section"><a href="/glyph/book/license.html#h_12">License</a></li></ol></li> <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>

@@ -76,86 +77,64 @@ <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_122">Core Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_block.html#h_166">Block Macros</a></li><li class="appendix section"><a href="/glyph/book/macros/macros_inline.html#h_186">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_202">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_230">Changelog</a></li> </ol> -</div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/index.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - - </body> + </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> </html>
M content/glyph/book/introduction.htmlcontent/glyph/book/introduction.html

@@ -1,71 +1,71 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Introduction</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Introduction</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Introduction</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Introduction</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/license.html">&rarr; License</a></div> + <nav><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/license.html">&rarr; License</a></nav> <p>Glyph is a <em>Rapid Document Authoring Framework</em>.</p> <p>With Glyph, creating and maintaining any kind of document becomes as easy as&#8230; <em>programming</em>. Glyph enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards customization and extensibility.</p> -<p><br style="clear:both" /></p> -<div class="section"> -<h3 id="h_2">Main Features</h3> -<div class="section"> -<h4 id="h_3">Command Line Interface</h4> +<section class="section"> +<header><h1 id="h_2">Main Features</h1></header> +<section class="section"> +<header><h1 id="h_3">Command Line Interface</h1></header> <p>Glyph is 100% command line. Its interface resambles <a href="http://git-scm.com/">Git&#8217;s</a> for its simplicity and power (thanks to the <a href="http://github.com/davetron5000/gli">gli</a> gem). Here are some example commands:</p> <ul> <li><code>glyph init</code> &#8212; to initialize a new Glyph project in the current (empty) directory.</li>

@@ -77,9 +77,9 @@ <li><code>glyph compile readme.glyph</code> &#8212; to compile a <em>readme.glyph</em> located in the current directory into a single <span class="caps">HTML</span> file.</li>

<li><code>glyph outline -l 2</code> &#8212; Display the document outline, up to second-level headers.</li> <li><code>glyph stats</code> &#8212; Display project statistics.</li> </ul> -</div> -<div class="section"> -<h4 id="h_4">Minimalist Syntax</h4> +</section> +<section class="section"> +<header><h1 id="h_4">Minimalist Syntax</h1></header> <p>Glyph syntax rules can be explained using Glyph itself:</p> <div class="code"> <pre>

@@ -136,9 +136,9 @@ &lt;/div&gt;

</code> </pre> </div> -</div> -<div class="section"> -<h4 id="h_5">Content Reuse</h4> +</section> +<section class="section"> +<header><h1 id="h_5">Content Reuse</h1></header> <p>Finding yourself repeating the same sentence over an over? Glyph allows you to create snippets. Within snippets. Within other snippets (and so on, for a long long time&#8230;) as long as you don&#8217;t define a snippet by defining itself, which would be kinda nasty (and Glyph would complain!):</p> <div class="code"> <pre>

@@ -160,36 +160,36 @@ </code>

</pre> </div> <p>If yourself dreaming about <em>parametric</em> snippets, just create your own macros (see the <a href="http://github.com/h3rald/glyph/blob/master/book/text/changelog.glyph">source</a> of Glyph&#8217;s changelog, just to have an idea).</p> -</div> -<div class="section"> -<h4 id="h_6">Automation of Common Tasks</h4> +</section> +<section class="section"> +<header><h1 id="h_6">Automation of Common Tasks</h1></header> <p>If you&#8217;re writing a book, you shouldn&#8217;t have to worry about pagination, headers, footers, table of contents, section numbering or similar. Glyph understands you, and will take care of everything for you (with a little help from CSS3, sometimes).</p> -</div> -<div class="section"> -<h4 id="h_7">Reference Validation</h4> +</section> +<section class="section"> +<header><h1 id="h_7">Reference Validation</h1></header> <p>Feel free to add plenty of links, snippets, bookmarks, &#8230; if Glyph doesn&#8217;t find something, it will definitely complain. Broken references are a thing on the past, and you don&#8217;t need to worry about it.</p> -</div> -<div class="section"> -<h4 id="h_8">Extreme Extensibility</h4> +</section> +<section class="section"> +<header><h1 id="h_8">Extreme Extensibility</h1></header> <ul> <li>You miss a <code>!!!</code> macro to format really, <em>really</em> important things? Create it. In under 3 seconds, in Ruby or Glyph itself. And yes, you can use special characters, too.</li> <li>You want your own, very special special <code>glyph create --everything</code> command to create all <em>you</em> need in a Glyph project? You can do it. Using your own Rake tasks, too.</li> <li>You want Glyph to output <span class="caps">ODF</span> files? You can do it, and you&#8217;ll be able to run <code>glyph generate -f odf</code>. This would probably require a little more time, but it&#8217;s trivial, from a technical point of view.</li> </ul> -</div> -<div class="section"> -<h4 id="h_9">Convention over Configuration</h4> +</section> +<section class="section"> +<header><h1 id="h_9">Convention over Configuration</h1></header> <p>Put your text files in <code>/text</code>, your images in <code>/images</code>, add custom macros in a <code>macro</code> folder within your <code>/lib</code> folder&#8230; you get the picture: Glyph has its special places.</p> <p>Nonetheless, you also have 1 (<em>one</em>) configuration file to customize to your heart&#8217;s content (with smart defaults).</p> -</div> -<div class="section"> -<h4 id="h_10">Free and Open Source</h4> +</section> +<section class="section"> +<header><h1 id="h_10">Free and Open Source</h1></header> <p>Glyph is 100% Open Source Software, developed using the Ruby Programming Language and licensed under the very permissive terms of the <a href="http://www.opensource.org/licenses/mit-license.php"><span class="caps">MIT</span> License</a>.</p> <p>If you have Ruby installed, just run <code>gem install glyph</code>. That&#8217;s all it takes.</p> -</div> -</div> -<div class="section"> -<h3 id="h_11">Resources</h3> +</section> +</section> +<section class="section"> +<header><h1 id="h_11">Resources</h1></header> <ul> <li>Home Page: <a href="http://www.h3rald.com/glyph/">http://www.h3rald.com/glyph/</a></li> <li>Repository: <a href="http://www.github.com/h3rald/glyph/">http://www.github.com/h3rald/glyph/</a></li>

@@ -201,87 +201,65 @@ <li>Book (Web): <a href="http://www.h3rald.com/glyph/book/">http://www.h3rald.com/glyph/book/</a></li>

<li>Reference Documentation: <a href="http://rubydoc.info/gems/glyph/">http://rubydoc.info/gems/glyph/</a></li> <li>User Group: <a href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a></li> </ul> -</div> - <div class="navigation"><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/license.html">&rarr; License</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_0.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/license.html">&rarr; License</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/license.htmlcontent/glyph/book/license.html

@@ -1,64 +1,65 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - License</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - License</title> + + + + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + </header> + <article class="page"> + <header> + <hgroup> + <h1>License</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>License</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/introduction.html">Introduction &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/acknowledgements.html">&rarr; Acknowledgements</a></div> + <nav><a href="/glyph/book/introduction.html">Introduction &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/acknowledgements.html">&rarr; Acknowledgements</a></nav> <p>Copyright &copy; 2010 <strong>Fabio Cevasco</strong>, <a href="http://www.h3rald.com">http://www.h3rald.com</a></p> <div class="code">

@@ -84,86 +85,64 @@ THE SOFTWARE.

</code> </pre> </div> - <div class="navigation"><a href="/glyph/book/introduction.html">Introduction &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/acknowledgements.html">&rarr; Acknowledgements</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_1.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/introduction.html">Introduction &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/acknowledgements.html">&rarr; Acknowledgements</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/macros/macros_block.htmlcontent/glyph/book/macros/macros_block.html

@@ -1,67 +1,68 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Block Macros</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Block Macros</title> + + - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Block Macros</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> - <h2>Block Macros</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/macros/macros_core.html">Core Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_inline.html">&rarr; Inline Macros</a></div> + <nav><a href="/glyph/book/macros/macros_core.html">Core Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_inline.html">&rarr; Inline Macros</a></nav> - <div class="section"> -<h4 id="m_box">box</h4> + <section class="section"> +<header><h1 id="m_box">box</h1></header> <p>Creates a titled box (<code>&lt;div&gt;</code> tag).</p>

@@ -69,15 +70,16 @@

<div class="example"><p> <strong>Example</strong> </p> - <pre class="lazy"><span class="line-numbers"> 1 </span> box[Why boxes?| -<span class="line-numbers"> 2 </span> Boxes can be used to make a section of text stand out from the rest of the document. -<span class="line-numbers"> 3 </span> ] -</pre></div> + <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></div> - <div class="section"> -<h5 id="h_168">Parameters</h5> + <section class="section"> +<header><h1 id="h_168">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -95,14 +97,14 @@ <td>The box text.</td>

</tr> </table> -</div> +</section> -</div> +</section> - <div class="section"> -<h4 id="m_codeblock">codeblock</h4> + <section class="section"> +<header><h1 id="m_codeblock">codeblock</h1></header> <p>Used to render a block of code within <code>&lt;pre&gt;</code> and <code>&lt;code&gt;</code> tags.</p>

@@ -110,17 +112,18 @@

<div class="example"><p> <strong>Example</strong> </p> - <pre class="lazy"><span class="line-numbers"> 1 </span> code[ -<span class="line-numbers"> 2 </span> def hello -<span class="line-numbers"> 3 </span> puts &quot;Hello World&quot; -<span class="line-numbers"> 4 </span> end -<span class="line-numbers"> 5 </span> ] -</pre></div> + <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></div> - <div class="section"> -<h5 id="h_170">Parameters</h5> + <section class="section"> +<header><h1 id="h_170">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -132,21 +135,21 @@ <td>The code to be formatted.</td>

</tr> </table> -</div> +</section> -<div class="section"> -<h5 id="h_171">Remarks</h5> +<section class="section"> +<header><h1 id="h_171">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> -</div> +</section> -</div> +</section> - <div class="section"> -<h4 id="m_figure">figure</h4> + <section class="section"> +<header><h1 id="m_figure">figure</h1></header> <p>Includes an image in the document, with an optional caption (see <a href="/glyph/book/text_editing/images.html#img_fig">Images and Figures</a>).</p>

@@ -154,16 +157,17 @@

<div class="example"><p> <strong>Example</strong> </p> - <pre class="lazy"><span class="line-numbers"> 1 </span> figure[ -<span class="line-numbers"> 2 </span> graph.png|Monthly Pageviews -<span class="line-numbers"> 3 </span> @width[90%] -<span class="line-numbers"> 4 </span> ] -</pre></div> + <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></div> - <div class="section"> -<h5 id="h_173">Parameters</h5> + <section class="section"> +<header><h1 id="h_173">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -181,11 +185,11 @@ <td>The image caption <em>(optional)</em>.</td>

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

@@ -197,14 +201,14 @@ <td>Any attribute supported by the <a href="http://www.w3schools.com/tags/tag_IMG.asp">img tag</a>.</td>

</tr> </table> -</div> +</section> -</div> +</section> - <div class="section"> -<h4 id="m_image">image</h4> + <section class="section"> +<header><h1 id="m_image">image</h1></header> <p>Includes an image in the document</p>

@@ -212,17 +216,18 @@

<div class="example"><p> <strong>Example</strong> </p> - <pre class="lazy"><span class="line-numbers"> 1 </span> img[ -<span class="line-numbers"> 2 </span> holidays/landscape.jpg -<span class="line-numbers"> 3 </span> @class[photo] -<span class="line-numbers"> 4 </span> @style[border: 1px solid black;] -<span class="line-numbers"> 5 </span> ] -</pre></div> + <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></div> - <div class="section"> -<h5 id="h_176">Parameters</h5> + <section class="section"> +<header><h1 id="h_176">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -234,11 +239,11 @@ <td>The name of the image file (relative to the <code>images/</code> folder).</td>

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

@@ -250,22 +255,22 @@ <td>Any attribute supported by the <a href="http://www.w3schools.com/tags/tag_IMG.asp">img tag</a>.</td>

</tr> </table> -</div> +</section> -</div> +</section> - <div class="section"> -<h4 id="m_navigation">navigation</h4> + <section class="section"> +<header><h1 id="m_navigation">navigation</h1></header> <p>Displays links to the document&#8217;s <span class="caps">TOC</span> and the previous/next topic (used only in <a href="/glyph/book/extending/layouts.html#layouts">layouts</a>).</p> - <div class="section"> -<h5 id="h_179">Parameters</h5> + <section class="section"> +<header><h1 id="h_179">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -277,22 +282,22 @@ <td>The ID of the current topic.</td>

</tr> </table> -</div> +</section> -</div> +</section> - <div class="section"> -<h4 id="m_note">note</h4> + <section class="section"> +<header><h1 id="m_note">note</h1></header> <p>Creates a note <code>div</code> containing the value.</p> <strong>Aliases:</strong> <code>important, caution, tip</code> <p><strong>Example:</strong> <code>note[This is a note.]</code></p> - <div class="section"> -<h5 id="h_181">Parameters</h5> + <section class="section"> +<header><h1 id="h_181">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -304,130 +309,108 @@ <td>The text of the note.</td>

</tr> </table> -</div> +</section> -</div> +</section> - <div class="section"> -<h4 id="m_pubdate">pubdate</h4> + <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><strong>Example:</strong> <code>pubdate[]</code></p> -</div> +</section> - <div class="section"> -<h4 id="m_revision">revision</h4> + <section class="section"> +<header><h1 id="m_revision">revision</h1></header> <p>Renders the revision of the document (based on the <a href="/glyph/book/config/document.html#s_document_revision"><code>document.revision</code></a> setting) within a <code>&lt;div&gt;</code> tag.</p> <p><strong>Example:</strong> <code>revision[]</code></p> -</div> +</section> - <div class="section"> -<h4 id="m_subtitle">subtitle</h4> + <section class="section"> +<header><h1 id="m_subtitle">subtitle</h1></header> <p>Renders the subtitle of the document (based on the <a href="/glyph/book/config/document.html#s_document_subtitle"><code>document.subtitle</code></a> setting) within a <code>&lt;h2&gt;</code> tag.</p> <p><strong>Example:</strong> <code>subtitle[]</code></p> -</div> +</section> - <div class="section"> -<h4 id="m_title">title</h4> + <section class="section"> +<header><h1 id="m_title">title</h1></header> <p>Renders the title of the document (based on the <a href="/glyph/book/config/document.html#s_document_title"><code>document.title</code></a> setting) within a <code>&lt;h1&gt;</code> tag.</p> <p><strong>Example:</strong> <code>title[]</code></p> -</div> +</section> - <div class="navigation"><a href="/glyph/book/macros/macros_core.html">Core Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_inline.html">&rarr; Inline Macros</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/t_49.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></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> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); + <nav><a href="/glyph/book/macros/macros_core.html">Core Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_inline.html">&rarr; Inline Macros</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></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> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/macros/macros_core.htmlcontent/glyph/book/macros/macros_core.html

@@ -1,76 +1,77 @@

-<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>Glyph - Core Macros</title> - <meta name="author" content="Fabio Cevasco" /> - <meta name="copyright" content="Fabio Cevasco" /> - <meta name="robots" content="all, follow" /> - <meta name="Revisit-After" content="2 Days" /> - <meta name="language" content="en" /> - <meta name="target_country" content="en-us" /> - <meta name="country" content="United States" /> - <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, glyph, technical writing, html, html5, book" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta content="44.388041;9.073248" name="ICBM" /> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Glyph - Core Macros</title> + - <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="wrapper"> - <a href="http://github.com/h3rald/h3rald"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> - <div id="header"> - <!--[if lte IE 6]> - <div id="ie-warning"> - This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More...</a>] - </div> - <![endif]--> - <!-- HEADER START --> - <div id="header-container"> - <div id="header-left"> - <h1><span class="logo"></span><a id="logo" href="/" title="H3RALD"></a></h1> - </div> - <div id="header-right"> - <ul id="navigation"> - <li><span class="preload nav-archives"></span><a id="nav-archives" href="/archives/" title="ARCHIVES"></a></li> - <li><span class="preload nav-projects"></span><a id="nav-projects" href="/projects/" title="PROJECTS"></a></li> - <li><span class="preload nav-about"></span><a id="nav-about" href="/about/" title="ABOUT"></a></li> - <li><span class="preload nav-other"></span><a id="nav-other" href="/other/" title="OTHER"></a></li> - </ul> - </div> - </div> - </div> - <!-- HEADER END --> - <div class="ribbon"> - </div> - <!-- MAIN START --> - <div id="main"> - <!-- CONTAINER START --> - <div id="container"> - <!-- CONTENT START --> - <div id="content" class="clearfixstandard"> - <div id="page-links"> - <span><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"></script></span> - </div> - <h2>Core Macros</h2> - <hr /> - <div id="content-body"> - <div class="navigation"><a href="/glyph/book/ref_commands.html">Command Reference &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_block.html">&rarr; Block Macros</a></div> + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="copyright" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="language" content="en" /> + <meta name="target_country" content="en-us" /> + <meta name="country" content="United States" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + + <meta name="keywords" content="h3rald, fabio cevasco, glyph" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + + + <link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + + <!--[if lte IE 8]> + <script src="/js/html5.js" type="text/javascript"></script> + <![endif]--> + </head> + <body> + <!--[if lte IE 6]> + <div id="ie-warning"> + This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better &ndash; and <em>safer</em> &ndash; web experience. [<a href="http://browsehappy.com/browsers/">Read More &raquo;</a>] + </div> + <![endif]--> + + <section id="container"> + + <header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + + <nav class="section"> + /<a href="/projects/" rel="archives">PROJECTS</a> + </nav> + + </header> + <article class="page"> + <header> + <hgroup> + <h1>Core Macros</h1> + </hgroup> + </header> + <section id="body-text" class="hyphenate"> + + <nav><a href="/glyph/book/ref_commands.html">Command Reference &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_block.html">&rarr; Block Macros</a></nav> - <div class="section"> -<h4 id="m_alias">alias</h4> + <section class="section"> +<header><h1 id="m_alias">alias</h1></header> <p>Creates a macro alias.</p> <p><strong>Example:</strong> <code>alias[s|section]</code></p> - <div class="section"> -<h5 id="h_124">Parameters</h5> + <section class="section"> +<header><h1 id="h_124">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -88,22 +89,22 @@ <td>The name of an existing macro.</td>

</tr> </table> -</div> +</section> -</div> +</section> - <div class="section"> -<h4 id="m_and">and</h4> + <section class="section"> +<header><h1 id="m_and">and</h1></header> <p>Conditional <code>and</code> operator, to be used with the <a href="#m_condition"><code>condition</code></a> macro.</p> <p><strong>Example:</strong> <code>?[and[true|false]|This is never displayed.]</code></p> - <div class="section"> -<h5 id="h_126">Parameters</h5> + <section class="section"> +<header><h1 id="h_126">Parameters</h1></header> <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th>

@@ -120,22 +121,22 @@ <td>The second expression to test</td>

</tr> </table> -</div> +</section> -</div> +</section> - <div class="section"> -<h4 id="m_comment">comment</h4> + <section class="section"> +<header><h1 id="m_comment">comment</h1></header> <p>Evaluates to nothing. Used to add comments in a Glyph document that will not be displayed in output files.</p> <strong>Aliases:</strong> <code>--</code> <p><strong>Example:</strong> <code>--[=>[#link|This link will not be evaluated]]</code></p>