deplate 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. data/CHANGES.TXT +118 -0
  2. data/NEWS.TXT +6 -21
  3. data/VERSION.TXT +1 -1
  4. data/etc/deplate.ini +15 -2
  5. data/lib/action_view/helpers/deplate.rb +0 -0
  6. data/lib/deplate/abstract-class.rb +3 -2
  7. data/lib/deplate/bib.rb +3 -2
  8. data/lib/deplate/builtin.rb +3 -2
  9. data/lib/deplate/cache.rb +3 -2
  10. data/lib/deplate/commands.rb +3 -11
  11. data/lib/deplate/common.rb +7 -2
  12. data/lib/deplate/compat.rb +21 -0
  13. data/lib/deplate/compat/parsedate.rb +24 -0
  14. data/lib/deplate/converter.rb +3 -2
  15. data/lib/deplate/core.rb +135 -103
  16. data/lib/deplate/counters.rb +3 -2
  17. data/lib/deplate/css/article.css +2 -2
  18. data/lib/deplate/css/doc.css +3 -2
  19. data/lib/deplate/css/heading-navbar.css +2 -2
  20. data/lib/deplate/css/highlight.css +0 -0
  21. data/lib/deplate/css/layout-deplate-print.css +2 -2
  22. data/lib/deplate/css/layout-deplate.css +2 -2
  23. data/lib/deplate/css/presentation.css +2 -2
  24. data/lib/deplate/css/sans-serif.css +2 -2
  25. data/lib/deplate/css/screenplay.css +0 -0
  26. data/lib/deplate/css/serif-e.css +2 -2
  27. data/lib/deplate/css/serif-rel.css +3 -2
  28. data/lib/deplate/css/serif.css +2 -2
  29. data/lib/deplate/css/slides.css +3 -2
  30. data/lib/deplate/css/tabbar-top.css +2 -2
  31. data/lib/deplate/css/text-sans-serif.css +3 -2
  32. data/lib/deplate/css/text-serif.css +2 -2
  33. data/lib/deplate/css/website.css +0 -0
  34. data/lib/deplate/define.rb +3 -2
  35. data/lib/deplate/deplate-string.rb +3 -2
  36. data/lib/deplate/docbook.rb +4 -14
  37. data/lib/deplate/elements.rb +37 -4
  38. data/lib/deplate/encoding.rb +57 -0
  39. data/lib/deplate/etc.rb +7 -5
  40. data/lib/deplate/external.rb +5 -13
  41. data/lib/deplate/fmt/dbk-article-4.1.2.rb +3 -2
  42. data/lib/deplate/fmt/dbk-article.rb +3 -2
  43. data/lib/deplate/fmt/dbk-book.rb +3 -2
  44. data/lib/deplate/fmt/dbk-ref.rb +3 -2
  45. data/lib/deplate/fmt/dbk-slides.rb +3 -2
  46. data/lib/deplate/fmt/dbk-snippet.rb +3 -2
  47. data/lib/deplate/fmt/html-snippet.rb +3 -2
  48. data/lib/deplate/fmt/html.rb +40 -27
  49. data/lib/deplate/fmt/htmlsite.rb +3 -2
  50. data/lib/deplate/fmt/htmlslides.rb +3 -2
  51. data/lib/deplate/fmt/htmlwebsite.rb +3 -2
  52. data/lib/deplate/fmt/latex-dramatist.rb +2 -1
  53. data/lib/deplate/fmt/latex-snippet.rb +3 -2
  54. data/lib/deplate/fmt/latex.rb +88 -67
  55. data/lib/deplate/fmt/null.rb +3 -2
  56. data/lib/deplate/fmt/php.rb +3 -2
  57. data/lib/deplate/fmt/phpsite.rb +3 -2
  58. data/lib/deplate/fmt/plain.rb +4 -3
  59. data/lib/deplate/fmt/sweave.rb +104 -0
  60. data/lib/deplate/fmt/template.rb +3 -2
  61. data/lib/deplate/fmt/xhtml10t.rb +82 -2
  62. data/lib/deplate/fmt/xhtml11m.rb +3 -2
  63. data/lib/deplate/formatter-snippet.rb +3 -2
  64. data/lib/deplate/formatter.rb +203 -29
  65. data/lib/deplate/guesslanguage.rb +3 -2
  66. data/lib/deplate/input.rb +9 -8
  67. data/lib/deplate/input/deplate-headings.rb +3 -2
  68. data/lib/deplate/input/deplate-restricted.rb +3 -2
  69. data/lib/deplate/input/deplate.rb +3 -2
  70. data/lib/deplate/input/play.rb +3 -2
  71. data/lib/deplate/input/rdoc.rb +3 -2
  72. data/lib/deplate/input/template.rb +3 -2
  73. data/lib/deplate/lib/Makefile.config +8 -0
  74. data/lib/deplate/locale/de.latin1 +6 -0
  75. data/lib/deplate/macros.rb +4 -2
  76. data/lib/deplate/messages.rb +9 -5
  77. data/lib/deplate/metadata.rb +3 -2
  78. data/lib/deplate/metadata/marshal.rb +3 -2
  79. data/lib/deplate/metadata/xml.rb +3 -2
  80. data/lib/deplate/metadata/yaml.rb +3 -2
  81. data/lib/deplate/mod/anyword.rb +3 -2
  82. data/lib/deplate/mod/babelfish.rb +3 -2
  83. data/lib/deplate/mod/code-coderay.rb +3 -2
  84. data/lib/deplate/mod/code-gvim.rb +3 -2
  85. data/lib/deplate/mod/code-gvim71.rb +3 -2
  86. data/lib/deplate/mod/code-highlight.rb +3 -2
  87. data/lib/deplate/mod/colored-log.rb +3 -2
  88. data/lib/deplate/mod/encode.rb +33 -0
  89. data/lib/deplate/mod/endnotes.rb +3 -2
  90. data/lib/deplate/mod/entities-decode.rb +2 -1
  91. data/lib/deplate/mod/entities-encode.rb +2 -1
  92. data/lib/deplate/mod/guesslanguage.rb +3 -2
  93. data/lib/deplate/mod/html-asciimath.rb +3 -2
  94. data/lib/deplate/mod/html-deplate-button.rb +3 -2
  95. data/lib/deplate/mod/html-headings-navbar.rb +3 -2
  96. data/lib/deplate/mod/html-highstep.rb +3 -2
  97. data/lib/deplate/mod/html-jsmath.rb +3 -2
  98. data/lib/deplate/mod/html-mathml.rb +2 -1
  99. data/lib/deplate/mod/html-obfuscate-email.rb +3 -2
  100. data/lib/deplate/mod/html-sidebar.rb +3 -2
  101. data/lib/deplate/mod/htmlslides-navbar-fh.rb +3 -2
  102. data/lib/deplate/mod/iconv.rb +3 -2
  103. data/lib/deplate/mod/imgurl.rb +4 -3
  104. data/lib/deplate/mod/inlatex-compound.rb +3 -2
  105. data/lib/deplate/mod/koma.rb +3 -2
  106. data/lib/deplate/mod/lang-de.rb +3 -2
  107. data/lib/deplate/mod/lang-en.rb +3 -2
  108. data/lib/deplate/mod/lang-ru-koi8-r.rb +3 -2
  109. data/lib/deplate/mod/lang-ru.rb +3 -2
  110. data/lib/deplate/mod/lang-zh_CN-autospace.rb +3 -2
  111. data/lib/deplate/mod/lang-zh_CN.rb +3 -2
  112. data/lib/deplate/mod/latex-emph-table-head.rb +3 -2
  113. data/lib/deplate/mod/latex-styles.rb +3 -2
  114. data/lib/deplate/mod/latex-verbatim-small.rb +3 -2
  115. data/lib/deplate/mod/linkmap.rb +2 -1
  116. data/lib/deplate/mod/makefile.rb +39 -46
  117. data/lib/deplate/mod/mark-external-urls.rb +3 -2
  118. data/lib/deplate/mod/markup-1-warn.rb +3 -2
  119. data/lib/deplate/mod/markup-1.rb +3 -2
  120. data/lib/deplate/mod/navbar-png.rb +3 -2
  121. data/lib/deplate/mod/noindent.rb +3 -2
  122. data/lib/deplate/mod/numpara.rb +3 -2
  123. data/lib/deplate/mod/particle-math.rb +3 -2
  124. data/lib/deplate/mod/php-extra.rb +3 -2
  125. data/lib/deplate/mod/pstoedit.rb +3 -2
  126. data/lib/deplate/mod/recode.rb +3 -2
  127. data/lib/deplate/mod/smart-dash.rb +3 -2
  128. data/lib/deplate/mod/smiley.rb +3 -2
  129. data/lib/deplate/mod/soffice.rb +3 -2
  130. data/lib/deplate/mod/symbols-latin1.rb +8 -2
  131. data/lib/deplate/mod/symbols-od-utf-8.rb +3 -2
  132. data/lib/deplate/mod/symbols-plain.rb +3 -2
  133. data/lib/deplate/mod/symbols-sgml.rb +6 -5
  134. data/lib/deplate/mod/symbols-utf-8.rb +6 -5
  135. data/lib/deplate/mod/symbols-xml.rb +3 -2
  136. data/lib/deplate/mod/syntax-region-alt.rb +3 -2
  137. data/lib/deplate/mod/utf8.rb +3 -2
  138. data/lib/deplate/mod/validate-html.rb +3 -2
  139. data/lib/deplate/mod/xmlrpc.rb +3 -2
  140. data/lib/deplate/nukumi2.rb +3 -2
  141. data/lib/deplate/once-method.rb +3 -2
  142. data/lib/deplate/output.rb +3 -2
  143. data/lib/deplate/particles.rb +12 -6
  144. data/lib/{ps2ppm.rb → deplate/ps2ppm.rb} +11 -11
  145. data/lib/deplate/regions.rb +75 -52
  146. data/lib/deplate/skeletons.rb +3 -2
  147. data/lib/deplate/structured.rb +8 -24
  148. data/lib/deplate/template.rb +3 -2
  149. data/lib/deplate/themes/presentation.html/css/presentation.css +2 -2
  150. data/lib/deplate/themes/presentation.html/prelude.txt +1 -1
  151. data/lib/deplate/themes/presentation.html/resources/spacer.png +0 -0
  152. data/lib/deplate/themes/s5.xhtml/README.TXT +2 -0
  153. data/lib/deplate/themes/s5.xhtml/templates/s5.xhtml +42 -0
  154. data/lib/deplate/themes/s5.xhtml/theme.ini +11 -0
  155. data/lib/deplate/variables.rb +12 -2
  156. data/lib/deplate/wiki-markup.rb +3 -2
  157. data/lib/deplate/xml.rb +19 -21
  158. data/lib/deplate/zh_CN.rb +3 -2
  159. data/man/man1/deplate.1 +83 -128
  160. metadata +16 -4
