deplate 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. data/AUTHORS.TXT +2 -1
  2. data/CHANGES.TXT +56 -211
  3. data/NEWS.TXT +15 -38
  4. data/VERSION.TXT +1 -1
  5. data/bin/deplate +0 -0
  6. data/bin/deplate.bat +0 -0
  7. data/etc/deplate.ini +11 -0
  8. data/lib/deplate/commands.rb +8 -3
  9. data/lib/deplate/common.rb +2 -2
  10. data/lib/deplate/core.rb +157 -45
  11. data/lib/deplate/css/article.css +19 -3
  12. data/lib/deplate/css/doc.css +770 -0
  13. data/lib/deplate/elements.rb +7 -7
  14. data/lib/deplate/ents/general-latin1.entities +100 -0
  15. data/lib/deplate/ents/general-utf-8.entities +252 -0
  16. data/lib/deplate/external.rb +3 -2
  17. data/lib/deplate/fmt/html.rb +12 -10
  18. data/lib/deplate/fmt/latex.rb +25 -14
  19. data/lib/deplate/fmt/plain.rb +4 -5
  20. data/lib/deplate/fmt/xhtml11m.rb +25 -0
  21. data/lib/deplate/formatter.rb +106 -32
  22. data/lib/deplate/input.rb +8 -7
  23. data/lib/deplate/lib/Makefile.config +11 -1
  24. data/lib/deplate/locale/de.latin1 +9 -0
  25. data/lib/deplate/macros.rb +23 -18
  26. data/lib/deplate/mod/code-coderay.rb +45 -0
  27. data/lib/deplate/mod/code-gvim.rb +3 -2
  28. data/lib/deplate/mod/code-gvim71.rb +3 -6
  29. data/lib/deplate/mod/code-highlight.rb +3 -2
  30. data/lib/deplate/mod/entities-decode.rb +72 -0
  31. data/lib/deplate/mod/entities-encode.rb +50 -0
  32. data/lib/deplate/mod/guesslanguage.rb +3 -3
  33. data/lib/deplate/mod/html-jsmath.rb +5 -5
  34. data/lib/deplate/mod/html-mathml.rb +40 -0
  35. data/lib/deplate/mod/latex-styles.rb +21 -11
  36. data/lib/deplate/mod/makefile.rb +21 -11
  37. data/lib/deplate/mod/markup-1.rb +3 -3
  38. data/lib/deplate/mod/particle-math.rb +15 -6
  39. data/lib/deplate/particles.rb +2 -2
  40. data/lib/deplate/regions.rb +50 -15
  41. data/lib/deplate/template.rb +7 -2
  42. data/lib/deplate/themes/presentation.html/css/highstep.css +29 -0
  43. data/lib/deplate/themes/presentation.html/css/presentation.css +206 -0
  44. data/lib/deplate/themes/presentation.html/css/website.css +281 -0
  45. data/lib/deplate/themes/presentation.html/prelude.txt +19 -0
  46. data/lib/deplate/themes/presentation.html/resources/spacer.png +0 -0
  47. data/lib/deplate/themes/presentation.html/templates/presentation.html +26 -0
  48. data/lib/deplate/themes/presentation.html/theme.ini +20 -0
  49. data/man/man1/deplate.1 +147 -73
  50. metadata +67 -40
  51. data/bin/deplate.exy +0 -192
@@ -3,8 +3,8 @@
3
3
  # @Website: http://deplate.sf.net/
4
4
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
5
  # @Created: 26-M�r-2004.
6
- # @Last Change: 2007-09-30.
7
- # @Revision: 0.4497
6
+ # @Last Change: 2008-07-06.
7
+ # @Revision: 0.4514
8
8
 
9
9
  require "deplate/abstract-class"
10
10
 
@@ -389,14 +389,14 @@ class Deplate::Element < Deplate::BaseElement
389
389
  # log(["Cannot attach caption to", self.class.name], :error)
390
390
  end
391
391
 
392
- def set_caption(captiondef, quiet=false)
392
+ def set_caption(captiondef, quiet=false, extended_syntax=false)
393
393
  if @caption
394
394
  log('Element already has a caption', :error) unless quiet
395
395
  else
396
396
  self.level_as_string = @deplate.get_current_heading
