glyph 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/AUTHORS.textile +8 -0
  2. data/CHANGELOG.textile +260 -0
  3. data/LICENSE.textile +26 -0
  4. data/README.textile +49 -21
  5. data/Rakefile +17 -7
  6. data/VERSION +1 -1
  7. data/book/config.yml +11 -5
  8. data/book/document.glyph +24 -13
  9. data/book/lib/macros/reference.rb +41 -14
  10. data/book/output/html/glyph.html +2298 -687
  11. data/book/output/pdf/glyph.pdf +6218 -2698
  12. data/book/script/authors +1 -0
  13. data/book/script/changelog +1 -0
  14. data/book/script/compile.rb +8 -0
  15. data/book/script/license +1 -0
  16. data/book/script/prof +1 -0
  17. data/book/script/prof_results.htm +21079 -0
  18. data/book/script/readme +1 -0
  19. data/book/snippets.yml +3 -4
  20. data/book/text/acknowledgement.glyph +8 -0
  21. data/book/text/authoring.glyph +548 -0
  22. data/book/text/changelog.glyph +76 -0
  23. data/book/text/extending.glyph +224 -0
  24. data/book/text/{getting_started.textile → getting_started.glyph} +30 -24
  25. data/book/text/{introduction.textile → introduction.glyph} +22 -12
  26. data/book/text/license.glyph +21 -0
  27. data/book/text/{ref_commands.textile → ref_commands.glyph} +30 -8
  28. data/book/text/ref_config.glyph +108 -0
  29. data/book/text/ref_macros.glyph +378 -0
  30. data/book/text/troubleshooting.glyph +179 -0
  31. data/config.yml +16 -4
  32. data/glyph.gemspec +83 -22
  33. data/lib/glyph.rb +164 -31
  34. data/lib/glyph/commands.rb +98 -23
  35. data/lib/glyph/document.rb +13 -7
  36. data/lib/glyph/glyph_language.rb +9 -1
  37. data/lib/glyph/glyph_language.treetop +1 -1
  38. data/lib/glyph/interpreter.rb +19 -9
  39. data/lib/glyph/macro.rb +88 -11
  40. data/lib/glyph/macro_validators.rb +48 -0
  41. data/lib/glyph/node.rb +13 -1
  42. data/lib/glyph/system_extensions.rb +0 -28
  43. data/macros/common.rb +125 -31
  44. data/macros/filters.rb +19 -13
  45. data/macros/html/block.rb +119 -68
  46. data/macros/html/inline.rb +29 -3
  47. data/macros/html/structure.rb +40 -40
  48. data/spec/files/article.glyph +5 -0
  49. data/spec/lib/commands_spec.rb +98 -3
  50. data/spec/lib/document_spec.rb +15 -2
  51. data/spec/lib/glyph_spec.rb +39 -10
  52. data/spec/lib/interpreter_spec.rb +8 -2
  53. data/spec/lib/macro_spec.rb +54 -6
  54. data/spec/lib/macro_validators_spec.rb +33 -0
  55. data/spec/lib/node_spec.rb +11 -3
  56. data/spec/macros/filters_spec.rb +5 -5
  57. data/spec/macros/macros_spec.rb +185 -8
  58. data/spec/macros/textile_spec.rb +217 -0
  59. data/spec/spec_helper.rb +25 -15
  60. data/spec/tasks/generate_spec.rb +3 -3
  61. data/spec/tasks/load_spec.rb +11 -1
  62. data/spec/tasks/project_spec.rb +0 -3
  63. data/styles/coderay.css +121 -0
  64. data/styles/default.css +54 -20
  65. data/{book/styles/css3.css → styles/pagination.css} +35 -7
  66. data/styles/ultraviolet/active4d.css +114 -0
  67. data/styles/ultraviolet/all_hallows_eve.css +72 -0
  68. data/styles/ultraviolet/amy.css +147 -0
  69. data/styles/ultraviolet/blackboard.css +88 -0
  70. data/styles/ultraviolet/brilliance_black.css +605 -0
  71. data/styles/ultraviolet/brilliance_dull.css +599 -0
  72. data/styles/ultraviolet/cobalt.css +149 -0
  73. data/styles/ultraviolet/dawn.css +121 -0
  74. data/styles/ultraviolet/eiffel.css +121 -0
  75. data/styles/ultraviolet/espresso_libre.css +109 -0
  76. data/styles/ultraviolet/idle.css +62 -0
  77. data/styles/ultraviolet/iplastic.css +80 -0
  78. data/styles/ultraviolet/lazy.css +73 -0
  79. data/styles/ultraviolet/mac_classic.css +123 -0
  80. data/styles/ultraviolet/magicwb_amiga.css +104 -0
  81. data/styles/ultraviolet/pastels_on_dark.css +188 -0
  82. data/styles/ultraviolet/slush_poppies.css +85 -0
  83. data/styles/ultraviolet/spacecadet.css +51 -0
  84. data/styles/ultraviolet/sunburst.css +180 -0
  85. data/styles/ultraviolet/twilight.css +137 -0
  86. data/styles/ultraviolet/zenburnesque.css +91 -0
  87. data/tasks/generate.rake +45 -26
  88. data/tasks/load.rake +21 -18
  89. data/tasks/project.rake +3 -1
  90. metadata +210 -41
  91. data/book/styles/default.css +0 -190
  92. data/book/text/authoring.textile +0 -351
  93. data/book/text/extending.textile +0 -148
  94. data/book/text/ref_config.textile +0 -0
  95. data/book/text/ref_macros.textile +0 -256
  96. data/book/text/troubleshooting.textile +0 -118
  97. data/styles/css3.css +0 -220
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2010 **Fabio Cevasco**, =>[http://www.h3rald.com]
2
+
3
+ code[
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in
12
+ all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+ ]
@@ -8,26 +8,31 @@ Where:
8
8
 
9
9
  section[header[Global Options]
10
10
 
11
- section[header[@-d@, @--debug@]
11
+ section[header[@-d@, @--debug@|debug_switch]
12
12
  If specified, the command is executed in debug mode and additional diagnostic information is printed on the screen.
13
13
  ]
14
14
  ]
15
15
 
16
- section[header[@add@]
16
+ section[header[@add@|c_add]
17
17
  Creates a new text file in the @text/@ folder.
18
18
 
19
19
  example[glyph add introduction.textile]
20
20
 
21
21
  parameters[
22
- -p[file-name|The name (or relative path) of the new file to be created.]
22
+ -p[_file-name_|The name (or relative path) of the new file to be created.]
23
23
  ]
24
24
  ] --[End add]
25
25
 
26
- section[header[@compile@]
26
+ section[header[@compile@|c_compile]
27
27
  Compiles a Glyph document into an output file. If no options are specified, the @document.glyph@ file is used as source to produce a standalone HTML file.
28
28
 
29
29
  example[glyph compile -f pdf]
30
30
 
31
+ parameters[
32
+ -p[_source_|The source glyph file to compile _(Optional)_.]
33
+ -p[_destination_|The destination file _(Optional)_.]
34
+ ]
35
+
31
36
  options[
32
37
  -o[source|
33
38
  The source file to compile.
@@ -38,10 +43,13 @@ The format of the output file.
38
43
  default[html]
39
44
  values[html, pdf]
40
45
  ]
46
+ -o[auto|
47
+ If specified, enable =>[#auto_regeneration|auto regeneration] (requires the =>[http://rubygems.org/gems/directory_watcher|directory_watcher] gem to be installed).
48
+ ]
41
49
  ]
42
50
  ] --[End compile]
43
51
 
44
- section[header[@config@]
52
+ section[header[@config@|c_config]
45
53
  Gets or sets a configuration setting in the project or global configuration file (\.fmi[configuration files|#cfg]).
46
54
 
47
55
  examples[
@@ -56,12 +64,26 @@ default[false]
56
64
  ]
57
65
  ]
58
66
  parameters[
59
- -p[setting|The name of a valid =>[#cfg_ref|configuration setting].]
60
- -p[value|The new value of the configuration setting.]
67
+ -p[_setting_|The name of a valid =>[#cfg_ref|configuration setting].]
68
+ -p[_value_|The new value of the configuration setting.]
61
69
  ]
62
70
  ] --[End config]
63
71
 
64
- section[header[@init@]
72
+ section[header[@help@|c_help]
73
+ Prints information about all Glyph commands or about one specific command.
74
+
75
+ examples[
76
+ glyph help
77
+ glyph help compile
78
+ ]
79
+
80
+ parameters[
81
+ -p[_command_|A valid Glyph command.]
82
+ ]
83
+
84
+ ] --[End help]
85
+
86
+ section[header[@init@|c_init]
65
87
  Creates a new Glyph project in the current directory (if empty).
66
88
 
67
89
  example[glyph init]
@@ -0,0 +1,108 @@
1
+ section[header[@document.*@]
2
+ The following configuration settings are related to the current Glyph document. Therefore, you should update them right after creating a project.
3
+
4
+ config_table[
5
+ ref_config[document.author|
6
+ The author of the document.
7
+ ]
8
+ ref_config[document.draft|
9
+ If set to @true@, the document is considered a draft, so =>[#m_draftcomment|draft comments] and =>[#m_todo|todo items] will be displayed.
10
+ ]
11
+ ref_config[document.filename|
12
+ The name of the output file.
13
+ ]
14
+ ref_config[document.output|
15
+ The format of the output file. It can be set to any value stored in the $>[document.output_targets].
16
+ ]
17
+ ref_config[document.output_targets|
18
+ An @Array@ containing all the possible output formats. This setting should not be changed by the user.
19
+ ]
20
+ ref_config[document.source|
21
+ The main source file to compile. It can be also be overridden by calling the #>[compile] with the @-s@ option.
22
+ ]
23
+
24
+ ref_config[document.subtitle|
25
+ The subtitle of the document, displayed using the %>[subtitle].
26
+ ]
27
+ ref_config[document.title|
28
+ The title of the document, displayed using the %>[title].
29
+ ]
30
+ ]
31
+ ] --[End document section]
32
+
33
+ section[header[@filters.*@]
34
+ config_table[
35
+ ref_config[filters.by_file_extension|
36
+ If set to @true@, a filter macro is applied to included files, based on their extensions (\.fmi[including files|#incl]).
37
+ ]
38
+ ref_config[filters.markdown.converter|
39
+ The name of the markdown converter to use with the %>[markdown]. It can be set to one of the following values:
40
+ * BlueCloth
41
+ * RDiscount
42
+ * Maruku
43
+ * Kramdown
44
+
45
+ If not set, Glyph tests for the presence of each gem in the same order, until one is found.
46
+ ]
47
+ ref_config[filters.redcloth.restrictions|
48
+ An @Array@ containing restrictions applied to RedCloth, used by the %>[textile] (see =>[http://redcloth.rubyforge.org/classes/RedCloth/TextileDoc.html|RedCloth Documentation] for more information).
49
+ ]
50
+ ref_config[filters.target|
51
+ The output target for filters. It can be set to @html@ (for RedCloth and MarkDown) or @latex@ (RedCloth-only).
52
+ ]
53
+ ]
54
+ ] --[End filters section]
55
+
56
+
57
+ section[header[@highlighters.*@|s_highlighters]
58
+
59
+ config_table[
60
+ ref_config[highlighters.coderay.*|
61
+ Some &[coderay]-specific =>[http://coderay.rubychan.de/doc/classes/CodeRay/Encoders/HTML.html|options].
62
+ ]
63
+ ref_config[highlighters.current|
64
+ The current highlighter to use. It can be set to @coderay@ or @ultraviolet@
65
+ ]
66
+ ref_config[highlighters.target|
67
+ The target output of the =>[#s_highlighters_current|current highlighter]. It can be set to anything the highlighter supports.
68
+ ]
69
+ ref_config[highlighters.ultraviolet.line_numbers|
70
+ Whether the &[uv] highlighter should display line numbers or not.
71
+ ]
72
+ ref_config[highlighters.ultraviolet.theme|
73
+ The theme used by the &[uv] highlighter.
74
+ ]
75
+ ]
76
+
77
+ ] --[End highlighters section]
78
+
79
+ section[header[@structure.*@]
80
+ The following configuration settings are used internally by Glyph and should not be changed by the user.
81
+
82
+ config_table[
83
+ ref_config[structure.backmatter|
84
+ The section types used in the document backmatter.
85
+ ]
86
+ ref_config[structure.bodymatter|
87
+ The section types used in the document bodymatter.
88
+ ]
89
+ ref_config[structure.frontmatter|
90
+ The section types used in the document frontmatter.
91
+ ]
92
+ ref_config[structure.hidden|
93
+ The section types that will not be shown in the Table of Contents.
94
+ ]
95
+ ref_config[structure.special|
96
+ The section types that will be considered _special_ and whose children will not be included in the Table of Contents.
97
+ ]
98
+ ]
99
+ ] --[End structure section]
100
+
101
+ section[header[@tools.*@]
102
+ config_table[
103
+ ref_config[tools.pdf_generator|
104
+ The external program used to generate PDF files. It can only be set to @prince@.
105
+ ]
106
+ ]
107
+ ] --[End tools section]
108
+
@@ -0,0 +1,378 @@
1
+ section[header[Common Macros]
2
+
3
+ ref_macro[and|
4
+ Conditional @and@ operator, to be used with the %>[condition].
5
+
6
+ example[=?[and[true\|false]\|This is never displayed.]=]
7
+ ]
8
+
9
+ ref_macro[comment|
10
+ Evaluates to nothing. Used to add comments in a Glyph document that will not be displayed in output files.
11
+
12
+ aliases[--]
13
+ example[=--[This is a comment. It will not be displayed in the output]=]
14
+ ]
15
+
16
+ ref_macro[condition|
17
+ Tests a conditional expression (first parameter), and evaluates to the second parameter if the condition is satisfied. If the second parameter is an %>[escape] macro, its contents are unescaped and interpreted only if the condition is satisfied. For more information, see =>[#cond_macros].
18
+
19
+ aliases[?]
20
+
21
+ *Examples*
22
+
23
+ See any of the following:
24
+ * %>[and]
25
+ * %>[or]
26
+ * %>[not]
27
+ * %>[match]
28
+ * %>[eq]
29
+
30
+ ]
31
+
32
+ ref_macro[config|
33
+ Evaluates to the configuration setting referenced by its value.
34
+
35
+ aliases[$]
36
+ example[=$[document.author]=]
37
+ ]
38
+
39
+ ref_macro[config:|
40
+ Sets the value of a configuration setting.
41
+
42
+ aliases[$:]
43
+
44
+ example[=$:[document.draft\|true]=]
45
+
46
+ ]
47
+ ref_macro[decode|
48
+ Decodes some text that was previously encoded (see %>[encode]). fmi[this topic|#encode_decode].
49
+
50
+ aliases[**]
51
+
52
+ example[=*[\=note‡\.‡¤\.91\.¤‡\.‡This will not be evaluated‡\.‡¤\.93\.¤‡\.‡\=]=]
53
+
54
+ ]
55
+
56
+ ref_macro[encode|
57
+ Encodes some Glyph code to prevent its evaluation, so that it can be decoded (and interpreted) later on (see the %>[decode]). fmi[this topic|#encode_decode].
58
+
59
+ aliases[*]
60
+
61
+ example[=*[\=note[This will not be evaluated]\=]=]
62
+
63
+ ]
64
+
65
+ ref_macro[eq|
66
+ Conditional equality operator, to be used with the %>[condition].
67
+
68
+ example[=?[eq[$[document.draft]\|true]\|This is displayed only in draft documents.]=]
69
+ ]
70
+
71
+ ref_macro[escape|
72
+ Evaluates to its value. Commonly used with the escaping delimiters codeph[\[\=] and codeph[\=\]].
73
+
74
+ aliases[.]
75
+ example[=.\[=Macros are escaped here =>[#test].=\]=]
76
+ ]
77
+
78
+ ref_macro[include|
79
+ Evaluates to the contents of a text file stored in the @text/@ directory referenced by its value. If &[filter_by_ext], filters the contents of the file using the =>[#f_macros|filter macro] corresponding to the file extension.
80
+
81
+ aliases[@]
82
+ example[=@[introduction.textile]=]
83
+ ]
84
+
85
+ ref_macro[match|
86
+ Evaluates to @true@ if the first parameter matches the second, an empty string otherwise. The second parameter must be a valid Ruby-compatible regular expression. This macro must be used with the %>[condition].
87
+
88
+ example[=?[match[Hello!\|/^hell/i]\|This is always displayed]=]
89
+ ]
90
+
91
+ ref_macro[macro:|
92
+ Defines a macro.
93
+
94
+ note[The new macro &[only_after_declaration].]
95
+
96
+ aliases[%:]
97
+
98
+ example[=%:[test\|"<em>test: #@value</em>"]=]
99
+
100
+ ]
101
+
102
+ ref_macro[not|
103
+ Conditional @and@ operator, to be used with the %>[condition].
104
+
105
+ example[=?[not[false]\|This is always displayed.]=]
106
+ ]
107
+
108
+ ref_macro[or|
109
+ Conditional @or@ operator, to be used with the %>[condition].
110
+
111
+ example[=?[or[true\|false]\|This is always displayed.]=]
112
+ ]
113
+
114
+ ref_macro[ruby|
115
+ Evaluates its value as Ruby code (using @Kernel#instance_eval@).
116
+
117
+ aliases[%]
118
+ examples[=
119
+ %[Time.now]
120
+ %[Glyph::VERSION]
121
+ =]
122
+ ]
123
+
124
+ ref_macro[snippet|
125
+ Evaluates to the snippet referenced by its value.
126
+
127
+ aliases[&]
128
+ example[=&[glang]=]
129
+ ]
130
+
131
+ ref_macro[snippet:|
132
+ Defines a snippet.
133
+
134
+ note[The new snippet &[only_after_declaration].]
135
+
136
+ aliases[&:]
137
+
138
+ example[=&:[test\|This is a test]=]
139
+
140
+ ]
141
+
142
+ ref_macro[todo|
143
+ Saves the value as a TODO item, which can be printed using the #>[todo] or included in the document if the $>[document.draft] is set to @true@.
144
+
145
+ example[=todo[Remember to do this.]=]
146
+ ]
147
+
148
+ ] --[End common macros]
149
+
150
+ section[header[Filter Macros|f_macros]
151
+
152
+ ref_macro[markdown|
153
+ Uses a markdown converter (BlueCloth, RDiscount, Maruku or Kramdown) to transform the value into HTML if the $>[filters.target] is set to @html@.
154
+
155
+ &[called_on_files] with a @.markdown@ or a @.md@ extension.
156
+
157
+ example[=markdown[This is *emphasized* text.]=]
158
+ ]
159
+
160
+ ref_macro[textile|
161
+ Uses the RedCloth gem to transform the value into HTML or LaTeX, depending on the value of the $>[filters.target].
162
+
163
+ &[called_on_files] with a @.textile@ extension.
164
+
165
+ example[=textile[This is a *strong emphasis*.]=]
166
+ ]
167
+
168
+ ] --[End filter macros]
169
+
170
+ section[header[Block Macros]
171
+
172
+ ref_macro[box|
173
+ Creates a titled box (@<div>@ tag).
174
+
175
+ *Example:*
176
+
177
+ code[=
178
+ box[Why boxes?\|
179
+ Boxes can be used to make a section of text stand out from the rest of the document.
180
+ ]
181
+ =]
182
+ ]
183
+
184
+ ref_macro[code|
185
+ Used to render a block of code within @<pre>@ and @<code>@ tags.
186
+ * For inline code, see the %>[codeph].
187
+ * For code highlighting, see the %>[highlight].
188
+
189
+ *Example:*
190
+
191
+ code[=
192
+ code[
193
+ def hello
194
+ puts "Hello World"
195
+ end
196
+ ]
197
+ =]
198
+
199
+ ]
200
+
201
+ ref_macro[fig|
202
+ Includes an image in the document, with an optional caption.
203
+
204
+ examples[=
205
+ fig[diagram.png]
206
+ fig[graph.png\|Monthly pageviews]
207
+ =]
208
+ ]
209
+
210
+ ref_macro[highlight|
211
+ Highlights a piece of source code (second parameter) according to the specified language (first parameter). fmi[code highligting|#source_code].
212
+
213
+ *Example:*
214
+
215
+ code[=
216
+ highlight[ruby\|
217
+ def hello
218
+ puts "Hello World"
219
+ end
220
+ ]
221
+ =]
222
+
223
+ ]
224
+
225
+ ref_macro[img|
226
+ Includes an image in the document, optionally scaled according to the specified width and height. The image must be stored within the @images/@ directory of the current project.
227
+
228
+ examples[=
229
+ img[icon.png]
230
+ img[holidays/landscape.jpg\|70%]
231
+ img[logo.svg\|50%\|50%]
232
+ =]
233
+ ]
234
+
235
+ ref_macro[note|
236
+ Creates a note @div@ containing the value.
237
+
238
+ aliases[important, caution, tip]
239
+ example[=note[This is a note.]=]
240
+ ]
241
+
242
+ ref_macro[pubdate|
243
+ Evaluates to a date string (in the format: _current-month_ _current-year_; or _%B_ _%Y_), within a @<div>@ tag.
244
+
245
+ example[=pubdate[]=]
246
+ ]
247
+
248
+ ref_macro[subtitle|
249
+ Renders the subtitle of the document (based on the $>[document.subtitle]) within a @<h2>@ tag.
250
+
251
+ example[=subtitle[]=]
252
+ ]
253
+
254
+ ref_macro[table|
255
+ Evaluates to an HTML table. Used in conjunction with the =>[#m_tr|@tr@], =>[#m_td|@td@] and =>[#m_th|@th@] macros.
256
+
257
+ *Example:*
258
+
259
+ code[=
260
+ table[
261
+ tr[
262
+ th[Name]
263
+ th[Value]
264
+ ]
265
+ tr[
266
+ td[A]
267
+ td[1]
268
+ ]
269
+ tr[
270
+ td[B]
271
+ td[2]
272
+ ]
273
+ ]
274
+ =]
275
+
276
+ ]
277
+
278
+ ref_macro[td|See =>[#m_table].]
279
+
280
+ ref_macro[title|
281
+ Renders the title of the document (based on the $>[document.title]) within a @<h1>@ tag.
282
+
283
+ example[=title[]=]
284
+ ]
285
+
286
+ ref_macro[th|See =>[#m_table].]
287
+ ref_macro[tr|See =>[#m_table].]
288
+
289
+ ] --[End block macros]
290
+
291
+ section[header[Inline Macros]
292
+
293
+ ref_macro[anchor|
294
+ Creates a named anchor (or bookmark).
295
+
296
+ aliases[bookmark, #]
297
+ example[=#[test\|Test Bookmark]=]
298
+ ]
299
+
300
+ ref_macro[codeph|
301
+ Wraps the value in a @<code>@ tag.
302
+
303
+ example[=codeph[Kernel.instance_eval]=]
304
+
305
+ ]
306
+
307
+ ref_macro[draftcomment|
308
+ If the $>[document.draft] is set to @true@, displays a draft comment within the document.
309
+
310
+ aliases[dc]
311
+
312
+ example[=dc[This is printed only in draft documents.]=]
313
+
314
+ ]
315
+
316
+ ref_macro[fmi|
317
+ Creates a _For More Information_ link (for an example usage, see the %>[link]).
318
+
319
+ example[=fmi[creating links\|#links]=]
320
+ ]
321
+
322
+ ref_macro[link|
323
+ Creates an hyperlink (\.fmi[creating links|#links]).
324
+
325
+ aliases[\.=>]
326
+ examples[=
327
+ =>[#introduction]
328
+ =>[#troub\|Troubleshooting]
329
+ =>[http://www.h3rald.com\|H3RALD.com]
330
+ =]
331
+ ]
332
+
333
+ ] --[End inline macros]
334
+
335
+ section[header[Structure Macros]
336
+
337
+ ref_macro[body|
338
+ Creates a @<body>@ tag.
339
+ ]
340
+
341
+ ref_macro[div|
342
+ Creates a @<div>@ tag.
343
+
344
+ *Aliases:* codeph[%[=Glyph['structure'].values.flatten.uniq.map{\|a\| a.to_s }.push("section").sort.join(', ')=]]
345
+ ]
346
+
347
+ ref_macro[document|
348
+ The root macro used in every Glyph document. It creates an @<html>@ tag.
349
+ ]
350
+
351
+ ref_macro[head|
352
+ Creates a @<head>@ tag, pre-populated with @title@ and author/copyright @<meta>@ tags.
353
+ ]
354
+
355
+ ref_macro[header|
356
+ Creates an @h2@, @h3@, @h4@, etc. header (\.fmi[using headers|#sec_head]).
357
+
358
+ examples[=
359
+ header[Introduction]
360
+ header[Getting Started\|gs]
361
+ =]
362
+ ]
363
+
364
+ ref_macro[section|See =>[#m_div].]
365
+
366
+ ref_macro[style|
367
+ Embeds the content of a CSS or Sass file within a @<style>@ tag (\.fmi[stylesheets|#stylesheets]).
368
+
369
+ example[=style[default.css]=]
370
+ ]
371
+
372
+ ref_macro[toc|
373
+ Generates a _Table of Contents_ based on how sections and headers are nested in the current document.
374
+
375
+ example[=toc[]=]
376
+ ]
377
+
378
+ ] --[End structure macros]