all repos — h3rald @ 87d1386a6c49c4668ebab4623b793487ca6e9723

The sources of https://h3rald.com

Merge branch 'newspaper-layout'
h3rald h3rald@h3rald.com
Thu, 23 Sep 2010 13:51:13 +0200
commit

87d1386a6c49c4668ebab4623b793487ca6e9723

parent

e03ca4dcf9c10f799d88512c6cf8b80c0aea01a0

201 files changed, 14864 insertions(+), 16871 deletions(-)

jump to
M README.textileREADME.textile

@@ -1,43 +1,40 @@

h2. H3RALD Web Site -<span class="dropcap">T</span>his is a _minimalist_ web site: I do not care about fancy graphics or nitfy effects. I do care, however, about content and I want you to read what I write comfortably. As you can see, this site has no sidebars: it only has a header, a main column and a footer, exactly where you expect them to be. The source code of this site follows W3C's XHTML 1.1 and CSS 2.1 standard. - -As of version 8, h3rald.com is a completely static web site, except for a few AJAX calls. All the files are generated automatically thanks to the "Nanoc":http://nanoc.stoneship.org/ publishing system, an ingenious creation of "Denis Defreyne":http://www.stoneship.org/. Nanoc can be used to easily create static web sites using Ruby, as explained in "this article":http://www.h3rald.com/articles/creating-static-web-sites-with-nanoc. +H3RALD.com was created in 2004 by Fabio Cevasco, a technical writer, programmer and IT enthusiast. It features over a hundred "articles":/articles/ covering a wide range of topics, from programming to writing, productivity and even traveling. + +As of version 8, H3RALD.com is a completely static web site, except for a few AJAX calls. All the files are generated automatically thanks to the "nanoc":http://nanoc.stoneship.org/ publishing system, an ingenious creation of "Denis Defreyne":http://www.stoneship.org/. Nanoc can be used to easily create static web sites using Ruby, as explained in "this article":http://www.h3rald.com/articles/take-back-your-site-with-nanoc/. + + +h3. Licensing + +The "articles":/archives/ and all the content published on this web site is licensed under the _Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License_. For other uses, please "contact us":/contact/. + +<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-nd/3.0/us/88x31.png" /></a> + +The source code of this web site, such as its layout, SASS/CSS stylesheets, custom rake tasks and code is licensed under the terms of the <em><a href="http://creativecommons.org/licenses/MIT/">MIT License</a></em> and it is available on "GitHub":http://github.com/h3rald/h3rald. + h3. Requirements -The following ruby libraries (gems) have been used to create this web site: +The following ruby libraries (gems) are used to compile this web site: * *"nanoc":http://rubygems.org/gems/nanoc*, to generate the entire web site * *"extlib":http://rubygems.org/gems/extlib*, in some custom Rake tasks * *"bb-ruby":http://rubygems.org/gems/bb-ruby*, for the BBCode filter * *"builder":http://rubygems.org/gems/builder/*, to create RSS and ATOM feeds * *"haml":http://rubygems.org/gems/haml/*, for the SASS filter +* *"coderay":http://rubygems.org/gems/coderay/*, for syntax highlighting * *"glyph":http://rubygems.org/gems/glyph*, for the Glyph filter Additionally, the following gems were necessary to migrate from the previous version of this web site, powered by "Typo":http://www.typosphere.org: * *"mysql":http://rubyforge.org/projects/mysql/* * *"sequel":http://rubyforge.org/projects/sequel/* -Besides Ruby-related dependencies, the following was also necessary: - -* *"pygments":http://pygments.org/*, a Python library for code highlighting. -* *"prince":http://www.princexml.com*, a program to generate PDF files from HTML. -* A cron job to fetch backtype comments, delicious bookmarks, tweets, and github commits in JSON format and save them to the @/output/data@ folder. - -h3. Licensing - -My "articles":/archives/ and all content published on this web site is licensed under the <em>Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License</em>. For other uses, contact me. - -<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-nd/3.0/us/88x31.png" /></a> - -The source code of this web site, such as its layout, SASS/CSS stylesheets, Nanoc tasks and code is licensed under the terms of the <em><a href="http://creativecommons.org/licenses/BSD/">BSD License</a></em> and it is available on "GitHub":http://github.com/h3rald/h3rald. h3. Credits -I'd like to thank the following people for their work, which made this web site possible: +Special thanks to the following people, who made this web site possible: -* "Denis Defreyne":http://www.stoneship.org/, for creating the wonderful "Nanoc":http://nanoc.stoneship.org/ site publishing system. +* "Denis Defreyne":http://www.stoneship.org/, for creating the wonderful "nanoc":http://nanoc.stoneship.org/ site publishing system. * "David J.Perry":http://scholarsfonts.net/, who designed the "Cardo font":http://scholarsfonts.net/cardofnt.html I used for the H3RALD logo and the navigation buttons. -* The staff of "Archive.org":http://www.archive.org, for scanning the first edition of "A Complete Guide to Heraldry":http://www.archive.org/details/completeguidetoh00foxduoft, and making it available to the public. All the images featuring heraldic monsters are taken from this book. -As of version 8, h3rald.com is a completely static web site, except for a few AJAX calls. All the files are generated automatically thanks to the "Nanoc":http://nanoc.stoneship.org/ publishing system, an ingenious creation of "Denis Defreyne":http://www.stoneship.org/. Nanoc can be used to easily create static web sites using Ruby, as explained in "this article":http://www.h3rald.com/articles/creating-static-web-sites-with-nanoc. +* The creators of the free "Gentium":http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=gentium font, used throughout the web site.
M RulesRules

@@ -1,34 +1,35 @@

#!/usr/bin/env ruby -compile /^\/archives\// do - rep.filter :erb +compile /^\/(archives|home)\// do + filter :erb layout 'default' end -compile /^\/(home|projects|about)/ do - rep.filter :erb - rep.filter :redcloth +compile /^\/(projects|about)/ do + filter :erb + filter :redcloth layout 'default' end compile /(rss|atom)/ do - rep.filter :erb + filter :erb unless rep.binary? # e.g. rss.png image end -compile '/css/*' do - filter :sass, { - :load_paths => [Dir.pwd+"/content/css"], - :full_exception => true, - :line_numbers => true - } -end +compile '/styles/_*/' do +end compile '/styles/*' do - # do nothing + if item[:extension] == "scss" && item.identifier.match(/style\/$/) then + filter :sass, { + :load_paths => [Dir.pwd+"/content/styles"], + :syntax => :scss, + :style => :compact + } + end end compile "sitemap" do - rep.filter :erb + filter :erb end compile /^\/(js\/.+?)/ do

@@ -42,57 +43,26 @@

compile '*' do if item[:filters_pre] && !item[:filters_pre].empty? then item[:filters_pre].each do |f| - rep.filter f.to_sym + filter f.to_sym end layout 'default' else unless rep.binary? then case item[:extension] when 'textile' then - rep.filter :redcloth + filter :redcloth layout 'default' when 'md','markdown' then - rep.filter :bluecloth + filter :bluecloth layout 'default' when 'bbcode' then - rep.filter :bbcode + filter :bbcode layout 'default' when 'glyph' then pdf_file = Pathname.new "#{Dir.pwd}/output#{item.identifier.gsub(/\/$/, '')}.pdf" - unless pdf_file.exist? then - # Create the PDF file - f = Pathname.new "#{Dir.pwd}/output#{item.identifier.gsub(/\/$/, '')}.glyph" - f.parent.mkpath - doc = %{ - include[#{f.parent.parent.parent}/lib/data] - h3rald_article[ - @identifier[#{item.identifier}] - @content[section[#{item.raw_content}]] - ] - } - # Write the new raw file using Glyph's file_write method - file_write f, doc - # 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] - Glyph['document.subtitle'] = "" - Glyph.compile f.to_s - begin - f.unlink - Pathname.new(f.to_s.gsub(/\.glyph$/, '.html')).unlink - rescue - end - end - Glyph['site.root'] = "" - # Filter text rep - rep.filter :glyph - layout 'default' - Glyph.reset + glyph_config @item + glyph_pdf_for @item unless pdf_file.exist? + glyph_article_for @item end end end