397
397
  captiondef.elt = @deplate.parse_with_source(captiondef.source,
398
- captiondef.elt,
399
- false)
398
+ captiondef.elt,
399
+ extended_syntax)
400
400
  @caption = captiondef
401
401
  if respond_to?(:register_caption)
402
402
  register_caption
@@ -1094,7 +1094,7 @@ class Deplate::Element::Command < Deplate::Element
1094
1094
 
1095
1095
  def get_var_or_option(deplate, key)
1096
1096
  begin
1097
- if deplate.options.allow.include?(':') && key =~ /^:(.*)$/
1097
+ if deplate.is_allowed?(':') && key =~ /^:(.*)$/
1098
1098
  return deplate.options.send($1)
1099
1099
  # elsif deplate.variables.has_key?(key)
1100
1100
  else
@@ -1375,7 +1375,7 @@ class Deplate::Element::Heading < Deplate::Element
1375
1375
  end
1376
1376
 
1377
1377
  def register_heading
1378
- sc = @args['id'] || @args['shortcaption']
1378
+ sc = @args['@id'] || @args['shortcaption']
1379
1379
  log(['Register heading', level_as_string, sc], :debug)
1380
1380
  @deplate.set_top_heading(self, sc)
1381
1381
  end
@@ -0,0 +1,100 @@
1
+ " &quot; &#34;
2
+ & &amp; &#38;
3
+ < &lt; &#60;
4
+ > &gt; &#62;
5
+ � &nbsp; &#160;
6
+ � &iexcl; &#161;
7
+ � &cent; &#162;
8
+ � &pound; &#163;
9
+ � &curren; &#164;
10
+ � &yen; &#165;
11
+ � &brvbar; &#166;
12
+ � &sect; &#167;
13
+ � &uml; &#168;
14
+ � &copy; &#169;
15
+ � &ordf; &#170;
16
+ � &laquo; &#171;
17
+ � &not; &#172;
18
+ � &shy; &#173;
19
+ � &reg; &#174;
20
+ � &macr; &#175;
21
+ � &deg; &#176;
22
+ � &plusmn; &#177;
23
+ � &sup2; &#178;
24
+ � &sup3; &#179;
25
+ � &acute; &#180;
26
+ � &micro; &#181;
27
+ � &para; &#182;
28
+ � &middot; &#183;
29
+ � &cedil; &#184;
30
+ � &sup1; &#185;
31
+ � &ordm; &#186;
32
+ � &raquo; &#187;
33
+ � &frac14; &#188;
34
+ � &frac12; &#189;
35
+ � &frac34; &#190;
36
+ � &iquest; &#191;
37
+ � &Agrave; &#192;
38
+ � &Aacute; &#193;
39
+ � &Acirc; &#194;
40
+ � &Atilde; &#195;
41
+ � &Auml; &#196;
42
+ � &Aring; &#197;
43
+ � &AElig; &#198;
44
+ � &Ccedil; &#199;
45
+ � &Egrave; &#200;
46
+ � &Eacute; &#201;
47
+ � &Ecirc; &#202;
48
+ � &Euml; &#203;
49
+ � &Igrave; &#204;
50
+ � &Iacute; &#205;
51
+ � &Icirc; &#206;
52
+ � &Iuml; &#207;
53
+ � &ETH; &#208;
54
+ � &Ntilde; &#209;
55
+ � &Ograve; &#210;
56
+ � &Oacute; &#211;
57
+ � &Ocirc; &#212;
58
+ � &Otilde; &#213;
59
+ � &Ouml; &#214;
60
+ � &times; &#215;
61
+ � &Oslash; &#216;
62
+ � &Ugrave; &#217;
63
+ � &Uacute; &#218;
64
+ � &Ucirc; &#219;
65
+ � &Uuml; &#220;
66
+ � &Yacute; &#221;
67
+ � &THORN; &#222;
68
+ � &szlig; &#223;
69
+ � &agrave; &#224;
70
+ � &aacute; &#225;
71
+ � &acirc; &#226;
72
+ � &atilde; &#227;
73
+ � &auml; &#228;
74
+ � &aring; &#229;
75
+ � &aelig; &#230;
76
+ � &ccedil; &#231;
77
+ � &egrave; &#232;
78
+ � &eacute; &#233;
79
+ � &ecirc; &#234;
80
+ � &euml; &#235;
81
+ � &igrave; &#236;
82
+ � &iacute; &#237;
83
+ � &icirc; &#238;
84
+ � &iuml; &#239;
85
+ � &eth; &#240;
86
+ � &ntilde; &#241;
87
+ � &ograve; &#242;
88
+ � &oacute; &#243;
89
+ � &ocirc; &#244;
90
+ � &otilde; &#245;
91
+ � &ouml; &#246;
92
+ � &divide; &#247;
93
+ � &oslash; &#248;
94
+ � &ugrave; &#249;
95
+ � &uacute; &#250;
96
+ � &ucirc; &#251;
97
+ � &uuml; &#252;
98
+ � &yacute; &#253;
99
+ � &thorn; &#254;
100
+ � &yuml; &#255;
@@ -0,0 +1,252 @@
1
+ " &quot; &#34;
2
+ & &amp; &#38;
3
+ < &lt; &#60;
4
+ > &gt; &#62;
5
+ � &nbsp; &#160;
6
+ ¡ &iexcl; &#161;
7
+ ¢ &cent; &#162;
8
+ £ &pound; &#163;
9
+ ¤ &curren; &#164;
10
+ ¥ &yen; &#165;
11
+ ¦ &brvbar; &#166;
12
+ § &sect; &#167;
13
+ ¨ &uml; &#168;
14
+ © &copy; &#169;
15
+ ª &ordf; &#170;
16
+ « &laquo; &#171;
17
+ ¬ &not; &#172;
18
+ ­ &shy; &#173;
19
+ ® &reg; &#174;
20
+ ¯ &macr; &#175;
21
+ ° &deg; &#176;
22
+ ± &plusmn; &#177;
23
+ ² &sup2; &#178;
24
+ ³ &sup3; &#179;
25
+ ´ &acute; &#180;
26
+ µ &micro; &#181;
27
+ ¶ &para; &#182;
28
+ · &middot; &#183;
29
+ ¸ &cedil; &#184;
30
+ ¹ &sup1; &#185;
31
+ º &ordm; &#186;
32
+ » &raquo; &#187;
33
+ ¼ &frac14; &#188;
34
+ ½ &frac12; &#189;
35
+ ¾ &frac34; &#190;
36
+ ¿ &iquest; &#191;
37
+ À &Agrave; &#192;
38
+ Á &Aacute; &#193;
39
+ Â &Acirc; &#194;
40
+ Ã &Atilde; &#195;
41
+ Ä &Auml; &#196;
42
+ Å &Aring; &#197;
43
+ Æ &AElig; &#198;
44
+ Ç &Ccedil; &#199;
45
+ È &Egrave; &#200;
46
+ É &Eacute; &#201;
47
+ Ê &Ecirc; &#202;
48
+ Ë &Euml; &#203;
49
+ Ì &Igrave; &#204;
50
+ Í &Iacute; &#205;
51
+ Î &Icirc; &#206;
52
+ Ï &Iuml; &#207;
53
+ Ð &ETH; &#208;
54
+ Ñ &Ntilde; &#209;
55
+ Ò &Ograve; &#210;
56
+ Ó &Oacute; &#211;
57
+ Ô &Ocirc; &#212;
58
+ Õ &Otilde; &#213;
59
+ Ö &Ouml; &#214;
60
+ × &times; &#215;
61
+ Ø &Oslash; &#216;
62
+ Ù &Ugrave; &#217;
63
+ Ú &Uacute; &#218;
64
+ Û &Ucirc; &#219;
65
+ Ü &Uuml; &#220;
66
+ Ý &Yacute; &#221;
67
+ Þ &THORN; &#222;
68
+ ß &szlig; &#223;
69
+ à &agrave; &#224;
70
+ á &aacute; &#225;
71
+ â &acirc; &#226;
72
+ ã &atilde; &#227;
73
+ ä &auml; &#228;
74
+ å &aring; &#229;
75
+ æ &aelig; &#230;
76
+ ç &ccedil; &#231;
77
+ è &egrave; &#232;
78
+ é &eacute; &#233;
79
+ ê &ecirc; &#234;
80
+ ë &euml; &#235;
81
+ ì &igrave; &#236;
82
+ í &iacute; &#237;
83
+ î &icirc; &#238;
84
+ ï &iuml; &#239;
85
+ ð &eth; &#240;
86
+ ñ &ntilde; &#241;
87
+ ò &ograve; &#242;
88
+ ó &oacute; &#243;
89
+ ô &ocirc; &#244;
90
+ õ &otilde; &#245;
91
+ ö &ouml; &#246;
92
+ ÷ &divide; &#247;
93
+ ø &oslash; &#248;
94
+ ù &ugrave; &#249;
95
+ ú &uacute; &#250;
96
+ û &ucirc; &#251;
97
+ ü &uuml; &#252;
98
+ ý &yacute; &#253;
99
+ þ &thorn; &#254;
100
+ ÿ &yuml; &#255;
101
+ Α &Alpha; &#913;
102
+ α &alpha; &#945;
103
+ Β &Beta; &#914;
104
+ β &beta; &#946;
105
+ Γ &Gamma; &#915;
106
+ γ &gamma; &#947;
107
+ Δ &Delta; &#916;
108
+ δ &delta; &#948;
109
+ Ε &Epsilon; &#917;
110
+ ε &epsilon; &#949;
111
+ Ζ &Zeta; &#918;
112
+ ζ &zeta; &#950;
113
+ Η &Eta; &#919;
114
+ η &eta; &#951;
115
+ Θ &Theta; &#920;
116
+ θ &theta; &#952;
117
+ Ι &Iota; &#921;
118
+ ι &iota; &#953;
119
+ Κ &Kappa; &#922;
120
+ κ &kappa; &#954;
121
+ Λ &Lambda; &#923;
122
+ λ &lambda; &#955;
123
+ Μ &Mu; &#924;
124
+ μ &mu; &#956;
125
+ Ν &Nu; &#925;
126
+ ν &nu; &#957;
127
+ Ξ &Xi; &#926;
128
+ ξ &xi; &#958;
129
+ Ο &Omicron; &#927;
130
+ ο &omicron; &#959;
131
+ Π &Pi; &#928;
132
+ π &pi; &#960;
133
+ Ρ &Rho; &#929;
134
+ ρ &rho; &#961;
135
+ Σ &Sigma; &#931;
136
+ ς &sigmaf; &#962;
137
+ σ &sigma; &#963;
138
+ Τ &Tau; &#932;
139
+ τ &tau; &#964;
140
+ Υ &Upsilon; &#933;
141
+ υ &upsilon; &#965;
142
+ Φ &Phi; &#934;
143
+ φ &phi; &#966;
144
+ Χ &Chi; &#935;
145
+ χ &chi; &#967;
146
+ Ψ &Psi; &#936;
147
+ ψ &psi; &#968;
148
+ Ω &Omega; &#937;
149
+ ω &omega; &#969;
150
+ ϑ &thetasym; &#977;
151
+ ϒ &upsih; &#978;
152
+ ϖ &piv; &#982;
153
+ ∀ &forall; &#8704;
154
+ ∂ &part; &#8706;
155
+ ∃ &exist; &#8707;
156
+ ∅ &empty; &#8709;
157
+ ∇ &nabla; &#8711;
158
+ ∈ &isin; &#8712;
159
+ ∉ &notin; &#8713;
160
+ ∋ &ni; &#8715;
161
+ ∏ &prod; &#8719;
162
+ ∑ &sum; &#8721;
163
+ − &minus; &#8722;
164
+ ∗ &lowast; &#8727;
165
+ √ &radic; &#8730;
166
+ ∝ &prop; &#8733;
167
+ ∞ &infin; &#8734;
168
+ ∠ &ang; &#8736;
169
+ ∧ &and; &#8743;
170
+ ∨ &or; &#8744;
171
+ ∩ &cap; &#8745;
172
+ ∪ &cup; &#8746;
173
+ ∫ &int; &#8747;
174
+ ∴ &there4; &#8756;
175
+ ∼ &sim; &#8764;
176
+ ≅ &cong; &#8773;
177
+ ≈ &asymp; &#8776;
178
+ ≠ &ne; &#8800;
179
+ ≡ &equiv; &#8801;
180
+ ≤ &le; &#8804;
181
+ ≥ &ge; &#8805;
182
+ ⊂ &sub; &#8834;
183
+ ⊃ &sup; &#8835;
184
+ ⊄ &nsub; &#8836;
185
+ ⊆ &sube; &#8838;
186
+ ⊇ &supe; &#8839;
187
+ ⊕ &oplus; &#8853;
188
+ ⊗ &otimes; &#8855;
189
+ ⊥ &perp; &#8869;
190
+ ⋅ &sdot; &#8901;
191
+ ◊ &loz; &#9674;
192
+ ⌈ &lceil; &#8968;
193
+ ⌉ &rceil; &#8969;
194
+ ⌊ &lfloor; &#8970;
195
+ ⌋ &rfloor; &#8971;
196
+ 〈 &lang; &#9001;
197
+ 〉 &rang; &#9002;
198
+ ← &larr; &#8592;
199
+ ↑ &uarr; &#8593;
200
+ → &rarr; &#8594;
201
+ ↓ &darr; &#8595;
202
+ ↔ &harr; &#8596;
203
+ ↵ &crarr; &#8629;
204
+ ⇐ &lArr; &#8656;
205
+ ⇑ &uArr; &#8657;
206
+ ⇒ &rArr; &#8658;
207
+ ⇓ &dArr; &#8659;
208
+ ⇔ &hArr; &#8660;
209
+ • &bull; &#8226;
210
+ ′ &prime; &#8242;
211
+ ″ &Prime; &#8243;
212
+ ‾ &oline; &#8254;
213
+ ⁄ &frasl; &#8260;
214
+ ℘ &weierp; &#8472;
215
+ ℑ &image; &#8465;
216
+ ℜ &real; &#8476;
217
+ ™ &trade; &#8482;
218
+ € &euro; &#8364;
219
+ ℵ &alefsym; &#8501;
220
+ ♠ &spades; &#9824;
221
+ ♣ &clubs; &#9827;
222
+ ♥ &hearts; &#9829;
223
+ ♦ &diams; &#9830;
224
+ Œ &OElig; &#338;
225
+ œ &oelig; &#339;
226
+ Š &Scaron; &#352;
227
+ š &scaron; &#353;
228
+ Ÿ &Yuml; &#376;
229
+ ƒ &fnof; &#402;
230
+   &ensp; &#8194;
231
+   &emsp; &#8195;
232
+   &thinsp; &#8201;
233
+ ‌ &zwnj; &#8204;
234
+ ‍ &zwj; &#8205;
235
+ ‎ &lrm; &#8206;
236
+ ‏ &rlm; &#8207;
237
+ – &ndash; &#8211;
238
+ — &mdash; &#8212;
239
+ ‘ &lsquo; &#8216;
240
+ ’ &rsquo; &#8217;
241
+ ‚ &sbquo; &#8218;
242
+ “ &ldquo; &#8220;
243
+ ” &rdquo; &#8221;
244
+ „ &bdquo; &#8222;
245
+ † &dagger; &#8224;
246
+ ‡ &Dagger; &#8225;
247
+ … &hellip; &#8230;
248
+ ‰ &permil; &#8240;
249
+ ‹ &lsaquo; &#8249;
250
+ › &rsaquo; &#8250;
251
+ ˆ &circ; &#710;
252
+ ˜ &tilde; &#732;
@@ -3,8 +3,8 @@
3
3
  # @Website: http://deplate.sf.net/
