all repos — h3rald @ b10004d6f6b6778b7bc15a6a875aeeb138c6542c

The sources of https://h3rald.com

Added Glyph book.
h3rald h3rald@h3rald.com
Fri, 03 Sep 2010 18:10:28 +0200
commit

b10004d6f6b6778b7bc15a6a875aeeb138c6542c

parent

0bb58e4f73c1ea1cc231e6eb057d2c37b9aec23f

70 files changed, 13095 insertions(+), 75 deletions(-)

jump to
M RulesRules

@@ -76,6 +76,7 @@ # Now compile the PDF (works if Prince is installed)

target = Glyph['document.output'] Glyph['document.output'] = 'pdf' Glyph['document.author'] = "Fabio Cevasco" + Glyph['output.pdf.generator'] = "prince" Glyph['site.root'] = ".." Glyph['document.date'] = item[:date].strftime "%A, %d %B %Y" Glyph['document.title'] = item[:title]

@@ -111,6 +112,10 @@ end

route '/styles/*' do item.identifier.chop + '.css' +end + +route '/glyph/book/' do + '/glyph/book/index.html' end route '/glyph/book/*' do
M content/css/_code.sasscontent/css/_code.sass

@@ -6,12 +6,13 @@ border: 1px solid #cccccc

background: #dedede padding: 5px margin: 5px 0 + font-size: 90% overflow: auto code +code_font - + font-size: 90% .highlight .hll
M content/css/_definitions.sasscontent/css/_definitions.sass

@@ -4,7 +4,7 @@ $gray: #555555

// Mixins =default_border - border: 1px dashed $gray + border: 1px solid $gray =button_img($img) background: url(../images/theme/buttons/#{$img}.png)
M content/css/_elements.sasscontent/css/_elements.sass

@@ -21,8 +21,15 @@ blockquote, .note

color: $gray font-style: italic padding: 0 0 0 33px - margin: 0 + margin: 5px + +blockquote background: url(../images/theme/quote.png) no-repeat top left + +.note .note-title + font-style: normal + font-weight: bold + padding-right: 1em .hidden display: none

@@ -209,6 +216,24 @@ .toc-top-link

font-size: 13px margin-left: 15px +.contents > #toc + display: none + +.contents ol li + list-style-type: none + +div.navigation + display: block + margin: auto + text-align: center + margin: 2em 0 + +div.navigation a + font-weight: bold + font-variant: small-caps + margin-left: 3em + margin-right: 3em + #content .article-buttons li font-family: "Arial", "Sans-serif" font-size: 0.8em

@@ -238,7 +263,11 @@ background: #121212

padding: 5px table + margin: 10px auto +default_border + +tr + border-bottom: 1px solid $gray table &#timeline, &#taglist

@@ -248,10 +277,11 @@ tr, td, th

padding: 5px td - border-left: 1px dashed $gray - border-right: 1px dashed $gray + border-left: 1px solid $gray + border-right: 1px solid $gray th + background: #cecece +default_border #taglist, #timeline
M content/glyph.textilecontent/glyph.textile

@@ -11,70 +11,44 @@ - "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/h3rald/glyph/blob/master/book/output/pdf/glyph.pdf -- "Docs": http://yardoc.org/docs/h3rald-glyph/ +- "Book (PDF)": http://github.com/downloads/h3rald/glyph/glyph.pdf +- "Book (Web)": 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.3.0 +version: 0.4.0 ----- <%= render 'project_data', :tag => 'glyph' %> +<div class="section"> Glyph is a _Rapid Document Authoring Framework_. -With Glyph, you can manage your documents tidily in _projects_ and generate deliverables in different formats such as HTML or PDF (through <a href="http://www.princexml.com/">Prince</a>). +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" /> + <br style="clear:both" /> -<div class="section"> + <div class="section"> <h3 id="h_1">Main Features</h3> -Glyph comes with its very own macro system to perform a wide variety of advanced tasks: -* Generate block-level HTML tags not commonly managed by lightweight markups, like @head@, @body@, @div@ and @table@. -* Create and validate internal and external links. -* Include and validate images and figures. -* Automatically determine header levels based on the document structure. -* Automatically generate a Table of Contents based on the document structure. -* Store common snippets of text in a single YAML file and use them anywhere in your document, as many times as you need. -* Store configuration settings in a YAML file and use them anywhere in your document, as many times as you need. -* Evaluate Ruby code within your document. -* Include content only if certain conditions are satisfied. -* Define macros, snippets and configuration settings directly within your document. -* Highlight source code. -* Call macros from other macros (including snippets), avoiding mutual calls. -* Include text files within other text files. -* Include the value of any configuration setting (like author, title) in the document. -* Filter input explicitly or implicitly (based on file extensions). -* Manage draft comments and todo items. -* Provide a simple, less-verbose syntax to write XML code. - -</div> - -<div class="section"> -<h3 id="h_2">Installation</h3> -@gem install glyph@ -- simple, as always. - -</div> - <div class="section"> -<h3 id="h_3">Essential Glyph commands</h3> +<h4 id="h_2">Command Line Interface</h4> 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. * @glyph add introduction.textile@ -- to create a new file called _introduction.textile_. * @glyph compile@ -- to compile the current document into a single HTML file. * @glyph compile --auto@ -- to keep recompiling the current document every time a file is changed. -* @glyph compile -f pdf@ -- to compile the current document into HTML and then transform it into PDF using <a href="http://www.princexml.com/">Prince</a>. +* @glyph compile -f pdf@ -- to compile the current document into HTML and then transform it into PDF. * @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> -<div class="section"> -<h3 id="macros_nutshell">Glyph macros in a nutshell</h3> -Format your documents using Textile or Markdown, and use Glyph Macros to do everything else: - -**Glyph Source:** - + <div class="section"> +<h4 id="h_3">Minimalist Syntax</h4> +Glyph syntax rules can be explained using Glyph itself: + <div class="code"> <pre> <code>

@@ -85,25 +59,24 @@ You can use Glyph macros in conjunction

