glyph 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/Rakefile +19 -40
  2. data/benchmark.rb +1 -2
  3. data/book/config.yml +8 -8
  4. data/book/document.glyph +18 -19
  5. data/book/images/glyph/commands_tasks.png +0 -0
  6. data/book/lib/layouts/bookindex.glyph +113 -111
  7. data/book/lib/layouts/bookpage.glyph +112 -108
  8. data/book/lib/macros/reference.rb +2 -2
  9. data/book/lib/tasks/tasks.rake +1 -1
  10. data/book/text/acknowledgements.glyph +1 -0
  11. data/book/text/changelog.glyph +140 -112
  12. data/book/text/compiling/compiling.glyph +36 -24
  13. data/book/text/compiling/lite_mode.glyph +11 -11
  14. data/book/text/compiling/programmatic_usage.glyph +57 -57
  15. data/book/text/config/document.glyph +7 -1
  16. data/book/text/config/options.glyph +5 -3
  17. data/book/text/config/output.glyph +41 -8
  18. data/book/text/extending/bookmarks_headers.glyph +13 -11
  19. data/book/text/extending/command.glyph +1 -1
  20. data/book/text/extending/commands_tasks.glyph +2 -2
  21. data/book/text/extending/internals.glyph +29 -29
  22. data/book/text/extending/interpreting.glyph +48 -9
  23. data/book/text/extending/macro_def.glyph +80 -32
  24. data/book/text/extending/output_format.glyph +2 -2
  25. data/book/text/extending/placeholders.glyph +27 -15
  26. data/book/text/extending/validators.glyph +1 -1
  27. data/book/text/getting_started/configuration.glyph +1 -1
  28. data/book/text/getting_started/create_project.glyph +4 -5
  29. data/book/text/getting_started/structure.glyph +2 -2
  30. data/book/text/macros/macros_core.glyph +341 -199
  31. data/book/text/macros/macros_filters.glyph +1 -1
  32. data/book/text/macros/macros_inline.glyph +3 -3
  33. data/book/text/macros/macros_structure.glyph +1 -1
  34. data/book/text/ref_commands.glyph +98 -93
  35. data/book/text/snippets.glyph +18 -0
  36. data/book/text/stats/bookmarks.glyph +16 -16
  37. data/book/text/stats/links.glyph +23 -23
  38. data/book/text/stats/macros.glyph +14 -14
  39. data/book/text/stats/snippets.glyph +26 -26
  40. data/book/text/stats/stats.glyph +14 -15
  41. data/book/text/text_editing/attribute_intro.glyph +8 -8
  42. data/book/text/text_editing/code.glyph +16 -16
  43. data/book/text/text_editing/conditionals.glyph +12 -13
  44. data/book/text/text_editing/esc_quot.glyph +3 -3
  45. data/book/text/text_editing/evaluation.glyph +57 -3
  46. data/book/text/text_editing/inclusions.glyph +34 -25
  47. data/book/text/text_editing/macro_composition.glyph +28 -0
  48. data/book/text/text_editing/macro_intro.glyph +4 -4
  49. data/book/text/text_editing/section_aliases.glyph +23 -23
  50. data/book/text/text_editing/sections.glyph +22 -22
  51. data/book/text/text_editing/stylesheets.glyph +33 -33
  52. data/book/text/text_editing/topics.glyph +6 -6
  53. data/book/text/text_editing/xml_fallback.glyph +1 -1
  54. data/book/text/troubleshooting/errors_command.glyph +4 -4
  55. data/book/text/troubleshooting/errors_generic.glyph +16 -10
  56. data/book/text/troubleshooting/errors_macro.glyph +18 -21
  57. data/book/text/troubleshooting/errors_parser.glyph +7 -7
  58. data/config.yml +51 -29
  59. data/document.glyph +18 -18
  60. data/glyph.gemspec +39 -287
  61. data/layouts/web5/topic.glyph +1 -1
  62. data/lib/glyph.rb +42 -10
  63. data/lib/glyph/analyzer.rb +5 -2
  64. data/lib/glyph/bookmark.rb +3 -1
  65. data/lib/glyph/commands.rb +11 -9
  66. data/lib/glyph/commands/add.rb +3 -1
  67. data/lib/glyph/commands/compile.rb +10 -7
  68. data/lib/glyph/commands/config.rb +7 -5
  69. data/lib/glyph/commands/init.rb +2 -0
  70. data/lib/glyph/commands/outline.rb +2 -0
  71. data/lib/glyph/commands/stats.rb +3 -0
  72. data/lib/glyph/commands/todo.rb +2 -0
  73. data/lib/glyph/config.rb +2 -0
  74. data/lib/glyph/document.rb +34 -9
  75. data/lib/glyph/interpreter.rb +2 -0
  76. data/lib/glyph/macro.rb +97 -25
  77. data/lib/glyph/macro_validators.rb +9 -6
  78. data/lib/glyph/node.rb +3 -1
  79. data/lib/glyph/parser.rb +68 -33
  80. data/lib/glyph/reporter.rb +3 -1
  81. data/lib/glyph/syntax_node.rb +23 -28
  82. data/lib/glyph/system_extensions.rb +21 -0
  83. data/lib/glyph/utils.rb +24 -4
  84. data/macros/block.rb +111 -0
  85. data/macros/core.rb +163 -33
  86. data/macros/filters.rb +3 -2
  87. data/macros/inline.rb +97 -0
  88. data/macros/reps/html.rb +180 -0
  89. data/macros/reps/html5.rb +100 -0
  90. data/macros/reps/web.rb +4 -0
  91. data/macros/reps/web5.rb +4 -0
  92. data/macros/structure.rb +229 -0
  93. data/macros/xml.rb +29 -24
  94. data/spec/config.yml +7 -0
  95. data/spec/files/article.glyph +2 -2
  96. data/spec/files/web_doc.glyph +9 -5
  97. data/spec/lib/commands_spec.rb +13 -9
  98. data/spec/lib/config_spec.rb +2 -2
  99. data/spec/lib/document_spec.rb +10 -0
  100. data/spec/lib/glyph_spec.rb +30 -8
  101. data/spec/lib/macro_spec.rb +39 -4
  102. data/spec/lib/macro_validators_spec.rb +3 -4
  103. data/spec/lib/parser_spec.rb +7 -0
  104. data/spec/lib/reporter_spec.rb +1 -0
  105. data/spec/lib/syntax_node_spec.rb +40 -6
  106. data/spec/macros/core_spec.rb +154 -21
  107. data/spec/macros/filters_spec.rb +1 -1
  108. data/spec/macros/html5_spec.rb +4 -5
  109. data/spec/macros/macros_spec.rb +6 -7
  110. data/spec/macros/web5_spec.rb +3 -3
  111. data/spec/macros/web_spec.rb +10 -7
  112. data/spec/macros/xml_spec.rb +11 -2
  113. data/spec/spec_helper.rb +11 -5
  114. data/spec/tasks/generate_spec.rb +40 -5
  115. data/spec/tasks/load_spec.rb +1 -13
  116. data/styles/coderay.css +147 -38
  117. data/styles/default.css +19 -22
  118. data/styles/pagination.css +30 -30
  119. data/tasks/generate.rake +54 -18
  120. data/tasks/load.rake +9 -24
  121. data/tasks/project.rake +0 -2
  122. metadata +208 -207
  123. data/.gitignore +0 -7
  124. data/VERSION +0 -1
  125. data/book/snippets.yml +0 -18
  126. data/lib/glyph/macro_helpers.rb +0 -282
  127. data/macros/html/block.rb +0 -124
  128. data/macros/html/inline.rb +0 -42
  129. data/macros/html/structure.rb +0 -191
  130. data/macros/html5/block.rb +0 -69
  131. data/macros/html5/inline.rb +0 -24
  132. data/macros/html5/structure.rb +0 -140