4
4
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
5
  # @Created: 04-Sep-2004.
6
- # @Last Change: 2007-09-02.
7
- # @Revision: 0.215
6
+ # @Last Change: 2008-07-06.
7
+ # @Revision: 0.217
8
8
 
9
9
  require "ps2ppm"
10
10
 
@@ -106,6 +106,7 @@ module Deplate::External
106
106
  def jave(instance, imgfile, args)
107
107
  variables = args[:deplate].variables
108
108
  cmd = ["#{get_app('jave')} image2ascii #{imgfile}"]
109
+ p cmd
109
110
  alg = args['ascii_algorithm'] || args['algorithm'] ||
110
111
  variables['ascii_algorithm'] || 'edge_detection'
111
112
  cmd << "algorithm=#{alg}"
@@ -3,8 +3,8 @@
3
3
  # @Website: http://deplate.sf.net/
4
4
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
5
  # @Created: 17-M�r-2004.
6
- # @Last Change: 2007-10-12.
7
- # @Revision: 0.4287
6
+ # @Last Change: 2008-07-06.
7
+ # @Revision: 0.4317
8
8
 
9
9
  # require 'cgi'
10
10
  require 'uri'
@@ -58,7 +58,7 @@ class Deplate::Formatter::HTML < Deplate::Formatter
58
58
  }