@@ -110,6 +80,10 @@ route '/css/*' do

item.identifier.chop + '.css' end +route '/styles/_*/' do + nil +end + route '/styles/*' do item.identifier.chop + '.css' end

@@ -118,8 +92,16 @@ route '/glyph/book/' do

'/glyph/book/index.html' end +route '/glyph/book/images/glyph/*' do + item.identifier.chop + ".#{item[:extension]}" +end + route '/glyph/book/*' do item.identifier.chop+'.html' +end + +route '/home/' do + "/index.html" end route '/sitemap' do

@@ -136,6 +118,10 @@ end

route '/js/*' do item.identifier.chop + '.js' +end + +route '/fonts/*' do + item.identifier.chop + '.ttf' end route '*' do
M config.yamlconfig.yaml

@@ -21,6 +21,7 @@ - xml

- textile - bbcode - glyph +- scss output_dir: output base_url: "http://www.h3rald.com" author_name: "Fabio Cevasco"
M content/about.textilecontent/about.textile

@@ -1,51 +1,43 @@

----- permalink: about -filters_pre: -- erb -- redcloth title: About type: page ----- -!>/images/theme/heraldry/unicorn.png! +H3RALD.com was created in 2004 by Fabio Cevasco, a technical writer, programmer and IT enthusiast. It features over a hundred "articles":/articles/ covering a wide range of topics, from programming to writing, productivity and even traveling. + +As of version 8, H3RALD.com is a completely static web site, except for a few AJAX calls. All the files are generated automatically thanks to the "nanoc":http://nanoc.stoneship.org/ publishing system, an ingenious creation of "Denis Defreyne":http://www.stoneship.org/. Nanoc can be used to easily create static web sites using Ruby, as explained in "this article":http://www.h3rald.com/articles/take-back-your-site-with-nanoc/. + + +h3. Licensing + +The "articles":/archives/ and all the content published on this web site is licensed under the _Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License_. For other uses, please "contact us":/contact/. - <span class="dropcap">T</span>his is a _minimalist_ web site: I do not care about fancy graphics or nitfy effects. I do care, however, about content and I want you to read what I write comfortably. As you can see, this site has no sidebars: it only has a header, a main column and a footer, exactly where you expect them to be. The source code of this site follows W3C's XHTML 1.1 and CSS 2.1 standard. - -As of version 8, h3rald.com is a completely static web site, except for a few AJAX calls. All the files are generated automatically thanks to the "Nanoc":http://nanoc.stoneship.org/ publishing system, an ingenious creation of "Denis Defreyne":http://www.stoneship.org/. Nanoc can be used to easily create static web sites using Ruby, as explained in "this article":http://www.h3rald.com/articles/take-back-your-site-with-nanoc/. +<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-nd/3.0/us/88x31.png" /></a> + +The source code of this web site, such as its layout, SASS/CSS stylesheets, custom rake tasks and code is licensed under the terms of the <em><a href="http://creativecommons.org/licenses/MIT/">MIT License</a></em> and it is available on "GitHub":http://github.com/h3rald/h3rald. + h3. Requirements -The following ruby libraries (gems) have been used to create this web site: +The following ruby libraries (gems) are used to compile this web site: * *"nanoc":http://rubygems.org/gems/nanoc*, to generate the entire web site * *"extlib":http://rubygems.org/gems/extlib*, in some custom Rake tasks * *"bb-ruby":http://rubygems.org/gems/bb-ruby*, for the BBCode filter * *"builder":http://rubygems.org/gems/builder/*, to create RSS and ATOM feeds * *"haml":http://rubygems.org/gems/haml/*, for the SASS filter +* *"coderay":http://rubygems.org/gems/coderay/*, for syntax highlighting * *"glyph":http://rubygems.org/gems/glyph*, for the Glyph filter Additionally, the following gems were necessary to migrate from the previous version of this web site, powered by "Typo":http://www.typosphere.org: * *"mysql":http://rubyforge.org/projects/mysql/* * *"sequel":http://rubyforge.org/projects/sequel/* -Besides Ruby-related dependencies, the following was also necessary: - -* *"pygments":http://pygments.org/*, a Python library for code highlighting. -* *"prince":http://www.princexml.com*, a program to generate PDF files from HTML. -* A cron job to fetch backtype comments, delicious bookmarks, tweets, and github commits in JSON format and save them to the @/output/data@ folder. - -h3. Licensing - -My "articles":/archives/ and all content published on this web site is licensed under the <em>Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License</em>. For other uses, contact me. - -<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-nd/3.0/us/88x31.png" /></a> - -The source code of this web site, such as its layout, SASS/CSS stylesheets, Nanoc tasks and code is licensed under the terms of the <em><a href="http://creativecommons.org/licenses/BSD/">BSD License</a></em> and it is available on "GitHub":http://github.com/h3rald/h3rald. h3. Credits -I'd like to thank the following people for their work, which made this web site possible: +Special thanks to the following people, who made this web site possible: -* "Denis Defreyne":http://www.stoneship.org/, for creating the wonderful "Nanoc":http://nanoc.stoneship.org/ site publishing system. +* "Denis Defreyne":http://www.stoneship.org/, for creating the wonderful "nanoc":http://nanoc.stoneship.org/ site publishing system. * "David J.Perry":http://scholarsfonts.net/, who designed the "Cardo font":http://scholarsfonts.net/cardofnt.html I used for the H3RALD logo and the navigation buttons. -* The staff of "Archive.org":http://www.archive.org, for scanning the first edition of "A Complete Guide to Heraldry":http://www.archive.org/details/completeguidetoh00foxduoft, and making it available to the public. All the images featuring heraldic monsters are taken from this book. -As of version 8, h3rald.com is a completely static web site, except for a few AJAX calls. All the files are generated automatically thanks to the "Nanoc":http://nanoc.stoneship.org/ publishing system, an ingenious creation of "Denis Defreyne":http://www.stoneship.org/. Nanoc can be used to easily create static web sites using Ruby, as explained in "this article":http://www.h3rald.com/articles/creating-static-web-sites-with-nanoc. +* The creators of the free "Gentium":http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=gentium font, used throughout the web site.
A content/archives.erb

@@ -0,0 +1,38 @@

+----- +permalink: archives +filters_pre: +- erb +title: Archives +type: page +----- +<% + tags = sorted_site_tags +%> +<section> + <header> + <h1>Articles by Topic</h1> + </header> + <table id="taglist"> + <% c = 0 + tags.each do |t| + c = c+1 %> + <%= "<tr>" if c%5 == 1 %> + <td><%= tag_link_with_count(t[0], t[1]) %></td> + <%= "</tr>" if c%5 == 0 %> + <% end %></tr> + </table> +</section> +<section> + <header> + <h1>Articles by Month</h1> + </header> + <table id="timeline"> + <% c = 0 + articles_by_month.each do |m| + c = c+1 %> + <%= "<tr>" if c%5 == 1 %> + <td><%= month_link_with_count(m[0], m[1].length) %></td> + <%= "</tr>" if c%5 == 0 %> + <% end %></tr> + </table> +</section>
D content/archives.textile

@@ -1,35 +0,0 @@

------ -permalink: archives -filters_pre: -- erb -title: Archives -type: page ------ -<% - tags = sorted_site_tags -%> - <div id="search_form"></div> - <div id="search_results"></div> -<p style="margin: auto; text-align: center"> -<img src="/images/theme/heraldry/phoenix.png" /> -</p> - <h3>Articles by Topic</h3> - <table id="taglist"> - <% c = 0 - tags.each do |t| - c = c+1 %> - <%= "<tr>" if c%5 == 1 %> - <td><%= tag_link_with_count(t[0], t[1]) %></td> - <%= "</tr>" if c%5 == 0 %> - <% end %></tr> - </table> - <h3>Articles by Month</h3> - <table id="timeline"> - <% c = 0 - articles_by_month.each do |m| - c = c+1 %> - <%= "<tr>" if c%5 == 1 %> - <td><%= month_link_with_count(m[0], m[1].length) %></td> - <%= "</tr>" if c%5 == 0 %> - <% end %></tr> - </table>
M content/articles/10-programming-languages.textilecontent/articles/10-programming-languages.textile

