glyph 0.5.2 → 0.5.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS.textile +1 -0
  3. data/CHANGELOG.textile +104 -59
  4. data/Gemfile.lock +46 -0
  5. data/LICENSE.textile +1 -1
  6. data/README.textile +106 -120
  7. data/book/lib/layouts/bookindex.glyph +6 -106
  8. data/book/lib/layouts/bookpage.glyph +8 -108
  9. data/book/lib/layouts/project.glyph +0 -1
  10. data/book/text/acknowledgements.glyph +1 -0
  11. data/book/text/changelog.glyph +7 -1
  12. data/glyph.gemspec +10 -10
  13. data/lib/glyph.rb +1 -1
  14. data/spec/files/test.scss +1 -1
  15. data/spec/lib/analyzer_spec.rb +60 -61
  16. data/spec/lib/bookmark_spec.rb +21 -21
  17. data/spec/lib/commands_spec.rb +53 -54
  18. data/spec/lib/config_spec.rb +16 -16
  19. data/spec/lib/document_spec.rb +35 -35
  20. data/spec/lib/glyph_spec.rb +32 -32
  21. data/spec/lib/interpreter_spec.rb +8 -8
  22. data/spec/lib/macro_spec.rb +51 -49
  23. data/spec/lib/macro_validators_spec.rb +14 -14
  24. data/spec/lib/node_spec.rb +25 -25
  25. data/spec/lib/parser_spec.rb +26 -26
  26. data/spec/lib/reporter_spec.rb +32 -32
  27. data/spec/lib/syntax_node_spec.rb +33 -33
  28. data/spec/macros/core_spec.rb +95 -95
  29. data/spec/macros/filters_spec.rb +9 -8
  30. data/spec/macros/html5_spec.rb +17 -17
  31. data/spec/macros/macros_spec.rb +33 -33
  32. data/spec/macros/textile_spec.rb +15 -15
  33. data/spec/macros/web5_spec.rb +3 -3
  34. data/spec/macros/web_spec.rb +19 -19
  35. data/spec/macros/xml_spec.rb +15 -15
  36. data/spec/tasks/generate_spec.rb +34 -34
  37. data/spec/tasks/load_spec.rb +15 -15
  38. data/spec/tasks/project_spec.rb +15 -15
  39. data/styles/coderay.css +2 -0
  40. data/styles/coderay.css.map +7 -0
  41. data/styles/default.css +9 -7
  42. data/styles/default.css.map +7 -0
  43. data/styles/pagination.css +18 -23
  44. data/styles/pagination.css.map +7 -0
  45. data/tasks/generate.rake +12 -5
  46. metadata +47 -68
  47. data/glyph-0.5.1.gem +0 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bdec63625df78834606e6c7fca7e392b62bfb6d7
4
+ data.tar.gz: ffc846abcfb35bd1db8f8ff3577ee8ff50cb01e5
5
+ SHA512:
6
+ metadata.gz: 7422e97437dec41a8b50444ac927ad4626ab2f340b62b2861a2cdb6a7d91e9c5f053455abc7b9c0849850a104a067175ff6f33a9c8ecd83fcb7480275fcf2ae3
7
+ data.tar.gz: f221b4175271e59218d4751f88c393da7443d6fc9007b40b14ce2387f93f71695857d9298e6d09ff3280e04821f9d120da9f7191f7dd602d4528dcf7a894f486
@@ -7,5 +7,6 @@
7
7
  <li><a href="http://www.stuartellis.eu">Stuart Ellis</a> (stuartellis)</li>
8
8
  <li>Eric Givens (darthzippy)</li>
9
9
  <li><a href="http://www.taylored-software.com/">Tammy Cravit</a> (tammycravit)</li>
10
+ <li><a href="https://github.com/grv87">Basil Peace</a> (grv87)</li>
10
11
  </ul>
11
12
 
@@ -3,10 +3,94 @@
3
3
 
4
4
 
5
5
 