59
59
  build_plain_text_rx
60
60
  @encodings = {
61
- 'latin1' => 'iso-8859-1',
61
+ 'latin1' => 'ISO-8859-1',
62
62
  }
63
63
  @deplate.output.attributes[:stepwiseIdx] ||= 0
64
64
  end
@@ -75,7 +75,7 @@ class Deplate::Formatter::HTML < Deplate::Formatter
75
75
  @deplate.copy_file(src, dest)
76
76
  end
77
77
  else
78
- srcc = @deplate.auxiliary_filename("#{name}.css", true)
78
+ srcc = @deplate.auxiliary_filename(Deplate::Core.ensure_suffix(name, '.css'), true)
79
79
  unless File.exist?(srcc)
80
80
  log(['File not found', srcc], :error)
81
81
  end
@@ -140,8 +140,8 @@ class Deplate::Formatter::HTML < Deplate::Formatter
140
140
  output_at(:pre, :doc_beg, html_def)
141
141
  output_at(:pre, :head_beg, '<head>')
142
142
 
143
- t = @variables['encoding'] || 'ISO-8859-1'
144
- t = canonic_enc_name(t)
143
+ # t = canonic_encoding('ISO-8859-1')
144
+ t = document_encoding()
145
145
  t = %{http-equiv="content-type" content="text/html; charset=#{t}"}