@@ -4,11 +4,11 @@ The most important concept to grasp about Glyph is the concept of _macro_.
4
4
 
5
5
  A Glyph macro is, in a nutshell, an identifier of some kind that wraps a value or parameters within square brackets. More specifically:
6
6
  * The macro identifier can contain _any_ character except for: @\[@, @\]@, @\\@, @\|@, code[@] or spaces.
7
- * The delimiters can be either @\[@ and @\]@ or @\[=@ and @=\]@ (\.fmi[differences between delimiters|#esc_quot]).
8
- * The value can be anything, even other macros. If a macro supports more than one parameter, they must be separated with @\|@. For example, the %>[link] can take an optional second parameter for the link text: @\..[=link[#link_id\|This is the link text]=]@.
7
+ * The delimiters can be either @\[@ and @\]@ or @\[=@ and @=\]@ (\/fmi[differences between delimiters|#esc_quot]).
8
+ * The value can be anything, even other macros. If a macro supports more than one parameter, they must be separated with @\|@. For example, the %>[link] can take an optional second parameter for the link text: @\/.[=link[#link_id\|This is the link text]=]@.
9
9
  * A macro can also have _attributes_, which look exactly like macros but their identifier starts with a code[@].
10
10
 
11
11
  A macro can often have one or more aliases. For example, @=>@ is an alias for the %>[link], so the following macro calls are equivalent:
12
- * code[=\.=>[#test\|Test Section]=]
13
- * code[=\.link[#test\|Test Section]=]
12
+ * code[=\/=>[#test\|Test Section]=]
13
+ * code[=\/link[#test\|Test Section]=]
14
14
  ]
@@ -1,28 +1,28 @@
1
- txt[
1
+ txt[
2
2
  There are _a lot_ of macros that can be used in the same way as @section@, one for each element commonly used in =>[http://en.wikipedia.org/wiki/Book_design|book design].
3
3
 
4
4
  The following table lists the identifiers of all section-like macros, divided according to the part of the book they should be placed in:
5
- ]
6
- table[
7
- tr[
8
- th[Frontmatter]
9
- td[txt[@imprint@ ^†^, @dedication@ ^†^, @inspiration@ ^†^, @foreword@ ^‡^, @introduction@ ^‡^, @acknowledgement@ ^‡^, @prologue@ ^‡^, @toc@ ^*^]]
10
- ]
11
- tr[
12
- th[Bodymatter]
13
- td[txt[@volume@, @book@, @part@, @chapter@]]
14
- ]
15
- tr[
16
- th[Backmatter]
17
- td[txt[@epilogue@ ^‡^, @afterword@ ^‡^, @postscript@ ^†^, @appendix@, @addendum@ ^‡^, @glossary@ ^**‡^, @colophon@ ^†^, @bibliography@ ^**‡^, @promotion@ ^†^, @references@ ^**‡^, @index@ ^**‡^, @lot@ ^**‡^, @lof@ ^**‡^]]
18
- ]
19
- ]
5
+ ]
6
+ table[
7
+ tr[
8
+ th[Frontmatter]
9
+ td[txt[@imprint@ ^†^, @dedication@ ^†^, @inspiration@ ^†^, @foreword@ ^‡^, @introduction@ ^‡^, @acknowledgement@ ^‡^, @prologue@ ^‡^, @toc@ ^*^]]
10
+ ]
11
+ tr[
12
+ th[Bodymatter]
13
+ td[txt[@volume@, @book@, @part@, @chapter@]]
14
+ ]
15
+ tr[
16
+ th[Backmatter]
17
+ td[txt[@epilogue@ ^‡^, @afterword@ ^‡^, @postscript@ ^†^, @appendix@, @addendum@ ^‡^, @glossary@ ^**‡^, @colophon@ ^†^, @bibliography@ ^**‡^, @promotion@ ^†^, @references@ ^**‡^, @index@ ^**‡^, @lot@ ^**‡^, @lof@ ^**‡^]]
18
+ ]
19
+ ]
20
20
 
21
- p[strong[*]: The %>[toc] is used to generate the Table of Contents automatically, and it takes no parameters.]
22
- p[strong[**]: This macro is likely to be extended in future versions to generate/aggregate content automatically.]
23
- p[strong[†]: This section is not listed in the Table of Contents.]
24
- p[strong[‡]: Any subsection of this section is not listed in the Table of Contents.]
21
+ p[strong[*]: The %>[toc] is used to generate the Table of Contents automatically, and it takes no parameters.]
22
+ p[strong[**]: This macro is likely to be extended in future versions to generate/aggregate content automatically.]
23
+ p[strong[†]: This section is not listed in the Table of Contents.]
24
+ p[strong[‡]: Any subsection of this section is not listed in the Table of Contents.]
25
25
 
26
- note[
27
- code[frontmatter], code[bodymatter] and code[backmatter] are also macro identifiers, but they are also exposed as attributes for the %>[book] and the %>[article], so if you're using either of these two macros as your root macro for your document, there's no need to use them explicitly.
28
- ]
26
+ note[
27
+ code[frontmatter], code[bodymatter] and code[backmatter] are also macro identifiers, but they are also exposed as attributes for the %>[book] and the %>[article], so if you're using either of these two macros as your root macro for your document, there's no need to use them explicitly.
28
+ ]
@@ -1,7 +1,7 @@
1
1
 
2
- p[Glyph documents are normally organized as a hierarchical tree of nested chapters, appendixes, sections, etc. To define a section, use the %>[section] (aliased by code[§]), like so:]
2
+ p[Glyph documents are normally organized as a hierarchical tree of nested chapters, appendixes, sections, etc. To define a section, use the %>[section] (aliased by code[§]), like so:]
3
3
 
4
- highlight[=html|
4
+ highlight[=html|
5
5
  section[
6
6
  @title[Section #1]
7
7
  Write the section contents here...
@@ -10,13 +10,13 @@ Write the section contents here...
10
10
  This section is nested into the previous one.
11
11
  ] --[End of Section #2]
12
12
  ] --[End of Section #1]
13
- =]
13
+ =]
14
14
 
15
- txt[This example defines two nested sections. If the code[@title] attribute is specified like in this case, it will be converted to a proper HTML header and it will appear in the Table of Contents (see the %>[toc]).
15
+ txt[This example defines two nested sections. If the code[@title] attribute is specified like in this case, it will be converted to a proper HTML header and it will appear in the Table of Contents (see the %>[toc]).
16
16
 
17
17
  Note an important difference from HTML: there is no need for an explicit level for the headers, as it will be determined at runtime when the document is compiled, based on how sections are nested. The previous code snippet (taken as it is), for example, will be transformed into the following HTML code:]
18
18
 
19
- highlight[=html|
19
+ highlight[=html|
20
20
  <div class="section">
21
21
  <h2>Section #1</h2>
22
22
  <p>Write the section contents here...</p>
@@ -25,30 +25,30 @@ Note an important difference from HTML: there is no need for an explicit level f
25
25
  <p>This section is nested in the previous one</p>
26
26
  </div>
27
27
  </div>
28
- =]
28
+ =]
29
29
 
30
- txt[
30
+ txt[
31
31
  By default, in Glyph the first header level is _2_, so the two headers are rendered as @h2@ and @h3@, respectively (@--\[...\]@ macros are _comments_, therefore they are not included in the final output).
32
- ]
32
+ ]
33
33
  section[
34
- @title[Markup-aware sections]
35
- txt[Although Glyph can be used on its own to produce valid HTML or XML code, you may often want to use &[markups] to save some typing. Typically, you'll end up writing a lot of code like this:]
36
-
37
- highlight[=html|
34
+ @title[Markup-aware sections]
35
+ txt[Although Glyph can be used on its own to produce valid HTML or XML code, you may often want to use &[markups] to save some typing. Typically, you'll end up writing a lot of code like this:]
36
+
37
+ highlight[=html|
38
38
  section[
39
- @title[My Textile section]
40
- textile[
39
+ @title[My Textile section]
40
+ textile[
41
41
  Textile markup can be used _here_.
42
- ]
42
+ ]
43
43
  ]
44
- =]
45
- txt[To save you even more typing, you can use the %>[textile_section] (aliased by @txt_section@ and @§txt@) and the %>[markdown_section] (aliased by @md_section@ and @§md@). By doing so, the previous code snippet can be written like this:]
46
- highlight[=html|
44
+ =]
45
+ txt[To save you even more typing, you can use the %>[textile_section] (aliased by @txt_section@ and @§txt@) and the %>[markdown_section] (aliased by @md_section@ and @§md@). By doing so, the previous code snippet can be written like this:]
46
+ highlight[=html|
47
47
  §txt[
48
- @title[My Textile section]
48
+ @title[My Textile section]
49
49
  Textile markup can be used _here_.
50
50
  ]
51
- =]
52
- tip[txt[On an Italian keyboard, you can type a @§@ character by pressing *SHIFT + &ugrave;*. Unfortunately, that's about the only useful thing an Italian keyboard does. If you use Vim, you can map it to some key sequence like @''s@, like this: @map! ''s <C-V>u00A7@.]]
51
+ =]
52
+ tip[txt[On an Italian keyboard, you can type a @§@ character by pressing *SHIFT + &ugrave;*. Unfortunately, that's about the only useful thing an Italian keyboard does. If you use Vim, you can map it to some key sequence like @''s@, like this: @map! ''s <C-V>u00A7@.]]
53
53
 
54
- ]
54
+ ]
@@ -1,34 +1,34 @@
1
- p[Currently, Glyph does not provide any native way to format text and pages. The reason is that there's absolutely no need for that: CSS does the job just fine. In particular, CSS3 offers specific attributes and elements that can be used specifically for paginated documents. That's no replacement for LaTeX by any means, but it is enough if you're not looking for advanced typographical features.]
2
- p[You can embed CSS files using the %>[style], like this:]
3
- p[code[= style[default.css] =]]
4
- txt[In this case, the %>[style] looks for a @default.css@ file in the @/styles@ folder of your Glyph project _and_ among the default Glyph stylesheets, and embeds it within a @<style>@ tag. If you supply a file with a @.sass@ or @.scss@ extension, it will interpret it as a Sass file and convert it to CSS automatically (if the _Haml_ gem is installed).]
5
- tip[
1
+ p[Currently, Glyph does not provide any native way to format text and pages. The reason is that there's absolutely no need for that: CSS does the job just fine. In particular, CSS3 offers specific attributes and elements that can be used specifically for paginated documents. That's no replacement for LaTeX by any means, but it is enough if you're not looking for advanced typographical features.]
2
+ p[You can embed CSS files using the %>[style], like this:]
3
+ p[code[= style[default.css] =]]
4
+ txt[In this case, the %>[style] looks for a @default.css@ file in the @/styles@ folder of your Glyph project _and_ among the default Glyph stylesheets, and embeds it within a @<style>@ tag. If you supply a file with a @.sass@ or @.scss@ extension, it will interpret it as a Sass file and convert it to CSS automatically (if the _Haml_ gem is installed).]
5
+ tip[
6
6
  By default, stylesheets are embedded within text files. If necessary, you can choose to link them or import them by changing the values of the $>[document.styles].
7
- ]
8
- section[
9
- @title[Default Stylesheets]
10
- @id[default_stylesheets]
11
- p[Glyph provides the following default stylesheets, that can be referenced directly using the %>[style]:]
12
- table[
13
- tr[
14
- th[File name]
15
- th[Notes]
16
- ]
17
- tr[
18
- td[code[default.css]]
19
- td[The stylesheet used for this book.]
20
- ]
21
- tr[
22
- td[code[pagination.css]]
23
- td[A CSS3-compliant stylesheet used for pagination, suitable for PDF generation using &[prince].]
24
- ]
25
- tr[
26
- td[code[coderay.css]]
27
- td[The default &[coderay] stylesheet, used for syntax highlighting.]
28
- ]
29
- tr[
30
- td[code[ultraviolet/*]]
31
- td[This folder contains the following &[uv] stylesheets, used for syntax highlighting: code[%[(Glyph::HOME/"styles/ultraviolet").children.sort.map{\|c\| c.basename}.join(", ")]]]
32
- ]
33
- ]
34
- ]
7
+ ]
8
+ section[
9
+ @title[Default Stylesheets]
10
+ @id[default_stylesheets]
11
+ p[Glyph provides the following default stylesheets, that can be referenced directly using the %>[style]:]
12
+ table[
13
+ tr[
14
+ th[File name]
15
+ th[Notes]
16
+ ]
17
+ tr[
18
+ td[code[default.css]]
19
+ td[The stylesheet used for this book.]
20
+ ]
21
+ tr[
22
+ td[code[pagination.css]]
23
+ td[A CSS3-compliant stylesheet used for pagination, suitable for PDF generation using &[prince].]
24
+ ]
25
+ tr[
26
+ td[code[coderay.css]]
27
+ td[The default &[coderay] stylesheet, used for syntax highlighting.]
28
+ ]
29
+ tr[
30
+ td[code[ultraviolet/*]]
31
+ td[This folder contains the following &[uv] stylesheets, used for syntax highlighting: code[%[(Glyph::HOME/"styles/ultraviolet").children.sort.map{\|c\| c.basename}.join(", ")]]]
32
+ ]
33
+ ]
34
+ ]
@@ -8,9 +8,9 @@ Glyph does not formally enforce the correctness of topic composition and usage,
8
8
  ]
9
9
  highlight[=html|
10
10
  section[
11
- @title[My First Topic]
12
- @id[first_topic]
13
- @src[test/first_topic.glyph]
11
+ @title[My First Topic]
12
+ @id[first_topic]
13
+ @src[test/first_topic.glyph]
14
14
  ]
15
15
  =]
16
16
  txt[
@@ -18,9 +18,9 @@ This is an ordinary section with a title and an explicit ID, but it has no conte
18
18
  ]
19
19
  highlight[=html|
20
20
  section[
21
- @title[My First Topic]
22
- @id[first_topic]
23
- include[test/first_topic.glyph]
21
+ @title[My First Topic]
22
+ @id[first_topic]
23
+ include[test/first_topic.glyph]
24
24
  ]
25
25
  =]
26
26
  txt[
@@ -59,7 +59,7 @@ table[@class[features]
59
59
  ]
60
60
  p[Basically, if the $>[options.xml_fallback] is set to code[true], any macro unknown to Glyph with at most one parameter will be converted to an XML tag with the same name and any attribute will be converted to the corresponding XML attribute.]
61
61
  important[While macro names and attributes are validated so that an error is returned if they contain illegal character, no check is performed against any particular XML schema.]
62
- txt[Additionally, it is possible to force macro-to-XML conversion by prepending an equal sign to any macro, so for example code[=\.=snippet[test]=] will be converted into @<snippet>test</snippet>@.]
62
+ txt[Additionally, it is possible to force macro-to-XML conversion by composing the name of a tag with the %>[xml], so for example code[=\/xml/snippet[test]=] will be converted into @<snippet>test</snippet>@.]
63
63
  section[
64
64
  @title[Blacklisted XML tags]
65
65
  @id[xml_blacklist]
@@ -1,5 +1,5 @@
1
1
  error_table[
2
- ref_error[Source file '\.em[source_file]' does not exist|
2
+ ref_error[Source file '\/em[source_file]' does not exist|
3
3
  Returned if Glyph is running in =>[#lite_mode|lite mode] and the specified source file was not found.
4
4
  ]
5
5
  ref_error[Source and destination file are the same|
@@ -17,7 +17,7 @@ No file name was specified for the #>[add].
17
17
  ref_error[Output target not specified|
18
18
  Returned if no target was specified for the #>[compile] _and_ if the $>[document.output] is not set.
19
19
  ]
20
- ref_error[Unknown output target '\.em[target_name]'|
20
+ ref_error[Unknown output target '\/em[target_name]'|
21
21
  An unsupported output target was specified for the #>[compile]. Only the following output targets are supported:
22
22
  ul[
23
23
  li[html]
@@ -27,10 +27,10 @@ An unsupported output target was specified for the #>[compile]. Only the followi
27
27
  ref_error[Too few/too many arguments|
28
28
  Returned if the #>[config] was used with no arguments or more than two arguments respectively.
29
29
  ]
30
- ref_error[Unknown setting '\.em[setting_name]'|
30
+ ref_error[Unknown setting '\/em[setting_name]'|
31
31
  The name of an unknown setting was specified for the #>[config].
32
32
  ]
33
- ref_error[Cannot reset '\.em[setting_name]' setting (system use only).|
33
+ ref_error[Cannot reset '\/em[setting_name]' setting (system use only).|
34
34
  Returned by the #>[config] when attempting to override a setting in the code[system.*] namespace.
35
35
  ]
36
36
  ]
@@ -1,9 +1,12 @@
1
1
  error_table[
2
- ref_error[Invalid alias: macro '\.em[macro_name]' already exists|
2
+ ref_error[Invalid alias: macro '\/em[macro_name]' already exists|
3
3
  The alias name supplied to the code[macro_alias] method has already been used for another macro or alias.
4
4
  ]
5
- ref_error[Undefined macro '\.em[macro_name]'|
5
+ ref_error[Undefined macro '\/em[macro_name]'|
6
6
  The document contains a macro that does not exist, i.e. it is not a standard or used-defined =>[#macro_ref|Glyph macro or alias].
7
+ ]
8
+ ref_error[No macro representation for '\/em[macro_name]'|
9
+ There is no valid macro representation for the specified macro.
7
10
  ]
8
11
  ref_error[An error occurred when generating _file-name_.pdf|
9
12
  Returned if Prince could not generate the PDF file or if Prince is not installed. Normally, Prince provides additional details on the specific error(s).
@@ -11,34 +14,37 @@ Returned if Prince could not generate the PDF file or if Prince is not installed
11
14
  ref_error[Glyph cannot generate PDF. Please specify a valid output.pdf.generator setting|
12
15
  Returned if the $>[output.pdf.generator] has not be set to a valid PDF renderer. Currently, the only supported values for this setting are code[prince] and code[wkhtmltopdf].
13
16
  ]
17
+ ref_error[Glyph cannot generate e-book. At present, output.\/em[ebook_format].generator can only be set to 'calibre'.|
18
+ Returned if the output.\/em[ebook_format].generator setting has not be set to @calibre@.
19
+ ]
14
20
  ref_error[The current directory is not a valid Glyph project|
15
21
  Returned if a glyph command was executed outside a valid glyph project directory.
16
22
  ]
17
23
  ref_error[Invalid snippet file|
18
24
  The code[snippet.yml] file contains invalid data. Most likely, it does not evaluate to a Ruby code[Hash].
19
25
  ]
20
- ref_error[Directory '\.em[directory_name]' is not empty|
26
+ ref_error[Directory '\/em[directory_name]' is not empty|
21
27
  Returned when executing the #>[init] in a directory that is not empty.
22
28
  ]
23
- ref_error[File '\.em[file_name]' already exists|
29
+ ref_error[File '\/em[file_name]' already exists|
24
30
  Returned if the name of an existing file was specified as a parameter for the #>[add].
25
31
  ]
26
- ref_error[Unknown macro '\.em[macro_name]'|
32
+ ref_error[Unknown macro '\/em[macro_name]'|
27
33
  Returned by the #>[stats] if the specified macro was not found.
28
34
  ]
29
- ref_error[Macro '\.em[macro_name]' is not used in this document|
35
+ ref_error[Macro '\/em[macro_name]' is not used in this document|
30
36
  Returned by the #>[stats] if the specified macro is defined but unused.
31
37
  ]
32
- ref_error[Bookmark '\.em[bookmark_name]' does not exist|
38
+ ref_error[Bookmark '\/em[bookmark_name]' does not exist|
33
39
  Returned by the #>[stats] if the specified bookmark does not exist.
34
40
  ]
35
- ref_error[No link matching /\.em[regexp]/ was found|
41
+ ref_error[No link matching /\/em[regexp]/ was found|
36
42
  Returned by the #>[stats] if the no link target matches the supplied regular expression.
37
43
  ]
38
- ref_error[Unknown snippet '\.em[snippet_name]'|
44
+ ref_error[Unknown snippet '\/em[snippet_name]'|
39
45
  Returned by the #>[stats] if the specified snippet was not found.
40
46
  ]
41
- ref_error[Snippet '\.em[snippet_name]' is not used in this document|
47
+ ref_error[Snippet '\/em[snippet_name]' is not used in this document|
42
48
  Returned by the #>[stats] if the specified snippet is defined but unused.
43
49
  ]
44
50
  ]
@@ -14,25 +14,25 @@ Where:
14
14
  * em[macro_value] is the value of the macro (shown only if Glyph is running in =>[#debug_switch|debug mode]).
15
15
  ]
16
16
  error_table[
17
- ref_error[Macro '\.em[name]' takes up to em[x] parameter(s) (\.em[y] given)|
17
+ ref_error[Macro '\/em[name]' takes up to em[x] parameter(s) (\/em[y] given)|
18
18
  Returned if the macro was called with extra parameters.
19
19
  ]
20
- ref_error[Macro '\.em[name]' takes at least em[x] parameter(s) (\.em[y] given)|
20
+ ref_error[Macro '\/em[name]' takes at least em[x] parameter(s) (\/em[y] given)|
21
21
  Returned if the macro was called with fewer parameters than expected.
22
22
  ]
23
- ref_error[Macro '\.em[name]' takes exactly em[x] parameter(s) (\.em[y] given)|
23
+ ref_error[Macro '\/em[name]' takes exactly em[x] parameter(s) (\/em[y] given)|
24
24
  Returned if the macro was called with a different number of parameters than.
25
25
  ]
26
26
  ref_error[Macro not available when compiling a single file.|
27
27
  Returned by the %>[include] if used in =>[#lite_mode|lite mode].
28
28
  ]
29
- ref_error[Filter macro '\.em[extension]' not available|
29
+ ref_error[Filter macro '\/em[extension]' not available|
30
30
  Returned by a filter macro if $>[options.filters_by_file_extension] is set to @true@, but the extension was not recognized.
31
31
  ]
32
32
  ref_error[Invalid regular expression: em[regexp]|
33
33
  Returned by the %>[match] if an invalid regular expression was supplied.
34
34
  ]
35
- ref_error[Macro '\.em[name]' takes no parameters (\.em[x] given)|
35
+ ref_error[Macro '\/em[name]' takes no parameters (\/em[x] given)|
36
36
  Returned if the macro was called with parameters but none are requested.
37
37
  ]
38
38
  ref_error[No highlighter installed. Please run: gem install coderay|
@@ -44,16 +44,16 @@ Returned by the %>[highlight] if $>[filters.highlighter] is set to @coderay@ but
44
44
  ref_error[UltraViolet highlighter not installed. Please run: gem install ultraviolet|
45
45
  Returned by the %>[highlight] if $>[filters.highlighter] is set to @ultraviolet@ but &[uv] is not installed.
46
46
  ]
47
- ref_error[Mutual Inclusion in parameter/attribute(\.em[name]): '\.em[value]'|
47
+ ref_error[Mutual Inclusion in parameter/attribute(\/em[name]): '\/em[value]'|
48
48
  Returned if a catch-22 situation occurs with macro inclusion, for example if the value of a snippet includes a reference to the same snippet.
49
49
  ]
50
- ref_error[Snippet '\.em[snippet_id]' does not exist|
50
+ ref_error[Snippet '\/em[snippet_id]' does not exist|
51
51
  Returned by the %>[snippet] if an invalid snippet ID was supplied.
52
52
  ]
53
- ref_error[File '\.em[file_name]' not found|
53
+ ref_error[File '\/em[file_name]' not found|
54
54
  Returned by the %>[include] if an invalid file was supplied.
55
55
  ]
56
- ref_error[Filter macro '\.em[macro_name]' not found|
56
+ ref_error[Filter macro '\/em[macro_name]' not found|
57
57
  Returned by the %>[include] if the $>[options.filters_by_file_extension] is set to @true@ but the file extension of the included file is not recognized as a filter macro.
58
58
  ]
59
59
  ref_error[RedCloth gem not installed. Please run: gem install RedCloth|
@@ -65,37 +65,34 @@ Returned by the %>[markdown] if no valid Markdown converter gem is installed. Gl
65
65
  ref_error[Image/Figure not found|
66
66
  Retured by the %>[image] or the %>[figure] respectively, if the specified image file could not be found within the code[images/] folder.
67
67
  ]
68
- ref_error[Bookmark '\.em[bookmark_name]' already exists|
68
+ ref_error[Bookmark '\/em[bookmark_name]' already exists|
69
69
  Returned by the %>[anchor] or by the %>[section] if the anchor ID supplied as attribute has already been used in the document.
70
70
  ]
71
- ref_error[Bookmark '\.em[bookmark_name]' already exists|
71
+ ref_error[Bookmark '\/em[bookmark_name]' already exists|
72
72
  Returned by the %>[link] if the anchor ID supplied as parameter has not been used in the document.
73
73
  ]
74
- ref_error[Stylesheet '\.em[file_name]' not found|
74
+ ref_error[Stylesheet '\/em[file_name]' not found|
75
75
  Returned by the %>[style] if the code[.css] or code[.sass] file supplied as parameter was not found in the code[styles/] directory.
76
76
  ]
77
77
  ref_error[Haml is not installed. Please run: gem install haml|
78
78
  Returned by the %>[style] if a code[.sass] file was passed as parameter but the Haml gem is not installed.
79
79
  ]
80
- ref_error[Invalid XML element: '\.em[element_name]'|
80
+ ref_error[Invalid XML element: '\/em[element_name]'|
81
81
  An invalid XML element name was supplied to the code[\|xml\|] system macro (see =>[#other_elements]).
82
82
  ]
83
- ref_error[Invalid XML element: '\.em[element_name]'|
83
+ ref_error[Invalid XML element: '\/em[element_name]'|
84
84
  An invalid XML attribute name was supplied to the code[\|xml\|] system macro (see =>[#other_elements]).
85
85
  ]
86
- ref_error[Macro '\.em[macro_name]' cannot be used in safe mode|
86
+ ref_error[Macro '\/em[macro_name]' cannot be used in safe mode|
87
87
  Returned if a forbidden macro was used in safe mode (see =>[#modes]).
88
88
  ]
89
- ref_error[Cannot reset 'system.\.em[setting_name]' setting (system use only).|
89
+ ref_error[Cannot reset 'system.\/em[setting_name]' setting (system use only).|
90
90
  Returned by the =>[#m_config_] when attempting to override a setting in the code[system.*] namespace.
91
91
  ]
92
- ref_error[Macro '\.em[macro_name]' cannot be defined by itself|
93
- Returned by the =>[#m_rewrite_] if it contains a macro with the same name.
94
- ]
95
- ref_error[Macro '\.em[macro_a]' must be within a '\.em[macro_b]' macro|
92
+ ref_error[Macro '\/em[macro_a]' must be within a '\/em[macro_b]' macro|
96
93
  Returned if a macro was used in the wrong place.
97
94
  ]
98
- ref_error[Macro '\.em[macro_a]' must not be within a '\.em[macro_b]' macro|
95
+ ref_error[Macro '\/em[macro_a]' must not be within a '\/em[macro_b]' macro|
99
96
  Returned if a macro was used in the wrong place.
100
97
  ]
101
98
  ]
@@ -1,23 +1,23 @@
1
1
  error_table[
2
- ref_error[Macro delimiter '\.em[delimiter]' not escaped|
2
+ ref_error[Macro delimiter '\/em[delimiter]' not escaped|
3
3
  Returned in case of unescaped code[\[]or code[\]].
4
4
  ]
5
5
  ref_error[em[macro_name]\[...\] - A macro cannot start with '@' or a digit.|
6
6
  Returned if an invalid macro name was specified.
7
7
  ]
8
- ref_error[Macro '\.em[macro_name]' not closed|
9
- Returned if a macro lacks its end delimiter code[\.=\]].
8
+ ref_error[Macro '\/em[macro_name]' not closed|
9
+ Returned if a macro lacks its end delimiter code[\/=\]].
10
10
  ]
11
- ref_error[Escaping macro '\.em[macro_name]' not closed|
12
- Returned if an escaping macro lacks its end delimiter code[\.=\]].
11
+ ref_error[Escaping macro '\/em[macro_name]' not closed|
12
+ Returned if an escaping macro lacks its end delimiter code[\/=\]].
13
13
  ]
14
- ref_error[Attribute @\.em[attribute_name] not closed|
14
+ ref_error[Attribute @\/em[attribute_name] not closed|
15
15
  Returned if a macro attribute lacks its end delimiter code[\]].
16
16
  ]
17
17
  ref_error[Attributes cannot be nested|
18
18
  Returned if a macro attribute was found immediately within another attribute.
19
19
  ]
20
- ref_error[Cannot nest escaping macro '\.em[macro_name_1]' within escaping macro '\.em[macro_name_2]'|
20
+ ref_error[Cannot nest escaping macro '\/em[macro_name_1]' within escaping macro '\/em[macro_name_2]'|
21
21
  Returned if an escaping macro contains another escaping macro.
22
22
  ]
23
23
  ref_error[Parameter delimiter '\|' not allowed here|