6
+
7
+ <div class="section">
8
+ <h2 id="h_1" class="toc">v0.5.3 &ndash; October 4 2014</h2>
9
+ <div class="section">
10
+ <h3 id="h_2" class="toc">1 Bug Fixed</h3>
11
+ <table>
12
+ <tr>
13
+ <th>ID</th>
14
+ <th>Description</th>
15
+ </tr>
16
+
17
+
18
+ <tr>
19
+ <td><a href="https://github.com/h3rald/glyph/issues/216">#216</a></td>
20
+ <td>
21
+ <p>Fix error with <span class="caps">SCSS</span> generation</p>
22
+ </td>
23
+ </tr>
24
+
25
+ </table>
26
+
27
+ </div>
28
+
29
+ </div>
30
+
31
+ <div class="section">
32
+ <h2 id="h_3" class="toc">v0.5.2 &ndash; November 11th 2012</h2>
33
+ <div class="section">
34
+ <h3 id="h_4" class="toc">2 Features Implemented</h3>
35
+ <table>
36
+ <tr>
37
+ <th>ID</th>
38
+ <th>Description</th>
39
+ </tr>
40
+
41
+
42
+ <tr>
43
+ <td><a href="https://github.com/h3rald/glyph/issues/208">#208</a></td>
44
+ <td>
45
+ <p><span class="caps">HTML</span> output now indented automatically.</p>
46
+ </td>
47
+ </tr>
48
+
49
+ <tr>
50
+ <td><a href="https://github.com/h3rald/glyph/issues/206">#206</a></td>
51
+ <td>
52
+ <p><span class="caps">CSS</span> improvements.</p>
53
+ </td>
54
+ </tr>
55
+
56
+ </table>
57
+
58
+ </div>
59
+
60
+
61
+ <div class="section">
62
+ <h3 id="h_5" class="toc">2 Bugs Fixed</h3>
63
+ <table>
64
+ <tr>
65
+ <th>ID</th>
66
+ <th>Description</th>
67
+ </tr>
68
+
69
+
70
+ <tr>
71
+ <td><a href="https://github.com/h3rald/glyph/issues/209">#209</a></td>
72
+ <td>
73
+ <p>Made Glyph compatible with gli v2.&#215;.</p>
74
+ </td>
75
+ </tr>
76
+
77
+ <tr>
78
+ <td><a href="https://github.com/h3rald/glyph/issues/207">#207</a></td>
79
+ <td>
80
+ <p>Fixed heading level of aliased macro always set to 2.</p>
81
+ </td>
82
+ </tr>
83
+
84
+ </table>
85
+
86
+ </div>
87
+
88
+ </div>
89
+
6
90
  <div class="section">
7
- <h2 id="h_1">v0.5.1 &ndash; December 4th 2011</h2>
91
+ <h2 id="h_6" class="toc">v0.5.1 &ndash; December 4th 2011</h2>
8
92
  <div class="section">
9
- <h3 id="h_2">2 Bugs Fixed</h3>
93
+ <h3 id="h_7" class="toc">2 Bugs Fixed</h3>
10
94
  <table>
11
95
  <tr>
12
96
  <th>ID</th>
@@ -31,18 +115,13 @@
31
115
  </table>
32
116
 
33
117
  </div>
34
-
35
-
36
- <p>
37
- <em>&rarr; View closed issues on <a href="https://github.com/h3rald/glyph/issues?direction=asc&amp;labels=0.5.1&amp;sort=created&amp;state=closed">GitHub</a>.</em>
38
- </p>
39
118
 
40
119
  </div>
41
120
 
42
121
  <div class="section">
43
- <h2 id="h_3">v0.5.0 &ndash; August 28th 2011</h2>
122
+ <h2 id="h_8" class="toc">v0.5.0 &ndash; August 28th 2011</h2>
44
123
  <div class="section">
45
- <h3 id="h_4">16 Features Implemented</h3>
124
+ <h3 id="h_9" class="toc">16 Features Implemented</h3>
46
125
  <table>
47
126
  <tr>
48
127
  <th>ID</th>
@@ -168,7 +247,7 @@
168
247
 
169
248
 
170
249
  <div class="section">
171
- <h3 id="h_5">4 Bugs Fixed</h3>
250
+ <h3 id="h_10" class="toc">4 Bugs Fixed</h3>
172
251
  <table>
173
252
  <tr>
174
253
  <th>ID</th>
@@ -207,18 +286,13 @@
207
286
  </table>
208
287
 
209
288
  </div>
210
-
211
-
212
- <p>
213
- <em>&rarr; View closed issues on <a href="https://github.com/h3rald/glyph/issues?direction=asc&amp;labels=0.5.0&amp;sort=created&amp;state=closed">GitHub</a>.</em>
214
- </p>
215
289
 
216
290
  </div>
217
291
 
218
292
  <div class="section">
219
- <h2 id="h_6">v0.4.2 &ndash; October 22th 2010</h2>
293
+ <h2 id="h_11" class="toc">v0.4.2 &ndash; October 22th 2010</h2>
220
294
  <div class="section">