@@ -5,6 +5,7 @@ permalink: 10-programming-languages

filters_pre: - redcloth title: 10 programming languages worth checking out +subtitle: A quick comparison of 10 non-mainstream programming languages comments: - :date: :author: Nikhil

@@ -309,10 +310,15 @@ tags:

- programming type: article toc: true +intro: | + If you program for fun or profit, chances are that you know C, C++, Java, PHP, Perl, Python or Ruby. These programming languages are all widely known, and, to a different degree, used in commercial applications. At least some of them can safely be considered _mainstream_, even if that word has become so overused and misused that has almost lost its original meaning, if it ever had one. + +extended_intro: | + If you are earning your living by coding, it's often one of these languages that pays the bills. Nevertheless, true hackers frequently meander in other directions, exploring and discovering different paradigms and methodologies, sometimes to the most "esoteric":http://esolangs.org/wiki/Main_Page extremes. ----- If you program for fun or profit, chances are that you know C, C++, Java, PHP, Perl, Python or Ruby. These programming languages are all widely known, and, to a different degree, used in commercial applications. At least some of them can safely be considered _mainstream_, even if that word has become so overused and misused that has almost lost its original meaning, if it ever had one. -If you are earning your living by coding, it's often one of these languages that pays the bills. Nevertheless, true hackers frequently meander in other directions, exploring and discovering different paradigms and methodologies, sometimes to the most ["esoteric":http://esolangs.org/wiki/Main_Page] extremes. +If you are earning your living by coding, it's often one of these languages that pays the bills. Nevertheless, true hackers frequently meander in other directions, exploring and discovering different paradigms and methodologies, sometimes to the most "esoteric":http://esolangs.org/wiki/Main_Page extremes. bq. "The most obvious common 'personality' characteristics of hackers are high intelligence, consuming curiosity, and facility with intellectual abstractions. Also, most hackers are 'neophiles', stimulated by and appreciative of novelty (especially intellectual novelty). Most are also relatively individualistic and anti-conformist."
M content/articles/10-reasons-to-learn-ruby.textilecontent/articles/10-reasons-to-learn-ruby.textile

@@ -1,11 +1,11 @@

----- -summary: "Ten possible reasons to learn the Ruby Programming Language. Mostly related to the language's syntax and most useful idioms." +subtitle: "Ten possible reasons to learn the Ruby Programming Language" popular: true permalink: 10-reasons-to-learn-ruby filters_pre: - erb - redcloth -title: 10 Reasons to Learn Ruby +title: "10 Reasons to Learn Ruby" comments: - :date: 2007-09-05 17:33:43 +02:00 :author: Joel Moss

@@ -309,6 +309,10 @@ tags:

- ruby type: article toc: true +intro: | + I discovered Ruby fairly recently, through the excellent Ruby on Rails framework. Although I don't consider myself a Ruby expert by any means, I read the PickAxe[2], I've coded a few utilities for my personal use in Ruby and I'm currently developing with Rails during my free time. +extended_intro: | + Ruby is currently my programming language of choice; I started off with Turbo Pascal in high school, discovered C and C++ at university, did my thesis in Java and learned PHP from scratch because I wanted to learn how to make websites quickly and easily. I guess I feel compelled to code sometimes, more as a form of entertainment than anything else. Rather dissatisfied with what I tried language-wise, I was determined to start learning either Python or Ruby. I chose the latter because I didn't want incorrect indentation to break my code, and here I am, heaping praise upon it. ----- h3. Preamble
M content/articles/distributed-programming-with-ruby-review.glyphcontent/articles/distributed-programming-with-ruby-review.glyph

@@ -6,10 +6,16 @@ - books

- ruby permalink: distributed-programming-with-ruby-review title: "Book Review: Distributed Programming with Ruby" +subtitle: Just what you need to get started with the right tools to build large and scalable applications in Ruby toc: true pdf: true -summary: "A review of Mark Bates' Distributed Programming with Ruby. Just what you need to get started with the right tools to build large and scalable applications in Ruby." date: 2010-06-22 13:30:00.000000 +02:00 +intro: | + Back when I read <em>"Programming Ruby":http://www.pragprog.com/titles/ruby/programming-ruby</em> for the first time, I distinctly remember a short reference to "dRb":http://ruby-doc.org/stdlib/libdoc/drb/rdoc/index.html, the <strong>D</strong>istributed <strong>R</strong>u<strong>b</strong>y library included in the Standard Library. + + _"Cool!"_ -- I thought + + ...and that was pretty much it. The documentation for DRb was pretty much nonexistent (at the time), I didn't need it, so I pretty much forgot about it altogether until this book came out. ----- &:[book|_Distributed Programming with Ruby_] &:[author|Mark Bates]

@@ -18,26 +24,20 @@ &:[linkedbook|=>[&[url]|&[book]]]

&:[image|$[site.root]/img/pictures/distributed-programming-with-ruby.jpg] &:[drb|=>[http://ruby-doc.org/stdlib/libdoc/drb/rdoc/index.html|DRb]] &:[rinda|=>[http://ruby-doc.org/stdlib/libdoc/rinda/rdoc/index.html|Rinda]] -&:[pickaxe|=>[#unkwnown#|_Programming Ruby_]] +&:[pickaxe|=>[http://www.pragprog.com/titles/ruby/programming-ruby|_Programming Ruby_]] rw:[pt| section[@title[Part {{0}}: {{1}}] txt[{{2}}] ] ] --[--------------------------------------------------] -textile[ -Back when I read &[pickaxe] for the first time, I distinctly remember a short reference to &[drb], the strong[D]istributed strong[R]u\.strong[b]y library included in the Standard Library. - -_"Cool!"_ -- I thought +$[document.intro] +txt[ +<em>"Distributed Programming with Ruby":http://www.informit.com/store/product.aspx?isbn=0321638360</em> fills a very particular niche of the Ruby programming world: _distributed_ programming. Moreover, this book is somehow _justified_ by the scarce documentation on the subject: -...and that was pretty much it. The documentation for DRb was pretty much nonexistent (at the time), I didn't need it, so I pretty much forgot about it altogether until this book came out. +bq. Although these libraries \[DRb and rinda\] have been included with Ruby for many years now, they have received little or no attention (or documentation). This has led to a lot of FUD (fear, uncertainty, and doubt) about what these libraries can and cannot do, and when they are appropriate to use (if at all). -&[linkedbook] fills a very particular niche of the Ruby programming world: _distributed_ programming. Moreover, this book is somehow _justified_ by the scarce documentation on the subject: - -bq. Although these libraries \[DRb and rinda\] have been included with Ruby for many years now, they have received little or no attention (or documentation). This has led to a lot of FUD -(fear, uncertainty, and doubt) about what these libraries can and cannot do, and when they are appropriate to use (if at all). - -p(((((. -- &[author], &[book] +p((((. -- Mark Bates, <em>"Distributed Programming with Ruby":http://www.informit.com/store/product.aspx?isbn=0321638360</em> But there's more. This book gives the reader a complete overview of what's out there, in the Ruby world, to support distributed programming. This includes quite a few gems and libraries besides the ones provided in the standard library. ]
M content/articles/firefox-lovers-guide-to-opera.textilecontent/articles/firefox-lovers-guide-to-opera.textile

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

----- -summary: "An in-depth review of the Opera browser, with the eyes of a Firefox enthusiast. A useful comparison of the two browsers, whether you're planning to _switch_ or not." +subtitle: "An in-depth review of the Opera browser, with the eyes of a Firefox enthusiast" popular: true permalink: firefox-lovers-guide-to-opera filters_pre:

@@ -223,6 +223,10 @@ - opera

- firefox type: article toc: true +intro: | + I am a Firefox fan. I've been using Firefox since it was named "Firebird" and calling it "stable" was a big overstatement. Firefox dragged me out of Internet Explorer, and that was definitely one of its biggest achievements. + + Because I'm addicted to trying out new tools, however, I always kept testing new browsers I discovered here and there. K-Meleon, Flock, Sleipnir... When Safari came out for Windows I immediately installed it and used it for about 2 hours, only to realize that it wasn't &ndash; and it still isn't &ndash; usable at all, mainly due to sporadic crashes. ----- bq. *Note:* This article can be considered a sequel for "An IE Lover's Guide to Firefox":http://www.h3rald.com/articles/ie-lovers-guide-to-firefox, which described Firefox through the eyes of an Internet Explorer fan. Similarly, this article describes Opera's features from the point of view of a user &ndash; myself &ndash; who has been using Firefox for years and is now considering another browser switch.
M content/articles/glyph-020-released.glyphcontent/articles/glyph-020-released.glyph

@@ -6,10 +6,14 @@ - ruby

- opensource :permalink: glyph-020-released :title: "Glyph 0.2.0 Released" -:summary: "The second release of Glyph is out! Featuring single-file compilation, programmatic usage and auto-regeneration, as well as plenty of bugfixes and stability improvements." +:subtitle: Featuring single-file compilation, programmatic usage and auto-regeneration, and more :toc: true :pdf: true :date: 2010-05-09 17:00:00.099000 +02:00 +:intro: | + I am very pleased to announce the second release of the "Glyph Document Authoring Framework":/glyph/. For those who don't know, Glyph is a pure-Ruby, extensible solution to author documents like books or articles using a simple, fully-customizable markup language. + + Since the "first release":/articles/introducing-glyph/, came out, last month, a lot happened. Plenty of bugs were fixed and new features implemented, as shown by the "changelog":http://github.com/h3rald/glyph/blob/master/CHANGELOG.textile. Here's a brief rundown of the most notable changes. ----- &:[G|Glyph] textile[
M content/articles/glyph-030-released.glyphcontent/articles/glyph-030-released.glyph

@@ -6,13 +6,19 @@ - ruby

- opensource :permalink: glyph-030-released :title: "Glyph 0.3.0 Released" -:summary: "The third release of the Glyph Authoring Framework features dramatic speed improvements, the new 'glyph outline' command, alternative XML syntax, macro attributes, and more." +:subtitle: The third release of the Glyph Authoring Framework features dramatic speed improvements, and much more :toc: true :pdf: true :date: 2010-06-13 14:10:00.000000 +02:00 +:intro: | + The third release of "Glyph":/glyph/ is out! + + For those checking it out for the first time, Glyph is a _Rapid Document Authoring Framework_ focused on extensibility and content reuse. For an example of what Glyph can do, have a look at Glyph's "free PDF book":http://github.com/downloads/h3rald/glyph/glyph.pdf. + + This release brings more stability to Glyph, more speed, and features affecting Glyph's core functionality. As a consequence, some "incompatibilities":http://github.com/h3rald/glyph/issues/closed#issue/121 had to be introduced &ndash; but after all, better now than later. ----- &:[yardoc|http://yardoc.org/docs/h3rald-glyph] -&:[book|http://github.com/h3rald/glyph/raw/master/book/output/pdf/glyph.pdf] +&:[book|http://github.com/downloads/h3rald/glyph/glyph.pdf] p[The third release of =>[$[site.root]/glyph/|Glyph] is out!]
M content/articles/glyph-040-released.glyphcontent/articles/glyph-040-released.glyph

@@ -6,12 +6,13 @@ - ruby

- opensource :permalink: glyph-040-released :title: "Glyph 0.4.0 Released" -:summary: "Glyph 0.4.0 is out! Featuring web output, HTML5 support, stats, wkhtmltopdf, enhanced customization and much more." +:subtitle: Featuring web output, HTML5 support, stats, wkhtmltopdf, and much more :toc: true :pdf: true :date: 2010-09-03 19:45:00.000000 +02:00 +:intro: This new release of Glyph introduces an unusually large number of features, improvements and bugfixes. Not so much in terms of new macros maybe (no index or bibliography support for now, but it will come, don't worry!), but rather... pretty much everything else! ----- -txt[This new release of Glyph introduces an unusually large number of features, improvements and bugfixes. Not so much in terms of new macros maybe (no index or bibliography support for now, but it will come, don't worry!), but rather... pretty much everything else!] +$[document.intro] section[ @title[Web Output]
A content/articles/h3rald-81.glyph

@@ -0,0 +1,62 @@

+----- +:title: H3RALD.com v8.1 Released +:subtitle: Featuring a a brand new newspaper-like design, powered by HTML5 and CSS3 +:type: article +:toc: true +:date: 2010-09-15 14:24:25.052000 +02:00 +:permalink: h3rald-81 +:pdf: true +:tags: +- website +- webdevelopment +:intro: | + Just "over a year ago":/articles/take-back-your-site-with-nanoc I released the 8th version of this web site. The biggest change then was abandoning the Rails-powered "Typo":http://wiki.github.com/fdv/typo/ blogging platform in favor of "nanoc":http://nanoc.stoneship.org/, arguably the most versatile static site generator out there. + + A year later, I am still very happy with nanoc, hence there's no need for another major release. Nonetheless, I decided to improve the site's overall design and image, making it (hopefully) easier to use and more pleasant to the eye. +:extended_intro: | + I always had a problem finding the right theme for my web site. I always wanted to find something related to the word _herald_, so in the last release I went for a herandry-oriented theme. For this release, I decided to go for a newspaper-style layout: after all, the word _herald_ is often used in newspaper titles, and I picked the name "h3rald" after the "International Herald Tribune":http://global.nytimes.com/?iht. + + Also, I was desperate to try out the new features offered by HTML3 and CSS3, and a newspaper layout seemed a good excuse to use columns. +----- +$[document.intro] +section[ + @title[Browser Compatibility] + txt[ +Although I shouldn't really say this, the site is meant to be viewed with a WebKit-based browser, really. It works in other (modern) browsers (read: no IE6), and it degrades more or less gracefully if a particular feature is not supported. + +That being said: +* IE7 and IE8 just barely render it (Javascript is used to "patch" the DOM with the new HTML5 elements) +* Firefox 3+ renders pretty much everything right. +* Safari and Chrome render the site as it is actually meant to be rendered + +Nobody ever died from not being able to see CSS3 rounded corners anyhow. The most important thing about this site is its content, and I made sure that whatever browser you're using you can still read it. + ] +] +section[ + @title[Columns and hyphenation] + txt[ +As I previously stated, I couldn't wait to try out CSS3 columns so I kinda went crazy on the home page, but just there. Some may argue that they are not suitable for web use of course, but I think they contribute to give the site layout a unique feeling. + +The problem with having columns is of course text alignment: justified text looks good, but unless you hyphenate text properly it shows a lot of blank space. Luckily, I discovered "hyphenator.js":http://code.google.com/p/hyphenator/, which solved the problem nicely. + ] +] +section[ + @title[CSS and layout improvements] + txt[ +I made a point out of improving the old stylesheet to make the site easier to read and generally prettier. Beauty is in the eye of the beholder, but still, I think the new stylesheet brings some improvements, especially concerning text (the "Gentium":http://scripts.sil.org/gentium font is used throughout the site) and syntax highlighting. + +Moreover, I worked on streamlining navigations across different sections of the site, in particular on article pages: + +!=/img/pictures/h3rald_81_article.png! + ] +] +section[ + @title[Under the hood] + txt[ +Besides appearence, the new site also features some improvements in its underlying business logic. In particular: +* Better nanoc "Rules":http://github.com/h3rald/h3rald/blob/master/Rules +* Improved "Glyph":/glyph/ integration, by extending nanoc "RuleContext":http://github.com/h3rald/h3rald/blob/master/lib/glyph_context.rb +* Minor updates to the custom "Rake tasks":http://github.com/h3rald/h3rald/blob/master/tasks/site.rake +* "Disqus":http://disqus.com/overview/ comments + ] +]
M content/articles/herald-vim-color-scheme.textilecontent/articles/herald-vim-color-scheme.textile

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

----- -summary: "My very own VIM color scheme. Featuring 256, 16 and 8 color support, high readability and... pretty colors!" +subtitle: "My very own VIM color scheme. Featuring 256, 16 and 8 color support, high readability and... pretty colors!" permalink: herald-vim-color-scheme filters_pre: - redcloth

@@ -74,8 +74,17 @@ - vim

type: article toc: true popular: true +intro: | + I use "Vim":http://www.vim.org a lot. It's my editor of choice when I code (mainly in Ruby), and also when I write my blog post and articles (mainly in Textile). + + One thing I always liked about Vim was it powerful syntax highlighting: there's probably a syntax highlighting file for every programming language ever created, even the new ones ("Nimrod":http://force7.de/nimrod/index.html? Sure, "here":http://www.vim.org/scripts/script.php?script_id=2632!). +extended_intro: | + Furthermore, Vim allows you to create color schemes, and that's surprisingly easy to do. Everything you need to do is in the "docs":http://vimdoc.sourceforge.net/htmldoc/syntax.html, but that may put you off, so you can just start by editing an existing one -- that's what I did.h3. InfiniteRed Black + + I've been using the "ir_black":http://blog.infinitered.com/entries/show/8 color scheme for near enough a year. It's an excellent color scheme, recommended especially for writing Ruby code: ----- I use "Vim":http://www.vim.org a lot. It's my editor of choice when I code (mainly in Ruby), and also when I write my blog post and articles (mainly in Textile). + One thing I always liked about Vim was it powerful syntax highlighting: there's probably a syntax highlighting file for every programming language ever created, even the new ones ("Nimrod":http://force7.de/nimrod/index.html? Sure, "here":http://www.vim.org/scripts/script.php?script_id=2632!). Furthermore, Vim allows you to create color schemes, and that's surprisingly easy to do. Everything you need to do is in the "docs":http://vimdoc.sourceforge.net/htmldoc/syntax.html, but that may put you off, so you can just start by editing an existing one -- that's what I did.h3. InfiniteRed Black
M content/articles/komodo-edit-review.textilecontent/articles/komodo-edit-review.textile

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

----- -summary: "A comprehensive review of the free editor from ActiveState, and why it's a very interesting alternative to more complex and heavy IDEs." -popular: true +subtitle: "A comprehensive review of the free editor from ActiveState" permalink: komodo-edit-review filters_pre: - redcloth

@@ -108,6 +107,12 @@ - programming

- software type: article toc: true +intro: | + _What's your favorite code editor?_ + + This is a common question which still keeps popping up on community boards, mailing lists, comments, etc. Every programmer who writes code in some programming language normally has an editor of choice. Being realistic, most of the times it's not only one program but several, depending on the language and on the features needed at the time. + + Yes, great, but how do you choose your favorite editor? ----- <a href="http://digg.com/programming/A_closer_look_at_Komodo_Edit"> <img src="http://digg.com/img/badges/180x35-digg-button.png" width="180" height="35" alt="Digg!" />
M content/articles/rails-inspired-php-frameworks.textilecontent/articles/rails-inspired-php-frameworks.textile

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

----- -summary: "A roundup of six different PHP frameworks inspired by Ruby on Rails. Each with essential details, comments, pros and cons." +subtitle: "A roundup of six different PHP frameworks inspired by Ruby on Rails" popular: true permalink: rails-inspired-php-frameworks filters_pre:

@@ -77,6 +77,7 @@ - cakephp

- rails type: article toc: true +intro: There are various articles online examining many PHP frameworks, providing short reviews or comparative charts, but I could not find yet an article examining the so called _"Rails-inspired frameworks"_ anywhere on the web, so I decided to write my own... ----- There are various articles online examining many PHP frameworks, providing short reviews or comparative charts, but I could not find yet an article examining the so called _"Rails-inspired frameworks"_ anywhere on the web, so I decided to write my own...
A content/contact.textile

@@ -0,0 +1,13 @@

+----- +:type: page +:permalink: contact +:title: "Contact" +----- +You can contact me using the form below or by sending an email to <a href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#51;&#114;&#97;&#108;&#100;&#64;&#104;&#51;&#114;&#97;&#108;&#100;&#46;&#99;&#111;&#109;'>&#104;&#51;&#114;&#97;&#108;&#100;&#64;&#104;&#51;&#114;&#97;&#108;&#100;&#46;&#99;&#111;&#109;</a>. + +<section class="center"> + <script type="text/javascript" src="http://www.formstack.com/forms/js.php?1003418-bMy6M2wC0u-v2"></script> + <noscript><a href="http://www.formstack.com/forms/?1003418-bMy6M2wC0u" title="Contact">Contact</a></noscript> + <section style="font-size:x-small;"><a href="http://www.formstack.com/" title="Web Form Builder">Formstack - Web Form Builder</a></section> +</section> +
D content/css/_code.sass

@@ -1,62 +0,0 @@

-@import definitions - -.highlight, .code, pre.lazy - +code_font - border: 1px solid #cccccc - background: #dedede - padding: 5px - margin: 5px 0 - font-size: 90% - overflow: auto - - -code - +code_font - font-size: 90% - -.highlight - .hll - background-color: #ffffcc - - .c - color: #008000 - - .err - border: 1px solid #FF0000 - - .k - color: #0000ff - - .cm - color: #008000 - - .cp - color: #0000ff - - .c1, .cs - color: #008000 - - .ge - font-style: italic - - .gh, .gp, .gs, .gu - font-weight: bold - - .kc, .kd, .kn, .kp, .kr - color: #0000ff - - .kt - color: #2b91af - - .s - color: #a31515 - - .nc - color: #2b91af - - .ow - color: #0000ff - - .sb, .sc, .sd, .s2, .se, .sh, .si, .sx, .sr, .s1, .ss - color: #a31515 -
D content/css/_definitions.sass

@@ -1,27 +0,0 @@

-// Variables -$red: #a4282d -$gray: #555555 - -// Mixins -=default_border - border: 1px solid $gray - -=button_img($img) - background: url(../images/theme/buttons/#{$img}.png) - -=title_font - font-family: "Palatino Linotype", "Palatino", "Book Antiqua", "Serif" - -=body_font - font-family: "Georgia", "Serif" - -=title - +title_font - font-variant: small-caps - margin: 1em 0 0 0 - -=code_font - font-family: "Consolas", "Monaco", "Monospace" - -=darkbg_font - color: #cacaca
D content/css/_elements.sass

@@ -1,380 +0,0 @@

-@import definitions - -#content img - margin: 0 5px - padding: 2px - -#content - li, dd - margin-left: 30px - line-height: 1.5em - dt - margin-top: 1em - font-weight: bold - dd - font-style: italic - p - line-height: 1.5em - margin: 1em 0 - -blockquote, .note - color: $gray - font-style: italic - padding: 0 0 0 33px - 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 - -.preload - background-position: -9999px -9999px - -#navigation a - display: block - -#nav-about - width: 115px - height: 52px - +button_img(about) - &:hover - +button_img(about_h) - -.nav-about - +button_img(about_h) - -#nav-other - width: 130px - height: 52px - +button_img(other) - &:hover - +button_img(other_h) - -.nav-other - +button_img(other_h) - -#nav-projects - width: 127px - height: 52px - +button_img(projects) - &:hover - +button_img(projects_h) - -.nav-projects - +button_img(projects_h) - -#nav-archives - width: 155px - height: 52px - +button_img(archives) - &:hover - +button_img(archives_h) - -.nav-archives - +button_img(archives_h) - -#services li - margin-left: 0 - -#services h3 - display: block - text-align: center - a - margin: auto - display: block - -#s-opinions - width: 192px - height: 52px - +button_img(opinions) - &:hover - +button_img(opinions_h) - -.s-opinions - +button_img(opinions_h) - -#s-tweets - width: 183px - height: 52px - +button_img(tweets) - &:hover - +button_img(tweets_h) - -.s-tweets - +button_img(tweets_h) - -#s-bookmarks - width: 197px - height: 52px - +button_img(bookmarks) - &:hover - +button_img(bookmarks_h) - -.s-bookmarks - +button_img(bookmarks_h) - -.spacer-20 - display: block - height: 20px - -.spacer-50 - display: block - height: 50px - -.spacer-100 - display: block - height: 100px - -.spacer-200 - display: block - height: 200px - -.feed-item - list-style-type: none - margin: 0.8em 0.3em - -.feed-item-text, .feed-item-date - display: block - -.feed-item-text - margin-top: 0.3em - margin-left: 1em - font-style: italic - -.left-column - float: left - width: 400px - -.right-column - float: right - width: 400px - -.clearleft - clear: both - -.article-item - padding: 0.5em 0 - display: block - -.article-meta - font-size: 0.8em - -.tag - font-weight: bold - -.project-data - border-left: 1px dashed $gray - padding: 0 1em 1em 1.5em - margin: 0 0 0 1.5em - height: 300px - -ul - overflow: hidden - &.article-meta - list-style-type: none - &.article-buttons - text-align: center - list-style-type: none - display: block - margin: auto - border: 1px solid $gray - background: white - padding: 5px 0 - -#toc - float: right - width: 250px - padding: 10px - margin: 0 0 10px 15px - +default_border - ol - li - margin-left: 1.5em - li - margin-left: 1.5em - li - margin-left: 1.5em - li - margin-left: 1.5em - li - margin-left: 1.5em - li - line-height: 1.2em - -#toctitle - font-variant: small-caps - font-weight: bold - -.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 - font-weight: bold - display: inline - margin-left: 0 - vertical-align: top - -#content .article-meta li - margin-left: 0 - -.inner-border img - margin-top: 7px - -#legacy-comments, #intensedebate - max-width: 800px - margin: auto - -.legacy-comment - padding: 5px 0 - -.lc-header - display: block - height: 20px - border: 1px solid #232323 - background: #121212 - padding: 5px - -table - margin: 10px auto - +default_border - -tr - border-bottom: 1px solid $gray - -#search_form tr, #timeline tr, #taglist tr - border-bottom: none - -table - &#timeline, &#taglist - border: none - -tr, td, th - padding: 5px - -td - border-left: 1px solid $gray - border-right: 1px solid $gray - -th - background: #cecece - +default_border - -#taglist, #timeline - width: 100% - border-bottom: none - margin: 20px 0 - -#taglist tr, #timeline tr - padding: 2px - width: 100% - -#taglist td, #timeline td - padding: 2px - border-left: none - border-right: none - -#content input - &[type=submit] - color: #333333 - border: 2px solid $gray - background: #cccccc - outline: none - padding: 0.1em 0.3em - vertical-align: middle - &:hover - border: 2px solid #cf282d - background: #eeeeee - color: #121212 - &:active - background: #aaaaaa - outline: none - &[type=text] - color: #333333 - border: 2px solid #333333 - background: white - outline: none - text-align: left - height: 21px - vertical-align: middle - &:hover, &:focus, &:active - border: 2px solid #cf282d - -#search_form - clear: both - -.gsc-resultsHeader, .gs-visibleUrl, .gsc-trailing-more-results, .gs-watermark - display: none - -.gsc-result - padding: 0.5em 0 - -table.gsc-search-box - height: 25px - margin: auto - margin-top: 20px - -.gsc-control, .gsc-resultsRoot - width: 850px - -.gsc-search-box - border: none - td - border: none - -.gsc-input - width: 400px - -.gsc-branding - color: black - font-style: italic - font-size: 80% - border: none - margin: auto - padding: 0 - -td.gsc-branding-img - text-align: left - -div.gsc-clear-button - background: transparent url("../images/theme/icons/close.png") no-repeat center 50% - width: 10px - height: 10px - &:hover - cursor: pointer - -.gsc-cursor-page - display: inline - padding-right: 7px - &:hover - cursor: pointer - -.gsc-cursor-current-page - font-weight: bold
D content/css/_fancybox-gallery.sass

@@ -1,25 +0,0 @@

-#gallery - padding: 1em - width: 750px - ul - list-style: none - li - float: left - margin-left: 2px - padding-left: 0 - img - border: 5px solid #dedede - a:hover - color: white - img - border: 5px solid #cccccc - color: white - a - border-bottom: none - -#fancy_content - a - border-bottom: none - -#fancy_title td, #fancy_title tr, #fancy_title table - border: none
D content/css/_fancybox.sass

@@ -1,245 +0,0 @@

-html, body - height: 100% - -div#fancy_overlay - position: fixed - top: 0 - left: 0 - width: 100% - height: 100% - background-color: #666666 - display: none - z-index: 30 - -* html div#fancy_overlay - position: absolute - height: 580px - -div - &#fancy_wrap - text-align: left - &#fancy_loading - position: absolute - height: 40px - width: 40px - cursor: pointer - display: none - overflow: hidden - background: transparent - z-index: 100 - div - position: absolute - top: 0 - left: 0 - width: 40px - height: 480px - background: transparent url("/images/fancybox/fancy_progress.png") no-repeat - &#fancy_loading_overlay - position: absolute - background-color: white - z-index: 30 - &#fancy_loading_icon - position: absolute - background: url("/images/fancybox/fancy_loading.gif") no-repeat - z-index: 35 - width: 16px - height: 16px - &#fancy_outer - position: absolute - top: 0 - left: 0 - z-index: 90 - padding: 18px 18px 33px 18px - margin: 0 - overflow: hidden - background: transparent - display: none - &#fancy_inner - position: relative - width: 100% - height: 100% - border: 1px solid #bbbbbb - background: white - &#fancy_content - margin: 0 - z-index: 100 - position: absolute - &#fancy_div - background: black - color: white - height: 100% - width: 100% - z-index: 100 - -img#fancy_img - position: absolute - top: 0 - left: 0 - border: 0 - padding: 0 - margin: 0 - z-index: 100 - width: 100% - height: 100% - -div#fancy_close - position: absolute - top: -12px - right: -15px - height: 30px - width: 30px - background: url("/images/fancybox/fancy_closebox.png") top left no-repeat - cursor: pointer - z-index: 181 - display: none - -#fancy_frame - position: relative - width: 100% - height: 100% - display: none - -#fancy_ajax - width: 100% - height: 100% - overflow: auto - -a - &#fancy_left, &#fancy_right - position: absolute - bottom: 0px - height: 100% - width: 35% - cursor: pointer - z-index: 111 - display: none - outline: none - &#fancy_left - left: 0px - &#fancy_right - right: 0px - -span - &.fancy_ico - position: absolute - top: 50% - margin-top: -15px - width: 30px - height: 30px - z-index: 112 - cursor: pointer - display: block - &#fancy_left_ico - left: -9999px - background: transparent url("/images/fancybox/fancy_left.png") no-repeat - &#fancy_right_ico - right: -9999px - background: transparent url("/images/fancybox/fancy_right.png") no-repeat - -a - &#fancy_left:hover, &#fancy_right:hover - visibility: visible - &#fancy_left:hover span - left: 20px - &#fancy_right:hover span - right: 20px - -.fancy_bigIframe - position: absolute - top: 0 - left: 0 - width: 100% - height: 100% - background: transparent - -div - &#fancy_bg - position: absolute - top: 0 - left: 0 - width: 100% - height: 100% - z-index: 70 - border: 0 - padding: 0 - margin: 0 - &.fancy_bg - position: absolute - display: block - z-index: 70 - border: 0 - padding: 0 - margin: 0 - &.fancy_bg_n - top: -18px - width: 100% - height: 18px - background: transparent url("/images/fancybox/fancy_shadow_n.png") repeat-x - &.fancy_bg_ne - top: -18px - right: -13px - width: 13px - height: 18px - background: transparent url("/images/fancybox/fancy_shadow_ne.png") no-repeat - &.fancy_bg_e - right: -13px - height: 100% - width: 13px - background: transparent url("/images/fancybox/fancy_shadow_e.png") repeat-y - &.fancy_bg_se - bottom: -18px - right: -13px - width: 13px - height: 18px - background: transparent url("/images/fancybox/fancy_shadow_se.png") no-repeat - &.fancy_bg_s - bottom: -18px - width: 100% - height: 18px - background: transparent url("/images/fancybox/fancy_shadow_s.png") repeat-x - &.fancy_bg_sw - bottom: -18px - left: -13px - width: 13px - height: 18px - background: transparent url("/images/fancybox/fancy_shadow_sw.png") no-repeat - &.fancy_bg_w - left: -13px - height: 100% - width: 13px - background: transparent url("/images/fancybox/fancy_shadow_w.png") repeat-y - &.fancy_bg_nw - top: -18px - left: -13px - width: 13px - height: 18px - background: transparent url("/images/fancybox/fancy_shadow_nw.png") no-repeat - &#fancy_title - position: absolute - bottom: -33px - left: 0 - width: 100% - z-index: 100 - display: none - div - color: white - font: bold 12px Arial - padding-bottom: 3px - table - margin: 0 auto - td - padding: 0 - vertical-align: middle - -td - &#fancy_title_left - height: 32px - width: 15px - background: transparent url(/images/fancybox/fancy_title_left.png) repeat-x - &#fancy_title_main - height: 32px - background: transparent url(/images/fancybox/fancy_title_main.png) repeat-x - &#fancy_title_right - height: 32px - width: 15px - background: transparent url(/images/fancybox/fancy_title_right.png) repeat-x
D content/css/_layout.sass

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

-@import definitions - -* - font-family: inherit - font-style: inherit - font-size: 100% - border: none - padding: 0 - margin: 0 - -html, body - height: 100% - line-height: 1.2 - background: #121212 - -p, ol, ul - margin: 0.5em 0 - -table - border-collapse: collapse - border-spacing: 0 - -body - margin: 0 - padding: 0 - -=button_img($img) - background: url(../images/theme/#{$img}.png) - -#logo - display: block - width: 313px - height: 75px - +button_img(logo) - &:hover - +button_img(logo_h) - -.logo - +button_img(logo_h) - -#header - width: 100% - padding: 5px 0 - height: 70px - -#header-container, #footer-container - margin: auto - width: 900px - -#header-left - float: left - width: 300px - -#header-right - float: right - text-align: right - width: 600px - -#navigation li - float: left - list-style-type: none - padding-left: 10px - -#ie-warning - border-bottom: 1px solid #f5b800 - background-color: #ffe38f - padding: 1em - margin-top: -5px - margin-bottom: 5px - font-weight: bold - -#container - padding: 5px 15px - margin: auto - width: 900px - height: 100% - -.ribbon - height: 19px - background: url(../images/theme/ribbon.png) repeat-x - -#main - background: white url(../images/theme/main.jpg) - -#content - text-align: justify - padding: 0 1em - -#content-body - clear: both - -#content-footer - text-align: center - margin: auto - -#wrapper - min-height: 100% - margin-bottom: -40px - -#border-bottom - clear: both - height: auto - padding: 0 - width: 100% - +darkbg_font - -#services - margin: auto - width: 1000px - -#footer - position: relative - height: 40px - width: 100% - font-size: 0.8em - text-align: center - padding-top: 1em - +darkbg_font - -.clearfooter - height: 40px - clear: both - -.footer-left, .footer-right, .footer-center - float: left - text-align: left - font-size: 90% - display: block - height: 600px - -.footer-left, .footer-right - width: 30% - -.footer-center - width: 40% - -.footer-div - clear: both - font-size: 95% - color: #cacaca - -.share - clear: both - margin: auto - padding: 5px - text-align: center - table, td, tr - border: none - -#page-links - text-align: right - img - vertical-align: text-bottom - -#page-links span - padding: 0 5px - -#comments - width: 900px - margin: auto
D content/css/_text.sass

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

-@import definitions - -/* TEXT - -body - color: black - +body_font - font-size: 0.9em - -h2 - font-size: 2.3em - +title - margin: 0 - -h3 - font-size: 1.7em - +title - -h4 - font-size: 1.3em - +title - -.dropcap - +title_font - float: left - font-size: 4.2em - line-height: 0.75em - margin-top: 0.15em - padding-right: 0.25em - text-transform: uppercase - -p.first-p:first-line - font-variant: small-caps - -#services h3 - text-align: center - -em - font-style: italic - -/**** Article Lists *** - -.article-list h3, .left-column h3, .right-column h3 - text-align: center - -.article-item h4 - margin: 0 - padding: 0 - -.article-tags - font-size: 90% - padding-left: 1em - -.article-summary - padding-left: 1em - font-style: italic - -/******* LINKS ****** - -a, a.gs-title - text-decoration: none - outline: none - -h4 a - text-decoration: none - -a, a.gs-title, .gsc-cursor-page - color: $red - -a:hover, a.gs-title:hover, .gsc-cursor-page:hover - color: #cf282d
D content/css/main.sass

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

-@import layout.sass -@import elements.sass -@import text.sass -@import code.sass -@import fancybox.sass -@import fancybox-gallery.sass
M content/glyph.textilecontent/glyph.textile

@@ -3,35 +3,30 @@ permalink: glyph

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

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

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

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

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

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

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

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

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

@@ -1,64 +1,66 @@

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

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

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

@@ -1,73 +1,102 @@

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

@@ -111,11 +140,11 @@

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

@@ -141,14 +170,14 @@

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

@@ -192,11 +221,11 @@

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

@@ -210,14 +239,14 @@

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

@@ -255,11 +284,11 @@

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

@@ -288,95 +317,73 @@

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

@@ -1,64 +1,66 @@

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

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

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

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

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

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

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

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

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

@@ -1,72 +1,74 @@

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

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

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

@@ -1,64 +1,66 @@

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

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

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

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

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

@@ -1,64 +1,66 @@

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

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

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

@@ -1,64 +1,66 @@

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

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

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

@@ -1,64 +1,66 @@

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

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

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

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

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

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

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

@@ -1,64 +1,66 @@

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

@@ -70,8 +72,8 @@

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

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

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

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

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

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

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

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

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

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

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

@@ -1,155 +1,137 @@

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

@@ -1,190 +1,175 @@

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

@@ -1,72 +1,74 @@

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

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

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

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

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

@@ -1,64 +1,66 @@

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

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

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

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

@@ -1,75 +1,79 @@

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

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

<li>Any macro included in the <code>String</code> is evaluated, and the resulting text is returned by the method. Note that this new document does not get finalized: in other words, placeholders will be left as they are, and they&#8217;ll eventually be replaced when <em>the main document</em> is finalized.</li> </ol> - <div class="section"> -<h5 id="rewriting">Rewriting</h5> + <section class="section"> +<header><h1 id="rewriting">Rewriting</h1></header> <p>While the <code>interpret</code> method is useful to evaluate Glyph code in a macro while performing other actions (storing a bookmark, checking for the presence of an anchor, etc.), in some cases it may not be necessary. If you simply want your macro to be converted into existing Glyph macro without performing any action excepting parameter substitution, you can just use the <a href="/glyph/book/macros/macros_core.html#m_rewrite_"><code>rewrite:</code></a> macro within youy Glyph document</p> <p>Consider the following macro definition:</p> - <pre class="lazy"><span class="line-numbers"> 1 </span> macro <span class="Constant"><span class="Constant">:</span>issue</span> <span class="Keyword">do</span> -<span class="line-numbers"> 2 </span> interpret <span class="String"><span class="String">%{</span></span> -<span class="line-numbers"> 3 </span> <span class="String"> tr[</span> -<span class="line-numbers"> 4 </span> <span class="String"> td[.=&gt;[http://github.com/h3rald/glyph/issues/closed#issue/<span class="String"><span class="String">#{</span>param<span class="String">[</span><span class="Constant">0</span><span class="String">]</span><span class="String">}</span></span>|#<span class="String"><span class="String">#{</span><span class="String"><span class="Entity">param</span></span><span class="String">(</span><span class="Constant">0</span><span class="String">)</span><span class="String">}</span></span>]]</span> -<span class="line-numbers"> 5 </span> <span class="String"> td[txt[<span class="String"><span class="String">#{</span><span class="String"><span class="Entity">param</span></span><span class="String">(</span><span class="Constant">1</span><span class="String">)</span><span class="String">}</span></span>]]</span> -<span class="line-numbers"> 6 </span> <span class="String"> ]</span> -<span class="line-numbers"> 7 </span> <span class="String"> <span class="String">}</span></span> -<span class="line-numbers"> 8 </span> <span class="Keyword">end</span> -</pre> + <div class="CodeRay"> + <div class="code"><pre><span class="no">1</span> macro <span class="sy">:issue</span> <span class="r">do</span> +<span class="no">2</span> interpret <span class="s"><span class="dl">%{</span><span class="k"> +<span class="no">3</span> tr[ +<span class="no">4</span> td[.=&gt;[http://github.com/h3rald/glyph/issues/closed#issue/</span><span class="il"><span class="idl">#{</span>param[<span class="i">0</span>]<span class="idl">}</span></span><span class="k">|#</span><span class="il"><span class="idl">#{</span>param(<span class="i">0</span>)<span class="idl">}</span></span><span class="k">]] +<span class="no">5</span> td[txt[</span><span class="il"><span class="idl">#{</span>param(<span class="i">1</span>)<span class="idl">}</span></span><span class="k">]] +<span class="no">6</span> ] +<span class="no">7</span> </span><span class="dl">}</span></span> +<span class="no">8</span> <span class="r">end</span></pre></div> +</div> + <p>The <code>issue</code> macro is only rewriting existing Glyph code around the two parameters provided. In this case, it is possible to do exactly the same thing using the <a href="/glyph/book/macros/macros_core.html#m_rewrite_"><code>rewrite:</code></a> macro:</p> - <pre class="lazy"><span class="line-numbers"> 1 </span> rewrite:[issue| -<span class="line-numbers"> 2 </span> tr[ -<span class="line-numbers"> 3 </span> td[.=&gt;[http://github.com/h3rald/glyph/issues/closed#issue/{{0}}|#{{0}}]] -<span class="line-numbers"> 4 </span> td[txt[{{1}}]] -<span class="line-numbers"> 5 </span> ] -<span class="line-numbers"> 6 </span> ] -</pre> + <div class="CodeRay"> + <div class="code"><pre><span class="no">1</span> rewrite:[issue| +<span class="no">2</span> tr[ +<span class="no">3</span> td[.=<span class="er">&gt;</span>[http://github.com/h3rald/glyph/issues/closed#issue/{{0}}|#{{0}}]] +<span class="no">4</span> td[txt[{{1}}]] +<span class="no">5</span> ] +<span class="no">6</span> ]</pre></div> +</div> + <p>Within the <a href="/glyph/book/macros/macros_core.html#m_rewrite_"><code>rewrite:</code></a> macro, it is possible to use a special syntax to call the <code>raw_attr</code> or <code>raw_param</code> methods: <br /> <code>{{</code><em>parameter_number</em> or <em>attribute_name</em><code>}}</code></p> -</div> - <div class="navigation"><a href="/glyph/book/extending/validators.html">Using Validators &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/layouts.html">&rarr; Layouts</a></div> - </div> - <div id="content-footer"> - <div class="share"> - <script type="text/javascript"><!-- - google_ad_client = "pub-2871497824158668"; - /* 728x90, h3rald 8.0 */ - google_ad_slot = "0081634732"; - google_ad_width = 728; - google_ad_height = 90; - //--> - </script> - <script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> - </script> - </div> - </div> - </div> - <!-- CONTENT END --> - </div> - <!-- CONTAINER END --> - </div> - <div class="ribbon"></div> - <!-- MAIN END --> - <div id="border-bottom"> - <div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> - </div> <!-- SERVICES END --> - </div> - <div class="clearfooter"></div> - </div> <!-- WRAPPER END --> - <div id="footer"> - <div id="footer-container"> - <div class="footer-div"> - H3RALD Web Site v8.0.0 <em>"xStatic"</em> &mdash; &copy; 2004-2010 <strong>Fabio Cevasco</strong> &mdash; <a class="link" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Some rights reserved</a> | <a href="http://validator.w3.org/check?uri=referer" class="link">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=/interpreting.html" class="link">CSS 2.1</a> - </div> - </div> <!-- END FOOTER CONTAINER--> - </div> <!-- END FOOTER --> - <!-- Start of StatCounter Code --> - <script type="text/javascript"> - var sc_project=6193656; - var sc_invisible=1; - var sc_security="57f7ee2a"; - </script> - <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> - <!-- End of StatCounter Code --> - <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></script> - <script src="/js/jquery-timeago.js" type="text/javascript"></script> - <script src="/js/jquery-easing.js" type="text/javascript"></script> - <script src="/js/jquery-fancybox.js" type="text/javascript"></script> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> - - - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); +</section> + <nav><a href="/glyph/book/extending/validators.html">Using Validators &larr;</a><a href="/glyph/book/index.html">Contents</a><a href="/glyph/book/extending/layouts.html">&rarr; Layouts</a></nav> + </section> + </article> + + + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> - </body> - </html>+ </section> + <section> + <nav> + <a href="/about/">ABOUT</a>|<a href="/contact/">CONTACT</a> + </nav> + <p>H3RALD Web Site v8.1 &mdash; &copy; 2010 &mdash; <em>Fabio Cevasco</em></p> + </section> + </footer> + </section><!-- #container end --> + <script src="http://www.google.com/jsapi?key=ABQIAAAAr6RY1Z6dchG_sX9WDLSy3xRlq2n1sm52B5HDRR5tm6o8XM18FhR56xHNNH6CsX86uN5VoTrglpyOyQ" type="text/javascript"></script> + <!-- <script src="/js/jquery.js" type="text/javascript"></script> --> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> + <script src="/js/jquery-timeago.js" type="text/javascript"></script> + <script src="/js/jquery-easing.js" type="text/javascript"></script> + <script src="/js/jquery-fancybox.js" type="text/javascript"></script> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/hyphenator.min.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-18587377-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> + <!-- End Google Analytics --> + <!-- Start of StatCounter Code --> + <script type="text/javascript"> + var sc_project=6193656; + var sc_invisible=1; + var sc_security="57f7ee2a"; + </script> + <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script> + <!-- End of StatCounter Code --> + </body> +</html>
M content/glyph/book/extending/layouts.htmlcontent/glyph/book/extending/layouts.html

@@ -1,89 +1,93 @@

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

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

@@ -1,87 +1,91 @@

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

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

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

@@ -1,82 +1,86 @@

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

@@ -87,128 +91,105 @@ <li>macro_dirs</li>

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

@@ -1,67 +1,69 @@

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

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

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

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

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

@@ -1,167 +1,149 @@

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

@@ -1,68 +1,70 @@

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

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

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

@@ -1,67 +1,69 @@

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

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

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

@@ -1,64 +1,66 @@

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

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

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

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

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

@@ -1,70 +1,72 @@

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

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

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

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

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

@@ -1,97 +1,101 @@

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

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

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

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

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