glyph 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS.textile +8 -0
- data/CHANGELOG.textile +260 -0
- data/LICENSE.textile +26 -0
- data/README.textile +49 -21
- data/Rakefile +17 -7
- data/VERSION +1 -1
- data/book/config.yml +11 -5
- data/book/document.glyph +24 -13
- data/book/lib/macros/reference.rb +41 -14
- data/book/output/html/glyph.html +2298 -687
- data/book/output/pdf/glyph.pdf +6218 -2698
- data/book/script/authors +1 -0
- data/book/script/changelog +1 -0
- data/book/script/compile.rb +8 -0
- data/book/script/license +1 -0
- data/book/script/prof +1 -0
- data/book/script/prof_results.htm +21079 -0
- data/book/script/readme +1 -0
- data/book/snippets.yml +3 -4
- data/book/text/acknowledgement.glyph +8 -0
- data/book/text/authoring.glyph +548 -0
- data/book/text/changelog.glyph +76 -0
- data/book/text/extending.glyph +224 -0
- data/book/text/{getting_started.textile → getting_started.glyph} +30 -24
- data/book/text/{introduction.textile → introduction.glyph} +22 -12
- data/book/text/license.glyph +21 -0
- data/book/text/{ref_commands.textile → ref_commands.glyph} +30 -8
- data/book/text/ref_config.glyph +108 -0
- data/book/text/ref_macros.glyph +378 -0
- data/book/text/troubleshooting.glyph +179 -0
- data/config.yml +16 -4
- data/glyph.gemspec +83 -22
- data/lib/glyph.rb +164 -31
- data/lib/glyph/commands.rb +98 -23
- data/lib/glyph/document.rb +13 -7
- data/lib/glyph/glyph_language.rb +9 -1
- data/lib/glyph/glyph_language.treetop +1 -1
- data/lib/glyph/interpreter.rb +19 -9
- data/lib/glyph/macro.rb +88 -11
- data/lib/glyph/macro_validators.rb +48 -0
- data/lib/glyph/node.rb +13 -1
- data/lib/glyph/system_extensions.rb +0 -28
- data/macros/common.rb +125 -31
- data/macros/filters.rb +19 -13
- data/macros/html/block.rb +119 -68
- data/macros/html/inline.rb +29 -3
- data/macros/html/structure.rb +40 -40
- data/spec/files/article.glyph +5 -0
- data/spec/lib/commands_spec.rb +98 -3
- data/spec/lib/document_spec.rb +15 -2
- data/spec/lib/glyph_spec.rb +39 -10
- data/spec/lib/interpreter_spec.rb +8 -2
- data/spec/lib/macro_spec.rb +54 -6
- data/spec/lib/macro_validators_spec.rb +33 -0
- data/spec/lib/node_spec.rb +11 -3
- data/spec/macros/filters_spec.rb +5 -5
- data/spec/macros/macros_spec.rb +185 -8
- data/spec/macros/textile_spec.rb +217 -0
- data/spec/spec_helper.rb +25 -15
- data/spec/tasks/generate_spec.rb +3 -3
- data/spec/tasks/load_spec.rb +11 -1
- data/spec/tasks/project_spec.rb +0 -3
- data/styles/coderay.css +121 -0
- data/styles/default.css +54 -20
- data/{book/styles/css3.css → styles/pagination.css} +35 -7
- data/styles/ultraviolet/active4d.css +114 -0
- data/styles/ultraviolet/all_hallows_eve.css +72 -0
- data/styles/ultraviolet/amy.css +147 -0
- data/styles/ultraviolet/blackboard.css +88 -0
- data/styles/ultraviolet/brilliance_black.css +605 -0
- data/styles/ultraviolet/brilliance_dull.css +599 -0
- data/styles/ultraviolet/cobalt.css +149 -0
- data/styles/ultraviolet/dawn.css +121 -0
- data/styles/ultraviolet/eiffel.css +121 -0
- data/styles/ultraviolet/espresso_libre.css +109 -0
- data/styles/ultraviolet/idle.css +62 -0
- data/styles/ultraviolet/iplastic.css +80 -0
- data/styles/ultraviolet/lazy.css +73 -0
- data/styles/ultraviolet/mac_classic.css +123 -0
- data/styles/ultraviolet/magicwb_amiga.css +104 -0
- data/styles/ultraviolet/pastels_on_dark.css +188 -0
- data/styles/ultraviolet/slush_poppies.css +85 -0
- data/styles/ultraviolet/spacecadet.css +51 -0
- data/styles/ultraviolet/sunburst.css +180 -0
- data/styles/ultraviolet/twilight.css +137 -0
- data/styles/ultraviolet/zenburnesque.css +91 -0
- data/tasks/generate.rake +45 -26
- data/tasks/load.rake +21 -18
- data/tasks/project.rake +3 -1
- metadata +210 -41
- data/book/styles/default.css +0 -190
- data/book/text/authoring.textile +0 -351
- data/book/text/extending.textile +0 -148
- data/book/text/ref_config.textile +0 -0
- data/book/text/ref_macros.textile +0 -256
- data/book/text/troubleshooting.textile +0 -118
- data/styles/css3.css +0 -220
data/styles/css3.css
DELETED
@@ -1,220 +0,0 @@
|
|
1
|
-
@page {
|
2
|
-
size: A4;
|
3
|
-
margin: 40pt 30pt 40pt 30pt;
|
4
|
-
@top {
|
5
|
-
content: string(book-title) " · " string(book-subtitle) " – " string(chapter-title);
|
6
|
-
font-style: italic;
|
7
|
-
}
|
8
|
-
@bottom { content: counter(page, decimal); }
|
9
|
-
}
|
10
|
-
|
11
|
-
@page frontmatter {
|
12
|
-
@bottom { content: counter(page, lower-roman); }
|
13
|
-
}
|
14
|
-
|
15
|
-
@page backmatter {
|
16
|
-
@bottom { content: counter(page, decimal); }
|
17
|
-
}
|
18
|
-
|
19
|
-
@page:first {
|
20
|
-
padding-top: 20%;
|
21
|
-
@top { content: normal; }
|
22
|
-
@bottom { content: normal; }
|
23
|
-
}
|
24
|
-
|
25
|
-
.toc li a::after {
|
26
|
-
content: leader('.') target-counter(attr(href), page);
|
27
|
-
}
|
28
|
-
|
29
|
-
.titlepage h1 {
|
30
|
-
string-set: book-title content();
|
31
|
-
}
|
32
|
-
|
33
|
-
.titlepage h2 {
|
34
|
-
string-set: book-subtitle content();
|
35
|
-
}
|
36
|
-
|
37
|
-
.toc>li[class~=chapter] {
|
38
|
-
counter-increment: toc1;
|
39
|
-
counter-reset: toc2;
|
40
|
-
}
|
41
|
-
|
42
|
-
.toc>li[class~=appendix] {
|
43
|
-
counter-increment: appendix1;
|
44
|
-
counter-reset: toc2;
|
45
|
-
}
|
46
|
-
|
47
|
-
.toc ol li[class] {
|
48
|
-
counter-increment: toc2;
|
49
|
-
counter-reset: toc3;
|
50
|
-
}
|
51
|
-
|
52
|
-
.toc ol ol li[class] {
|
53
|
-
counter-increment: toc3;
|
54
|
-
counter-reset: toc4;
|
55
|
-
}
|
56
|
-
|
57
|
-
.toc ol ol ol li[class] {
|
58
|
-
counter-increment: toc4;
|
59
|
-
counter-reset: toc5;
|
60
|
-
}
|
61
|
-
|
62
|
-
.toc ol ol ol ol li[class] {
|
63
|
-
counter-increment: toc5;
|
64
|
-
}
|
65
|
-
|
66
|
-
.toc>li[class~=chapter]::before {
|
67
|
-
content: counter(toc1) ". ";
|
68
|
-
}
|
69
|
-
|
70
|
-
|
71
|
-
.toc>li[class~=appendix]::before {
|
72
|
-
content: counter(appendix1, upper-latin) ". ";
|
73
|
-
}
|
74
|
-
|
75
|
-
.toc>li[class] {
|
76
|
-
margin: 1em 0;
|
77
|
-
}
|
78
|
-
|
79
|
-
.toc ol li[class~=bodymatter]::before {
|
80
|
-
margin-left: 1em;
|
81
|
-
content: counter(toc1) "." counter(toc2) " ";
|
82
|
-
}
|
83
|
-
.toc ol li[class~=appendix]::before {
|
84
|
-
margin-left: 1em;
|
85
|
-
content: counter(appendix1, upper-latin) "." counter(toc2) " ";
|
86
|
-
}
|
87
|
-
|
88
|
-
|
89
|
-
.toc ol ol li[class~=bodymatter]::before {
|
90
|
-
margin-left: 1em;
|
91
|
-
content: counter(toc1) "." counter(toc2) "." counter(toc3) " ";
|
92
|
-
}
|
93
|
-
.toc ol ol li[class~=appendix]::before {
|
94
|
-
margin-left: 1em;
|
95
|
-
content: counter(appendix1, upper-latin) "." counter(toc2) "." counter(toc3) " ";
|
96
|
-
}
|
97
|
-
|
98
|
-
.toc ol ol ol li[class~=bodymatter]::before {
|
99
|
-
margin-left: 1em;
|
100
|
-
content: counter(toc1) "." counter(toc2) "." counter(toc3) "." counter(toc4) " ";
|
101
|
-
}
|
102
|
-
.toc ol ol ol li[class~=appendix]::before {
|
103
|
-
margin-left: 1em;
|
104
|
-
content: counter(appendix1, upper-latin) "." counter(toc2) "." counter(toc3) "." counter(toc4) " ";
|
105
|
-
}
|
106
|
-
|
107
|
-
.toc ol ol ol ol li[class~=bodymatter]::before {
|
108
|
-
margin-left: 1em;
|
109
|
-
content: counter(toc1) "." counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) " ";
|
110
|
-
}
|
111
|
-
.toc ol ol ol ol li[class~=appendix]::before {
|
112
|
-
margin-left: 1em;
|
113
|
-
content: counter(appendix1, upper-latin) "." counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) " ";
|
114
|
-
}
|
115
|
-
|
116
|
-
div.frontmatter{
|
117
|
-
page: frontmatter;
|
118
|
-
}
|
119
|
-
|
120
|
-
div.backmatter{
|
121
|
-
page: backmatter;
|
122
|
-
}
|
123
|
-
|
124
|
-
.bodymatter h2::before {
|
125
|
-
content: "Chapter " counter(h2, upper-roman) " – ";
|
126
|
-
counter-reset: footnote;
|
127
|
-
}
|
128
|
-
|
129
|
-
.backmatter h2::before {
|
130
|
-
content: "Appendix " counter(a2, upper-latin) " – ";
|
131
|
-
}
|
132
|
-
|
133
|
-
.bodymatter h3::before {
|
134
|
-
content: counter(h2) "." counter(h3) " ";
|
135
|
-
}
|
136
|
-
|
137
|
-
.backmatter h3::before {
|
138
|
-
content: counter(a2, upper-latin) "." counter(h3) " ";
|
139
|
-
}
|
140
|
-
|
141
|
-
.bodymatter h4::before {
|
142
|
-
content: counter(h2) "." counter(h3) "." counter(h4) " ";
|
143
|
-
}
|
144
|
-
|
145
|
-
.backmatter h4::before {
|
146
|
-
content: counter(a2, upper-latin) "." counter(h3) "." counter(h4) " ";
|
147
|
-
}
|
148
|
-
|
149
|
-
.bodymatter h5::before {
|
150
|
-
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " ";
|
151
|
-
}
|
152
|
-
|
153
|
-
.backmatter h5::before {
|
154
|
-
content: counter(a2, upper-latin) "." counter(h3) "." counter(h4) "." counter(h5) " ";
|
155
|
-
}
|
156
|
-
|
157
|
-
h2 {
|
158
|
-
string-set: chapter-title content();
|
159
|
-
page-break-before: always;
|
160
|
-
}
|
161
|
-
|
162
|
-
.titlepage h2 {
|
163
|
-
page-break-before: avoid;
|
164
|
-
}
|
165
|
-
|
166
|
-
.bodymatter h2{
|
167
|
-
counter-increment: h2;
|
168
|
-
counter-reset: h3;
|
169
|
-
}
|
170
|
-
|
171
|
-
.backmatter h2{
|
172
|
-
counter-increment: a2;
|
173
|
-
counter-reset: h3;
|
174
|
-
}
|
175
|
-
|
176
|
-
.bodymatter h3, .backmatter h3 {
|
177
|
-
counter-increment: h3;
|
178
|
-
counter-reset: h4;
|
179
|
-
}
|
180
|
-
|
181
|
-
.bodymatter h4, .backmatter h4 {
|
182
|
-
counter-increment: h4;
|
183
|
-
counter-reset: h5;
|
184
|
-
}
|
185
|
-
|
186
|
-
.bodymatter h5, .backmatter h5 {
|
187
|
-
counter-increment: h5;
|
188
|
-
}
|
189
|
-
|
190
|
-
h2, h3, h4, h5 { page-break-after: avoid }
|
191
|
-
table, .box, .note, .important, .tip, .caution, .code { page-break-inside: avoid }
|
192
|
-
|
193
|
-
/* Footnotes */
|
194
|
-
|
195
|
-
@page {
|
196
|
-
@footnotes {
|
197
|
-
border-top: 1px solid #000;
|
198
|
-
}
|
199
|
-
}
|
200
|
-
|
201
|
-
.fn {
|
202
|
-
font-size: 85%;
|
203
|
-
margin-left: 1.5em;
|
204
|
-
display: prince-footnote;
|
205
|
-
counter-increment: footnote;
|
206
|
-
}
|
207
|
-
|
208
|
-
.fn::footnote-call {
|
209
|
-
content: counter(footnote);
|
210
|
-
font-size: 85%;
|
211
|
-
vertical-align: super;
|
212
|
-
line-height: none;
|
213
|
-
font-weight: bold;
|
214
|
-
margin-left: 1pt;
|
215
|
-
}
|
216
|
-
|
217
|
-
.fn::footnote-marker {
|
218
|
-
font-weight: bold;
|
219
|
-
margin-right: 0.5em;
|
220
|
-
}
|