221
- <h3 id="h_7">3 Features Implemented</h3>
295
+ <h3 id="h_12" class="toc">3 Features Implemented</h3>
222
296
  <table>
223
297
  <tr>
224
298
  <th>ID</th>
@@ -253,7 +327,7 @@
253
327
 
254
328
 
255
329
  <div class="section">
256
- <h3 id="h_8">1 Bug Fixed</h3>
330
+ <h3 id="h_13" class="toc">1 Bug Fixed</h3>
257
331
  <table>
258
332
  <tr>
259
333
  <th>ID</th>
@@ -271,18 +345,13 @@
271
345
  </table>
272
346
 
273
347
  </div>
274
-
275
-
276
- <p>
277
- <em>&rarr; View closed issues on <a href="https://github.com/h3rald/glyph/issues?direction=asc&amp;labels=0.4.2&amp;sort=created&amp;state=closed">GitHub</a>.</em>
278
- </p>
279
348
 
280
349
  </div>
281
350
 
282
351
  <div class="section">
283
- <h2 id="h_9">v0.4.1 &ndash; September 23th 2010</h2>
352
+ <h2 id="h_14" class="toc">v0.4.1 &ndash; September 23th 2010</h2>
284
353
  <div class="section">
285
- <h3 id="h_10">5 Bugs Fixed</h3>
354
+ <h3 id="h_15" class="toc">5 Bugs Fixed</h3>
286
355
  <table>
287
356
  <tr>
288
357
  <th>ID</th>
@@ -328,18 +397,13 @@
328
397
  </table>
329
398
 
330
399
  </div>
331
-
332
-
333
- <p>
334
- <em>&rarr; View closed issues on <a href="https://github.com/h3rald/glyph/issues?direction=asc&amp;labels=0.4.1&amp;sort=created&amp;state=closed">GitHub</a>.</em>
335
- </p>
336
400
 
337
401
  </div>
338
402
 
339
403
  <div class="section">
340
- <h2 id="h_11">v0.4.0 &ndash; September 3th 2010</h2>
404
+ <h2 id="h_16" class="toc">v0.4.0 &ndash; September 3th 2010</h2>
341
405
  <div class="section">
342
- <h3 id="h_12">13 Features Implemented</h3>
406
+ <h3 id="h_17" class="toc">13 Features Implemented</h3>
343
407
  <table>
344
408
  <tr>
345
409
  <th>ID</th>
@@ -444,7 +508,7 @@
444
508
 
445
509
 
446
510
  <div class="section">
447
- <h3 id="h_13">7 Bugs Fixed</h3>
511
+ <h3 id="h_18" class="toc">7 Bugs Fixed</h3>
448
512
  <table>
449
513
  <tr>
450
514
  <th>ID</th>
@@ -504,18 +568,13 @@
504
568
  </table>
505
569
 
506
570
  </div>
507
-
508
-
509
- <p>
510
- <em>&rarr; View closed issues on <a href="https://github.com/h3rald/glyph/issues?direction=asc&amp;labels=0.4.0&amp;sort=created&amp;state=closed">GitHub</a>.</em>
511
- </p>
512
571
 
513
572
  </div>
514
573
 
515
574
  <div class="section">
516
- <h2 id="h_14">v0.3.0 &ndash; June 13th 2010</h2>
575
+ <h2 id="h_19" class="toc">v0.3.0 &ndash; June 13th 2010</h2>
517
576
  <div class="section">
518
- <h3 id="h_15">13 Features Implemented</h3>
577
+ <h3 id="h_20" class="toc">13 Features Implemented</h3>
519
578
  <table>
520
579
  <tr>
521
580
  <th>ID</th>
@@ -620,7 +679,7 @@
620
679
 
621
680
 
622
681
  <div class="section">
623
- <h3 id="h_16">3 Bugs Fixed</h3>
682
+ <h3 id="h_21" class="toc">3 Bugs Fixed</h3>
624
683
  <table>
625
684
  <tr>
626
685
  <th>ID</th>
@@ -652,18 +711,13 @@
652
711
  </table>
653
712
 
654
713
  </div>
655
-
656
-
657
- <p>
658
- <em>&rarr; View closed issues on <a href="https://github.com/h3rald/glyph/issues?direction=asc&amp;labels=0.3.0&amp;sort=created&amp;state=closed">GitHub</a>.</em>
659
- </p>
660
714
 
661
715
  </div>
662
716
 
663
717
  <div class="section">