146
146
  output_at(:pre, :head, head_meta_tag(t))
147
147
 
@@ -773,7 +773,8 @@ EOJS
773
773
  style.gsub!(/[,;]+/, ' ') if style
774
774
  clss = style || get_html_class(invoker, :default => 'standard')
775
775
  clsss = %{ class="#{clss}"}
776
- opts = format_particle(:table_args, invoker)
776
+ # opts = format_particle(:table_args, invoker)
777
+ opts = table_args(invoker)
777
778
  halfindent = ' '
778
779
  indent = halfindent * 2
779
780
 
@@ -1214,12 +1215,13 @@ EOJS
1214
1215
  csso = @variables['css']
1215
1216
  if csso
1216
1217
  csss = Deplate::Core.split_list(csso, ',', ' ;', nil, nil)
1218
+ csss.map! {|css| Deplate::Core.ensure_suffix(css, '.css')}
1217
1219
  else
1218
1220
  csss = []
1219
1221
  end
1220
1222
  cls = @variables['class']
1221
1223
  if cls
1222
- csss << cls + '.css'
1224
+ csss << Deplate::Core.ensure_suffix(cls, '.css')
1223
1225
  end
1224
1226
  acc = []
1225
1227
  if @deplate.variables['cssInclude']
@@ -1238,7 +1240,7 @@ EOJS
1238
1240
  @deplate.options.css << [cssName]
1239
1241
  end
1240
1242
  if @deplate.variables['cssInclude']
1241
- cssFile = @deplate.collected_css[css]
1243
+ cssFile = @deplate.collected_css[cssName]
1242
1244
  if cssFile and File.readable?(cssFile)
1243
1245
  acc << File.read(cssFile)
1244
1246
  else
@@ -1456,7 +1458,7 @@ EOJS
1456
1458
  opts << %{align="#{align}"} if align
1457
1459
  width = args['width'] || @variables['tableWidth']
1458
1460
  opts << %{width="#{width}"} if width
1459
- opts << %{summary="#{caption.elt}"} if caption and caption.elt
1461
+ opts << %{summary="#{clean_tags(caption.elt)}"} if caption and caption.elt
1460
1462
  return opts.join(' ')
1461
1463
  end
1462
1464