@@ -1,9 +1,10 @@
1
+ # encoding: ASCII
1
2
  # counters.rb
2
3
  # @Author: Thomas Link (micathom AT gmail com)
3
4
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
4
5
  # @Created: 31-Dez-2005.
5
- # @Last Change: 2007-09-29.
6
- # @Revision: 0.15
6
+ # @Last Change: 2009-02-02.
7
+ # @Revision: 0.17
7
8
 
8
9
  class Deplate::Counters
9
10
  def initialize(deplate)
@@ -1,8 +1,8 @@
1
1
  /* Layout and decoration */
2
2
  /* @Author: Thomas Link (micathom AT gmail com) */
3
3
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 2007-11-04. */
5
- /* @Revision: 0.799 */
4
+ /* @Last Change: 2008-12-04. */
5
+ /* @Revision: 0.800 */
6
6
 
7
7
  @page {
8
8
  size:portrait;
@@ -1,8 +1,9 @@
1
+ # encoding: ISO-8859-1
1
2
  /* Layout and decoration */
2
3
  /* @Author: Thomas Link (samul AT web.de) */
3
4
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 2008-07-10. */
5
- /* @Revision: 0.1217 */
5
+ /* @Last Change: 2008-12-04. */
6
+ /* @Revision: 0.1218 */
6
7
 
7
8
  body {
8
9
  padding: 1px;
@@ -1,8 +1,8 @@
1
1
  /* Layout and decoration */
2
2
  /* @Author: Thomas Link (micathom AT gmail com) */
3
3
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 22-M�r-2005. */
5
- /* @Revision: 0.1064 */
4
+ /* @Last Change: 2008-12-04. */
5
+ /* @Revision: 0.1065 */
6
6
 
7
7
  table.navbar {
8
8
  border-top: 0;
File without changes
@@ -1,8 +1,8 @@
1
1
  /* Layout and decoration */
2
2
  /* @Author: Thomas Link (micathom AT gmail com) */
3
3
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 22-J�n-2005. */
5
- /* @Revision: 0.772 */
4
+ /* @Last Change: 2008-12-04. */
5
+ /* @Revision: 0.773 */
6
6
 
7
7
  @page {
8
8
  size:portrait;
@@ -1,8 +1,8 @@
1
1
  /* Layout and decoration */
2
2
  /* @Author: Thomas Link (micathom AT gmail com) */
3
3
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 19-Feb-2005. */
5
- /* @Revision: 0.982 */
4
+ /* @Last Change: 2008-12-04. */
5
+ /* @Revision: 0.983 */
6
6
 
7
7
  body {
8
8
  padding: 1px;
@@ -1,8 +1,8 @@
1
1
  /* Text style: sans-serif */
2
2
  /* @Author: Thomas Link (samul AT web.de) */
3
3
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 2008-07-08. */
5
- /* @Revision: 0.637 */
4
+ /* @Last Change: 2008-12-04. */
5
+ /* @Revision: 0.638 */
6
6
 
7
7
  body, table, div {
8
8
  /* font-family: Georgia, Bookman, Times, Serif; */
@@ -1,8 +1,8 @@
1
1
  /* Text style: sans-serif */
2
2
  /* @Author: Thomas Link (micathom AT gmail com) */
3
3
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 31-M�r-2005. */
5
- /* @Revision: 0.597 */
4
+ /* @Last Change: 2008-12-04. */
5
+ /* @Revision: 0.598 */
6
6
 
7
7
  body, table, div {
8
8
  /* font-family: Verdana, Geneva, Sans-Serif; */
File without changes
@@ -1,8 +1,8 @@
1
1
  /* Text style: sans-serif */
2
2
  /* @Author: Thomas Link (micathom AT gmail com) */
3
3
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 20-M�r-2005. */
5
- /* @Revision: 0.617 */
4
+ /* @Last Change: 2008-12-04. */
5
+ /* @Revision: 0.618 */
6
6
 
7
7
  body, table, div {
8
8
  /* font-family: Georgia, Bookman, Times, Serif; */
@@ -1,8 +1,9 @@
1
+ # encoding: ISO-8859-1
1
2
  /* Text style: sans-serif */
2
3
  /* @Author: Thomas Link (micathom AT gmail com) */
3
4
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 20-M�r-2005. */
5
- /* @Revision: 0.632 */
5
+ /* @Last Change: 2008-12-04. */
6
+ /* @Revision: 0.633 */
6
7
 
7
8
  body, table, div {
8
9
  font-family: Georgia, Minion Web, Palatino, Book Antiqua, Utopia, Times New Roman, serif;
@@ -1,8 +1,8 @@
1
1
  /* Text style: sans-serif */
2
2
  /* @Author: Thomas Link (micathom AT gmail com) */
3
3
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 23-Apr-2006. */
5
- /* @Revision: 0.626 */
4
+ /* @Last Change: 2008-12-04. */
5
+ /* @Revision: 0.627 */
6
6
 
7
7
  body, table, div {
8
8
  /* font-family: Georgia, Bookman, Times, Serif; */
@@ -1,8 +1,9 @@
1
+ # encoding: ISO-8859-1
1
2
  /* A sample style sheet for use with deplate generated html files */
2
3
  /* @Author: Thomas Link (micathom AT gmail com) */
3
4
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 18-Nov-2004. */
5
- /* @Revision: 0.550 */
5
+ /* @Last Change: 2008-12-04. */
6
+ /* @Revision: 0.551 */
6
7
 
7
8
  @import url(text-serif.css) print;
8
9
  @import url(text-sans-serif.css) screen;
@@ -52,8 +52,8 @@ table.tabBarTop {
52
52
  padding: 0;
53
53
  width: 80%;
54
54
  border-spacing: 0;
55
- position: relative;
56
- top: 1px;
55
+ /* position: relative; */
56
+ /* top: 1px; */
57
57
  text-align: center;
58
58
  }
59
59
  tr.tabBarTop {
@@ -1,8 +1,9 @@
1
+ # encoding: ISO-8859-1
1
2
  /* Text style: sans-serif */
2
3
  /* @Author: Thomas Link (micathom AT gmail com) */
3
4
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 20-Feb-2005. */
5
- /* @Revision: 0.587 */
5
+ /* @Last Change: 2008-12-04. */
6
+ /* @Revision: 0.588 */
6
7
 
7
8
  body, table, div {
8
9
  /* font-family: Verdana, Geneva, Sans-Serif; */
@@ -1,8 +1,8 @@
1
1
  /* Text style: sans-serif */
2
2
  /* @Author: Thomas Link (micathom AT gmail com) */
3
3
  /* @Created: 13-Apr-2004. */
4
- /* @Last Change: 21-Mai-2005. */
5
- /* @Revision: 0.585 */
4
+ /* @Last Change: 2008-12-04. */
5
+ /* @Revision: 0.586 */
6
6
 
7
7
  body, table, div {
8
8
  font-family : Serif;
File without changes
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # define.rb
2
3
  # @Author: Thomas Link (micathom AT gmail com)
3
4
  # @Website: http://deplate.sf.net/
4
5
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
6
  # @Created: 19-Okt-2004.
6
- # @Last Change: 2007-05-20.
7
- # @Revision: 0.546
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.550
8
9
 
9
10
  require 'deplate/commands'
10
11
  require 'deplate/macros'
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  #!/usr/bin/env ruby
2
3
  # deplate-string.rb
3
4
  # @Author: Thomas Link (micathom AT gmail com)
4
5
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
6
  # @Created: 31-Dez-2005.
6
- # @Last Change: 18-Aug-2006.
7
- # @Revision: 0.40
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.42
8
9
 
9
10
  require 'deplate/converter'
10
11
 
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # docbook.rb
2
3
  # @Author: Thomas Link (micathom AT gmail com)
3
4
  # @Website: http://deplate.sf.net/
4
5
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
6
  # @Created: 17-M�r-2004.
6
- # @Last Change: 2007-09-30.
7
- # @Revision: 0.2748
7
+ # @Last Change: 2009-02-05.
8
+ # @Revision: 0.2756
8
9
 
9
10
  require 'deplate/xml'
10
11
 
@@ -382,17 +383,6 @@ class Deplate::Formatter::Docbook < Deplate::Formatter::XML
382
383
  s
383
384
  end
384
385
 
385
- def clean_tags(text, *tags)
386
- if text
387
- tags = tags.empty? ? '\w+' : tags.join('|')
388
- t = text.gsub(/<(#{tags}).*?>.*?<\/\1>|<(#{tags}).*?\/>/, '')
389
- t.gsub!(/^\s*$/, '')
390
- t.gsub!(/^\n\s*/, '')
391
- t.gsub!(/\n\s*$/, '')
392
- t
393
- end
394
- end
395
-
396
386
  def get_item_paragraph(args, item, text)
397
387
  formatted_inline('para', text)
398
388
  end
@@ -540,7 +530,7 @@ class Deplate::Formatter::Docbook < Deplate::Formatter::XML
540
530
  acc = [img]
541
531
  alt = args['alt']
542
532
  if alt
543
- acc << formatted_inline('textobject', formatted_inline('phrase', alt))
533
+ acc << formatted_inline('textobject', formatted_inline('phrase', plain_text(alt)))
544
534
  end
545
535
  img = join_blocks(acc)
546
536
  if inline
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # elements.rb
2
3
  # @Author: Thomas Link (micathom AT gmail com)
3
4
  # @Website: http://deplate.sf.net/
4
5
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
6
  # @Created: 26-M�r-2004.
6
- # @Last Change: 2008-07-09.
7
- # @Revision: 0.4539
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.4603
8
9
 
9
10
  require "deplate/abstract-class"
10
11
 
@@ -43,6 +44,7 @@ class Deplate::Element < Deplate::BaseElement
43
44
 
44
45
  # class methods & variables
45
46
  class << self
47
+
46
48
  def match(text)
47
49
  return self.rx.match(text)
48
50
  end
@@ -97,6 +99,7 @@ class Deplate::Element < Deplate::BaseElement
97
99
  i -= 1
98
100
  end
99
101
  rescue Exception => e
102
+ # p e.backtrace
100
103
  Deplate::Core.log(['Error when running command', e], :error, src)
101
104
  end
102
105
  run_accumulation_hooks(@@accumulate_post[self], src, array, deplate, text, *args)
@@ -293,6 +296,16 @@ class Deplate::Element < Deplate::BaseElement
293
296
  end
294
297
  end
295
298
 
299
+ def format_contained(container, *args)
300
+ unless @postponed_preformat.empty?
301
+ container.postponed_preformat |= @postponed_preformat
302
+ end
303
+ unless @postponed_format.empty?
304
+ container.postponed_format |= @postponed_format
305
+ end
306
+ format_current(*args)
307
+ end
308
+
296
309
  def format_current(formatting_method=nil)
297
310
  formatting_method ||= self.class.formatter
298
311
  if formatting_method
@@ -560,6 +573,27 @@ class Deplate::Element < Deplate::BaseElement
560
573
  end
561
574
 
562
575
 
576
+ class Deplate::Element::PseudoElement < Deplate::Element
577
+
578
+ def initialize(deplate, src, container, &formatter)
579
+ super(deplate, src, text, [])
580
+ @formatter = formatter
581
+ @container = container
582
+ end
583
+
584
+ def process
585
+ @container.process_etc
586
+ # @container.process
587
+ self
588
+ end
589
+
590
+ def format_special
591
+ return @formatter.call(self)
592
+ end
593
+
594
+ end
595
+
596
+
563
597
  # Don't register Paragraph in @@elements -- it's assigned if nothing else
564
598
  # matches
565
599
  class Deplate::Element::Paragraph < Deplate::Element
@@ -808,7 +842,7 @@ end
808
842
 
809
843
  class Deplate::List::Itemize < Deplate::List
810
844
  register_element
811
- set_rx(/^(([[:blank:]]+)([-�+*])[[:blank:]]+)(.+)$/)
845
+ set_rx(/^(([[:blank:]]+)([-+*])[[:blank:]]+)(.+)$/)
812
846
  self.listtype = "Itemize"
813
847
  end
814
848
 
@@ -859,7 +893,6 @@ class Deplate::List::Task < Deplate::List
859
893
  rv[:done] = true
860
894
  end
861
895
  if due =~ /^\s*x?([0-9-]+%?)/
862
- # rv[:due] = ParseDate::parsedate($1, true)
863
896
  rv[:due] = $1
864
897
  end
865
898
 
@@ -0,0 +1,57 @@
1
+ # encoding.rb
2
+ # @Author: Thomas Link (micathom AT gmail com)
3
+ # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
4
+ # @Created: 2009-02-04.
5
+ # @Last Change: 2009-02-05.
6
+ # @Revision: 0.0.4
7
+
8
+ # require ''
9
+
10
+ module Deplate::Encoding
11
+
12
+ module_function
13
+
14
+ def ruby_enc_name(enc)
15
+ case enc.downcase
16
+ when 'latin-1', 'latin1', 'l1', 'isolat1', 'iso-8859-1'
17
+ cen = 'iso-8859-1'
18
+ when 'latin-9', 'latin9', 'l9', 'isolat9', 'iso-8859-15'
19
+ cen = 'iso-8859-15'
20
+ when 'gb2312', 'gbk'
21
+ cen = 'gb2312'
22
+ when 'koi8-r'
23
+ cen = 'koi8-r'
24
+ when 'utf8', 'utf-8'
25
+ cen = 'utf-8'
26
+ else
27
+ log(['Unsupported ruby encoding', enc], :anyway)
28
+ cen = enc
29
+ end
30
+ return cen
31
+ end
32
+
33
+ def canonic_enc_name(enc, table=@encodings)
34
+ case enc.downcase
35
+ when 'latin-1', 'latin1', 'l1', 'isolat1', 'iso-8859-1'
36
+ cen = 'latin1'
37
+ when 'latin-9', 'latin9', 'l9', 'isolat9', 'iso-8859-15'
38
+ cen = 'latin9'
39
+ when 'gb2312', 'gbk'
40
+ cen = 'gb2312'
41
+ when 'koi8-r'
42
+ cen = 'koi8-r'
43
+ when 'utf8', 'utf-8'
44
+ cen = 'utf-8'
45
+ else
46
+ log(['Unsupported encoding', enc], :anyway)
47
+ cen = enc
48
+ end
49
+ return (table && table[cen]) || cen
50
+ end
51
+
52
+ end
53
+
54
+
55
+ # Local Variables:
56
+ # revisionRx: REVISION\s\+=\s\+\'
57
+ # End:
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # etc.rb
2
3
  # @Author: Thomas Link (micathom AT gmail com)
3
4
  # @Website: http://deplate.sf.net/
4
5
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
6
  # @Created: 16-Okt-2005.
6
- # @Last Change: 2008-07-09.
7
- # @Revision: 0.319
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.327
8
9
 
9
10
  require 'deplate/common'
10
11
 
@@ -249,9 +250,10 @@ class Deplate::Symbols < Deplate::CommonObject
249
250
  %{ }
250
251
  end
251
252
 
252
- def symbol_paragraph(invoker)
253
- %{§}
254
- end
253
+ # def symbol_paragraph(invoker)
254
+ # # %{§}
255
+ # %{�}
256
+ # end
255
257
 
256
258
  def format_symbol(invoker, sym)
257
259
  return @formatter.plain_text(sym)
@@ -1,21 +1,13 @@
1
+ # encoding: ASCII
1
2
  # external.rb
2
3
  # @Author: Thomas Link (micathom AT gmail com)
3
4
  # @Website: http://deplate.sf.net/
4
5
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
6
  # @Created: 04-Sep-2004.
6
- # @Last Change: 2008-07-06.
7
- # @Revision: 0.217
8
-
9
- require "ps2ppm"
10
-
11
- # Description:
12
- #
13
- # Usage:
14
- #
15
- # TODO:
16
- #
17
- # CHANGES:
18
- #
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.222
9
+
10
+ require "deplate/ps2ppm"
19
11
 
20
12
  module Deplate::External
21
13
  @@apps = {}