664
- <h2 id="h_17">v0.2.0 &ndash; May 9th 2010</h2>
718
+ <h2 id="h_22" class="toc">v0.2.0 &ndash; May 9th 2010</h2>
665
719
  <div class="section">
666
- <h3 id="h_18">11 Features Implemented</h3>
720
+ <h3 id="h_23" class="toc">11 Features Implemented</h3>
667
721
  <table>
668
722
  <tr>
669
723
  <th>ID</th>
@@ -754,7 +808,7 @@
754
808
 
755
809
 
756
810
  <div class="section">
757
- <h3 id="h_19">8 Bugs Fixed</h3>
811
+ <h3 id="h_24" class="toc">8 Bugs Fixed</h3>
758
812
  <table>
759
813
  <tr>
760
814
  <th>ID</th>
@@ -821,20 +875,11 @@
821
875
  </table>
822
876
 
823
877
  </div>
824
-
825
-
826
- <p>
827
- <em>&rarr; View closed issues on <a href="https://github.com/h3rald/glyph/issues?direction=asc&amp;labels=0.2.0&amp;sort=created&amp;state=closed">GitHub</a>.</em>
828
- </p>
829
878
 
830
879
  </div>
831
880
 
832
881
  <div class="section">
833
- <h2 id="h_20">v0.1.0 &ndash; April 8th 2010</h2>
882
+ <h2 id="h_25" class="toc">v0.1.0 &ndash; April 8th 2010</h2>
834
883
  Initial release.
835
884
 
836
- <p>
837
- <em>&rarr; View closed issues on <a href="https://github.com/h3rald/glyph/issues?direction=asc&amp;labels=0.1.0&amp;sort=created&amp;state=closed">GitHub</a>.</em>
838
- </p>
839
-
840
885
  </div>
@@ -0,0 +1,46 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ glyph (0.5.2)
5
+ extlib (>= 0.9.15)
6
+ gli (>= 2.4.1)
7
+ rake (>= 0.9.2.2)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ RedCloth (4.2.9)
13
+ bluecloth (2.2.0)
14
+ coderay (1.1.0)
15
+ diff-lcs (1.2.5)
16
+ directory_watcher (1.5.1)
17
+ extlib (0.9.16)
18
+ gli (2.12.2)
19
+ rake (10.3.2)
20
+ rspec (3.1.0)
21
+ rspec-core (~> 3.1.0)
22
+ rspec-expectations (~> 3.1.0)
23
+ rspec-mocks (~> 3.1.0)
24
+ rspec-core (3.1.5)
25
+ rspec-support (~> 3.1.0)
26
+ rspec-expectations (3.1.2)
27
+ diff-lcs (>= 1.2.0, < 2.0)
28
+ rspec-support (~> 3.1.0)
29
+ rspec-mocks (3.1.2)
30
+ rspec-support (~> 3.1.0)
31
+ rspec-support (3.1.1)
32
+ sass (3.4.5)
33
+ yard (0.8.7.4)
34
+
35
+ PLATFORMS
36
+ ruby
37
+
38
+ DEPENDENCIES
39
+ RedCloth (>= 4.2.9)
40
+ bluecloth (>= 2.2.0)
41
+ coderay (>= 1.0.8)
42
+ directory_watcher (>= 1.4.1)
43
+ glyph!
44
+ rspec (>= 2.11.0)
45
+ sass (>= 3.2.1)
46
+ yard (>= 0.8.3)
@@ -1,4 +1,4 @@
1
- <p>Copyright &copy; 2010-2011 <strong>Fabio Cevasco</strong>, <a href="http://www.h3rald.com">http://www.h3rald.com</a></p>
1
+ <p>Copyright &copy; 2010-2012 <strong>Fabio Cevasco</strong>, <a href="http://www.h3rald.com">http://www.h3rald.com</a></p>
2
2
  <p>Permission is hereby granted, free of charge, to any person obtaining a copy
3
3
  of this software and associated documentation files (the "Software"), to deal
4
4
  in the Software without restriction, including without limitation the rights
@@ -1,159 +1,145 @@
1
1
  <div class="section">
2
- Glyph is a _Rapid Document Authoring Framework_.
3
-
4
- 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.
2
+ <p>Glyph is a <em>Rapid Document Authoring Framework</em>.</p>
3
+ <p>With Glyph, creating and maintaining any kind of document becomes as easy as&#8230; <em>programming</em>. Glyph enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards customization and extensibility.</p>
5
4
 