with _Textile_ or _Markdown_ to produce HTML files effortlessly. ] - p[ -Alternatively, you can just use em[Glyph itself] -to generate HTML tags. - ] + p[Alternatively, you can just use em[Glyph itself] to generate HTML tags.] section[ @title[What about PDFs?] @id[pdf] + p[ Once you have a single, well-formatted HTML file, converting it to PDF is -extremely easy with a 3rd-party -renderer like =>[http://www.princexml.com|Prince]. +extremely easy with a free 3rd-party +renderer like =>[http://www.princexml.com|Prince] +or =>[http://code.google.com/p/wkhtmltopdf/|wkhtmltopdf]. + ] ] ] </code> </pre> </div> - -**HTML Output:** - +The Glyph code above corresponds to the following HTML code: + <div class="code"> <pre> <code>

@@ -114,17 +87,18 @@ You can use Glyph macros in conjunction with

<em>Textile</em> or <em>Markdown</em> to produce HTML files effortlessly. </p> + <p> + Alternatively, you can just use <em>Glyph itself</em> + to generate HTML tags. + </p> <div class="section"> <h3 id="pdf">What about PDFs?</h3> <p> Once you have a single, well-formatted HTML file, converting it to PDF is - extremely easy with a 3rd-party renderer - like <a href="http://www.princexml.com">Prince</a>. - </p> - <p> - Alternatively, you can just use <em>Glyph itself</em> - to generate HTML tags. + extremely easy with a free 3rd-party renderer + like <a href="http://www.princexml.com">Prince</a> + or <a href="http://code.google.com/p/wkhtmltopdf/\">wkhtmltopdf</a>. </p> </div> </div>

@@ -134,4 +108,80 @@ </div>

</div> -<%= render 'project_updates', :tag => 'glyph' %> + <div class="section"> +<h4 id="h_4">Content Reuse</h4> +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"> +<pre> +<code> +snippet:[entities|snippets and macros] +snippet:[custom_definitions| + p[Glyph allows you to define your own &[entities].] +] +&[custom_definitions] +</code> +</pre> +</div> + ...which results in: + +<div class="code"> +<pre> +<code> +<p>Glyph allows you to define your own snippets and macros.</p> +</code> +</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> +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> +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> +* 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> +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> +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> + +</div> + <div class="section"> +<h3 id="h_10">Resources</h3> +* 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> +* Development Wiki <a href="http://wiki.github.com/h3rald/glyph">http://wiki.github.com/h3rald/glyph</a> +* RubyGem Download <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a> +* Book (PDF): <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">http://github.com/downloads/h3rald/glyph/glyph.pdf</a> +* 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> + +</div> + +<%= render 'project_updates', :tag => 'glyph' %>
A content/glyph/book/acknowledgements.html

@@ -0,0 +1,143 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Acknowledgements - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <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> + <li><a href="http://www.jabbslad.com">Jamie Atkinson</a> (Jabbslad)</li> + <li><a href="http://koraktor.github.com">Sebastian Staudt</a> (koraktor)</li> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/changelog.html

@@ -0,0 +1,369 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Changelog - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + + + + + + <div class="section"> +<h3 id="h_231">v0.4.0 &ndash; September 4th 2010</h3> +<div class="section"> +<h4 id="h_232">13 Features Implemented</h4> +<table><tr><th>ID</th> + <th>Description</th></tr> + + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/40">#40</a></td> + <td><p>A new <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command can be used to display statistics about project files, snippets, macros, bookmarks and links.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/73">#73</a></td> + <td><p>It is now possible to validate online <span class="caps">HTTP</span> links.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/112">#112</a></td> + <td><p>It is now possible to use <em>wkhtmltopdf</em> instead of Prince to generate <span class="caps">PDF</span> files from <span class="caps">HTML</span> files.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/114">#114</a></td> + <td><p>It is now possible to generate documents comprised of multiple files (topics).</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/115">#115</a></td> + <td><p>It is now possible to define layouts (used when generating multi-file outputs) using Glyph macros.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/120">#120</a></td> + <td><p>It is now possible to compile your project to a single HTML5 file (<code>html5</code> output) or multiple files (<code>web5</code> output)</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/135">#135</a></td> + <td><p>Stylesheets can now be linked and imported as well as embedded.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/138">#138</a></td> + <td><p><code>web</code> and <code>web5</code> output formats inherit <code>html</code> macros.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/142">#142</a></td> + <td><p>A new <a href="/glyph/book/macros/macros_block.html#m_navigation"><code>navigation</code></a> macro can be used in <code>web</code> and <code>web5</code> outputs to navigate through topics.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/143">#143</a></td> + <td><p>A topic-based <span class="caps">TOC</span> is generated when compiling to <code>web</code> or <code>web5</code></p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/144">#144</a></td> + <td><p>Two new validators are now available to check whether a macro has (or doesn&#8217;t have) a certain ancestor: <code>within</code> and <code>not_within</code>.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/147">#147</a></td> + <td><p>The default stylesheets provided by Glyph are now compatible with HTML5 outputs (html5 and web5).</p></td></tr> + + <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> + + + <div class="section"> +<h4 id="h_233">6 Bugs Fixed</h4> +<table><tr><th>ID</th> + <th>Description</th></tr> + + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/133">#133</a></td> + <td><p>Added <span class="caps">HTML</span> charset to Glyph documents (utf-8).</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/136">#136</a></td> + <td><p>Moved utility functions to separate <code>Glyph::Utils</code> module.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/139">#139</a></td> + <td><p>Heavily restructured Glyph configuration.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/140">#140</a></td> + <td><p>Added <code>Glyph::Macro::Helpers</code> module to avoid code duplication in macros for different output formats.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/141">#141</a></td> + <td><p>Prevented non-rb files to be loaded as macros.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/145">#145</a></td> + <td><p>Dotfiles are now ignored by <a href="/glyph/book/ref_commands.html#c_init"><code>init</code></a> command.</p></td></tr></table> + +</div> + +</div> + + <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> +<table><tr><th>ID</th> + <th>Description</th></tr> + + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/39">#39</a></td> + <td><p>A new <a href="/glyph/book/ref_commands.html#c_outline"><code>outline</code></a> command is available to display the document outline.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/110">#110</a></td> + <td><p>It is now possible to use Glyph language to produce arbitrary <span class="caps">XML</span> code.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/111">#111</a></td> + <td><p>System settings are now stored within a <code>system.*</code> namespace and cannot be changed via the <a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> macro or the <a href="/glyph/book/ref_commands.html#c_config"><code>config</code></a> command.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/116">#116</a></td> + <td><p>It is now possible to use named attributes within Glyph macros.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/119">#119</a></td> + <td><p><a id="new_parser"></a>A new parser was implemented from scratch to improve performance. Treetop gem no longer required.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/121">#121</a></td> + <td><p>Some macros have been removed in favor of <span class="caps">XML</span> fallback, others have been updated.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/123">#123</a></td> + <td><p>The SyntaxNode class has been specialized to differentiate between macros, attributes, parameters, text and escapes.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/124">#124</a></td> + <td><p>Implemented new <a href="/glyph/book/macros/macros_structure.html#m_article"><code>article</code></a> macro and <a href="/glyph/book/macros/macros_structure.html#m_book"><code>book</code></a> macro.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/126">#126</a></td> + <td><p>A new <a href="/glyph/book/macros/macros_core.html#m_rewrite_"><code>rewrite:</code></a> macro has been implemented to create simple macros using just Glyph code.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/127">#127</a></td> + <td><p>A new <a href="/glyph/book/macros/macros_core.html#m_alias"><code>alias</code></a> macro has been implemented to create macro aliases.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/128">#128</a></td> + <td><p>A blacklist for <span class="caps">XML</span> tags has been exposed via the <code>language.options.xml_blacklist</code> setting.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/129">#129</a></td> + <td><p>The <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro can now be used in lite mode, it can evaluate ruby files and requires relative paths.</p></td></tr> + + <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> + + + <div class="section"> +<h4 id="h_236">3 Bugs Fixed</h4> +<table><tr><th>ID</th> + <th>Description</th></tr> + + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/109">#109</a></td> + <td><p>Performance has been dramatically improved by implementing a parser from scratch (see <a href="#new_parser">#119</a>)</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/122">#122</a></td> + <td><p>Macro encoding/decoding no longer necessary due to the new parser (see <a href="#new_parser">#119</a>)</p></td></tr> + + <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> + +</div> + + <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> +<table><tr><th>ID</th> + <th>Description</th></tr> + + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/62">#62</a></td> + <td><p>A new <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro is available to highlight source code (CodeRay or UltraViolet required).</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/76">#76</a></td> + <td><p>It is now possible to use Glyph programmatically via the new <code>Glyph#filter</code> and <code>Glyph#compile</code> methods.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/87">#87</a></td> + <td><p>It is now possible to define snippets inside a Glyph source file using the <a href="/glyph/book/macros/macros_core.html#m_snippet_"><code>snippet:</code></a> macro.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/88">#88</a></td> + <td><p>It is now possible to change configuration settings inside a Glyph source file using the <a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> macro (Jabbslad).</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/89">#89</a></td> + <td><p>It is now possible to compile a single Glyph source file without creating a Glyph project.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/92">#92</a></td> + <td><p>6 new macros have been defined to allow conditional processing (<a href="/glyph/book/macros/macros_core.html#m_condition"><code>condition</code></a> macro, <a href="/glyph/book/macros/macros_core.html#m_eq"><code>eq</code></a> macro, <a href="/glyph/book/macros/macros_core.html#m_not"><code>not</code></a> macro, <a href="/glyph/book/macros/macros_core.html#m_and"><code>and</code></a> macro, <a href="/glyph/book/macros/macros_core.html#m_or"><code>or</code></a> macro, <a href="/glyph/book/macros/macros_core.html#m_match"><code>match</code></a> macro)</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/94">#94</a></td> + <td><p>It is now possible to add <em>validators</em> to macros, for example to check the number of parameters they take.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/97">#97</a></td> + <td><p>The <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command command can now take an extra <code>--auto</code> switch to trigger document auto-regeneration whenever a source file is changed (koraktor).</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/99">#99</a></td> + <td><p>Added a <code>document.draft</code> setting. If set to <code>true</code>, comments and TODOs are rendered in output files.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/100">#100</a></td> + <td><p><a id="system_css"></a>Glyph <span class="caps">CSS</span> files are no longer copied to new projects, but they can be referenced as if they were (see also <a href="#css_not_copied">#93</a>).</p></td></tr> + + <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> + + + <div class="section"> +<h4 id="h_239">8 Bugs Fixed</h4> +<table><tr><th>ID</th> + <th>Description</th></tr> + + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/86">#86</a></td> + <td><p>Warning and error messages have been updated, and it is now possible to show additional debug information. Additionally, syntax errors are now handled before the document is processed.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/93">#93</a></td> + <td><p><a id="css_not_copied"></a>Default css files were not copied when creating a new project. The issue has been resolved by allowing the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro to reference Glyph&#8217;s system styles (see also <a href="#system_css">#100</a>).</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/95">#95</a></td> + <td><p>The <a href="/glyph/book/ref_commands.html#c_config"><code>config</code></a> command did not save data to <span class="caps">YAML</span> configuration files. This has been fixed ensuring that internal configuration overrides are not saved to the <span class="caps">YAML</span> file too.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/98">#98</a></td> + <td><p>Glyph is now fully compatible with Ruby 1.9.1 and JRuby 1.4.0.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/101">#101</a></td> + <td><p>Additional tests have been developed to improve Textile support. There should no longer be errors when using textile block elements inside Glyph macros.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/103">#103</a></td> + <td><p>Fixed a bug that caused test failures when deleting the test project directory.</p></td></tr> + + <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/104">#104</a></td> + <td><p>Nested Glyph macros calling <code>Macro#interpret</code> no longer ignore escape delimiters.</p></td></tr> + + <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> + +</div> + + <div class="section"> +<h3 id="h_240">v0.1.0 &ndash; April 8th 2010</h3> +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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/compiling/compiling.html

@@ -0,0 +1,194 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Compiling a project - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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 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> + <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> + <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> +<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> + <p> +<code>glyph compile -f html5</code> +</p> + +</div> +<div class="section"> +<h4 id="h_42">PDF Output</h4> +<p>To generate a PDF document, you must specify <code>pdf</code> as format, like this:</p> + <p> +<code>glyph compile -f pdf</code> +</p> + <p>The command above will attempt to compile the project into an HTML document and then call a third-party PDF generator to convert it into a PDF file.</p> + <p>Currently, Glyph supports:</p> +<ul> + <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"> +<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"> +<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> + +</div> +<div class="section"> +<h4 id="web_output">Web/Web5 Output</h4> +<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> + <li>The document code is parsed as normal</li> + <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> +<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"> +<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> + +</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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/compiling/lite_mode.html

@@ -0,0 +1,153 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Compiling single Glyph files - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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> + <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> +<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> + <li>Project configuration settings can only be defined inside the source file, using the <a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> macro.</li> + <li>Custom macros can only be defined inside the source file, using the <a href="/glyph/book/macros/macros_core.html#m_macro_"><code>macro:</code></a> macro.</li> + <li>Images must be referenced with their absolute path, or a path relative to the current directory, and will not be copied anywhere when the output file is generated.</li> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/compiling/programmatic_usage.html

@@ -0,0 +1,209 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Using Glyph programmatically - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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> + <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> + <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"> +<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> +<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> + <th>Reader Method</th> + <th>Description</th></tr> + <tr><td>Test Mode</td> + <td> +<code>Glyph.test_mode=</code> +</td> + <td> +<code>Glyph.test?</code> +</td> + <td>Used internally by the <code>rake spec</code> task to run Glyph's specs.</td></tr> + <tr><td>Library Mode</td> + <td> +<code>Glyph.library_mode=</code> +</td> + <td> +<code>Glyph.library?</code> +</td> + <td>If enabled, the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command command will raise exceptions instead of printing errors on the screen. Enabled by the <code>Glyph.compile</code> command.</td></tr> + <tr><td>Debug Mode</td> + <td> +<code>Glyph.debug_mode=</code> +</td> + <td> +<code>Glyph.debug?</code> +</td> + <td>If enabled, additional diagnostic information (such as backtraces or macro values) will be displayed. Enabled by specifying the <a href="/glyph/book/ref_commands.html#debug_switch">debug switch</a> when running a Glyph command.</td></tr> + <tr><td>Lite Mode</td> + <td> +<code>Glyph.lite_mode=</code> +</td> + <td> +<code>Glyph.lite?</code> +</td> + <td><p>Used to compile <a href="/glyph/book/compiling/lite_mode.html#lite_mode">single files</a>. Enabled by:</p> +<ul> + <li>The <code>Glyph.compile</code> and <code>Glyph.filter</code> methods.</li> + <li>The <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command, if at least one parameter is supplied.</li> +</ul></td></tr> + <tr><td>Safe Mode</td> + <td> +<code>Glyph.safe_mode=</code> +</td> + <td> +<code>Glyph.safe?</code> +</td> + <td><p>If enabled, the following macros cannot be used and will return an error:</p> +<ul> + <li><a href="/glyph/book/macros/macros_core.html#m_ruby"><code>ruby</code></a> macro</li> + <li><a href="/glyph/book/macros/macros_core.html#m_macro_"><code>macro:</code></a> macro</li> + <li><a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro</li> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/config/document.html

@@ -0,0 +1,196 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>document.* - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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.*</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> + 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> + <th>Description</th> + <th>Default</th></tr> + <tr><td> +<code>document.author</code> <a id="s_document_author"></a> +</td> + <td><p>The author of the document.</p></td> + <td><code>""</code></td></tr> + <tr><td> +<code>document.draft</code> <a id="s_document_draft"></a> +</td> + <td><p>If set to <code>true</code>, the document is considered a draft, so <a href="/glyph/book/macros/macros_inline.html#m_draftcomment">draft comments</a> and <a href="/glyph/book/macros/macros_inline.html#m_todo">todo items</a> will be displayed.</p></td> + <td><code>false</code></td></tr> + <tr><td> +<code>document.filename</code> <a id="s_document_filename"></a> +</td> + <td><p>The name of the output file.</p></td> + <td><code>""</code></td></tr> + <tr><td> +<code>document.output</code> <a id="s_document_output"></a> +</td> + <td><p>The format of the output file. It can be set to:</p> +<ul> + <li><code>html5</code></li> + <li><code>html</code></li> + <li><code>pdf</code></li> + <li><code>web5</code></li> + <li><code>web</code></li> +</ul></td> + <td><code>"html"</code></td></tr> + <tr><td> +<code>document.revision</code> <a id="s_document_revision"></a> +</td> + <td><p>The document&#8217;s revision.</p></td> + <td><code>""</code></td></tr> + <tr><td> +<code>document.source</code> <a id="s_document_source"></a> +</td> + <td><p>The main source file to compile. It can be also be overridden by calling the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command with the <code>-s</code> option.</p></td> + <td><code>"document.glyph"</code></td></tr> + <tr><td> +<code>document.styles</code> <a id="s_document_styles"></a> +</td> + <td><p>How to process stylesheets. It can be set to one of the following values:</p> +<ul> + <li><code>embed</code> &#8212; Embed stylesheets within the document.</li> + <li><code>link</code> &#8212; Link stylesheets.</li> + <li><code>import</code> &#8212; Import stylesheets using the <code>@import</code> <span class="caps">CSS</span> directive.</li> +</ul></td> + <td><code>"embed"</code></td></tr> + <tr><td> +<code>document.subtitle</code> <a id="s_document_subtitle"></a> +</td> + <td><p>The subtitle of the document, displayed using the <a href="/glyph/book/macros/macros_block.html#m_subtitle"><code>subtitle</code></a> macro.</p></td> + <td><code>""</code></td></tr> + <tr><td> +<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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/config/filters.html

@@ -0,0 +1,176 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>filters.* - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + These settings are used to configure some special options related to output filters and highlighters. + +<table><tr><th>Name</th> + <th>Description</th> + <th>Default</th></tr> + <tr><td> +<code>filters.coderay.*</code> <a id="s_filters_coderay_"></a> +</td> + <td><p>Some <a href="http://coderay.rubychan.de/">Coderay</a>-specific <a href="http://coderay.rubychan.de/doc/classes/CodeRay/Encoders/HTML.html">options</a>.</p></td> + <td><code>nil</code></td></tr> + <tr><td> +<code>filters.highlighter</code> <a id="s_filters_highlighter"></a> +</td> + <td><p>The current highlighter to use. It can be set to <code>coderay</code> or <code>ultraviolet</code></p></td> + <td><code>"coderay"</code></td></tr> + <tr><td> +<code>filters.markdown.converter</code> <a id="s_filters_markdown_converter"></a> +</td> + <td><p>The name of the markdown converter to use with the <a href="/glyph/book/macros/macros_filters.html#m_markdown"><code>markdown</code></a> macro. It can be set to one of the following values:</p> +<ul> + <li>BlueCloth</li> + <li>RDiscount</li> + <li>Maruku</li> + <li>Kramdown</li> +</ul> +<p>If not set, Glyph tests for the presence of each gem in the same order, until one is found.</p></td> + <td><code>"bluecloth"</code></td></tr> + <tr><td> +<code>filters.redcloth.restrictions</code> <a id="s_filters_redcloth_restrictions"></a> +</td> + <td><p>An <code>Array</code> containing restrictions applied to RedCloth, used by the <a href="/glyph/book/macros/macros_filters.html#m_textile"><code>textile</code></a> macro (see <a href="http://redcloth.rubyforge.org/classes/RedCloth/TextileDoc.html">RedCloth Documentation</a> for more information).</p></td> + <td><code>[]</code></td></tr> + <tr><td> +<code>filters.ultraviolet.line_numbers</code> <a id="s_filters_ultraviolet_line_numbers"></a> +</td> + <td><p>Whether the <a href="http://ultraviolet.rubyforge.org/">Ultraviolet</a> highlighter should display line numbers or not.</p></td> + <td><code>true</code></td></tr> + <tr><td> +<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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/config/options.html

@@ -0,0 +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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>options.* - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + The following configuration settings are used to enable or disable specific Glyph functionalities and behaviors. + +<table><tr><th>Name</th> + <th>Description</th> + <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><code>nil</code></td></tr> + <tr><td> +<code>options.macro_set</code> <a id="s_options_macro_set"></a> +</td> + <td><p>Determines which macro set will be loaded. It can be set to:</p> +<ul> + <li>glyph &#8212; Loads core, filter, xml macros plus all macros necessary for the <a href="/glyph/book/config/document.html#s_document_output"><code>document.output</code></a> setting.</li> + <li>xml &#8212; Loads core and xml macros.</li> + <li>core &#8212; Loads core macros only.</li> +</ul></td> + <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><code>false</code></td></tr> + <tr><td> +<code>options.url_validation</code> <a id="s_options_url_validation"></a> +</td> + <td><p>If set to <em>true_, every external link will be validated (see </em>editing/links.html#links&quot;&gt;Links and Bookmarks</a>).</p></td> + <td><code>false</code></td></tr> + <tr><td> +<code>options.xml_blacklist</code> <a id="s_options_xml_blacklist"></a> +</td> + <td><p>The <span class="caps">XML</span> tags listed here cannot be generated using Glyph code.</p></td> + <td><code>["applet", "base", "basefont", "embed", "frame", "frameset", "iframe", "isindex", "meta", "noframes", "noscript", "object", "param", "title"]</code></td></tr> + <tr><td> +<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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/config/output.html

@@ -0,0 +1,325 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>output.* - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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> + + + + + + + + +These settings are used to configure output-specific options. + + +<div class="section"> +<h4 id="h_225">output.pdf.*</h4> +<table><tr><th>Name</th> + <th>Description</th> + <th>Default</th></tr> + <tr><td> +<code>output.pdf.extension</code> <a id="s_output_pdf_extension"></a> +</td> + <td><p>The extension to use for the output file(s).</p></td> + <td><code>".pdf"</code></td></tr> + <tr><td> +<code>output.pdf.filter_target</code> <a id="s_output_pdf_filter_target"></a> +</td> + <td><p>The output target for filters. It can be set to <code>html</code> (for RedCloth and MarkDown) or <code>latex</code> (RedCloth-only).</p></td> + <td><code>"html"</code></td></tr> + <tr><td> +<code>output.pdf.generator</code> <a id="s_output_pdf_generator"></a> +</td> + <td><p>The external program used to generate <span class="caps">PDF</span> files. It can be set to <code>prince</code> or <code>wkhtmltopdf</code>.</p></td> + <td><code>"wkhtmltopdf"</code></td></tr> + <tr><td> +<code>output.pdf.macro_dirs</code> <a id="s_output_pdf_macro_dirs"></a> +</td> + <td><p>The directories from which macros will be loaded (both in Glyph&#8217;s home and the current project directory).</p></td> + <td><code>["html"]</code></td></tr> + <tr><td> +<code>output.pdf.multifile</code> <a id="s_output_pdf_multifile"></a> +</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> +<table><tr><th>Name</th> + <th>Description</th> + <th>Default</th></tr> + <tr><td> +<code>output.html.extension</code> <a id="s_output_html_extension"></a> +</td> + <td><p>The extension to use for the output file(s).</p></td> + <td><code>".html"</code></td></tr> + <tr><td> +<code>output.html.filter_target</code> <a id="s_output_html_filter_target"></a> +</td> + <td><p>The output target for filters. It can be set to <code>html</code> (for RedCloth and MarkDown) or <code>latex</code> (RedCloth-only).</p></td> + <td><code>"html"</code></td></tr> + <tr><td> +<code>output.html.macro_dirs</code> <a id="s_output_html_macro_dirs"></a> +</td> + <td><p>The directories from which macros will be loaded (both in Glyph&#8217;s home and the current project directory).</p></td> + <td><code>["html"]</code></td></tr> + <tr><td> +<code>output.html.multifile</code> <a id="s_output_html_multifile"></a> +</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> +<table><tr><th>Name</th> + <th>Description</th> + <th>Default</th></tr> + <tr><td> +<code>output.html5.extension</code> <a id="s_output_html5_extension"></a> +</td> + <td><p>The extension to use for the output file(s).</p></td> + <td><code>".html"</code></td></tr> + <tr><td> +<code>output.html5.filter_target</code> <a id="s_output_html5_filter_target"></a> +</td> + <td><p>The output target for filters. It can be set to <code>html</code> (for RedCloth and MarkDown) or <code>latex</code> (RedCloth-only).</p></td> + <td><code>"html"</code></td></tr> + <tr><td> +<code>output.html5.macro_dirs</code> <a id="s_output_html5_macro_dirs"></a> +</td> + <td><p>The directories from which macros will be loaded (both in Glyph&#8217;s home and the current project directory).</p></td> + <td><code>["html", "html5"]</code></td></tr> + <tr><td> +<code>output.html5.multifile</code> <a id="s_output_html5_multifile"></a> +</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> +<table><tr><th>Name</th> + <th>Description</th> + <th>Default</th></tr> + <tr><td> +<code>output.web.base</code> <a id="s_output_web_base"></a> +</td> + <td><p>The directory to use as root for all link paths.</p></td> + <td><code>"/"</code></td></tr> + <tr><td> +<code>output.web.extension</code> <a id="s_output_web_extension"></a> +</td> + <td><p>The extension to use for the output file(s).</p></td> + <td><code>".html"</code></td></tr> + <tr><td> +<code>output.web.filter_target</code> <a id="s_output_web_filter_target"></a> +</td> + <td><p>The output target for filters. It can be set to <code>html</code> (for RedCloth and MarkDown) or <code>latex</code> (RedCloth-only).</p></td> + <td><code>"html"</code></td></tr> + <tr><td> +<code>output.web.layout_dirs</code> <a id="s_output_web_layout_dirs"></a> +</td> + <td><p>The directories from which layout macros will be loaded (both in Glyph&#8217;s home and the current project directory).</p></td> + <td><code>["web"]</code></td></tr> + <tr><td> +<code>output.web.layouts.index</code> <a id="s_output_web_layouts_index"></a> +</td> + <td><p>The name of the layout to use to render the document index file.</p></td> + <td><code>"index"</code></td></tr> + <tr><td> +<code>output.web.layouts.topic</code> <a id="s_output_web_layouts_topic"></a> +</td> + <td><p>The name of the layout to use to render topic files.</p></td> + <td><code>"topic"</code></td></tr> + <tr><td> +<code>output.web.macro_dirs</code> <a id="s_output_web_macro_dirs"></a> +</td> + <td><p>The directories from which macros will be loaded (both in Glyph&#8217;s home and the current project directory).</p></td> + <td><code>["html"]</code></td></tr> + <tr><td> +<code>output.web.multifile</code> <a id="s_output_web_multifile"></a> +</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> +<table><tr><th>Name</th> + <th>Description</th> + <th>Default</th></tr> + <tr><td> +<code>output.web5.base</code> <a id="s_output_web5_base"></a> +</td> + <td><p>The directory to use as root for all link paths.</p></td> + <td><code>"/"</code></td></tr> + <tr><td> +<code>output.web5.extension</code> <a id="s_output_web5_extension"></a> +</td> + <td><p>The extension to use for the output file(s).</p></td> + <td><code>".html"</code></td></tr> + <tr><td> +<code>output.web5.filter_target</code> <a id="s_output_web5_filter_target"></a> +</td> + <td><p>The output target for filters. It can be set to <code>html</code> (for RedCloth and MarkDown) or <code>latex</code> (RedCloth-only).</p></td> + <td><code>"html"</code></td></tr> + <tr><td> +<code>output.web5.layout_dirs</code> <a id="s_output_web5_layout_dirs"></a> +</td> + <td><p>The directories from which layout macros will be loaded (both in Glyph&#8217;s home and the current project directory).</p></td> + <td><code>["web5"]</code></td></tr> + <tr><td> +<code>output.web5.layouts.index</code> <a id="s_output_web5_layouts_index"></a> +</td> + <td><p>The name of the layout to use to render the document index file.</p></td> + <td><code>"index"</code></td></tr> + <tr><td> +<code>output.web5.layouts.topic</code> <a id="s_output_web5_layouts_topic"></a> +</td> + <td><p>The name of the layout to use to render topic files.</p></td> + <td><code>"topic"</code></td></tr> + <tr><td> +<code>output.web5.macro_dirs</code> <a id="s_output_web5_macro_dirs"></a> +</td> + <td><p>The directories from which macros will be loaded (both in Glyph&#8217;s home and the current project directory).</p></td> + <td><code>["html", "html5"]</code></td></tr> + <tr><td> +<code>output.web5.multifile</code> <a id="s_output_web5_multifile"></a> +</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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/bookmarks_headers.html

@@ -0,0 +1,145 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Bookmarks and Headers - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <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> + + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/command.html

@@ -0,0 +1,180 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Defining Custom Commands - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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</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> + <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> +<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> + <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> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/commands_tasks.html

@@ -0,0 +1,172 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Defining Custom Commands and Tasks - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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> + <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> +<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> + <p>As you can see:</p> +<ul> + <li>All commands call at at least one task.</li> + <li>There are several task inter-dependencies spanning across three main Rake namespaces: + <ul> + <li><code>project:</code> &#8212; used for tasks affecting only the physical structure of the Glyph project.</li> + <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"> +<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> + <li><code>load:config</code> &#8212; Load the configuration files</li> + <li><code>load:tasks</code> &#8212; Load custom tasks (if any)</li> + <li><code>load:commands</code> &#8212; Load custom commands (if any)</li> + <li><code>load:snippets</code> &#8212; Load snippets from the <code>snippet.yml</code> file</li> + <li><code>load:macros</code> &#8212; Load macros</li> + <li><code>load:all</code> &#8212; Dummy task used to call the previous ones</li> + <li><code>generate:document</code> &#8212; Parse, analyze and finalize the Glyph document</li> + <li><code>generate:images</code> &#8212; Copy images to the output directory (if any)</li> + <li><code>generate:styles</code> &#8212; Copy stylesheets to the output directory (if necessary)</li> + <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> + +</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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/further_reading.html

@@ -0,0 +1,143 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Further Reading - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <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> + <li><a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Parser"><code>Glyph::Parser</code></a></li> + <li><a href="http://yardoc.org/docs/h3rald-glyph/Glyph/SyntaxNode"><code>Glyph::SyntaxNode</code></a></li> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/internals.html

@@ -0,0 +1,208 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>A quick look at Glyph's internals - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <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> + <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> +<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> + <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> + <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> + <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> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/interpreting.html

@@ -0,0 +1,178 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Interpreting Glyph Code - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + + <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> + + <p>When the <code>interpret</code> method is called, the following happens:</p> +<ol> + <li>A new Glyph document is created from the <code>String</code> passed to the method.</li> + <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> +<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> + <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> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/layouts.html

@@ -0,0 +1,205 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Layouts - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <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> +<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> + <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> + <li><code>id</code> &#8212; the ID of the topic.</li> + <li><code>contents</code> &#8212; the body of the topic.</li> +</ul> + +</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> +<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"> +<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> + +</div> + + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/macro_def.html

@@ -0,0 +1,180 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Defining Custom Macros - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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 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> + <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"> +<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> +</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"> +<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> +<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> + <tr><td> +<code>@node</code> +</td> + <td><p>A <a href="http://yardoc.org/docs/h3rald-glyph/Glyph/MacroNode"><code>Glyph::MacroNode</code></a> containing information about the macro. Useful for accessing parent and child macros, and the current <a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Document"><code>Glyph::Document</code></a>. Normally, instances of the <code>MacroNode</code> class contain the following keys:</p> +<ul> + <li><code>:name</code>, the name of the macro.</li> + <li><code>:source</code>, a <code>String</code> identifying the source of the macro (a file, a snippet, etc.)</li> + <li><code>:value</code>, the value of the macro (populated after the document has been parsed and analyzed).</li> + <li><code>:escape</code>, whether the macro is a <a href="/glyph/book/text_editing/esc_quot.html#esc_quot">quoting macro</a> or not.</li> + <li><code>:document</code>, the instance of <code>Document</code> the macro is contained in (populated after the document has been parsed and analyzed).</li> +</ul> +<p>Note that the first two keys can also be accessed via instance variables.</p></td></tr> + <tr><td> +<code>@name</code> +</td> + <td>The name of the macro.</td></tr> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/output_format.html

@@ -0,0 +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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Custom Output Formats - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <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> +<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> + <p>In particular, the following keys are mandatory:</p> +<ul> + <li>multifile</li> + <li>extension</li> + <li>filter_target</li> + <li>base</li> + <li>macro_dirs</li> + <li>layout_dirs</li> +</ul> + +</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>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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/params_attrs.html

@@ -0,0 +1,196 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Parameters and Attributes - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <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> +<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> + <li><code>parameter</code> (or <code>param</code>): Returns the expanded value of the parameter specified by number. Other parameters are not expanded.</li> + <li><code>value</code>: Returns the expanded value of the first parameter (i.e. like <code>parameter(0)</code>).</li> + <li><code>attribute</code> (or <code>attr</code>): Returns the expanded value of the attribute specified by name. Other attributes are not expanded.</li> + <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> + +</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> + <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> + <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"> +<span class="note-title">Tip</span>To be on the safe side, always use <code>raw_*</code> methods when interpreting. + +</div> + <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> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/placeholders.html

@@ -0,0 +1,157 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Using Placeholders - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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 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> + <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> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/task.html

@@ -0,0 +1,172 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Defining Custom Tasks - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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 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> + <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> +<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> + <li><code>book/text/changelog.glyph</code> &rarr; <code>CHANGELOG.textile</code></li> + <li><code>book/text/license.glyph</code> &rarr; <code>LICENSE.textile</code></li> + <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> + + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/extending/validators.html

@@ -0,0 +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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Using Validators - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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 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> + <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"> +<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> +<ul> + <li>the macro cannot be used within <code>chapter</code> or <code>appendix</code> macros.</li> + <li>the macro cannot be used in snippets</li> +</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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/getting_started/configuration.html

@@ -0,0 +1,172 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Project Configuration - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + + <p>Glyph stores configuration settings in the following <span class="caps">YAML</span> files:</p> +<ol> + <li>Your <em>Project Configuration</em> is stored in the <code>config.yml</code> file, included in each Glyph Project.</li> + <li>Your <em>Global Configuration</em> is stored in a <code>.glyphrc</code> file in your <code>$HOME</code> (or <code>%HOMEPATH%</code> on Windows) directory (not created by default).</li> + <li>The <em>System Configuration</em> is stored in the source directory of Glyph itself.</li> +</ol> +<p>When compiling, Glyph loads all these configuration files and merges them according to the following rules:</p> +<ul> + <li>A setting configured in the <em>Project Configuration</em> overrides the same setting in both Global and System configuration.</li> + <li>A setting configured in the <em>Global Configuration</em> overrides the same setting in the <em>System Configuration</em>.</li> +</ul> +<p>Typically, you should use the <em>Project Configuration</em> for all project-specific settings and the <em>Global Configuration</em> for settings affecting all your projects (for example, you may want to set the <a href="/glyph/book/config/document.html#s_document_author"><code>document.author</code></a> setting in the Global Configuration instead of setting it in the Project Configuration of all your Glyph projects). The <em>System Configuration</em> is best left untouched.</p> +<p>Instead of editing your configuration settings directly, you can use the <a href="/glyph/book/ref_commands.html#c_config"><code>config</code></a> command, as follows:</p> +<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"> +<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> +<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"> +<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> + <li>is wrapped in quotes (<code>"</code> or <code>'</code>) &rarr; <code>String</code></li> + <li>starts with a colon (<code>:</code>) &rarr; <code>Symbol</code></li> + <li>is wrapped in square brackets (<code>[</code> and <code>]</code>) &rarr; <code>Array</code></li> + <li>is wrapped in curly brackets (<code>{</code> and <code>}</code>) &rarr; <code>Hash</code></li> + <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> +<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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/getting_started/create_project.html

@@ -0,0 +1,170 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Creating your first Glyph Project - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <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"> +<div class="box-title">Glyph&#8217;s dependencies</div> +<p>Glyph requires the following gems:</p> +<ul> + <li>extlib</li> + <li>gli</li> + <li>rake</li> +</ul> +<p>Additionally, some Glyph macros may require additional gems, such as:</p> +<ul> + <li>RedCloth (<a href="/glyph/book/macros/macros_filters.html#m_textile"><code>textile</code></a> macro)</li> + <li>BlueCloth <em>or</em> RDiscount <em>or</em> Maruku <em>or</em> Kramdown (<a href="/glyph/book/macros/macros_filters.html#m_markdown"><code>markdown</code></a> macro)</li> + <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> +<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> + <li><code>lib/</code> &#8212; used to store your custom Glyph macros and Rake tasks.</li> + <li><code>output/</code> &#8212; used to store your generated output files.</li> + <li><code>styles/</code> &#8212; used to store your stylesheets.</li> + <li><code>text/</code> &#8212; used to store your source text files.</li> +</ul> +<p>Additionally, the following files are also created at top level:</p> +<ul> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/getting_started/structure.html

@@ -0,0 +1,183 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Document Structure - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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> + + <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> + + <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> +<p>For now, think about a macro as something that performs a certain action and &#8212; generally &#8212; produces some text output or manipulation of the text inside it. In this way, it becomes easy to understand that the <code>chapter</code> macro creates a chapter and the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro includes an external file, for example.<br /> +Attributes &#8220;belong&#8221; to the macro they&#8217;re in, so in this case the <a href="/glyph/book/macros/macros_structure.html#m_book"><code>book</code></a> macro has the following attributes:</p> +<ul> + <li><code>@frontmatter</code></li> + <li><code>@bodymatter</code></li> + <li><code>@backmatter</code></li> +</ul> +<p>More specifically, in this <code>document.glyph</code> file:</p> +<ul> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/index.html

@@ -0,0 +1,151 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> +<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> +<li class="bodymatter chapter">Authoring Documents</li><li><ol><li class="bodymatter section"><a href="/glyph/book/text_editing/glyph_files.html#h_19">.glyph files</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/macro_intro.html#macro_intro">Introducing Glyph Macros</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/attribute_intro.html#attribute_intro">Macro attributes</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/esc_quot.html#esc_quot">Escaping and Quoting</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/sections.html#sec_head">Sections and Headers</a></li><li><ol><li class="bodymatter section"><a href="/glyph/book/text_editing/section_aliases.html#h_24">Section Aliases</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/topics.html#topics">Topics</a></li></ol></li> +<li class="bodymatter section"><a href="/glyph/book/text_editing/links.html#links">Links and Bookmarks</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/images.html#img_fig">Images and Figures</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/code.html#source_code">Source Code</a></li><li class="bodymatter section">Other HTML Elements</li><li><ol><li class="bodymatter section"><a href="/glyph/book/text_editing/raw_html.html#h_30">Textile or Markdown</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/xml_fallback.html#h_31">XML Fallback</a></li></ol></li> +<li class="bodymatter section"><a href="/glyph/book/text_editing/stylesheets.html#stylesheets">Adding Stylesheets</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/inclusions.html#incl">Including Files and Snippets</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/evaluation.html#h_36">Evaluating Ruby code and Configuration Settings</a></li><li class="bodymatter section"><a href="/glyph/book/text_editing/conditionals.html#cond_macros">Conditional Macros</a></li></ol></li> +<li class="bodymatter chapter">Generating Output Files</li><li><ol><li class="bodymatter section"><a href="/glyph/book/compiling/compiling.html#compile">Compiling a project</a></li><li class="bodymatter section"><a href="/glyph/book/compiling/lite_mode.html#lite_mode">Compiling single Glyph files</a></li><li class="bodymatter section"><a href="/glyph/book/compiling/programmatic_usage.html#h_47">Using Glyph programmatically</a></li></ol></li> +<li class="bodymatter chapter">Document Statistics</li><li><ol><li class="bodymatter section"><a href="/glyph/book/stats/stats.html#h_50">Using the stats command</a></li><li class="bodymatter section"><a href="/glyph/book/stats/macros.html#stats_macros">Macro Statistics</a></li><li class="bodymatter section"><a href="/glyph/book/stats/snippets.html#stats_snippets">Snippet Statistics</a></li><li class="bodymatter section"><a href="/glyph/book/stats/bookmarks.html#stats_bookmarks">Bookmark Statistics</a></li><li class="bodymatter section"><a href="/glyph/book/stats/links.html#stats_links">Link Statistics</a></li></ol></li> +<li class="bodymatter chapter">Extending Glyph</li><li><ol><li class="bodymatter section"><a href="/glyph/book/extending/internals.html#h_72">A quick look at Glyph's internals</a></li><li class="bodymatter section"><a href="/glyph/book/extending/macro_def.html#macro_def">Defining Custom Macros</a></li><li><ol><li class="bodymatter section"><a href="/glyph/book/extending/params_attrs.html#h_75">Parameters and Attributes</a></li><li class="bodymatter section"><a href="/glyph/book/extending/bookmarks_headers.html#h_78">Bookmarks and Headers</a></li><li class="bodymatter section"><a href="/glyph/book/extending/placeholders.html#h_79">Using Placeholders</a></li><li class="bodymatter section"><a href="/glyph/book/extending/validators.html#h_80">Using Validators</a></li><li class="bodymatter section"><a href="/glyph/book/extending/interpreting.html#interpreting">Interpreting Glyph Code</a></li><li class="bodymatter section"><a href="/glyph/book/extending/layouts.html#layouts">Layouts</a></li><li class="bodymatter section"><a href="/glyph/book/extending/further_reading.html#h_87">Further Reading</a></li></ol></li> +<li class="bodymatter section"><a href="/glyph/book/extending/commands_tasks.html#h_88">Defining Custom Commands and Tasks</a></li><li><ol><li class="bodymatter section"><a href="/glyph/book/extending/task.html#custom_task">Defining Custom Tasks</a></li><li class="bodymatter section"><a href="/glyph/book/extending/command.html#custom_command">Defining Custom Commands</a></li></ol></li> +</ol></li> +<li class="bodymatter chapter">Troubleshooting</li><li><ol><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_generic.html#h_98">Generic Errors</a></li><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_parser.html#h_99">Parsing Errors</a></li><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_command.html#h_100">Command Errors</a></li><li class="bodymatter section"><a href="/glyph/book/troubleshooting/errors_macro.html#h_101">Macro Errors</a></li></ol></li> +<li class="backmatter appendix"><a href="/glyph/book/ref_commands.html#cmd_ref">Command Reference</a></li><li class="backmatter appendix">Macro Reference</li><li><ol><li class="appendix section"><a href="/glyph/book/macros/macros_core.html#h_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/compressed.js" type="text/javascript"></script> + </body> +</html>
A content/glyph/book/introduction.html

@@ -0,0 +1,277 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Introduction - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <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> +<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> + <li><code>glyph add introduction.textile</code> &#8212; to create a new file called <em>introduction.textile</em>.</li> + <li><code>glyph compile</code> &#8212; to compile the current document into a single <span class="caps">HTML</span> file.</li> + <li><code>glyph compile --auto</code> &#8212; to keep recompiling the current document every time a file is changed.</li> + <li><code>glyph compile -f pdf</code> &#8212; to compile the current document into <span class="caps">HTML</span> and then transform it into <span class="caps">PDF</span>.</li> + <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> +<p>Glyph syntax rules can be explained using Glyph itself:</p> +<div class="code"> +<pre> +<code> +section[ + @title[Something about Glyph] + txt[ +You can use Glyph macros in conjunction +with _Textile_ or _Markdown_ to +produce HTML files effortlessly. + ] + p[Alternatively, you can just use em[Glyph itself] to generate HTML tags.] + section[ + @title[What about PDFs?] + @id[pdf] + p[ +Once you have a single, well-formatted HTML +file, converting it to PDF is +extremely easy with a free 3rd-party +renderer like =&gt;[http://www.princexml.com|Prince] +or =&gt;[http://code.google.com/p/wkhtmltopdf/|wkhtmltopdf]. + ] + ] +] +</code> +</pre> +</div> +<p>The Glyph code above corresponds to the following <span class="caps">HTML</span> code:</p> +<div class="code"> +<pre> +<code> +&lt;div class="section"&gt; + &lt;h2 id="h_10"&gt;Something about Glyph&lt;/h2&gt; + &lt;p&gt; + You can use Glyph macros in conjunction with + &lt;em&gt;Textile&lt;/em&gt; or &lt;em&gt;Markdown&lt;/em&gt; to + produce HTML files effortlessly. + &lt;/p&gt; + &lt;p&gt; + Alternatively, you can just use &lt;em&gt;Glyph itself&lt;/em&gt; + to generate HTML tags. + &lt;/p&gt; + &lt;div class="section"&gt; + &lt;h3 id="pdf"&gt;What about PDFs?&lt;/h3&gt; + &lt;p&gt; + Once you have a single, well-formatted HTML + file, converting it to PDF is + extremely easy with a free 3rd-party renderer + like &lt;a href="http://www.princexml.com"&gt;Prince&lt;/a&gt; + or &lt;a href="http://code.google.com/p/wkhtmltopdf/\"&gt;wkhtmltopdf&lt;/a&gt;. + &lt;/p&gt; + &lt;/div&gt; +&lt;/div&gt; +</code> +</pre> +</div> +</div> +<div class="section"> +<h4 id="h_5">Content Reuse</h4> +<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> +<code> +snippet:[entities|snippets and macros] +snippet:[custom_definitions| + p[Glyph allows you to define your own &amp;[entities].] +] +&amp;[custom_definitions] +</code> +</pre> +</div> +<p>&#8230;which results in:</p> +<div class="code"> +<pre> +<code> +&lt;p&gt;Glyph allows you to define your own snippets and macros.&lt;/p&gt; +</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> +<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> +<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> +<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> +<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> +<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> +<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> + <li>Bug Tracking: <a href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a></li> + <li>Development Wiki <a href="http://wiki.github.com/h3rald/glyph">http://wiki.github.com/h3rald/glyph</a></li> + <li>RubyGem Download <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a></li> + <li>Book (<span class="caps">PDF</span>): <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">http://github.com/downloads/h3rald/glyph/glyph.pdf</a></li> + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/license.html

@@ -0,0 +1,159 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>License - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + <p>Copyright &copy; 2010 <strong>Fabio Cevasco</strong>, <a href="http://www.h3rald.com">http://www.h3rald.com</a></p> + +<div class="code"> +<pre> +<code> +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/macros/macros_block.html

@@ -0,0 +1,423 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Block Macros - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>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> + + <div class="section"> +<h4 id="m_box">box</h4> +<p>Creates a titled box (<code>&lt;div&gt;</code> tag).</p> + + + + <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="section"> +<h5 id="h_168">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The box title.</td> + </tr> + + + <tr> + <td>1</td> + <td>The box text.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_codeblock">codeblock</h4> +<p>Used to render a block of code within <code>&lt;pre&gt;</code> and <code>&lt;code&gt;</code> tags.</p> + + + + <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="section"> +<h5 id="h_170">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The code to be formatted.</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_171">Remarks</h5> +<p>For code highlighting, see the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro.</p> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_figure">figure</h4> +<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> + + + + <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="section"> +<h5 id="h_173">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The name of the image file (relative to the <code>images/</code> folder).</td> + </tr> + + + <tr> + <td>1</td> + <td>The image caption <em>(optional)</em>.</td> + </tr> + </table> + +</div> + + + <div class="section"> +<h5 id="h_174">Attributes</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Attribute</th> + <th>Description</th> + </tr> +<tr> + <td>*</td> + <td>Any attribute supported by the <a href="http://www.w3schools.com/tags/tag_IMG.asp">img tag</a>.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_image">image</h4> +<p>Includes an image in the document</p> + + + + <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="section"> +<h5 id="h_176">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The name of the image file (relative to the <code>images/</code> folder).</td> + </tr> + </table> + +</div> + + + <div class="section"> +<h5 id="h_177">Attributes</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Attribute</th> + <th>Description</th> + </tr> +<tr> + <td>*</td> + <td>Any attribute supported by the <a href="http://www.w3schools.com/tags/tag_IMG.asp">img tag</a>.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_navigation">navigation</h4> +<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> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The ID of the current topic.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_note">note</h4> +<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> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The text of the note.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_pubdate">pubdate</h4> +<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> + + + + <div class="section"> +<h4 id="m_revision">revision</h4> +<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> + + + + <div class="section"> +<h4 id="m_subtitle">subtitle</h4> +<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> + + + + <div class="section"> +<h4 id="m_title">title</h4> +<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> + + <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="/js/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/macros/macros_core.html

@@ -0,0 +1,746 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Core Macros - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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> + + + <div class="section"> +<h4 id="m_alias">alias</h4> +<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> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The name of the alias.</td> + </tr> + + + <tr> + <td>1</td> + <td>The name of an existing macro.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_and">and</h4> +<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> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The first expression to test</td> + </tr> + + <tr> + <td>1</td> + <td>The second expression to test</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_comment">comment</h4> +<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> + + + + <div class="section"> +<h5 id="h_128">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The contents to comment out</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_129">Remarks</h5> +<p>Macros are not expanded within comments.</p> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_condition">condition</h4> +<p>Tests a conditional expression. For more information, see <a href="/glyph/book/text_editing/conditionals.html#cond_macros">Conditional Macros</a>.</p> +<strong>Aliases:</strong> <code>?</code> + + + + + <div class="section"> +<h5 id="h_131">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The condition to test</td> + </tr> + + + <tr> + <td>1</td> + <td>The contents to expand if the condition is satisfied.</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_132">Remarks</h5> +<p>For examples see any of the following:</p> +<ul> + <li><a href="#m_and"><code>and</code></a> macro</li> + <li><a href="#m_or"><code>or</code></a> macro</li> + <li><a href="#m_not"><code>not</code></a> macro</li> + <li><a href="#m_match"><code>match</code></a> macro</li> + <li><a href="#m_eq"><code>eq</code></a> macro</li> +</ul> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_config">config</h4> +<p>Returns the value of a configuration setting.</p> +<strong>Aliases:</strong> <code>$</code> +<p><strong>Example:</strong> <code>$[document.author]</code></p> + + + + <div class="section"> +<h5 id="h_134">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The full name of a configuration setting.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_config_">config:</h4> +<p>Sets the value of a configuration setting.</p> +<strong>Aliases:</strong> <code>$:</code> +<p><strong>Example:</strong> <code>$:[document.draft|true]</code></p> + + + + <div class="section"> +<h5 id="h_136">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The full name of a configuration setting.</td> + </tr> + + + <tr> + <td>0</td> + <td>The new value of the configuration setting</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_137">Remarks</h5> +<p>This macro cannot be used in <a href="/glyph/book/compiling/programmatic_usage.html#modes">safe mode</a>.</p> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_eq">eq</h4> +<p>Conditional equality operator, to be used with the <a href="#m_condition"><code>condition</code></a> macro.</p> + +<p><strong>Example:</strong> <code>?[eq[$[document.draft]|true]|This is displayed only in draft documents.]</code></p> + + + + <div class="section"> +<h5 id="h_139">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The first expression to test</td> + </tr> + + <tr> + <td>1</td> + <td>The second expression to test</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_escape">escape</h4> +<p>Evaluates to its value. Commonly used with the escaping delimiters <code>[=</code> and <code>=]</code>.</p> +<strong>Aliases:</strong> <code>.</code> +<p><strong>Example:</strong> <code>.[=Macros are escaped here =>[#test].=]</code></p> + + + + <div class="section"> +<h5 id="h_141">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The contents to escape.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_include">include</h4> +<p>Evaluates to the contents of a text file stored in the <code>text/</code> directory referenced by its relative path. If the <a href="/glyph/book/config/options.html#s_options_filters_by_file_extension"><code>options.filters_by_file_extension</code></a> setting is <code>true</code>, filters the contents of the file using the <a href="/glyph/book/macros/macros_filters.html#f_macros">filter macro</a> corresponding to the file extension.</p> +<strong>Aliases:</strong> <code>@</code> +<p><strong>Example:</strong> <code>include[frontmatter/introduction]</code></p> + + + + <div class="section"> +<h5 id="h_143">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The file to include.</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_144">Remarks</h5> +<ul><li>This macro cannot be used in <a href="/glyph/book/compiling/programmatic_usage.html#modes">safe mode</a>.</li> + <li><code>.glyph</code> is assumed if no file extension is specified.</li> + <li>This macro can also be used to include <code>.rb</code> ruby files within the <code>lib</code> directory. File contents are evaluated in the context of the <a href="http://yardoc.org/docs/h3rald-glyph/Glyph">Glyph</a> module.</li></ul> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_match">match</h4> +<p>Checks a string against a regular expression.</p> + +<p><strong>Example:</strong> <code>?[match[Hello!|/^hell/i]|This is always displayed]</code></p> + + + + <div class="section"> +<h5 id="h_146">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The string to check.</td> + </tr> + + + <tr> + <td>1</td> + <td>The regular expression to match against the string.</td> + </tr> + + + <tr> + <td>2</td> + <td>The contents to expand if the string matches.</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_147">Remarks</h5> +<p>This macro must be used with the <a href="#m_condition"><code>condition</code></a> macro.</p> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_macro_">macro:</h4> +<p>Defines a macro.</p> +<strong>Aliases:</strong> <code>%:</code> +<p><strong>Example:</strong> <code>%:[test|"<em>test: #{value}</em>"]</code></p> + + + + <div class="section"> +<h5 id="h_149">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The name of the new macro.</td> + </tr> + + + <tr> + <td>1</td> + <td>The macro definition (Ruby code).</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_150">Remarks</h5> +<ul><li>This macro cannot be used in <a href="/glyph/book/compiling/programmatic_usage.html#modes">safe mode</a>.</li> + <li>The new macro can only be used <em>after</em> its declaration.</li></ul> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_not">not</h4> +<p>Conditional <code>not</code> operator, to be used with the <a href="#m_condition"><code>condition</code></a> macro.</p> + +<p><strong>Example:</strong> <code>?[not[false]|This is always displayed.]</code></p> + + + + <div class="section"> +<h5 id="h_152">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The expression to negate</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_or">or</h4> +<p>Conditional <code>or</code> operator, to be used with the <a href="#m_condition"><code>condition</code></a> macro.</p> + +<p><strong>Example:</strong> <code>?[or[true|false]|This is always displayed.]</code></p> + + + + <div class="section"> +<h5 id="h_154">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The first expression to test</td> + </tr> + + <tr> + <td>1</td> + <td>The second expression to test</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_rewrite_">rewrite:</h4> +<p>Defines a new macro by rewriting (for more information, see <a href="/glyph/book/extending/interpreting.html#rewriting">Rewriting</a>)</p> +<strong>Aliases:</strong> <code>rw:</code> + + + <div class="example"><p> +<strong>Example</strong> +</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> rw:[release| +<span class="line-numbers"> 2 </span> section[ +<span class="line-numbers"> 3 </span> @title[Release {{0}}] +<span class="line-numbers"> 4 </span> {{1}} +<span class="line-numbers"> 5 </span> ] +<span class="line-numbers"> 6 </span> ] +</pre></div> + + + + <div class="section"> +<h5 id="h_156">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The name of the new macro.</td> + </tr> + + + <tr> + <td>0</td> + <td>The macro definition (Glyph code).</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_157">Remarks</h5> +<ul><li>The new macro can only be used <em>after</em> its declaration.</li> + <li>This macro cannot be used in <a href="/glyph/book/compiling/programmatic_usage.html#modes">safe mode</a>.</li></ul> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_ruby">ruby</h4> +<p>Evaluates its value as Ruby code within the context of the <a href="http://yardoc.org/docs/h3rald-glyph/Glyph">Glyph</a> module.</p> +<strong>Aliases:</strong> <code>%</code> + + + +<div class="examples"> +<p><strong>Examples:</strong></p> +<code>%[Time.now]</code><br /><code>%[Glyph::VERSION]</code><br /> +</div> + + + <div class="section"> +<h5 id="h_159">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The Ruby code to evaluate.</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_160">Remarks</h5> +<p>This macro cannot be used in <a href="/glyph/book/compiling/programmatic_usage.html#modes">safe mode</a>.</p> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_snippet">snippet</h4> +<p>Returns the value of a snippet.</p> +<strong>Aliases:</strong> <code>&amp;</code> +<p><strong>Example:</strong> <code>&amp;[glang]</code></p> + + + + <div class="section"> +<h5 id="h_162">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The ID of the snippet to retrieve.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_snippet_">snippet:</h4> +<p>Defines a snippet.</p> +<strong>Aliases:</strong> <code>&amp;:</code> +<p><strong>Example:</strong> <code>&amp;:[test|This is a test]</code></p> + + + + <div class="section"> +<h5 id="h_164">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The ID of the new snippet.</td> + </tr> + + + <tr> + <td>1</td> + <td>The contents of the new snippet.</td> + </tr> + </table> + +</div> + + +<div class="section"> +<h5 id="h_165">Remarks</h5> +<p>The new snippet can only be used <em>after</em> its declaration.</p> + +</div> + +</div> + + <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> + </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_48.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/macros/macros_filters.html

@@ -0,0 +1,209 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Filter Macros - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Filter Macros</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/macros/macros_inline.html">Inline Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_structure.html">&rarr; Structure Macros</a></div> + + <div class="section"> +<h4 id="m_markdown">markdown</h4> +<p>Uses a Markdown converter (BlueCloth, RDiscount, Maruku or Kramdown) to transform the value into <span class="caps">HTML</span> if the <a href="/glyph/book/config/output.html#cfg_output"><code>output.*.filter_target</code></a> setting is set to <code>html</code>.</p> +<p>If the <a href="/glyph/book/config/options.html#s_options_filters_by_file_extension"><code>options.filters_by_file_extension</code></a> setting is <code>true</code>, this macro is called automatically on <a href="/glyph/book/macros/macros_core.html#m_include">included</a> files with a <code>.markdown</code> or a <code>.md</code> extension.</p> +<strong>Aliases:</strong> <code>md</code> +<p><strong>Example:</strong> <code>markdown[This is *emphasized* text.]</code></p> + + + + <div class="section"> +<h5 id="h_198">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The Markdown text to filter.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_textile">textile</h4> +<p>Uses the RedCloth gem to transform the value into <span class="caps">HTML</span> or LaTeX, depending on the value of the <a href="/glyph/book/config/output.html#cfg_output"><code>output.*.filter_target</code></a>.</p> +<p>If the <a href="/glyph/book/config/options.html#s_options_filters_by_file_extension"><code>options.filters_by_file_extension</code></a> setting is <code>true</code>, this macro is called automatically on <a href="/glyph/book/macros/macros_core.html#m_include">included</a> files with a <code>.textile</code> or a <code>.txt</code> extension.</p> +<strong>Aliases:</strong> <code>txt</code> +<p><strong>Example:</strong> <code>textile[This is a *strong emphasis*.]</code></p> + + + + <div class="section"> +<h5 id="h_200">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The Textile text to filter.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_highlight">highlight</h4> +<p>Highlights a piece of source code (second parameter) according to the specified language (first parameter). <span class="fmi">for more information on code highligting, see <a href="/glyph/book/text_editing/code.html#source_code">Source Code</a></span>.</p> + + + + <div class="example"><p> +<strong>Example</strong> +</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> highlight[ruby| +<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> + + <div class="navigation"><a href="/glyph/book/macros/macros_inline.html">Inline Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_structure.html">&rarr; Structure 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=/f_macros.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/macros/macros_inline.html

@@ -0,0 +1,269 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Inline Macros - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Inline Macros</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/macros/macros_block.html">Block Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_filters.html">&rarr; Filter Macros</a></div> + + <div class="section"> +<h4 id="m_anchor">anchor</h4> +<p>Creates a named anchor (or bookmark).</p> +<strong>Aliases:</strong> <code>bookmark, #</code> +<p><strong>Example:</strong> <code>#[test|Test Bookmark]</code></p> + + + + <div class="section"> +<h5 id="h_188">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The identifier of the bookmark</td> + </tr> + + + <tr> + <td>1</td> + <td>The contents of the bookmark <em>(optional)</em></td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_draftcomment">draftcomment</h4> +<p>If the <a href="/glyph/book/config/document.html#s_document_draft"><code>document.draft</code></a> setting is set to <code>true</code>, displays a draft comment within the document.</p> +<strong>Aliases:</strong> <code>dc</code> +<p><strong>Example:</strong> <code>dc[This is printed only in draft documents.]</code></p> + + + + <div class="section"> +<h5 id="h_190">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The text of the comment.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_fmi">fmi</h4> +<p>Creates a <em>For More Information</em> link (for an example usage, see the <a href="#m_link"><code>link</code></a> macro).</p> + +<p><strong>Example:</strong> <code>fmi[creating links|#links]</code></p> + + + + <div class="section"> +<h5 id="h_192">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The object that needs additional explanation.</td> + </tr> + + + <tr> + <td>0</td> + <td>A valid bookmark within the document.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_link">link</h4> +<p>Creates an hyperlink (<span class="fmi">for more information on creating links, see <a href="/glyph/book/text_editing/links.html#links">Links and Bookmarks</a></span>).</p> +<strong>Aliases:</strong> <code>=></code> +<p><strong>Example:</strong> <code>=>[http://www.h3rald.com|H3RALD.com]</code></p> + + + + <div class="section"> +<h5 id="h_194">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>A valid bookmark within the document or an URL.</td> + </tr> + + + <tr> + <td>1</td> + <td>The text of the link <em>(optional)</em>.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_todo">todo</h4> +<p>Saves the value as a <span class="caps">TODO</span> item, which can be printed using the <a href="/glyph/book/ref_commands.html#c_todo"><code>todo</code></a> command and included in the document if the <a href="/glyph/book/config/document.html#s_document_draft"><code>document.draft</code></a> setting is set to <code>true</code>.</p> +<strong>Aliases:</strong> <code>!</code> +<p><strong>Example:</strong> <code>todo[Remember to do this.]</code></p> + +</div> + + <div class="navigation"><a href="/glyph/book/macros/macros_block.html">Block Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_filters.html">&rarr; Filter 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_50.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/macros/macros_structure.html

@@ -0,0 +1,497 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Structure Macros - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Structure Macros</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/macros/macros_filters.html">Filter Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/document.html">&rarr; document.*</a></div> + + <div class="section"> +<h4 id="m_article">article</h4> +<p>Used to create a simple article. By default, it includes the following macros:</p> +<ul> + <li><code>document</code> + <ul> + <li><code>head</code> + <ul> + <li><code>style[default.css]</code></li> + </ul></li> + <li><code>body</code> + <ul> + <li><code>halftitlepage</code> + <ul> + <li><code>title</code></li> + <li><code>pubdate</code></li> + <li><code>subtitle</code></li> + <li><code>author</code></li> + </ul></li> + </ul></li> + </ul></li> +</ul> + + + + + + <div class="section"> +<h5 id="h_204">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The article contents.</td> + </tr> + </table> + +</div> + + + <div class="section"> +<h5 id="h_205">Attributes</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Attribute</th> + <th>Description</th> + </tr> +<tr> + <td>pre-title</td> + <td>Contents to include before the <a href="/glyph/book/macros/macros_block.html#m_title"><code>title</code></a> macro.</td> + </tr> + + + <tr> + <td>post-title</td> + <td>Contents to include after the <a href="/glyph/book/macros/macros_block.html#m_title"><code>title</code></a> macro.</td> + </tr> + + + <tr> + <td>head</td> + <td>Contents to include instead of the default <code>head</code> macro.</td> + </tr> + + + <tr> + <td>pubdate</td> + <td>Contents to include instead of the default <code>pubdate</code> macro.</td> + </tr> + + + <tr> + <td>halftitlepage</td> + <td>Contents to include instead of the default <code>halftitlepage</code> macro.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_book">book</h4> +<p>Used to create a book. By default, it includes the following macros:</p> +<ul> + <li><code>document</code> + <ul> + <li><code>head</code> + <ul> + <li><code>style[default.css]</code></li> + </ul></li> + <li><code>body</code> + <ul> + <li><code>titlepage</code> + <ul> + <li><code>title</code></li> + <li><code>pubdate</code></li> + <li><code>subtitle</code></li> + <li><code>revision</code></li> + <li><code>author</code></li> + </ul></li> + </ul></li> + </ul></li> +</ul> + + + + + + <div class="section"> +<h5 id="h_207">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The article contents.</td> + </tr> + </table> + +</div> + + + <div class="section"> +<h5 id="h_208">Attributes</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Attribute</th> + <th>Description</th> + </tr> +<tr> + <td>pre-title</td> + <td>Contents to include before the <a href="/glyph/book/macros/macros_block.html#m_title"><code>title</code></a> macro.</td> + </tr> + + + <tr> + <td>post-title</td> + <td>Contents to include after the <a href="/glyph/book/macros/macros_block.html#m_title"><code>title</code></a> macro.</td> + </tr> + + + <tr> + <td>head</td> + <td>Contents to include instead of the default <code>head</code> macro.</td> + </tr> + + + <tr> + <td>pubdate</td> + <td>Contents to include instead of the default <code>pubdate</code> macro.</td> + </tr> + + + <tr> + <td>titlepage</td> + <td>Contents to include instead of the default <code>titlepage</code> macro.</td> + </tr> + + + <tr> + <td>frontmatter</td> + <td>Contents to include within a <code>frontmatter</code> macro.</td> + </tr> + + + <tr> + <td>bodymatter</td> + <td>Contents to include within a <code>bodymatter</code> macro.</td> + </tr> + + + <tr> + <td>backmatter</td> + <td>Contents to include within a <code>backmatter</code> macro.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_document">document</h4> +<p>Creates an <code>&lt;html&gt;</code> tag and a <span class="caps">DOCTYPE</span> declaration. Called internally by the <a href="#m_book"><code>book</code></a> macro and the <a href="#m_article"><code>article</code></a> macro.</p> + + + + + + <div class="section"> +<h5 id="h_210">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The document contents.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_head">head</h4> +<p>Creates a <code>&lt;head&gt;</code> tag, pre-populated with <code>title</code> and author/copyright <code>&lt;meta&gt;</code> tags.</p> + + + + + + <div class="section"> +<h5 id="h_212">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The head contents.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_section">section</h4> +<p>Creates a section (<code>&lt;div&gt;</code> tag).</p> +<strong>Aliases:</strong> <code>acknowledgement, addendum, afterword, appendix, bibliography, chapter, colophon, dedication, epilogue, foreword, glossary, imprint, index, inspiration, introduction, lof, lot, part, postscript, preface, prologue, promotion, references, section, section, volume</code> + + + <div class="example"><p> +<strong>Example</strong> +</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> section[ +<span class="line-numbers"> 2 </span> @title[Test Section] +<span class="line-numbers"> 3 </span> @id[test] +<span class="line-numbers"> 4 </span> ... +<span class="line-numbers"> 5 </span> ] +</pre></div> + + + + <div class="section"> +<h5 id="h_214">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The text of the section</td> + </tr> + </table> + +</div> + + + <div class="section"> +<h5 id="h_215">Attributes</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Attribute</th> + <th>Description</th> + </tr> +<tr> + <td>title</td> + <td>The title of the section <em>(optional)</em></td> + </tr> + + + <tr> + <td>id</td> + <td>The ID of the section <em>(optional)</em></td> + </tr> + + + <tr> + <td>notoc</td> + <td>If not blank, the header will not appear in the Table of Contents. <em>(optional)</em></td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_style">style</h4> +<p>Embeds the content of a <span class="caps">CSS</span> or Sass file within a <code>&lt;style&gt;</code> tag (<span class="fmi">for more information on stylesheets, see <a href="/glyph/book/text_editing/stylesheets.html#stylesheets">Adding Stylesheets</a></span>).</p> + +<p><strong>Example:</strong> <code>style[default.css]</code></p> + + + + <div class="section"> +<h5 id="h_217">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The stylesheet file to embed.</td> + </tr> + </table> + +</div> + +</div> + + + + <div class="section"> +<h4 id="m_toc">toc</h4> +<p>Generates a <em>Table of Contents</em> based on how sections are nested in the current document.</p> + +<p><strong>Example:</strong> <code>toc[1]</code></p> + + + + <div class="section"> +<h5 id="h_219">Parameters</h5> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td>0</td> + <td>The maximum header depth of the TOC <em>(optional)</em>.</td> + </tr> + </table> + +</div> + +</div> + + <div class="navigation"><a href="/glyph/book/macros/macros_filters.html">Filter Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/config/document.html">&rarr; document.*</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_52.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/ref_commands.html

@@ -0,0 +1,468 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Command Reference - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Command Reference</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/troubleshooting/errors_macro.html">Macro Errors &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_core.html">&rarr; Core Macros</a></div> + <p>Glyph&#8217;s command-line interface has been built using the <a href="http://github.com/davetron5000/gli">gli</a> (Git-like interface) gem. Therefore, Glyph commands are all written like this:</p> +<p><strong>glyph</strong> <em>global_options</em> <strong>command</strong> <em>options</em> <em>parameters</em></p> +<p>Where:</p> +<ul> + <li><em>global_options</em> and <em>options</em> are in the form: <code>-n</code> <em>value</em> or <code>--name=</code><em>value</em>, e.g. <code>-f pdf</code> or <code>--format=pdf</code></li> + <li><em>parameters</em> are separated by whitespaces, and can be wrapped in quotes.</li> +</ul> +<div class="section"> +<h3 id="h_103">Global Options</h3> +<div class="section"> +<h4 id="debug_switch"><code>-d</code>, <code>--debug</code></h4> +<p>If specified, the command is executed in debug mode and additional diagnostic information is printed on the screen.</p> + +</div> + +</div> +<div class="section"> +<h3 id="c_add">add</h3> +<p>Creates a new text file in the <code>text/</code> folder.</p> + <p><strong>Example:</strong> <code>glyph add introduction.textile</code></p> + + <div class="section"> +<h4 id="h_106">Parameters</h4> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td><em>file_name</em></td> + <td>The name (or relative path) of the new file to be created.</td> + </tr> + </table> + +</div> + +</div> +<div class="section"> +<h3 id="c_compile">compile</h3> +<p>Compiles a Glyph document into an output file. If no options are specified, the <code>document.glyph</code> file is used as source to produce a standalone HTML file.</p> + <p><strong>Example:</strong> <code>glyph compile -f pdf</code></p> + + <div class="section"> +<h4 id="h_108">Parameters</h4> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td><em>source</em></td> + <td>The source glyph file to compile <em>(Optional)</em>.</td> + </tr> + + + <tr> + <td><em>destination</em></td> + <td>The destination file <em>(Optional)</em>.</td> + </tr> + </table> + +</div> + + + <div class="section"> +<h4 id="h_109">Options</h4> +<table style="width:100%;"> + <tr> + <th style="width:30%">Option</th> + <th>Description</th> + </tr> +<tr> + <td><code>-s</code> (<code>--source</code>)</td> + <td> +The source file to compile. + <strong>Default Value:</strong> <code>document.glyph</code> + </td> + </tr> + + + <tr> + <td><code>-f</code> (<code>--format</code>)</td> + <td> +The format of the output file. + <strong>Default Value:</strong> <code>html</code> + *Possible Values:* @html, pdf@ + </td> + </tr> + + + <tr> + <td><code>-a</code> (<code>--auto</code>)</td> + <td> +If specified, enable <a href="/glyph/book/compiling/compiling.html#auto_regeneration">auto regeneration</a> (requires the <a href="http://rubygems.org/gems/directory_watcher">directory_watcher</a> gem to be installed). + </td> + </tr> + </table> + +</div> + +</div> +<div class="section"> +<h3 id="c_config">config</h3> +Gets or sets a configuration setting in the project or global configuration file (<span class="fmi">for more information on configuration files, see <a href="/glyph/book/getting_started/configuration.html#cfg">Project Configuration</a></span>). + +<div class="examples"> +<p><strong>Examples:</strong></p> +<code>glyph config document.filename</code><br /><code>glyph config -g document.author "Fabio Cevasco"</code><br /> +</div> + + + <div class="section"> +<h4 id="h_111">Options</h4> +<table style="width:100%;"> + <tr> + <th style="width:30%">Option</th> + <th>Description</th> + </tr> +<tr> + <td><code>-g</code> (<code>--global</code>)</td> + <td> +If specified, the global configuration file is processed instead of the project file. + <strong>Default Value:</strong> <code>false</code> + </td> + </tr> + </table> + +</div> + + + <div class="section"> +<h4 id="h_112">Parameters</h4> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td><em>setting</em></td> + <td>The name of a valid <a href="/glyph/book/document.html#cfg_ref">configuration setting</a>.</td> + </tr> + + + <tr> + <td><em>value</em></td> + <td>The new value of the configuration setting.</td> + </tr> + </table> + +</div> + +</div> +<div class="section"> +<h3 id="c_help">help</h3> +Prints information about all Glyph commands or about one specific command. + +<div class="examples"> +<p><strong>Examples:</strong></p> +<code>glyph help</code><br /><code>glyph help compile</code><br /> +</div> + + + <div class="section"> +<h4 id="h_114">Parameters</h4> +<table style="width:100%;"> + <tr> + <th style="width:30%">Parameter</th> + <th>Description</th> + </tr> +<tr> + <td><em>command</em></td> + <td>A valid Glyph command.</td> + </tr> + </table> + +</div> + +</div> +<div class="section"> +<h3 id="c_init">init</h3> +Creates a new Glyph project in the current directory (if empty). + <p><strong>Example:</strong> <code>glyph init</code></p> + +</div> +<div class="section"> +<h3 id="c_outline">outline</h3> +Display an outline of the current document. + + <div class="section"> +<h4 id="h_117">Options</h4> +<table style="width:100%;"> + <tr> + <th style="width:30%">Option</th> + <th>Description</th> + </tr> +<tr> + <td><code>-l</code> (<code>--limit</code>)</td> + <td> +Only display headers until the specified level. + </td> + </tr> + + + <tr> + <td><code>-i</code> (<code>--ids</code>)</td> + <td> +Display section IDs. + </td> + </tr> + + + <tr> + <td><code>-f</code> (<code>--files</code>)</td> + <td> +Display file names. + </td> + </tr> + + + <tr> + <td><code>-t</code> (<code>--titles</code>)</td> + <td> +Display section titles. + </td> + </tr> + </table> + +</div> + + +<div class="examples"> +<p><strong>Examples:</strong></p> +<code>glyph outline -it -l 1</code><br /><code>glyph outline -l 2</code><br /><code>glyph outline -f</code><br /> +</div> + +</div> +<div class="section"> +<h3 id="c_stats">stats</h3> +<p>Displays project statistics (<span class="fmi">for more information on this command, see <a href="/glyph/book/document.html#stats">Document Statistics</a></span>).</p> + +<div class="examples"> +<p><strong>Examples:</strong></p> +<code>glyph stats -m </code><br /><code>glyph stats --link=h3rald.com</code><br /> +</div> + + + <div class="section"> +<h4 id="h_119">Options</h4> +<table style="width:100%;"> + <tr> + <th style="width:30%">Option</th> + <th>Description</th> + </tr> +<tr> + <td><code>-b</code> (<code>--bookmarks</code>)</td> + <td> +If specified, general statistics about bookmarks are displayed (see <a href="/glyph/book/stats/bookmarks.html#stats_bookmarks">Bookmark Statistics</a>). + </td> + </tr> + + + <tr> + <td><code>--bookmark</code></td> + <td> +Display detailed statistics about the specified bookmark. + </td> + </tr> + + + <tr> + <td><code>-f</code> (<code>--files</code>)</td> + <td> +If specified, general statistics about project files are displayed. + </td> + </tr> + + + <tr> + <td><code>-l</code> (<code>--links</code>)</td> + <td> +If specified, general statistics about links are displayed (see <a href="/glyph/book/stats/links.html#stats_links">Link Statistics</a>). + </td> + </tr> + + + <tr> + <td><code>--link</code></td> + <td> +Display detailed statistics about all links whose target matches the specified regular expression. + </td> + </tr> + + + <tr> + <td><code>-m</code> (<code>--macros</code>)</td> + <td> +If specified, general statistics about macros are displayed (see <a href="/glyph/book/stats/macros.html#stats_macros">Macro Statistics</a>). + </td> + </tr> + + + <tr> + <td><code>--macro</code></td> + <td> +Display detailed statistics about the specified macro. + </td> + </tr> + + + <tr> + <td><code>-s</code> (<code>--snippets</code>)</td> + <td> +If specified, general statistics about snippets are displayed (see <a href="/glyph/book/stats/snippets.html#stats_snippets">Snippet Statistics</a>). + </td> + </tr> + + + <tr> + <td><code>--snippet</code></td> + <td> +Display detailed statistics about the specified snippet. + </td> + </tr> + </table> + +</div> + +</div> +<div class="section"> +<h3 id="c_todo">todo</h3> +Prints all the todo items saved using the <a href="/glyph/book/macros/macros_inline.html#m_todo"><code>todo</code></a> macro. + <p><strong>Example:</strong> <code>glyph todo</code></p> + +</div> + <div class="navigation"><a href="/glyph/book/troubleshooting/errors_macro.html">Macro Errors &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/macros/macros_core.html">&rarr; Core 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=/cmd_ref.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/stats/bookmarks.html

@@ -0,0 +1,191 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Bookmark Statistics - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Bookmark Statistics</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/stats/snippets.html">Snippet Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/links.html">&rarr; Link Statistics</a></div> + + <div class="section"> +<h4 id="h_62">Displaying stats about all bookmarks</h4> +<p>To display statistics about all bookmarks, execute <code>glyph stats --bookmarks</code>. Glyph displays something like this:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ===== Bookmarks +<span class="line-numbers"> 2 </span> -- Total Bookmarks: 241 +<span class="line-numbers"> 3 </span> -- Total Referenced Bookmarks: 89 +<span class="line-numbers"> 4 </span> -- Total Unreferenced Bookmarks: 155 +<span class="line-numbers"> 5 </span> -- Bookmarks: +<span class="line-numbers"> 6 </span> attribute_intro auto_regeneration c_add c_compile c_config +<span class="line-numbers"> 7 </span> c_help c_init c_outline c_todo cfg +<span class="line-numbers"> 8 </span> cfg_document cfg_filters cfg_ref cmd_ref compile +<span class="line-numbers"> 9 </span> [...] +<span class="line-numbers"> 10 </span> -- Referenced Bookmarks: +<span class="line-numbers"> 11 </span> - attribute_intro (1) +<span class="line-numbers"> 12 </span> - auto_regeneration (2) +<span class="line-numbers"> 13 </span> - c_add (2) +<span class="line-numbers"> 14 </span> - c_compile (10) +<span class="line-numbers"> 15 </span> - c_config (6) +<span class="line-numbers"> 16 </span> - c_init (1) +<span class="line-numbers"> 17 </span> - c_outline (1) +<span class="line-numbers"> 18 </span> [...] +<span class="line-numbers"> 19 </span> -- Unreferenced Bookmarks: +<span class="line-numbers"> 20 </span> c_help cmd_ref expanded_values extending h_1 +<span class="line-numbers"> 21 </span> h_10 h_102 h_105 h_107 h_109 +<span class="line-numbers"> 22 </span> h_111 h_112 h_114 h_115 h_117 +<span class="line-numbers"> 23 </span> [...] +</pre> + <div class="section"> +<h5 id="h_63">Remarks</h5> +<ul> + <li>All the automatically-generated bookmarks (like headers, starting with <code>h_</code>) are included as well.</li> +</ul> + +</div> + +</div> + + <div class="section"> +<h4 id="h_64">Displaying stats about a single bookmark</h4> +<p>To display statistics about a single bookmark (e.g. <code>yardoc</code>), execute <code>glyph stats --bookmark=c_config</code>. Glyph displays something like this:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ===== Bookmark 'c_config' (header) +<span class="line-numbers"> 2 </span> -- Defined in: text/ref_commands.glyph +<span class="line-numbers"> 3 </span> -- Referenced in: +<span class="line-numbers"> 4 </span> - text/changelog.glyph (2) +<span class="line-numbers"> 5 </span> - text/getting_started/configuration.glyph (1) +<span class="line-numbers"> 6 </span> - text/troubleshooting/errors_command.glyph (3) +</pre> + <div class="section"> +<h5 id="h_65">Remarks</h5> +<ul> + <li>Do not prepend the bookmark ID with <code>#</code>.</li> +</ul> + +</div> + +</div> + <div class="navigation"><a href="/glyph/book/stats/snippets.html">Snippet Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/links.html">&rarr; Link Statistics</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=/stats_bookmarks.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/stats/links.html

@@ -0,0 +1,232 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Link Statistics - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Link Statistics</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/stats/bookmarks.html">Bookmark Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/internals.html">&rarr; A quick look at Glyph's internals</a></div> + + <div class="section"> +<h4 id="h_67">Displaying stats about all links</h4> +<p>To display statistics about all links, execute <code>glyph stats --links</code>. Glyph displays something like this:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ===== Links +<span class="line-numbers"> 2 </span> -- Total Internal Links: 89 +<span class="line-numbers"> 3 </span> -- Internal Links +<span class="line-numbers"> 4 </span> - #attribute_intro +<span class="line-numbers"> 5 </span> - #auto_regeneration +<span class="line-numbers"> 6 </span> - #c_add +<span class="line-numbers"> 7 </span> - #c_compile +<span class="line-numbers"> 8 </span> - #c_config +<span class="line-numbers"> 9 </span> - #c_init +<span class="line-numbers"> 10 </span> - #c_outline +<span class="line-numbers"> 11 </span> - #c_stats +<span class="line-numbers"> 12 </span> - #c_todo +<span class="line-numbers"> 13 </span> - #cfg +<span class="line-numbers"> 14 </span> - #cfg_document +<span class="line-numbers"> 15 </span> - #cfg_filters +<span class="line-numbers"> 16 </span> [...] +<span class="line-numbers"> 17 </span> -- Total External Links: 95 +<span class="line-numbers"> 18 </span> -- External Links +<span class="line-numbers"> 19 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Glyph +<span class="line-numbers"> 20 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Glyph/Document +<span class="line-numbers"> 21 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Glyph/Interpreter +<span class="line-numbers"> 22 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Glyph/Macro +<span class="line-numbers"> 23 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Glyph/Macro/Validators +<span class="line-numbers"> 24 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Glyph/Macro:update_source +<span class="line-numbers"> 25 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Glyph/MacroNode +<span class="line-numbers"> 26 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Glyph/Parser +<span class="line-numbers"> 27 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Glyph/SyntaxNode +<span class="line-numbers"> 28 </span> - <span class="InvalidIllegal">&amp;</span>[yardoc]/Macro +<span class="line-numbers"> 29 </span> - http://code.google.com/p/wkhtmltopdf/ +<span class="line-numbers"> 30 </span> - http://coderay.rubychan.de/ +<span class="line-numbers"> 31 </span> - http://coderay.rubychan.de/doc/classes/CodeRay/Encoders/HTML.html +<span class="line-numbers"> 32 </span> [...] +</pre> + <div class="section"> +<h5 id="h_68">Remarks</h5> +<ul> + <li>The only criteria used to determine if a link is internal is whether it starts with a <code>#</code> or not.</li> +</ul> + +</div> + +</div> + + <div class="section"> +<h4 id="h_69">Displaying stats about links matching a regular expression</h4> +<p>To display statistics about links matching a regular expression (e.g. <code>/c_/</code>), execute <code>glyph stats --link=c_</code>. Glyph displays something like this:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ===== Links matching /c_/ +<span class="line-numbers"> 2 </span> -- Total Links: 8 +<span class="line-numbers"> 3 </span> -- Link Targets: +<span class="line-numbers"> 4 </span> - #c_add +<span class="line-numbers"> 5 </span> - #c_compile +<span class="line-numbers"> 6 </span> - #c_config +<span class="line-numbers"> 7 </span> - #c_init +<span class="line-numbers"> 8 </span> - #c_outline +<span class="line-numbers"> 9 </span> - #c_stats +<span class="line-numbers"> 10 </span> - #c_todo +<span class="line-numbers"> 11 </span> - #esc_quot +<span class="line-numbers"> 12 </span> -- Details: +<span class="line-numbers"> 13 </span> - #c_add (2) +<span class="line-numbers"> 14 </span> - text/troubleshooting/errors_command.glyph (1) +<span class="line-numbers"> 15 </span> - text/troubleshooting/errors_generic.glyph (1) +<span class="line-numbers"> 16 </span> - #c_compile (10) +<span class="line-numbers"> 17 </span> - text/changelog.glyph (1) +<span class="line-numbers"> 18 </span> - text/compiling/compiling.glyph (2) +<span class="line-numbers"> 19 </span> - text/compiling/lite_mode.glyph (1) +<span class="line-numbers"> 20 </span> - text/compiling/programmatic_usage.glyph (2) +<span class="line-numbers"> 21 </span> - text/getting_started/create_project.glyph (1) +<span class="line-numbers"> 22 </span> - text/ref_config.glyph (1) +<span class="line-numbers"> 23 </span> - text/troubleshooting/errors_command.glyph (2) +<span class="line-numbers"> 24 </span> - #c_config (6) +<span class="line-numbers"> 25 </span> - text/changelog.glyph (2) +<span class="line-numbers"> 26 </span> - text/getting_started/configuration.glyph (1) +<span class="line-numbers"> 27 </span> - text/troubleshooting/errors_command.glyph (3) +<span class="line-numbers"> 28 </span> - #c_init (1) +<span class="line-numbers"> 29 </span> - text/troubleshooting/errors_generic.glyph (1) +<span class="line-numbers"> 30 </span> - #c_outline (1) +<span class="line-numbers"> 31 </span> - text/changelog.glyph (1) +<span class="line-numbers"> 32 </span> - #c_stats (1) +<span class="line-numbers"> 33 </span> - text/stats/stats.glyph (1) +<span class="line-numbers"> 34 </span> - #c_todo (1) +<span class="line-numbers"> 35 </span> - text/macros/macros_inline.glyph (1) +<span class="line-numbers"> 36 </span> - #esc_quot (2) +<span class="line-numbers"> 37 </span> - text/extending/macro_def.glyph (1) +<span class="line-numbers"> 38 </span> - text/text_editing/macro_intro.glyph (1) +</pre> + <div class="section"> +<h5 id="h_70">Remarks</h5> +<ul> + <li>No distinction between external and internal targets is made.</li> +</ul> + +</div> + +</div> + <div class="navigation"><a href="/glyph/book/stats/bookmarks.html">Bookmark Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/internals.html">&rarr; A quick look at Glyph's internals</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=/stats_links.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/stats/macros.html

@@ -0,0 +1,215 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Macro Statistics - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Macro Statistics</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/stats/stats.html">Using the stats command &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/snippets.html">&rarr; Snippet Statistics</a></div> + + <div class="section"> +<h4 id="h_52">Displaying stats about all macros</h4> +<p>To display statistics about all macros, execute <code>glyph stats --macros</code>. Glyph displays something like this:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ===== Macros +<span class="line-numbers"> 2 </span> -- Total Macro Instances: 2497 +<span class="line-numbers"> 3 </span> -- Total Macro Definitions: 65 +<span class="line-numbers"> 4 </span> -- Total Macro Aliases: 57 +<span class="line-numbers"> 5 </span> -- Total Used Macro Definitions: 56 +<span class="line-numbers"> 6 </span> -- Macro Definitions: +<span class="line-numbers"> 7 </span> #&gt; $&gt; %&gt; alias: aliases +<span class="line-numbers"> 8 </span> anchor and article author block_example +<span class="line-numbers"> 9 </span> book box class codeblock comment +<span class="line-numbers"> 10 </span> condition config config: config_table default +<span class="line-numbers"> 11 </span> document draftcomment eq error_table escape +<span class="line-numbers"> 12 </span> example examples features figure fmi +<span class="line-numbers"> 13 </span> head highlight image include issue +<span class="line-numbers"> 14 </span> link macro: markdown match navigation +<span class="line-numbers"> 15 </span> not note option or parameters +<span class="line-numbers"> 16 </span> pubdate ref_config ref_error ref_macro release +<span class="line-numbers"> 17 </span> revision rewrite: ruby section snippet +<span class="line-numbers"> 18 </span> snippet: stats_for style subtitle textile +<span class="line-numbers"> 19 </span> title toc todo values |xml| +<span class="line-numbers"> 20 </span> +<span class="line-numbers"> 21 </span> -- Used Macro Definitions: +<span class="line-numbers"> 22 </span> #&gt; $&gt; %&gt; aliases anchor +<span class="line-numbers"> 23 </span> and author block_example book box +<span class="line-numbers"> 24 </span> class codeblock comment condition config +<span class="line-numbers"> 25 </span> config_table default document eq error_table +<span class="line-numbers"> 26 </span> escape example examples features figure +<span class="line-numbers"> 27 </span> fmi head highlight image include +<span class="line-numbers"> 28 </span> issue link note option or +<span class="line-numbers"> 29 </span> parameters pubdate ref_config ref_error ref_macro +<span class="line-numbers"> 30 </span> release revision rewrite: ruby section +<span class="line-numbers"> 31 </span> snippet snippet: stats_for style subtitle +<span class="line-numbers"> 32 </span> textile title toc todo values +<span class="line-numbers"> 33 </span> |xml| +</pre> + <div class="section"> +<h5 id="h_53">Remarks</h5> +<ul> + <li>Only macro <em>definitions</em> (not their <em>aliases</em>) are displayed, both default and user-defined.</li> + <li>The <code>|xml|</code> macro is a special macro used if the <a href="/glyph/book/config/options.html#s_options_xml_fallback"><code>options.xml_fallback</code></a> setting is enabled.</li> + <li>There&#8217;s no distinction between macros defined by the user and macros defined by Glyph itself.</li> +</ul> + +</div> + +</div> + + <div class="section"> +<h4 id="h_54">Displaying stats about a single macro</h4> +<p>To display statistics about a single macro (e.g. <code>note</code>), execute <code>glyph stats --macro=note</code>. Glyph displays something like this:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ===== Macro 'note' +<span class="line-numbers"> 2 </span> -- Total Instances: 18 +<span class="line-numbers"> 3 </span> -- Occurrences: +<span class="line-numbers"> 4 </span> - text/compiling/compiling.glyph (2) +<span class="line-numbers"> 5 </span> - text/compiling/programmatic_usage.glyph (1) +<span class="line-numbers"> 6 </span> - text/extending/params_attrs.glyph (1) +<span class="line-numbers"> 7 </span> - text/getting_started/configuration.glyph (1) +<span class="line-numbers"> 8 </span> - text/stats/macros.glyph (2) +<span class="line-numbers"> 9 </span> - text/text_editing/attribute_intro.glyph (1) +<span class="line-numbers"> 10 </span> - text/text_editing/esc_quot.glyph (1) +<span class="line-numbers"> 11 </span> - text/text_editing/images.glyph (1) +<span class="line-numbers"> 12 </span> - text/text_editing/inclusions.glyph (3) +<span class="line-numbers"> 13 </span> - text/text_editing/links.glyph (1) +<span class="line-numbers"> 14 </span> - text/text_editing/raw_html.glyph (1) +<span class="line-numbers"> 15 </span> - text/text_editing/section_aliases.glyph (1) +<span class="line-numbers"> 16 </span> - text/text_editing/xml_fallback.glyph (2) +</pre> + <div class="section"> +<h5 id="h_55">Remarks</h5> +<ul> + <li>All the instances of the specified macro definition <em>and all its aliases</em> are collected, regardless whether a definition or an alias is specified.</li> + <li>If you use custom macros, make sure they call the <a href="http://yardoc.org/docs/h3rald-glyph/Glyph/Macro:update_source">Macro#update_source</a> appropriately method if necessary.</li> + <li>If macros are used within <a href="/glyph/book/extending/interpreting.html#rewriting">rewritten</a> macros, they&#8217;ll be also listed in each file where the rewritten macro is used.</li> +</ul> + +</div> + +</div> + <div class="navigation"><a href="/glyph/book/stats/stats.html">Using the stats command &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/snippets.html">&rarr; Snippet Statistics</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=/stats_macros.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/stats/snippets.html

@@ -0,0 +1,192 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Snippet Statistics - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Snippet Statistics</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/stats/macros.html">Macro Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/bookmarks.html">&rarr; Bookmark Statistics</a></div> + + <div class="section"> +<h4 id="h_57">Displaying stats about all snippets</h4> +<p>To display statistics about all snippets, execute <code>glyph stats --snippets</code>. Glyph displays something like this:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ===== Snippets +<span class="line-numbers"> 2 </span> -- Total Snippets: 21 +<span class="line-numbers"> 3 </span> -- Total Used Snippets: 21 +<span class="line-numbers"> 4 </span> -- Total Unused Snippets: 0 +<span class="line-numbers"> 5 </span> -- Snippets: +<span class="line-numbers"> 6 </span> bin_params called_on_files coderay filter_by_ext gcode +<span class="line-numbers"> 7 </span> glang htmlcode img_attrs img_file macros +<span class="line-numbers"> 8 </span> markups only_after_declaration only_defined_through opt prince +<span class="line-numbers"> 9 </span> referenced_with_path sq_esc unsafe uv wkhtml +<span class="line-numbers"> 10 </span> yardoc +<span class="line-numbers"> 11 </span> -- Used Snippets: +<span class="line-numbers"> 12 </span> bin_params called_on_files coderay filter_by_ext gcode +<span class="line-numbers"> 13 </span> glang htmlcode img_attrs img_file macros +<span class="line-numbers"> 14 </span> markups only_after_declaration only_defined_through opt prince +<span class="line-numbers"> 15 </span> referenced_with_path sq_esc unsafe uv wkhtml +<span class="line-numbers"> 16 </span> yardoc +</pre> + <div class="section"> +<h5 id="h_58">Remarks</h5> +<ul> + <li>Information on snippet usage and definitions is available only when displaying statistics for a single snippet.</li> +</ul> + +</div> + +</div> + + <div class="section"> +<h4 id="h_59">Displaying stats about a single snippet</h4> +<p>To display statistics about a single snippet (e.g. <code>yardoc</code>), execute <code>glyph stats --snippet=yardoc</code>. Glyph displays something like this:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ===== Snippet 'yardoc' +<span class="line-numbers"> 2 </span> -- Definition: +<span class="line-numbers"> 3 </span> ------------------- +<span class="line-numbers"> 4 </span> http://yardoc.org/docs/h3rald-glyph +<span class="line-numbers"> 5 </span> ------------------- +<span class="line-numbers"> 6 </span> -- Total Used Instances: 18 +<span class="line-numbers"> 7 </span> -- Usage Details: +<span class="line-numbers"> 8 </span> - text/extending/bookmarks_headers.glyph (1) +<span class="line-numbers"> 9 </span> - text/extending/further_reading.glyph (5) +<span class="line-numbers"> 10 </span> - text/extending/internals.glyph (5) +<span class="line-numbers"> 11 </span> - text/extending/macro_def.glyph (3) +<span class="line-numbers"> 12 </span> - text/extending/validators.glyph (1) +<span class="line-numbers"> 13 </span> - text/macros/macros_core.glyph (2) +<span class="line-numbers"> 14 </span> - text/stats/macros.glyph (1) +</pre> + <div class="section"> +<h5 id="h_60">Remarks</h5> +<ul> + <li>Nested snippets appear as within the file containing the top-level snippet.</li> +</ul> + +</div> + +</div> + <div class="navigation"><a href="/glyph/book/stats/macros.html">Macro Statistics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/bookmarks.html">&rarr; Bookmark Statistics</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=/stats_snippets.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/stats/stats.html

@@ -0,0 +1,195 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Using the stats command - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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 the stats command</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/compiling/programmatic_usage.html">Using Glyph programmatically &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/macros.html">&rarr; Macro Statistics</a></div> + +<p>Glyph includes a <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command that can be used to display useful statistics about your Glyph project. If you try running Glyph's command help, you'll see that this command can take quite a few options:</p> +<pre class="lazy"><span class="line-numbers"> 1 </span> $ glyph help stats +<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> stats [options] +<span class="line-numbers"> 6 </span> Display statistics +<span class="line-numbers"> 7 </span> +<span class="line-numbers"> 8 </span> Options: +<span class="line-numbers"> 9 </span> -b, --bookmarks - Display stats about bookmarks +<span class="line-numbers"> 10 </span> --bookmark=arg - Display stats about a single bookmark +<span class="line-numbers"> 11 </span> -f, --files - Display stats about project files +<span class="line-numbers"> 12 </span> -l, --links - Display stats about links +<span class="line-numbers"> 13 </span> --link=arg - Display stats about links matching a regular expression +<span class="line-numbers"> 14 </span> -m, --macros - Display stats about macros +<span class="line-numbers"> 15 </span> --macro=arg - Display stats about a single macro +<span class="line-numbers"> 16 </span> -s, --snippets - Display stats about snippets +<span class="line-numbers"> 17 </span> --snippet=arg - Display stats about a single snippet +</pre> +<p>If no options are specified, the command returns a summary containing different element totals, i.e.:</p> +<ul> + <li>The files used in the project</li> + <li>Macro definitions and instances</li> + <li>Snippets</li> + <li>Bookmarks</li> + <li>Links and references</li> +</ul> +<p>Example:</p> +<pre class="lazy"><span class="line-numbers"> 1 </span> ===================================== +<span class="line-numbers"> 2 </span> Glyph - Statistics +<span class="line-numbers"> 3 </span> ===================================== +<span class="line-numbers"> 4 </span> +<span class="line-numbers"> 5 </span> ===== Files +<span class="line-numbers"> 6 </span> -- Total Files: 50 +<span class="line-numbers"> 7 </span> -- /text -- 46 +<span class="line-numbers"> 8 </span> -- /images -- 3 +<span class="line-numbers"> 9 </span> -- /styles -- 0 +<span class="line-numbers"> 10 </span> -- /layouts -- 0 +<span class="line-numbers"> 11 </span> -- /lib -- 1 +<span class="line-numbers"> 12 </span> +<span class="line-numbers"> 13 </span> ===== Macros +<span class="line-numbers"> 14 </span> -- Total Macro Instances: 2950 +<span class="line-numbers"> 15 </span> -- Total Macro Definitions: 22 +<span class="line-numbers"> 16 </span> -- Total Macro Aliases: 57 +<span class="line-numbers"> 17 </span> -- Total Used Macro Definitions: 60 +<span class="line-numbers"> 18 </span> +<span class="line-numbers"> 19 </span> ===== Snippets +<span class="line-numbers"> 20 </span> -- Total Snippets: 21 +<span class="line-numbers"> 21 </span> -- Total Used Snippets: 21 +<span class="line-numbers"> 22 </span> -- Total Unused Snippets: 0 +<span class="line-numbers"> 23 </span> +<span class="line-numbers"> 24 </span> ===== Bookmarks +<span class="line-numbers"> 25 </span> -- Total Bookmarks: 221 +<span class="line-numbers"> 26 </span> -- Total Referenced Bookmarks: 87 +<span class="line-numbers"> 27 </span> -- Total Unreferenced Bookmarks: 135 +<span class="line-numbers"> 28 </span> +<span class="line-numbers"> 29 </span> ===== Links +<span class="line-numbers"> 30 </span> -- Total Internal Links: 87 +<span class="line-numbers"> 31 </span> -- Total External Links: 97 +</pre> + <div class="navigation"><a href="/glyph/book/compiling/programmatic_usage.html">Using Glyph programmatically &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/stats/macros.html">&rarr; Macro Statistics</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_25.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/attribute_intro.html

@@ -0,0 +1,156 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Macro attributes - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Macro attributes</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/macro_intro.html">Introducing Glyph Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/esc_quot.html">&rarr; Escaping and Quoting</a></div> + <p>Although a macro can take any number of parameters, they are often no more than two or three, for readibility reasons: parameters have no name, but their position within a macro is significant.</p> +<p>If you have something like this:</p> + + <pre class="lazy"><span class="line-numbers"> 1 </span> custom_image[test.png|50%|50%|Test Image] +</pre> + <p>it may still be easy enough to understand what each parameter is used for, but:</p> +<ul> + <li>you can easily forget that the third parameter is the image width</li> + <li>if you don&#8217;t want to resize the image, you still have to pass <em>empty parameters</em> to the macro, like this: <code>custom_image[test2.png|||Test Image]</code></li> +</ul> +<p>To avoid these situations, some macros which would normally take three or four parameters take optional attributes instead, so you can write:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> image[test.png +<span class="line-numbers"> 2 </span> @width[50%] +<span class="line-numbers"> 3 </span> @alt[Test Image] +<span class="line-numbers"> 4 </span> @height[50%] +<span class="line-numbers"> 5 </span> ] +</pre> + <p>More verbose, of course, but definitely more readable. In this way, if you won't want to scale an image, you can safely omit the <code>@width</code> and <code>@height</code> attributes.</p> + <div class="note"> +<span class="note-title">Note</span>Like parameters, attributes can contain other macros, too. + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/macro_intro.html">Introducing Glyph Macros &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/esc_quot.html">&rarr; Escaping and Quoting</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=/attribute_intro.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/code.html

@@ -0,0 +1,176 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Source Code - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Source Code</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/images.html">Images and Figures &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/raw_html.html">&rarr; Textile or Markdown</a></div> + <p>If you&#8217;re a programmer, chances are that you&#8217;re going to include some source code in your articles and books. Glyph offers two ways to format code blocks effortlessly: the <a href="/glyph/book/macros/macros_block.html#m_codeblock"><code>codeblock</code></a> macro, which simply wraps text into <code>&lt;pre&gt;</code> and <code>&lt;code&gt;</code> tags, or the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro. The last one requires either <a href="http://coderay.rubychan.de/">Coderay</a> or <a href="http://ultraviolet.rubyforge.org/">Ultraviolet</a>, but it provides syntax highlighting for the most common programming languages.</p> +<p>Cosider the following piece of ruby code:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> def find_child(&amp;block) +<span class="line-numbers"> 2 </span> children.each do |c| +<span class="line-numbers"> 3 </span> c.descend do |node, level| +<span class="line-numbers"> 4 </span> return node if block.call(node) +<span class="line-numbers"> 5 </span> end +<span class="line-numbers"> 6 </span> end +<span class="line-numbers"> 7 </span> nil +<span class="line-numbers"> 8 </span> end +</pre> + <p>It can be wrapped in a highlight macro, like so:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> highlight[=ruby| +<span class="line-numbers"> 2 </span> def find_child(&amp;block) +<span class="line-numbers"> 3 </span> children.each do |c| +<span class="line-numbers"> 4 </span> c.descend do |node, level| +<span class="line-numbers"> 5 </span> return node if block.call(node) +<span class="line-numbers"> 6 </span> end +<span class="line-numbers"> 7 </span> end +<span class="line-numbers"> 8 </span> nil +<span class="line-numbers"> 9 </span> end +<span class="line-numbers"> 10 </span> =] +</pre> + <p>...to produce the following, using the ultraviolet highlighter:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> <span class="Keyword">def</span> <span class="Entity">find_child</span>(<span class="Variable"><span class="Keyword">&amp;</span>block</span>) +<span class="line-numbers"> 2 </span> children.<span class="Entity">each</span> <span class="Keyword">do </span>|<span class="Variable">c</span>| +<span class="line-numbers"> 3 </span> c.<span class="Entity">descend</span> <span class="Keyword">do </span>|<span class="Variable">node</span>, <span class="Variable">level</span>| +<span class="line-numbers"> 4 </span> <span class="Keyword">return</span> node <span class="Keyword">if</span> block.<span class="Entity">call</span>(node) +<span class="line-numbers"> 5 </span> <span class="Keyword">end</span> +<span class="line-numbers"> 6 </span> <span class="Keyword">end</span> +<span class="line-numbers"> 7 </span> <span class="Constant">nil</span> +<span class="line-numbers"> 8 </span> <span class="Keyword">end</span> +</pre> + <div class="box"> +<div class="box-title">Some Remarks</div> +<ul> + <li>Highlighters require some configuration. For more information on relevant configuration settings, see the <a href="/glyph/book/config/filters.html#cfg_filters">filters.*</a> configuration settings.</li> + <li>If you&#8217;re using the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro together within the <a href="/glyph/book/macros/macros_filters.html#m_textile"><code>textile</code></a> macro, you must wrap the macro call within <code>&lt;notextile&gt;</code> tags.</li> + <li>You must always escape pipes (<code>|</code>) with the code or the highlight macro.</li> +</ul> + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/images.html">Images and Figures &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/raw_html.html">&rarr; Textile or Markdown</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=/source_code.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/conditionals.html

@@ -0,0 +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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Conditional Macros - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Conditional Macros</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/evaluation.html">Evaluating Ruby code and Configuration Settings &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/compiling.html">&rarr; Compiling a project</a></div> + <p>Sometimes you may want text to be included in a document only if certain conditions are satisfied. For example, you may want to display a disclaimer section only if the document is a draft (see the <a href="/glyph/book/config/document.html#s_document_draft"><code>document.draft</code></a> setting), or use a particular stylesheet only if when you generate a <span class="caps">PDF</span> document.</p> +<p>To do so, you can use the <a href="/glyph/book/macros/macros_core.html#m_condition"><code>condition</code></a> macro (aliased by <code>?</code>), and a set of additional macros that can be used as conditional operators i.e.:</p> +<ul> + <li><a href="/glyph/book/macros/macros_core.html#m_eq"><code>eq</code></a> macro</li> + <li><a href="/glyph/book/macros/macros_core.html#m_not"><code>not</code></a> macro</li> + <li><a href="/glyph/book/macros/macros_core.html#m_and"><code>and</code></a> macro</li> + <li><a href="/glyph/book/macros/macros_core.html#m_or"><code>or</code></a> macro</li> + <li><a href="/glyph/book/macros/macros_core.html#m_match"><code>match</code></a> macro</li> +</ul> +<p>Consider the following code:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ?[$[document.draft]| +<span class="line-numbers"> 2 </span> This is a first draft of the Glyph Book] +<span class="line-numbers"> 3 </span> ?[not[$[document.draft]]| +<span class="line-numbers"> 4 </span> This is the official version of the Glyph Book] +</pre> + <p>In this case, if <code>document.draft</code> is set to <code>true</code>, &#8220;This is a first draft of the Glyph Book&#8221; will be displayed; if not, &#8220;This is the official version of the Glyph Book&#8221; will be displayed instead.</p> +<p>The <a href="/glyph/book/macros/macros_core.html#m_condition"><code>condition</code></a> macro takes two parameters:</p> +<ul> + <li>the first one is the condition to evaluate</li> + <li>the second one is the text to include in the document only if the condition is satisfied.</li> +</ul> +<p>Note that <em>both</em> parameters can contain macros, of course, so you can write things like:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> ?[and[ +<span class="line-numbers"> 2 </span> eq[$[document.output]|pdf] +<span class="line-numbers"> 3 </span> | +<span class="line-numbers"> 4 </span> eq[$[tools.pdf_generator]|prince] +<span class="line-numbers"> 5 </span> ] +<span class="line-numbers"> 6 </span> | +<span class="line-numbers"> 7 </span> style[pagination.css]] +</pre> + <p>In this case, the <code>pagination.css</code> stylesheet is included only when you're generating a PDF document using Prince XML.</p> + <div class="section"> +<h4 id="h_38">Results of conditional expressions</h4> +<p>The <a href="/glyph/book/macros/macros_core.html#m_condition"><code>condition</code></a> macro in Glyph works in a similar way as conditionals in programming languages: if the conditional expression (supplied as first parameter) is satisfied then the second parameter is executed or displayed. But when is a conditional expression satisfied? Glyph is a simple mini-language to perform text manipulation, and has no types, it can only understand text, therefore:</p> +<ul> + <li>A conditional expression is satisfied if it evaluates to a non-empty string except &#8220;false&#8221;.</li> + <li>A conditional expression is not satisfied if it evaluates to an empty string or the string &#8220;false&#8221;.</li> +</ul> + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/evaluation.html">Evaluating Ruby code and Configuration Settings &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/compiling/compiling.html">&rarr; Compiling a 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=/cond_macros.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/esc_quot.html

@@ -0,0 +1,201 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Escaping and Quoting - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Escaping and Quoting</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/attribute_intro.html">Macro attributes &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/sections.html">&rarr; Sections and Headers</a></div> + <p>Glyph doesn&#8217;t require any special control characters like LaTeX, and its macro syntax is very straightforward and liberal. This however comes with a price: because square brackets are used as delimiters, you must escape any square bracket in your text with a backslash. That&#8217;s not <em>too</em> bad if you think about it, unless you&#8217;re writing programming code, in which case escaping every single square bracket can be painful.</p> +<p>If a portion of your text contains an excessive amount of square brackets, you may consider using the <a href="/glyph/book/macros/macros_core.html#m_escape"><code>escape</code></a> macro (or its alias <code>.</code>) with the <code>[=</code> and <code>=]</code> delimiters. By itself, the escape macro doesn&#8217;t do anything: it just evaluates to its contents, but the special delimiters act as an escape for any square bracket within them. As a consequence, any macro within <code>[=</code> and <code>=]</code> will <em>not</em> be evaluated.</p> +<p>You can use the quoting delimiters with <em>any</em> macro identifier. Obviously, using them as delimiters for things like <a href="/glyph/book/macros/macros_structure.html#m_section"><code>section</code></a> macros may not be a good idea, but they should be more or less mandatory with the <a href="/glyph/book/macros/macros_block.html#m_codeblock"><code>codeblock</code></a> macro or the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro, especially when it contains square brackets or even Glyph code, like this:</p> + + <pre class="lazy"><span class="line-numbers"> 1 </span> codeblock[= +<span class="line-numbers"> 2 </span> section[ +<span class="line-numbers"> 3 </span> @title[A section] +<span class="line-numbers"> 4 </span> @id[test] +<span class="line-numbers"> 5 </span> This is a section. +<span class="line-numbers"> 6 </span> section[ +<span class="line-numbers"> 7 </span> @title[A nested section] +<span class="line-numbers"> 8 </span> This is another section. +<span class="line-numbers"> 9 </span> ] +<span class="line-numbers"> 10 </span> ] +<span class="line-numbers"> 11 </span> =] +</pre> + + <div class="note"> +<span class="note-title">Note</span>Although quoting delimiters allow you to use square brackets without escaping them, you must still escape them if you want to escape quoting delimiters themselves. + +</div> + + <p>Besides square brackets, there are other characters that must or can be escaped with backslashes, as shown in the following table:</p> + + <table><tr><th>Escape Sequence</th> + <th>Evaluates to...</th> + <th>Notes</th></tr> + <tr><td> +<code>[</code> +</td> + <td> +<code>[</code> +</td> + <td>Square brackets must be escaped unless used as macro delimiters or within a quoting macro.</td></tr> + <tr><td> +<code>]</code> +</td> + <td> +<code>]</code> +</td> + <td>Square brackets must be escaped unless used as macro delimiters or within a quoting macro.</td></tr> + <tr><td> +<code>\</code> +</td> + <td> +<code>\</code> +</td> + <td>Backslashes do not have to be escaped by default, but an escaped backslash will evaluate to itself.</td></tr> + <tr><td> +<code>=</code> +</td> + <td> +<code>=</code> +</td> + <td>Equal signs do not have to be escaped by default, but an escaped equal sign will evaluate to iself.</td></tr> + <tr><td> +<code>|</code> +</td> + <td> +<code>|</code> +</td> + <td>Pipes must be escaped (even within quoting macros) unless they are used to separate macro parameters.</td></tr> + <tr><td> +<code></code> +</td> + <td /> + <td>An escaped dot evaluates to nothing. Useful to separate macro identifiers from other characters: <br /><code>_=>[#link|This link is emphasized using Textile]_</code></td></tr></table> + <div class="navigation"><a href="/glyph/book/text_editing/attribute_intro.html">Macro attributes &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/sections.html">&rarr; Sections 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=/esc_quot.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/evaluation.html

@@ -0,0 +1,142 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Evaluating Ruby code and Configuration Settings - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Evaluating Ruby code and Configuration Settings</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/inclusions.html">Including Files and Snippets &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/conditionals.html">&rarr; Conditional Macros</a></div> + <p>Glyph Language is not a full-blown programming language and it is currently not Turing-complete (it does not provide loops). However, it is possible to evaluate simple ruby code snippets using the <code>ruby</code> macro (aliased to <code>%</code>), like this:</p> +<ul> + <li><code>%[2 + 2]</code> &rarr; 4</li> + <li><code>%[Time.now]</code> &rarr; Fri Sep 03 17:23:01 +0200 2010</li> + <li><code>%[Glyph::VERSION]</code> &rarr; 0.4.0</li> +</ul> +<p>The scope for the code evaluation is the Kernel module, (with all inclusions required by Glyph itself).</p> +<p>Although it is possible to retrieve Glyph configuration settings in this way (e.g. <code>%[cfg('document.author')]</code>), the <a href="/glyph/book/macros/macros_core.html#m_config"><code>config</code></a> macro (aliased to <code>$</code>) makes things slightly simpler (e.g. <code>$[document.author]</code>).</p> + <div class="navigation"><a href="/glyph/book/text_editing/inclusions.html">Including Files and Snippets &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/conditionals.html">&rarr; Conditional 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_20.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/glyph_files.html

@@ -0,0 +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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>.glyph files - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>.glyph files</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/getting_started/configuration.html">Project Configuration &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/macro_intro.html">&rarr; Introducing Glyph Macros</a></div> + <p>The <code>text</code> folder of any Glyph folder contains all the text source files used to produce a document. Although there are no restrictions on the extension of the files in this folder, you may want to use <code>.glyph</code>, especially if <a href="http://www.vim.org">Vim</a> is your favorite text editor.<br /> +The reason is simple: a Glyph syntax file is <a href="http://www.vim.org/scripts/script.php?script_id=3086">available on vim.org</a>. Although not essential, syntax highlighting does help when editing Glyph files.</p> + <div class="navigation"><a href="/glyph/book/getting_started/configuration.html">Project Configuration &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/macro_intro.html">&rarr; Introducing Glyph 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_6.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/images.html

@@ -0,0 +1,161 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Images and Figures - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Images and Figures</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/links.html">Links and Bookmarks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/code.html">&rarr; Source Code</a></div> + <p>Same as for <a href="/glyph/book/text_editing/links.html#links">links</a>, you can also include images and figures using Textile or Markdown. If you want additional features, you can use the <a href="/glyph/book/macros/macros_block.html#m_image"><code>image</code></a> macro and the <a href="/glyph/book/macros/macros_block.html#m_figure"><code>figure</code></a> macro, as shown in the following example:</p> + + <div class="box"> +<div class="box-title">Example</div> +<p>The following Glyph code:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> image[glyph.svg +<span class="line-numbers"> 2 </span> @with[20%] +<span class="line-numbers"> 3 </span> @height[20%] +<span class="line-numbers"> 4 </span> ] +<span class="line-numbers"> 5 </span> figure[example.png|An example figure. +<span class="line-numbers"> 6 </span> @alt[Example Figure] +<span class="line-numbers"> 7 </span> ] +</pre> + <p>Is translated into 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">img</span> <span class="MetaTag">src</span>=<span class="String"><span class="String">&quot;</span>images/glyph.svg<span class="String">&quot;</span></span> <span class="MetaTag">width</span>=<span class="String"><span class="String">&quot;</span>20%<span class="String">&quot;</span></span> <span class="MetaTag">height</span>=<span class="String"><span class="String">&quot;</span>20%<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">div</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>figure<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 3 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">img</span> <span class="MetaTag">src</span>=<span class="String"><span class="String">&quot;</span>images/example.png<span class="String">&quot;</span></span> <span class="MetaTag">alt</span>=<span class="String"><span class="String">&quot;</span>Example Figure<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">div</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>caption<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span>An example figure.<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">div</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">&gt;</span></span> +</pre> + <p>Any attribute passed to the <a href="/glyph/book/macros/macros_block.html#m_image"><code>image</code></a> macro or the <a href="/glyph/book/macros/macros_block.html#m_figure"><code>figure</code></a> macro is automatically passed to the underlying <code>&lt;img&gt;</code> tag.</p> + +</div> + <div class="note"> +<span class="note-title">Note</span>In future releases, figures will be numbered automatically and included in a <em>List of Figures</em> section. + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/links.html">Links and Bookmarks &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/code.html">&rarr; Source 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=/img_fig.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/inclusions.html

@@ -0,0 +1,172 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Including Files and Snippets - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Including Files and Snippets</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/stylesheets.html">Adding Stylesheets &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/evaluation.html">&rarr; Evaluating Ruby code and Configuration Settings</a></div> + <p>If you&#8217;re authoring a user manual, a long article, or a book, writing everything inside a single <code>document.glyph</code> file may not be optimal. For this reason, Glyph provides an <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro that can be used to include the contents of any file within the <code>text/</code> directory:</p> +<p><code>include[general/introduction.textile]</code></p> +<p>The macro call above loads the contents of the <code>introduction.textile</code> file, within the <code>text/general</code> directory.</p> +<p>When including a text file, an input filter macro is applied to its contents by default, based on the file extension used:</p> +<ul> + <li><code>.textile</code> or <code>.txt</code> &rarr; <a href="/glyph/book/macros/macros_filters.html#m_textile"><code>textile</code></a> macro</li> + <li><code>.markdown</code> or <code>.md</code> &rarr; <a href="/glyph/book/macros/macros_filters.html#m_markdown"><code>markdown</code></a> macro</li> +</ul> +<p>You can override this behavior by setting the <code>filters.by_file_extensions</code> configuration setting to <code>false</code>. If no extension is specified, <code>.glyph</code> is assumed.</p> +<div class="tip"> +<p><span class="note-title">Tip</span>The <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro can also be used to include (and evaluate) ruby files (with a <code>.rb</code> extension). In this case, the ruby file must be placed within the <code>lib/</code> directory of the current project.</p> +</div> +<p>While including the context of an entire file is definitely a useful feature for content reuse, sometimes it can be an overkill. What if, for example, you just want to reuse a short procedure or even a sentence or a single word? In this case, you may want to consider using a <em>snippet</em> instead.</p> +<p>Snippets are text strings saved in <span class="caps">YAML</span> format in the <code>snippets.yml</code> file. They can be included anywhere in your document using the <a href="/glyph/book/macros/macros_core.html#m_snippet"><code>snippet</code></a> macro (or its alias <code>&amp;</code>).</p> +<div class="tip"> +<p><span class="note-title">Tip</span>Besides storing snippets in the <code>snippets.yml</code> file, you can also define them right in your document, using the <a href="/glyph/book/macros/macros_core.html#m_snippet_"><code>snippet:</code></a> macro.</p> +</div> + <div class="box"> +<div class="box-title">Example</div> +<p>Consider the following <code>snippets.yml</code> file:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> <span class="Keyword">-</span><span class="Keyword">-</span><span class="Keyword">-</span><span class="InvalidDeprecated"> </span> +<span class="line-numbers"> 2 </span> :<span class="String"><span class="Entity">glang<span class="Entity">:</span></span> <span class="String">Glyph Language</span></span> +<span class="line-numbers"> 3 </span> :<span class="String"><span class="Entity">macros<span class="Entity">:</span></span> <span class="String">Glyph Macros</span></span> +<span class="line-numbers"> 4 </span> :<span class="MetaTag"><span class="MetaTag">sq_esc</span><span class="MetaTag">:</span> </span>|<span class="Keyword">-</span> +<span class="line-numbers"> 5 </span> Square brackets must be escaped<span class="InvalidDeprecated"> </span> +<span class="line-numbers"> 6 </span> unless used as macro delimiters or within a quoting macro. +<span class="line-numbers"> 7 </span> :<span class="String"><span class="Entity">markups<span class="Entity">:</span></span> <span class="String">Textile or Markdown</span></span> +<span class="line-numbers"> 8 </span> :<span class="MetaTag"><span class="MetaTag">test</span><span class="MetaTag">:</span> </span>|<span class="Keyword">-</span> +<span class="line-numbers"> 9 </span> This is a<span class="InvalidDeprecated"> </span> +<span class="line-numbers"> 10 </span> Test snippet +</pre> + <p>You can use <code>&amp;[markups]</code> anywhere in your document instead of having to type "Textile or Markdown" every time. Additionally, later on you can change the value of the <code>markups</code> snippet only in the <code>snippets.yml</code> file to change it everywhere else in the document.</p> + +</div> + <div class="tip"> +<span class="note-title">Tip</span>Snippets (or any other macro) can be nested within other snippets. Glyph takes care of checking if you nested snippets or macros mutually and warns you as necessary. + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/stylesheets.html">Adding Stylesheets &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/evaluation.html">&rarr; Evaluating Ruby code and Configuration Settings</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=/incl.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/links.html

@@ -0,0 +1,183 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Links and Bookmarks - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Links and Bookmarks</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/topics.html">Topics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/images.html">&rarr; Images and Figures</a></div> + <p>Lightweight markups let you create internal and external links in a very easy way, and you can still do so in Glyph. However, if you do so:</p> +<ul> + <li>you can&#8217;t check if they are valid</li> + <li>you can&#8217;t infer the link title automatically</li> +</ul> +<p>If you care about link validation and you want to save some keystrokes, then you should use:</p> +<ul> + <li>the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro (aliased to <code>=&gt;</code>) &#8212; to create internal and external links.</li> + <li>the <a href="/glyph/book/macros/macros_inline.html#m_anchor"><code>anchor</code></a> macro (aliased to <code>#</code>) &#8212; to create named anchors (bookmarks) within your document.</li> +</ul> + <div class="box"> +<div class="box-title">Example</div> +<p>The following Glyph code:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> This is a link to link[#test]. +<span class="line-numbers"> 2 </span> ... +<span class="line-numbers"> 3 </span> This is link[#wrong]. +<span class="line-numbers"> 4 </span> This is a #[test|test anchor]. +</pre> + <p>Is translated into 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">p</span><span class="MetaTag">&gt;</span></span>This is a link to <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 anchor<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">p</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 2 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span>...<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 3 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span>This is <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>#wrong<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span>#wrong<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">p</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 4 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span>This is a <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">a</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 anchor<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">p</span><span class="MetaTag">&gt;</span></span> +</pre> + <p>Additionally, the following warning message is displayed when <a href="/glyph/book/compiling/compiling.html#compile">compiling</a>:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> warning: Bookmark 'wrong' does not exist +<span class="line-numbers"> 2 </span> -&gt; source: @: authoring.textile +<span class="line-numbers"> 3 </span> -&gt; path: document/body/bodymatter/chapter/@/textile/section/section/box/link +</pre> + +</div> + <p>Basically, if you use the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro and the <a href="/glyph/book/macros/macros_inline.html#m_anchor"><code>anchor</code></a> macro, Glyph makes sure that:</p> +<ul> + <li>all links point to valid anchors within the document (regardless if the anchors are before or after the link, in snippets or included files).</li> + <li>there are no duplicate anchors within the documents.</li> + <li>if no title is specified as second parameter for the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro, the anchor&#8217;s name is used as such.</li> +</ul> +<p>Besides using the <a href="/glyph/book/macros/macros_inline.html#m_anchor"><code>anchor</code></a> macro, you can also create an anchor for a header by passing an <code>@id</code> attribute the the <a href="/glyph/book/macros/macros_structure.html#m_section"><code>section</code></a> macro, like this:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> section[ +<span class="line-numbers"> 2 </span> @title[My Section] +<span class="line-numbers"> 3 </span> @id[my_section] +<span class="line-numbers"> 4 </span> ... +<span class="line-numbers"> 5 </span> ] +</pre> + <p>By default, validation is only enabled for internal links (i.e. the check occurs if the first parameter of the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro starts with a <code>#</code>). You can enable it for external links as well by setting the <a href="/glyph/book/config/options.html#s_options_url_validation"><code>options.url_validation</code></a> setting to <code>true</code>. If URL validation is enabled, an error is returned if a link returns an HTTP status greater than 302.</p> + <div class="important"> +<span class="note-title">Important</span>Enabling URL validation may significantly slow down compilation if a lot of external links are present. + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/topics.html">Topics &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/images.html">&rarr; Images and Figures</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=/links.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/macro_intro.html

@@ -0,0 +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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Introducing Glyph Macros - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Introducing Glyph Macros</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/glyph_files.html">.glyph files &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/attribute_intro.html">&rarr; Macro attributes</a></div> + + <p>The most important concept to grasp about Glyph is the concept of <em>macro</em>.</p> +<p>A Glyph macro is, in a nutshell, an identifier of some kind that wraps a value or parameters within square brackets. More specifically:</p> +<ul> + <li>The macro identifier can contain <em>any</em> character except for: <code>[</code>, <code>]</code>, <code>\</code>, <code>|</code>, <code>@</code> or spaces.</li> + <li>The delimiters can be either <code>[</code> and <code>]</code> or <code>[=</code> and <code>=]</code> (<span class="fmi">for more information on differences between delimiters, see <a href="/glyph/book/text_editing/esc_quot.html#esc_quot">Escaping and Quoting</a></span>).</li> + <li>The value can be anything, even other macros. If a macro supports more than one parameter, they must be separated with <code>|</code>. For example, the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro can take an optional second parameter for the link text: <code>link[#link_id|This is the link text]</code>.</li> + <li>A macro can also have <em>attributes</em>, which look exactly like macros but their identifier starts with a <code>@</code>.</li> +</ul> +<p>A macro can often have one or more aliases. For example, <code>=&gt;</code> is an alias for the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro, so the following macro calls are equivalent:</p> +<ul> + <li><code>=&gt;[#test|Test Section]</code></li> + <li><code>link[#test|Test Section]</code></li> +</ul> + <div class="navigation"><a href="/glyph/book/text_editing/glyph_files.html">.glyph files &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/attribute_intro.html">&rarr; Macro 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_intro.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/raw_html.html

@@ -0,0 +1,162 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Textile or Markdown - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Textile or Markdown</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/code.html">Source Code &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/xml_fallback.html">&rarr; XML Fallback</a></div> + <p>Textile or Markdown are very easy and intuitive to use, and they can produce HTML markup with almost no effort. Using them with Glyph is as simple as using the <a href="/glyph/book/macros/macros_filters.html#m_textile"><code>textile</code></a> macro (aliased to <code>txt</code>) and the <a href="/glyph/book/macros/macros_filters.html#m_markdown"><code>markdown</code></a> macro (aliased to <code>md</code>).</p> + <div class="box"> +<div class="box-title">Example</div> +<p>The following Glyph code:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> textile[ +<span class="line-numbers"> 2 </span> This is a paragraph with some _emphasized_ text. +<span class="line-numbers"> 3 </span> +<span class="line-numbers"> 4 </span> This is another paragraph with some -deleted- text. +<span class="line-numbers"> 5 </span> * This is +<span class="line-numbers"> 6 </span> * a bulletted +<span class="line-numbers"> 7 </span> * list +<span class="line-numbers"> 8 </span> ] +</pre> + <p>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">p</span><span class="MetaTag">&gt;</span></span>This is a paragraph with some <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">em</span><span class="MetaTag">&gt;</span></span>emphasized<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">em</span><span class="MetaTag">&gt;</span></span> text.<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 2 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span>This is a paragraph with some <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">del</span><span class="MetaTag">&gt;</span></span>deleted<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">del</span><span class="MetaTag">&gt;</span></span> text.<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 3 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">ul</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 4 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span>This is<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 5 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span>a bulletted<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 6 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span>list<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 7 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">ul</span><span class="MetaTag">&gt;</span></span> +</pre> + +</div> + <div class="important"> +<span class="note-title">Important</span>Be careful when using block-level HTML with Textile and Markdown: sometimes it may be necessary to add extra empty lines or escape tags. + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/code.html">Source Code &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/xml_fallback.html">&rarr; XML Fallback</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_16.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/section_aliases.html

@@ -0,0 +1,160 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Section Aliases - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Section Aliases</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/sections.html">Sections and Headers &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/topics.html">&rarr; Topics</a></div> + <p>There are <em>a lot</em> of macros that can be used in the same way as <code>section</code>, one for each element commonly used in <a href="http://en.wikipedia.org/wiki/Book_design">book design</a>. Each one of them is a simple wrapper for a <code>&lt;div&gt;</code> tag with a <code>class</code> attribute set to its name.</p> +<p>The following table lists the identifiers of all section-like macros, divided according to the part of the book they should be placed in:</p> + <table><tr><th>Frontmatter</th> + <td><p><code>imprint</code> <sup>&dagger;</sup>, <code>dedication</code> <sup>&dagger;</sup>, <code>inspiration</code> <sup>&dagger;</sup>, <code>foreword</code> <sup>&Dagger;</sup>, <code>introduction</code> <sup>&Dagger;</sup>, <code>acknowledgement</code> <sup>&Dagger;</sup>, <code>prologue</code> <sup>&Dagger;</sup>, <code>toc</code> <sup>*</sup></p></td></tr> + <tr><th>Bodymatter</th> + <td><p><code>volume</code>, <code>book</code>, <code>part</code>, <code>chapter</code></p></td></tr> + <tr><th>Backmatter</th> + <td><p><code>epilogue</code> <sup>&Dagger;</sup>, <code>afterword</code> <sup>&Dagger;</sup>, <code>postscript</code> <sup>&dagger;</sup>, <code>appendix</code>, <code>addendum</code> <sup>&Dagger;</sup>, <code>glossary</code> <sup>**&Dagger;</sup>, <code>colophon</code> <sup>&dagger;</sup>, <code>bibliography</code> <sup>**&Dagger;</sup>, <code>promotion</code> <sup>&dagger;</sup>, <code>references</code> <sup>**&Dagger;</sup>, <code>index</code> <sup>**&Dagger;</sup>, <code>lot</code> <sup>**&Dagger;</sup>, <code>lof</code> <sup>**&Dagger;</sup></p></td></tr></table> + + <p> +<strong>*</strong>: The <a href="/glyph/book/macros/macros_structure.html#m_toc"><code>toc</code></a> macro is used to generate the Table of Contents automatically, and it takes no parameters. +</p> + <p> +<strong>**</strong>: This macro is likely to be extended in future versions to generate/aggregate content automatically. +</p> + <p> +<strong>&dagger;</strong>: This section is not listed in the Table of Contents. +</p> + <p> +<strong>&Dagger;</strong>: Any subsection of this section is not listed in the Table of Contents. +</p> + + <div class="note"> +<span class="note-title">Note</span><code>frontmatter</code>, <code>bodymatter</code> and <code>backmatter</code> are also macro identifiers, but they are exposed as attributes for the <a href="/glyph/book/macros/macros_structure.html#m_book"><code>book</code></a> macro and the <a href="/glyph/book/macros/macros_structure.html#m_article"><code>article</code></a> macro, so if you're using either of these two macros as your root macro for your document, there's no need to use them explicitly. + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/sections.html">Sections and Headers &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/topics.html">&rarr; Topics</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_11.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/sections.html

@@ -0,0 +1,161 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Sections and Headers - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Sections and Headers</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/esc_quot.html">Escaping and Quoting &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/section_aliases.html">&rarr; Section Aliases</a></div> + + <p>Glyph documents are normally organized as a hierarchical tree of nested chapters, appendixes, sections, etc. To define a section, use the <a href="/glyph/book/macros/macros_structure.html#m_section"><code>section</code></a> macro, like so:</p> + + <pre class="lazy"><span class="line-numbers"> 1 </span> section[ +<span class="line-numbers"> 2 </span> @title[Section #1] +<span class="line-numbers"> 3 </span> Write the section contents here... +<span class="line-numbers"> 4 </span> section[ +<span class="line-numbers"> 5 </span> @title[Section #2] +<span class="line-numbers"> 6 </span> This section is nested into the previous one. +<span class="line-numbers"> 7 </span> ] --[End of Section #2] +<span class="line-numbers"> 8 </span> ] --[End of Section #1] +</pre> + + <p>This example defines two nested sections. If the <code>@title</code> attribute is specified like in this case, it will be converted to a proper <span class="caps">HTML</span> header and it will appear in the Table of Contents (see the <a href="/glyph/book/macros/macros_structure.html#m_toc"><code>toc</code></a> macro).</p> +<p>Note an important difference from <span class="caps">HTML</span>: there is no need for an explicit level for the headers, as it will be determined at runtime when the document is compiled, based on how sections are nested. The previous code snippet (taken as it is), for example, will be transformed into the following <span class="caps">HTML</span> code:</p> + + <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">&gt;</span></span>Section #1<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">p</span><span class="MetaTag">&gt;</span></span>Write the section contents here...<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></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">h3</span><span class="MetaTag">&gt;</span></span>Section #2<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">h3</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 6 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span>This section is nested in the previous one<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 7 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">div</span><span class="MetaTag">&gt;</span></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> + + <p>By default, in Glyph the first header level is <em>2</em>, so the two headers are rendered as <code>h2</code> and <code>h3</code>, respectively (<code>--[...]</code> macros are <em>comments</em>, therefore they are not included in the final output).</p> + <div class="navigation"><a href="/glyph/book/text_editing/esc_quot.html">Escaping and Quoting &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/section_aliases.html">&rarr; Section Aliases</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=/sec_head.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/stylesheets.html

@@ -0,0 +1,167 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Adding Stylesheets - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Adding Stylesheets</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/xml_fallback.html">XML Fallback &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/inclusions.html">&rarr; Including Files and Snippets</a></div> + <p>Currently, Glyph does not provide any native way to format text and pages. The reason is that there's absolutely no need for that: CSS does the job just fine. In particular, CSS3 offers specific attributes and elements that can be used specifically for paginated documents. That's no replacement for LaTeX by any means, but it is enough if you're not looking for advanced typographical features.</p> + <p>You can embed CSS files using the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro, like this:</p> + <p> +<code>style[default.css]</code> +</p> + <p>In this case, the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro looks for a <code>default.css</code> file in the <code>/styles</code> folder of your Glyph project <em>and</em> among the default Glyph stylesheets, and embeds it within a <code>&lt;style&gt;</code> tag. If you supply a file with a <code>.sass</code> extension, it will interpret it as a Sass file and convert it to <span class="caps">CSS</span> automatically (if the <em>Haml</em> gem is installed).</p> + <div class="tip"> +<span class="note-title">Tip</span>By default, stylesheets are embedded within text files. If necessary, you can choose to link them or import them by changing the values of the <a href="/glyph/book/config/document.html#s_document_styles"><code>document.styles</code></a> setting. + +</div> + <div class="section"> +<h4 id="default_stylesheets">Default Stylesheets</h4> +<p>Glyph provides the following default stylesheets, that can be referenced directly using the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro:</p> + <table><tr><th>File name</th> + <th>Notes</th></tr> + <tr><td> +<code>default.css</code> +</td> + <td>The stylesheet used for this book.</td></tr> + <tr><td> +<code>pagination.css</code> +</td> + <td>A CSS3-compliant stylesheet used for pagination, suitable for PDF generation using <a href="http://www.princexml.com/">Prince</a>.</td></tr> + <tr><td> +<code>coderay.css</code> +</td> + <td>The default <a href="http://coderay.rubychan.de/">Coderay</a> stylesheet, used for syntax highlighting.</td></tr> + <tr><td> +<code>ultraviolet/*</code> +</td> + <td>This folder contains the following <a href="http://ultraviolet.rubyforge.org/">Ultraviolet</a> stylesheets, used for syntax highlighting: <code>active4d.css, all_hallows_eve.css, amy.css, blackboard.css, brilliance_black.css, brilliance_dull.css, cobalt.css, dawn.css, eiffel.css, espresso_libre.css, idle.css, iplastic.css, lazy.css, mac_classic.css, magicwb_amiga.css, pastels_on_dark.css, slush_poppies.css, spacecadet.css, sunburst.css, twilight.css, zenburnesque.css</code></td></tr></table> + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/xml_fallback.html">XML Fallback &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/inclusions.html">&rarr; Including Files and Snippets</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=/stylesheets.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/topics.html

@@ -0,0 +1,162 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Topics - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Topics</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/section_aliases.html">Section Aliases &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/links.html">&rarr; Links and Bookmarks</a></div> + <p>Sections can also be used to create <em>topics</em>. In a technical writing context, the term topic identifies a single page of an online help (e.g. a Compiled <span class="caps">HTML</span> file, or <span class="caps">CHM</span>). Topics should generally be:</p> +<ul> + <li>self-contained, in the sense that they should make sense on their own, ideally without the need to be read in sequence</li> + <li>be used for either <em>concepts</em>, <em>tasks</em> or <em>references</em></li> + <li>be divided into meaningful sections like <em>Introduction</em>, <em>Procedure</em>, <em>Result</em></li> +</ul> +<p>Glyph does not formally enforce the correctness of topic composition and usage, but it does enable authors to create them as a sort of external sections. Consider the following Glyph code:</p> +<pre class="lazy"><span class="line-numbers"> 1 </span> section[ +<span class="line-numbers"> 2 </span> @title[My First Topic] +<span class="line-numbers"> 3 </span> @id[first_topic] +<span class="line-numbers"> 4 </span> @src[test/first_topic.glyph] +<span class="line-numbers"> 5 </span> ] +</pre> +<p>This is an ordinary section with a title and an explicit ID, but it has no contents. Instead, its <code>@src</code> attribute references an external file. If you are generating a single-file document, like a standalone <span class="caps">HTML</span> file or a <span class="caps">PDF</span> file, the code snippet above is exactly the same as the following:</p> +<pre class="lazy"><span class="line-numbers"> 1 </span> section[ +<span class="line-numbers"> 2 </span> @title[My First Topic] +<span class="line-numbers"> 3 </span> @id[first_topic] +<span class="line-numbers"> 4 </span> include[test/first_topic.glyph] +<span class="line-numbers"> 5 </span> ] +</pre> +<p>On the other hand, if you are planning on producing a document comprised of multiple files (see <a href="/glyph/book/compiling/compiling.html#web_output">Web/Web5 Output</a>), the <code>@src</code> attribute tells Glyph to create a <em>topic</em> for the section. In this case:</p> +<ul> + <li>The <code>@title</code> attribute must be specified and is used as the topic title</li> + <li>The body of the topic is constituted by the contents of the file referenced by the <code>@src</code> attribute.</li> + <li>The topic file is rendered according to a specific <a href="/glyph/book/extending/layouts.html#layouts">layout</a>.</li> + <li>The location of the topic is the same as the location of the included file, mirrored in the output folder.</li> + <li>Glyph takes care of changing the file extensions and resolving links automatically, regardless of the output target.</li> +</ul> + <div class="navigation"><a href="/glyph/book/text_editing/section_aliases.html">Section Aliases &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/links.html">&rarr; Links and Bookmarks</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=/topics.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/text_editing/xml_fallback.html

@@ -0,0 +1,223 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>XML Fallback - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>XML Fallback</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/text_editing/raw_html.html">Textile or Markdown &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/stylesheets.html">&rarr; Adding Stylesheets</a></div> + <p>Sure Textile and Markdown are great, but sometimes you may want to just use HTML, without the extra verbosity, of course. Take tables for example: Textile offers an easy way to create them, but things may get dirty when you need to have multiple paragraphs or lists within cells.</p> + <p>Very early versions of Glyph used to offered some simple <code>table</code>, <code>tr</code>, <code>tr</code>, <code>td</code> macros just for that. Of course the problem was that thy didn't offer any way to customize the markup by adding, for example, CSS classes.</p> + <p>Instead, by default, Glyph can convert any unrecognized macro to the corresponding XML element and macro attributes to XML attributes.</p> + <div class="box"> +<div class="box-title">Example</div> +<p>The following Glyph code:</p> + <pre class="lazy"><span class="line-numbers"> 1 </span> table[@class[features] +<span class="line-numbers"> 2 </span> tr[ +<span class="line-numbers"> 3 </span> th[ID] +<span class="line-numbers"> 4 </span> th[Priority] +<span class="line-numbers"> 5 </span> th[Description] +<span class="line-numbers"> 6 </span> ] +<span class="line-numbers"> 7 </span> tr[ +<span class="line-numbers"> 8 </span> td[27] +<span class="line-numbers"> 9 </span> td[span[@style[color:red;font-weight:bold;] HIGH]] +<span class="line-numbers"> 10 </span> td[HTML output] +<span class="line-numbers"> 11 </span> ] +<span class="line-numbers"> 12 </span> tr[ +<span class="line-numbers"> 13 </span> td[42] +<span class="line-numbers"> 14 </span> td[span[@style[color:green;font-weight:bols;] LOW]] +<span class="line-numbers"> 15 </span> td[ +<span class="line-numbers"> 16 </span> p[Support for less-used tags:] +<span class="line-numbers"> 17 </span> ul[ +<span class="line-numbers"> 18 </span> li[cite] +<span class="line-numbers"> 19 </span> li[sup] +<span class="line-numbers"> 20 </span> li[...] +<span class="line-numbers"> 21 </span> ] +<span class="line-numbers"> 22 </span> ] +<span class="line-numbers"> 23 </span> ] +<span class="line-numbers"> 24 </span> ] +</pre> + <p>Is translated into 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">table</span> <span class="MetaTag">class</span>=<span class="String"><span class="String">&quot;</span>features<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">tr</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 3 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">th</span><span class="MetaTag">&gt;</span></span>ID<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">th</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 4 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">th</span><span class="MetaTag">&gt;</span></span>Priority<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">th</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 5 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">th</span><span class="MetaTag">&gt;</span></span>Description<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">th</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 6 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">tr</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 7 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">tr</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 8 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span>27<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 9 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span><span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">span</span> <span class="MetaTag">style</span>=<span class="String"><span class="String">&quot;</span>color:red;font-weight:bold;<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span>HIGH<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">span</span><span class="MetaTag">&gt;</span></span><span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 10 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span>HTML output<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 11 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">tr</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 12 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">tr</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 13 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span>42<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 14 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span><span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">span</span> <span class="MetaTag">style</span>=<span class="String"><span class="String">&quot;</span>color:green;font-weight:bold;<span class="String">&quot;</span></span><span class="MetaTag">&gt;</span></span>LOW<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">span</span><span class="MetaTag">&gt;</span></span><span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 15 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 16 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span>Support for less-used tags:<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">p</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 17 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">ul</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 18 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span>cite<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 19 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span>sup<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 20 </span> <span class="MetaTag"><span class="MetaTag">&lt;</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span>...<span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">li</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 21 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">ul</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 22 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">td</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 23 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">tr</span><span class="MetaTag">&gt;</span></span> +<span class="line-numbers"> 24 </span> <span class="MetaTag"><span class="MetaTag">&lt;/</span><span class="MetaTag">table</span><span class="MetaTag">&gt;</span></span> +</pre> + +</div> + <p>Basically, if the <a href="/glyph/book/config/options.html#s_options_xml_fallback"><code>options.xml_fallback</code></a> setting is set to <code>true</code>, any macro unknown to Glyph with at most one parameter will be converted to an XML tag with the same name and any attribute will be converted to the corresponding XML attribute.</p> + <div class="important"> +<span class="note-title">Important</span>While macro names and attributes are validated so that an error is returned if they contain illegal character, no check is performed against any particular XML schema. + +</div> + <p>Additionally, it is possible to force macro-to-<span class="caps">XML</span> conversion by prepending an equal sign to any macro, so for example <code>=snippet[test]</code> will be converted into <code>&lt;snippet&gt;test&lt;/snippet&gt;</code>.</p> + <div class="section"> +<h5 id="xml_blacklist">Blacklisted XML tags</h5> +<p>By default, the following tags are blacklisted and will be ignored:</p> +<ul> + <li><code>applet</code></li> + <li><code>base</code></li> + <li><code>basefont</code></li> + <li><code>embed</code></li> + <li><code>frame</code></li> + <li><code>frameset</code></li> + <li><code>iframe</code></li> + <li><code>isindex</code></li> + <li><code>meta</code></li> + <li><code>noframes</code></li> + <li><code>noscript</code></li> + <li><code>object</code></li> + <li><code>param</code></li> + <li><code>title</code></li> +</ul> +<div class="tip"> +<p><span class="note-title">Tip</span>You can change this list by modifying the <a href="/glyph/book/config/options.html#s_options_xml_blacklist"><code>options.xml_blacklist</code></a> setting.</p> +</div> + +</div> + <div class="navigation"><a href="/glyph/book/text_editing/raw_html.html">Textile or Markdown &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/text_editing/stylesheets.html">&rarr; Adding Stylesheets</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_17.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/troubleshooting/errors_command.html

@@ -0,0 +1,202 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Command Errors - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Command Errors</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/troubleshooting/errors_parser.html">Parsing Errors &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_macro.html">&rarr; Macro Errors</a></div> + + <table style="width:100%;"> + <tr> + <th style="width:30%">Error Message</th> + <th>Description</th> + </tr> + <tr> + <td>Source file '<em>source_file</em>' does not exist</td> + <td>Returned if Glyph is running in <a href="/glyph/book/compiling/lite_mode.html#lite_mode">lite mode</a> and the specified source file was not found.</td> + </tr> + + + <tr> + <td>Source and destination file are the same</td> + <td>Returned if Glyph is running in <a href="/glyph/book/compiling/lite_mode.html#lite_mode">lite mode</a> and you specified the same source and destination files.</td> + </tr> + + + <tr> + <td>DirectoryWatcher is not available. Install it with: gem install directory_watcher</td> + <td>Returned if <a href="/glyph/book/compiling/compiling.html#auto_regeneration">auto regeneration</a> is enabled but the <code>directory_watcher</code> gem in not installed.</td> + </tr> + + + <tr> + <td>Document cannot be finalized due to previous errors</td> + <td>Returned if one or more errors occurred in the document prevented finalization.</td> + </tr> + + + <tr> + <td>Please specify a file name</td> + <td>No file name was specified for the <a href="/glyph/book/ref_commands.html#c_add"><code>add</code></a> command.</td> + </tr> + + + <tr> + <td>Output target not specified</td> + <td>Returned if no target was specified for the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command _and_ if the <a href="/glyph/book/config/document.html#s_document_output"><code>document.output</code></a> setting is not set.</td> + </tr> + + + <tr> + <td>Unknown output target '<em>target_name</em>'</td> + <td>An unsupported output target was specified for the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command. Only the following output targets are supported: + <ul><li>html</li> + <li>pdf</li></ul></td> + </tr> + + + <tr> + <td>Too few/too many arguments</td> + <td>Returned if the <a href="/glyph/book/ref_commands.html#c_config"><code>config</code></a> command was used with no arguments or more than two arguments respectively.</td> + </tr> + + + <tr> + <td>Unknown setting '<em>setting_name</em>'</td> + <td>The name of an unknown setting was specified for the <a href="/glyph/book/ref_commands.html#c_config"><code>config</code></a> command.</td> + </tr> + + + <tr> + <td>Cannot reset '<em>setting_name</em>' setting (system use only).</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_config"><code>config</code></a> command when attempting to override a setting in the <code>system.*</code> namespace.</td> + </tr> + </table> + + <div class="navigation"><a href="/glyph/book/troubleshooting/errors_parser.html">Parsing Errors &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_macro.html">&rarr; Macro 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=/t_45.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/troubleshooting/errors_generic.html

@@ -0,0 +1,224 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Generic Errors - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Generic Errors</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/extending/command.html">Defining Custom Commands &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_parser.html">&rarr; Parsing Errors</a></div> + + <table style="width:100%;"> + <tr> + <th style="width:30%">Error Message</th> + <th>Description</th> + </tr> + <tr> + <td>Invalid alias: macro '<em>macro_name</em>' already exists</td> + <td>The alias name supplied to the <code>macro_alias</code> method has already been used for another macro or alias.</td> + </tr> + + + <tr> + <td>Undefined macro '<em>macro_name</em>'</td> + <td>The document contains a macro that does not exist, i.e. it is not a standard or used-defined <a href="/glyph/book/document.html#macro_ref">Glyph macro or alias</a>.</td> + </tr> + + + <tr> + <td>An error occurred when generating _file-name_.pdf</td> + <td>Returned if Prince could not generate the PDF file or if Prince is not installed. Normally, Prince provides additional details on the specific error(s).</td> + </tr> + + + <tr> + <td>Glyph cannot generate PDF. Please specify a valid output.pdf.generator setting</td> + <td>Returned if the <a href="/glyph/book/config/output.html#s_output_pdf_generator"><code>output.pdf.generator</code></a> setting has not be set to a valid PDF renderer. Currently, the only supported values for this setting are <code>prince</code> and <code>wkhtmltopdf</code>.</td> + </tr> + + + <tr> + <td>The current directory is not a valid Glyph project</td> + <td>Returned if a glyph command was executed outside a valid glyph project directory.</td> + </tr> + + + <tr> + <td>Invalid snippet file</td> + <td>The <code>snippet.yml</code> file contains invalid data. Most likely, it does not evaluate to a Ruby <code>Hash</code>.</td> + </tr> + + + <tr> + <td>Directory '<em>directory_name</em>' is not empty</td> + <td>Returned when executing the <a href="/glyph/book/ref_commands.html#c_init"><code>init</code></a> command in a directory that is not empty.</td> + </tr> + + + <tr> + <td>File '<em>file_name</em>' already exists</td> + <td>Returned if the name of an existing file was specified as a parameter for the <a href="/glyph/book/ref_commands.html#c_add"><code>add</code></a> command.</td> + </tr> + + + <tr> + <td>Unknown macro '<em>macro_name</em>'</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified macro was not found.</td> + </tr> + + + <tr> + <td>Macro '<em>macro_name</em>' is not used in this document</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified macro is defined but unused.</td> + </tr> + + + <tr> + <td>Bookmark '<em>bookmark_name</em>' does not exist</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified bookmark does not exist.</td> + </tr> + + + <tr> + <td>No link matching /<em>regexp</em>/ was found</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the no link target matches the supplied regular expression.</td> + </tr> + + + <tr> + <td>Unknown snippet '<em>snippet_name</em>'</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified snippet was not found.</td> + </tr> + + + <tr> + <td>Snippet '<em>snippet_name</em>' is not used in this document</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified snippet is defined but unused.</td> + </tr> + </table> + + <div class="navigation"><a href="/glyph/book/extending/command.html">Defining Custom Commands &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_parser.html">&rarr; Parsing 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=/t_43.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/troubleshooting/errors_macro.html

@@ -0,0 +1,320 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Macro Errors - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Macro Errors</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/troubleshooting/errors_command.html">Command Errors &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/ref_commands.html">&rarr; Command Reference</a></div> + <p>The following errors are displayed in the form:</p> +<p><em>message</em><br /> +&nbsp; source: <em>macro_source</em><br /> +&nbsp; path: <em>macro_path</em></p> +<p><em>macro_value</em></p> +<p>Where:</p> +<ul> + <li><em>message</em> is the error message.</li> + <li><em>macro_source</em> is the file or snippet where the error occurred.</li> + <li><em>macro_path</em> is the full path to the macro that returned the error, within the document syntax tree, e.g. <code>document/body/bodymatter/chapter/section/header/&amp;</code> if the error occurrent in a snippet within the header of a section in the <code>bodymatter</code> part of the document.</li> + <li><em>macro_value</em> is the value of the macro (shown only if Glyph is running in <a href="/glyph/book/ref_commands.html#debug_switch">debug mode</a>).</li> +</ul> + + <table style="width:100%;"> + <tr> + <th style="width:30%">Error Message</th> + <th>Description</th> + </tr> + <tr> + <td>Macro '<em>name</em>' takes up to <em>x</em> parameter(s) (<em>y</em> given)</td> + <td>Returned if the macro was called with extra parameters.</td> + </tr> + + + <tr> + <td>Macro '<em>name</em>' takes at least <em>x</em> parameter(s) (<em>y</em> given)</td> + <td>Returned if the macro was called with fewer parameters than expected.</td> + </tr> + + + <tr> + <td>Macro '<em>name</em>' takes exactly <em>x</em> parameter(s) (<em>y</em> given)</td> + <td>Returned if the macro was called with a different number of parameters than.</td> + </tr> + + + <tr> + <td>Macro not available when compiling a single file.</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro if used in <a href="/glyph/book/compiling/lite_mode.html#lite_mode">lite mode</a>.</td> + </tr> + + + <tr> + <td>Filter macro '<em>extension</em>' not available</td> + <td>Returned by a filter macro if <a href="/glyph/book/config/options.html#s_options_filters_by_file_extension"><code>options.filters_by_file_extension</code></a> setting is set to @true@, but the extension was not recognized.</td> + </tr> + + + <tr> + <td>Invalid regular expression: <em>regexp</em></td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_match"><code>match</code></a> macro if an invalid regular expression was supplied.</td> + </tr> + + + <tr> + <td>Macro '<em>name</em>' takes no parameters (<em>x</em> given)</td> + <td>Returned if the macro was called with parameters but none are requested.</td> + </tr> + + + <tr> + <td>No highlighter installed. Please run: gem install coderay</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro if no highlighters are installed.</td> + </tr> + + + <tr> + <td>CodeRay highlighter not installed. Please run: gem install coderay</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro if <a href="/glyph/book/config/filters.html#s_filters_highlighter"><code>filters.highlighter</code></a> setting is set to @coderay@ but <a href="http://coderay.rubychan.de/">Coderay</a> is not installed.</td> + </tr> + + + <tr> + <td>UltraViolet highlighter not installed. Please run: gem install ultraviolet</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro if <a href="/glyph/book/config/filters.html#s_filters_highlighter"><code>filters.highlighter</code></a> setting is set to @ultraviolet@ but <a href="http://ultraviolet.rubyforge.org/">Ultraviolet</a> is not installed.</td> + </tr> + + + <tr> + <td>Mutual Inclusion in parameter/attribute(<em>name</em>): '<em>value</em>'</td> + <td>Returned if a catch-22 situation occurs with macro inclusion, for example if the value of a snippet includes a reference to the same snippet.</td> + </tr> + + + <tr> + <td>Snippet '<em>snippet_id</em>' does not exist</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_snippet"><code>snippet</code></a> macro if an invalid snippet ID was supplied.</td> + </tr> + + + <tr> + <td>File '<em>file_name</em>' not found</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro if an invalid file was supplied.</td> + </tr> + + + <tr> + <td>Filter macro '<em>macro_name</em>' not found</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro if the <a href="/glyph/book/config/options.html#s_options_filters_by_file_extension"><code>options.filters_by_file_extension</code></a> setting is set to @true@ but the file extension of the included file is not recognized as a filter macro.</td> + </tr> + + + <tr> + <td>RedCloth gem not installed. Please run: gem install RedCloth</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_textile"><code>textile</code></a> macro if the RedCloth gem is not installed.</td> + </tr> + + + <tr> + <td>No MarkDown converter installed. Please run: gem install bluecloth</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_markdown"><code>markdown</code></a> macro if no valid Markdown converter gem is installed. Glyph checks for: BlueCloth, Maruku, Kramdown and RDiscount.</td> + </tr> + + + <tr> + <td>Image/Figure not found</td> + <td>Retured by the <a href="/glyph/book/macros/macros_block.html#m_image"><code>image</code></a> macro or the <a href="/glyph/book/macros/macros_block.html#m_figure"><code>figure</code></a> macro respectively, if the specified image file could not be found within the <code>images/</code> folder.</td> + </tr> + + + <tr> + <td>Bookmark '<em>bookmark_name</em>' already exists</td> + <td>Returned by the <a href="/glyph/book/macros/macros_inline.html#m_anchor"><code>anchor</code></a> macro or by the <a href="/glyph/book/macros/macros_structure.html#m_section"><code>section</code></a> macro if the anchor ID supplied as attribute has already been used in the document.</td> + </tr> + + + <tr> + <td>Bookmark '<em>bookmark_name</em>' already exists</td> + <td>Returned by the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro if the anchor ID supplied as parameter has not been used in the document.</td> + </tr> + + + <tr> + <td>Stylesheet '<em>file_name</em>' not found</td> + <td>Returned by the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro if the <code>.css</code> or <code>.sass</code> file supplied as parameter was not found in the <code>styles/</code> directory.</td> + </tr> + + + <tr> + <td>Haml is not installed. Please run: gem install haml</td> + <td>Returned by the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro if a <code>.sass</code> file was passed as parameter but the Haml gem is not installed.</td> + </tr> + + + <tr> + <td>Invalid XML element: '<em>element_name</em>'</td> + <td>An invalid XML element name was supplied to the <code>|xml|</code> system macro (see <a href="/glyph/book/document.html#other_elements">Other HTML Elements</a>).</td> + </tr> + + + <tr> + <td>Invalid XML element: '<em>element_name</em>'</td> + <td>An invalid XML attribute name was supplied to the <code>|xml|</code> system macro (see <a href="/glyph/book/document.html#other_elements">Other HTML Elements</a>).</td> + </tr> + + + <tr> + <td>Macro '<em>macro_name</em>' cannot be used in safe mode</td> + <td>Returned if a forbidden macro was used in safe mode (see <a href="/glyph/book/compiling/programmatic_usage.html#modes">Modes</a>).</td> + </tr> + + + <tr> + <td>Cannot reset 'system.<em>setting_name</em>' setting (system use only).</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_config_">config:</a> when attempting to override a setting in the <code>system.*</code> namespace.</td> + </tr> + + + <tr> + <td>Macro '<em>macro_name</em>' cannot be defined by itself</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_rewrite_">rewrite:</a> if it contains a macro with the same name.</td> + </tr> + + + <tr> + <td>Macro '<em>macro_a</em>' must be within a '<em>macro_b</em>' macro</td> + <td>Returned if a macro was used in the wrong place.</td> + </tr> + + + <tr> + <td>Macro '<em>macro_a</em>' must not be within a '<em>macro_b</em>' macro</td> + <td>Returned if a macro was used in the wrong place.</td> + </tr> + </table> + + <div class="navigation"><a href="/glyph/book/troubleshooting/errors_command.html">Command Errors &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/ref_commands.html">&rarr; Command Reference</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_46.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/glyph/book/troubleshooting/errors_parser.html

@@ -0,0 +1,188 @@

+<?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</title> +<meta name="author" content="Fabio Cevasco" /> + +<meta name="copyright" content="Fabio Cevasco" /> +<meta name="generator" content="Glyph v0.4.0 (http://www.h3rald.com/glyph)" /> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>Parsing Errors - Glyph</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" /> + + <link href="/css/main.css" media="all" rel="stylesheet" type="text/css" /> + <link href="/glyph/book/styles/default.css" 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>Parsing Errors</h2> + <hr /> + <div id="content-body"> + <div class="navigation"><a href="/glyph/book/troubleshooting/errors_generic.html">Generic Errors &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_command.html">&rarr; Command Errors</a></div> + + <table style="width:100%;"> + <tr> + <th style="width:30%">Error Message</th> + <th>Description</th> + </tr> + <tr> + <td>Macro delimiter '<em>delimiter</em>' not escaped</td> + <td>Returned in case of unescaped <code>[</code>or <code>]</code>.</td> + </tr> + + + <tr> + <td><em>macro_name</em>[...] - A macro cannot start with '@' or a digit.</td> + <td>Returned if an invalid macro name was specified.</td> + </tr> + + + <tr> + <td>Macro '<em>macro_name</em>' not closed</td> + <td>Returned if a macro lacks its end delimiter <code>=]</code>.</td> + </tr> + + + <tr> + <td>Escaping macro '<em>macro_name</em>' not closed</td> + <td>Returned if an escaping macro lacks its end delimiter <code>=]</code>.</td> + </tr> + + + <tr> + <td>Attribute @<em>attribute_name</em> not closed</td> + <td>Returned if a macro attribute lacks its end delimiter <code>]</code>.</td> + </tr> + + + <tr> + <td>Attributes cannot be nested</td> + <td>Returned if a macro attribute was found immediately within another attribute.</td> + </tr> + + + <tr> + <td>Cannot nest escaping macro '<em>macro_name_1</em>' within escaping macro '<em>macro_name_2</em>'</td> + <td>Returned if an escaping macro contains another escaping macro.</td> + </tr> + + + <tr> + <td>Parameter delimiter '|' not allowed here</td> + <td>Returned if a parameter delimiter is outside a macro or inside an attribute.</td> + </tr> + </table> + + <div class="navigation"><a href="/glyph/book/troubleshooting/errors_generic.html">Generic Errors &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/troubleshooting/errors_command.html">&rarr; Command 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=/t_44.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/compressed.js" type="text/javascript"></script> + </body> + </html>
A content/styles/default.css

@@ -0,0 +1,272 @@

+* { + border: none; + font-family: inherit; + font-size: 100%; + font-style: inherit; + margin: 0; + padding: 0; +} +html { + background: #fff; +} +ol, ul { + margin: 0.3em 0; +} +p { + margin: 1em 0; +} + +table { + border-collapse: collapse; + border-spacing: 0; + margin: auto; + margin-top: 1em; +} +body { + line-height: 1.2em; + margin: 0; + padding: 0; + padding: 0 1em; + text-align: justify; +} + +/* Structure */ +.halftitlepage, .titlepage { + margin: auto; + text-align: center; +} +.titlepage h1, .halftitlepage h1 { + font-size: 2.5em; + font-weight: bold; + line-height: 1.5em; + margin-bottom: 0.2em; +} +.halftitlepage h2, .titlepage h2 { + font-size: 1.1em; + font-style: italic; + font-weight: bold; + line-height: 1.2em; + margin-bottom: 0.5em; + prince-bookmark-level: none; +} +.author { + font-size: 1em; +} +.pubdate { + font-size: 0.8em; +} +li { + list-style-type: square; + margin: 0.4em 0; + margin-left: 1.5em; +} +ol li{ + list-style-type: decimal; +} +.contents li { + list-style-type: none; +} +img { + margin: 0 5px; + padding: 2px; +} +dt { + font-weight: bold; + margin-top: 1em; +} +dd { + font-style: italic; +} + +blockquote { + margin: 1em 1em; + font-style: italic; + color: #121212; +} + +table { + border: 1px solid #E6E6E6; +} +th { + background: #EEE; +} +tr, td, th { + padding: 5px; +} +td, tr { + border: 1px solid #E6E6E6; +} +sup { + font-size: 0.7em; + font-weight: bold; + margin-left: -0.4em; +} +/* BLOCKS */ +.center { + margin: auto; + text-align: center; +} +.left { + margin: auto; + text-align: left; +} +.right { + margin: auto; + text-align: center; +} + +.note, +.important, +.tip, +.caution, +.box { + border: 1px solid #E6E6E6; + display: block; + margin: 0.5em auto; + padding: 0 0.5em; + width: 600px; + background: #EEE; + color: #1F1F1F; +} +.note>p, +.important>p, +.tip>p, +.caution>p { + margin: 0; + padding: 0; +} +.note-title { + font-weight: bold; + margin-right: 1em; +} +.box-title { + display: block; + text-align: center; + font-weight: bold; +} +.code { + margin: 1em auto; + padding: 0.5em; + width: 600px; +} +.comment { + display: block; + border: 1px solid #004D00; + background: #7AFF7A; + padding: 3px; + margin: 1px; +} +.comment .comment-pre { + color: #004D00; +} +.todo { + display: block; + border: 1px solid #990000; + background: #FF9999; + padding: 3px; + margin: 1px; +} +.todo .todo-pre { + color: #990000; +} +/* TEXT */ +body { + color: #000; + font-size: 1em; +} +h2, section section h1, h1.toc-header { + display: block; + font-size: 2em; + font-weight: bold; + margin: 3em 0 1em 0; +} +h3, section section section h1 { + font-size: 1.6em; + font-weight: bold; + margin: 3em 0 1em 0; +} +h4, section section section section h1 { + font-size: 1.3em; + font-weight: bold; + margin: 3em 0 1em 0; +} +h5, section section section section section h1 { + font-size: 1.2em; + font-weight: bold; + margin: 3em 0 1em 0; +} +em { + font-style: italic; +} +a { + color: #8A1513; + text-decoration: none; +} +a:hover { + color: #CF282D; +} +code, pre { + font-size: 0.75em; +} +pre{ + border: 1px solid #cecece; + padding: 0.5em; + background: #ededed; +} +span.line-numbers{ + margin: 0; + padding: 3px; +} + +nav, .navigation { + display: block; + margin: 1em auto; + text-align: center; + border: 1px solid #E6E6E6; +} + +nav.contents { + margin: auto; + text-align: left; + border: none; +} + +nav a, .navigation a { + margin: 1em; +} + +nav.contents a { + margin: 0; +} + +mark { + font-weight:bolder; + font-style: italic; + background: none; +} + +pre>code { + font-size: 1em; +} +td p, td ul, td ol { + margin: 0; +} +td>div.code, td>code { + width: auto; + margin: 0.2em; + padding: 0.2em; +} + +.topic{ + margin: 2em auto; +} + +/* FONTS */ + +body { + font-family: "Gentium Book Basic", "Book Antiqua", "Times New Roman", "Serif"; +} + +code, pre { + font-family: "Droid Sans Mono", "Consolas", "Monaco", "Courier", "Monospace"; +}
A content/styles/ultraviolet/lazy.css

@@ -0,0 +1,73 @@

+pre.lazy .OcamlInfixFPOperator { + text-decoration: underline; +} +pre.lazy .OcamlInfixOperator { + color: #3B5BB5; +} +pre.lazy .MetaFunctionCallPy { + color: #3E4558; +} +pre.lazy .Superclass { + color: #3B5BB5; + font-style: italic; +} +pre.lazy .LatexEntity { + color: #D62A28; +} +pre.lazy .Constant { + color: #3B5BB5; +} +pre.lazy .OcamlFPConstant { + text-decoration: underline; +} +pre.lazy .Support { + color: #3B5BB5; +} +pre.lazy .OcamlOperator { + color: #000000; +} +pre.lazy .line-numbers { + background-color: #E3FC8D; + color: #000000; +} +pre.lazy .StringInterpolation { + color: #671EBB; +} +pre.lazy .InvalidIllegal { + background-color: #9D1E15; + color: #F8F8F8; +} +pre.lazy .OcamlVariant { + color: #7F90AA; +} +pre.lazy .MetaTag { + color: #3A4A64; +} +pre.lazy .OcamlPrefixFPOperator { + text-decoration: underline; +} +pre.lazy .OcamlPrefixOperator { + color: #3B5BB5; +} +pre.lazy .String { + color: #409B1C; +} +pre.lazy .Keyword { + color: #FF7800; +} +pre.lazy { + background-color: #FFFFFF; + color: #000000; +} +pre.lazy .InvalidDeprecated { + color: #990000; + font-style: italic; +} +pre.lazy .Variable { +} +pre.lazy .Entity { + color: #3B5BB5; +} +pre.lazy .Comment { + color: #8C868F; +}
M layouts/default.erblayouts/default.erb

@@ -142,19 +142,14 @@ </div>

</div> <!-- END FOOTER CONTAINER--> </div> <!-- END FOOTER --> <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> -<script type="text/javascript" src="http://include.reinvigorate.net/re_.js"></script> -<script type="text/javascript"> -try { -reinvigorate.track("ic648-011ry84432"); -} catch(err) {} -</script> - <script type="text/javascript"> - var lloogg_clientid = "2830021149dc1a04"; - var pageTracker = _gat._getTracker("UA-287139-1"); - pageTracker._setAllowLinker(true); - pageTracker._trackPageview(); - </script> - <script type="text/javascript" src="http://lloogg.com/l.js?c=2830021149dc1a04"></script> + <!-- 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.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> <% if @site.config[:dev] = true then %> <script src="/js/jquery.js" type="text/javascript"></script>