6
5
  <div class="section">
7
- <h3 id="h_1">Main Features</h3>
6
+ <h3 id="h_1" class="toc">Main Features</h3>
8
7
  <div class="section">
9
- <h4 id="h_2">Command Line Interface</h4>
10
- 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:
11
-
12
- * @glyph init@ -- to initialize a new Glyph project in the current (empty) directory.
13
- * @glyph add introduction.textile@ -- to create a new file called _introduction.textile_.
14
- * @glyph compile@ -- to compile the current document into a single HTML file.
15
- * @glyph compile --auto@ -- to keep recompiling the current document every time a file is changed.
16
- * @glyph compile -f pdf@ -- to compile the current document into HTML and then transform it into PDF.
17
- * @glyph compile readme.glyph@ -- to compile a _readme.glyph_ located in the current directory into a single HTML file.
18
- * @glyph outline -l 2@ -- Display the document outline, up to second-level headers.
19
- * @glyph stats@ -- Display project statistics.
8
+ <h4 id="h_2" class="toc">Command Line Interface</h4>
9
+ <p>Glyph is 100% command line. Its interface resambles <a href="http://git-scm.com/">Git&#8217;s</a> for its simplicity and power (thanks to the <a href="http://github.com/davetron5000/gli">gli</a> gem). Here are some example commands:</p>
10
+ <ul>
11
+ <li><code>glyph init</code> &#8212; to initialize a new Glyph project in the current (empty) directory.</li>
12
+ <li><code>glyph add introduction.textile</code> &#8212; to create a new file called <em>introduction.textile</em>.</li>
13
+ <li><code>glyph compile</code> &#8212; to compile the current document into a single <span class="caps">HTML</span> file.</li>
14
+ <li><code>glyph compile --auto</code> &#8212; to keep recompiling the current document every time a file is changed.</li>
15
+ <li><code>glyph compile -f pdf</code> &#8212; to compile the current document into <span class="caps">HTML</span> and then transform it into <span class="caps">PDF</span>.</li>
16
+ <li><code>glyph compile readme.glyph</code> &#8212; to compile a <em>readme.glyph</em> located in the current directory into a single <span class="caps">HTML</span> file.</li>
17
+ <li><code>glyph outline -l 2</code> &#8212; Display the document outline, up to second-level headers.</li>
18
+ <li><code>glyph stats</code> &#8212; Display project statistics.</li>
19
+ </ul>
20
20
 
21
21
  </div>
22
22
 
23
23
  <div class="section">
24
- <h4 id="h_3">Minimalist Syntax</h4>
25
- Glyph syntax rules can be explained using Glyph itself:
26
-
27
- <div class="code">
28
- <pre>
29
- <code>
30
- section[
31
- @title[Something about Glyph]
32
- txt[
33
- You can use Glyph macros in conjunction
34
- with _Textile_ or _Markdown_ to
35
- produce HTML files effortlessly.
36
- ]
37
- p[Alternatively, you can just use em[Glyph itself] to generate HTML tags.]
38
- section[
39
- @title[What about PDFs?]
40
- @id[pdf]
41
- p[
42
- Once you have a single, well-formatted HTML
43
- file, converting it to PDF is
44
- extremely easy with a free 3rd-party
45
- renderer like =>[http://www.princexml.com|Prince]
46
- or =>[http://code.google.com/p/wkhtmltopdf/|wkhtmltopdf].
47
- ]
48
- ]
49
- ]
50
- </code>
51
- </pre>
52
- </div>
53
- The Glyph code above corresponds to the following HTML code:
54
-
55
- <div class="code">
56
- <pre>
57
- <code>
58
- <div class="section">
59
- <h2 id="h_10">Something about Glyph</h2>
60
- <p>
61
- You can use Glyph macros in conjunction with
62
- <em>Textile</em> or <em>Markdown</em> to
63
- produce HTML files effortlessly.
64
- </p>
65
- <p>
66
- Alternatively, you can just use <em>Glyph itself</em>
67
- to generate HTML tags.
68
- </p>
69
- <div class="section">
70
- <h3 id="pdf">What about PDFs?</h3>
71
- <p>
72
- Once you have a single, well-formatted HTML
73
- file, converting it to PDF is
74
- extremely easy with a free 3rd-party renderer
75
- like <a href="http://www.princexml.com">Prince</a>
76
- or <a href="http://code.google.com/p/wkhtmltopdf/\">wkhtmltopdf</a>.
77
- </p>
78
- </div>
24
+ <h4 id="h_3" class="toc">Minimalist Syntax</h4>
25
+ <p>Glyph syntax rules can be explained using Glyph itself:</p>
26
+
27
+ <div class="CodeRay">
28
+ <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>section[
29
+ <span class="line-numbers"> <a href="#n2" name="n2">2</a></span> @title[Something about Glyph]
30
+ <span class="line-numbers"> <a href="#n3" name="n3">3</a></span> txt[
31
+ <span class="line-numbers"> <a href="#n4" name="n4">4</a></span>You can use Glyph macros in conjunction
32
+ <span class="line-numbers"> <a href="#n5" name="n5">5</a></span>with _Textile_ or _Markdown_ to
33
+ <span class="line-numbers"> <a href="#n6" name="n6">6</a></span>produce HTML files effortlessly.
34
+ <span class="line-numbers"> <a href="#n7" name="n7">7</a></span> ]
35
+ <span class="line-numbers"> <a href="#n8" name="n8">8</a></span> p[Alternatively, you can just use em[Glyph itself] to generate HTML tags.]
36
+ <span class="line-numbers"> <a href="#n9" name="n9">9</a></span> section[
37
+ <span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> @title[What about PDFs?]
38
+ <span class="line-numbers"><a href="#n11" name="n11">11</a></span> @id[pdf]
39
+ <span class="line-numbers"><a href="#n12" name="n12">12</a></span> p[
40
+ <span class="line-numbers"><a href="#n13" name="n13">13</a></span>Once you have a single, well-formatted HTML
41
+ <span class="line-numbers"><a href="#n14" name="n14">14</a></span>file, converting it to PDF is
42
+ <span class="line-numbers"><a href="#n15" name="n15">15</a></span>extremely easy with a free 3rd-party
43
+ <span class="line-numbers"><a href="#n16" name="n16">16</a></span>renderer like =&gt;[http://www.princexml.com|Prince]
44
+ <span class="line-numbers"><a href="#n17" name="n17">17</a></span>or =&gt;[http://code.google.com/p/wkhtmltopdf/|wkhtmltopdf].
45
+ <span class="line-numbers"><a href="#n18" name="n18">18</a></span> ]
46
+ <span class="line-numbers"><a href="#n19" name="n19">19</a></span> ]
47
+ <span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span>]</pre></div>
79
48
  </div>
80
- </code>
81
- </pre>
49
+
50
+ <p>The Glyph code above corresponds to the following HTML code:</p>
51
+ <div class="CodeRay">
52
+ <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
53
+ <span class="line-numbers"> <a href="#n2" name="n2">2</a></span> <span class="tag">&lt;h2</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">h_10</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Something about Glyph<span class="tag">&lt;/h2&gt;</span>
54
+ <span class="line-numbers"> <a href="#n3" name="n3">3</a></span> <span class="tag">&lt;p&gt;</span>
55
+ <span class="line-numbers"> <a href="#n4" name="n4">4</a></span> You can use Glyph macros in conjunction with
56
+ <span class="line-numbers"> <a href="#n5" name="n5">5</a></span> <span class="tag">&lt;em&gt;</span>Textile<span class="tag">&lt;/em&gt;</span> or <span class="tag">&lt;em&gt;</span>Markdown<span class="tag">&lt;/em&gt;</span> to
57
+ <span class="line-numbers"> <a href="#n6" name="n6">6</a></span> produce HTML files effortlessly.
58
+ <span class="line-numbers"> <a href="#n7" name="n7">7</a></span> <span class="tag">&lt;/p&gt;</span>
59
+ <span class="line-numbers"> <a href="#n8" name="n8">8</a></span> <span class="tag">&lt;p&gt;</span>
60
+ <span class="line-numbers"> <a href="#n9" name="n9">9</a></span> Alternatively, you can just use <span class="tag">&lt;em&gt;</span>Glyph itself<span class="tag">&lt;/em&gt;</span>
61
+ <span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> to generate HTML tags.
62
+ <span class="line-numbers"><a href="#n11" name="n11">11</a></span> <span class="tag">&lt;/p&gt;</span>
63
+ <span class="line-numbers"><a href="#n12" name="n12">12</a></span> <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
64
+ <span class="line-numbers"><a href="#n13" name="n13">13</a></span> <span class="tag">&lt;h3</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">pdf</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>What about PDFs?<span class="tag">&lt;/h3&gt;</span>
65
+ <span class="line-numbers"><a href="#n14" name="n14">14</a></span> <span class="tag">&lt;p&gt;</span>
66
+ <span class="line-numbers"><a href="#n15" name="n15">15</a></span> Once you have a single, well-formatted HTML
67
+ <span class="line-numbers"><a href="#n16" name="n16">16</a></span> file, converting it to PDF is
68
+ <span class="line-numbers"><a href="#n17" name="n17">17</a></span> extremely easy with a free 3rd-party renderer
69
+ <span class="line-numbers"><a href="#n18" name="n18">18</a></span> like <span class="tag">&lt;a</span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://www.princexml.com</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Prince<span class="tag">&lt;/a&gt;</span>
70
+ <span class="line-numbers"><a href="#n19" name="n19">19</a></span> or <span class="tag">&lt;a</span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://code.google.com/p/wkhtmltopdf/</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>wkhtmltopdf<span class="tag">&lt;/a&gt;</span>.
71
+ <span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> <span class="tag">&lt;/p&gt;</span>
72
+ <span class="line-numbers"><a href="#n21" name="n21">21</a></span> <span class="tag">&lt;/div&gt;</span>
73
+ <span class="line-numbers"><a href="#n22" name="n22">22</a></span><span class="tag">&lt;/div&gt;</span></pre></div>
82
74
  </div>
83
75
 
84
76
  </div>
85
77
 
86
78
  <div class="section">
87
- <h4 id="h_4">Content Reuse</h4>
88
- 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!):
89
-
90
- <div class="code">
91
- <pre>
92
- <code>
93
- snippet:[entities|snippets and macros]
94
- snippet:[custom_definitions|
95
- p[Glyph allows you to define your own &[entities].]
96
- ]
97
- &[custom_definitions]
98
- </code>
99
- </pre>
79
+ <h4 id="h_4" class="toc">Content Reuse</h4>
80
+ <p>Finding yourself repeating the same sentence over an over? Glyph allows you to create snippets. Within snippets. Within other snippets (and so on, for a long long time&#8230;) as long as you don&#8217;t define a snippet by defining itself, which would be kinda nasty (and Glyph would complain!):</p>
81
+ <div class="CodeRay">
82
+ <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>snippet:[entities|snippets and macros]
83
+ <span class="line-numbers"><a href="#n2" name="n2">2</a></span>snippet:[custom_definitions|
84
+ <span class="line-numbers"><a href="#n3" name="n3">3</a></span> p[Glyph allows you to define your own &amp;[entities].]
85
+ <span class="line-numbers"><a href="#n4" name="n4">4</a></span>]
86
+ <span class="line-numbers"><a href="#n5" name="n5">5</a></span>&amp;[custom_definitions]</pre></div>
100
87
  </div>
101
- ...which results in:
102
-
103
- <div class="code">
104
- <pre>
105
- <code>
106
- <p>Glyph allows you to define your own snippets and macros.</p>
107
- </code>
108
- </pre>
88
+
89
+ <p>...which results in:</p>
90
+ <div class="CodeRay">
91
+ <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag">&lt;p&gt;</span>Glyph allows you to define your own snippets and macros.<span class="tag">&lt;/p&gt;</span></pre></div>
109
92
  </div>
110
- 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).
93
+
94
+ <p>If yourself dreaming about <em>parametric</em> snippets, just create your own macros (see the <a href="http://github.com/h3rald/glyph/blob/master/book/text/changelog.glyph">source</a> of Glyph&#8217;s changelog, just to have an idea).</p>
111
95
 
112
96
  </div>
113
97
  <div class="section">
114
- <h4 id="h_5">Automation of Common Tasks</h4>
115
- 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).
98
+ <h4 id="h_5" class="toc">Automation of Common Tasks</h4>
99
+ <p>If you&#8217;re writing a book, you shouldn&#8217;t have to worry about pagination, headers, footers, table of contents, section numbering or similar. Glyph understands you, and will take care of everything for you (with a little help from CSS3, sometimes).</p>
116
100
 
117
101
  </div>
118
102
  <div class="section">
119
- <h4 id="h_6">Reference Validation</h4>
120
- 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.
103
+ <h4 id="h_6" class="toc">Reference Validation</h4>
104
+ <p>Feel free to add plenty of links, snippets, bookmarks, &#8230; if Glyph doesn&#8217;t find something, it will definitely complain. Broken references are a thing on the past, and you don&#8217;t need to worry about it.</p>
121
105
 
122
106
  </div>
123
107
  <div class="section">
124
- <h4 id="h_7">Extreme Extensibility</h4>
125
- * 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.
126
- * 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.
127
- * 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.
108
+ <h4 id="h_7" class="toc">Extreme Extensibility</h4>
109
+ <ul>
110
+ <li>You miss a <code>!!!</code> macro to format really, <em>really</em> important things? Create it. In under 3 seconds, in Ruby or Glyph itself. And yes, you can use special characters, too.</li>
111
+ <li>You want your own, very special special <code>glyph create --everything</code> command to create all <em>you</em> need in a Glyph project? You can do it. Using your own Rake tasks, too.</li>
112
+ <li>You want Glyph to output <span class="caps">ODF</span> files? You can do it, and you&#8217;ll be able to run <code>glyph generate -f odf</code>. This would probably require a little more time, but it&#8217;s trivial, from a technical point of view.</li>
113
+ </ul>
128
114
 
129
115
  </div>
130
116
  <div class="section">
131
- <h4 id="h_8">Convention over Configuration</h4>
132
- 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.
133
-
134
- Nonetheless, you also have 1 (_one_) configuration file to customize to your heart's content (with smart defaults).
117
+ <h4 id="h_8" class="toc">Convention over Configuration</h4>
118
+ <p>Put your text files in <code>/text</code>, your images in <code>/images</code>, add custom macros in a <code>macro</code> folder within your <code>/lib</code> folder&#8230; you get the picture: Glyph has its special places.</p>
119
+ <p>Nonetheless, you also have 1 (<em>one</em>) configuration file to customize to your heart&#8217;s content (with smart defaults).</p>
135
120
 
136
121
  </div>
137
122
  <div class="section">
138
- <h4 id="h_9">Free and Open Source</h4>
139
- 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>.
140
-
141
- If you have Ruby installed, just run @gem install glyph@. That's all it takes.
123
+ <h4 id="h_9" class="toc">Free and Open Source</h4>
124
+ <p>Glyph is 100% Open Source Software, developed using the Ruby Programming Language and licensed under the very permissive terms of the <a href="http://www.opensource.org/licenses/mit-license.php"><span class="caps">MIT</span> License</a>.</p>
125
+ <p>If you have Ruby installed, just run <code>gem install glyph</code>. That&#8217;s all it takes.</p>
142
126
 
143
127
  </div>
144
128
 
145
129
  </div>
146
130
  <div class="section">
147
- <h3 id="h_10">Resources</h3>
148
- * Home Page: <a href="http://www.h3rald.com/glyph/">http://www.h3rald.com/glyph/</a>
149
- * Repository: <a href="http://www.github.com/h3rald/glyph/">http://www.github.com/h3rald/glyph/</a>
150
- * Bug Tracking: <a href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a>
151
- * Development Wiki <a href="http://wiki.github.com/h3rald/glyph">http://wiki.github.com/h3rald/glyph</a>
152
- * RubyGem Download <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a>
153
- * Book (PDF): <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">http://github.com/downloads/h3rald/glyph/glyph.pdf</a>
154
- * Book (Web): <a href="http://www.h3rald.com/glyph/book/">http://www.h3rald.com/glyph/book/</a>
155
- * Reference Documentation: <a href="http://rubydoc.info/gems/glyph/">http://rubydoc.info/gems/glyph/</a>
156
- * User Group: <a href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a>
131
+ <h3 id="h_10" class="toc">Resources</h3>
132
+ <ul>
133
+ <li>Home Page: <a href="http://www.h3rald.com/glyph/">http://www.h3rald.com/glyph/</a></li>
134
+ <li>Repository: <a href="http://www.github.com/h3rald/glyph/">http://www.github.com/h3rald/glyph/</a></li>
135
+ <li>Bug Tracking: <a href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a></li>
136
+ <li>Development Wiki <a href="http://wiki.github.com/h3rald/glyph">http://wiki.github.com/h3rald/glyph</a></li>
137
+ <li>RubyGem Download <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a></li>
138
+ <li>Book (<span class="caps">PDF</span>): <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">http://github.com/downloads/h3rald/glyph/glyph.pdf</a></li>
139
+ <li>Book (Web): <a href="http://www.h3rald.com/glyph/book/">http://www.h3rald.com/glyph/book/</a></li>
140
+ <li>Reference Documentation: <a href="http://rubydoc.info/gems/glyph/">http://rubydoc.info/gems/glyph/</a></li>
141
+ <li>User Group: <a href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a></li>
142
+ </ul>
157
143
 
158
144
  </div>
159
145