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
  # guesslanguage.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: 2006-12-29.
5
- # @Last Change: 2007-01-06.
6
- # @Revision: 0.1.22
6
+ # @Last Change: 2009-02-02.
7
+ # @Revision: 0.1.24
7
8
 
8
9
  require 'zlib'
9
10
 
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # input.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: 10-M�r-2005.
6
- # @Last Change: 2008-07-20.
7
- # @Revision: 0.827
7
+ # @Last Change: 2009-02-05.
8
+ # @Revision: 0.833
8
9
  #
9
10
  # = Description
10
11
  # = Usage
@@ -268,7 +269,7 @@ class Deplate::Input < Deplate::CommonObject
268
269
  def include_string(string, acc_array, linenumber)
269
270
  accum = []
270
271
  string = @skeleton_expander.expand(string) if @skeleton_expander
271
- for line in string
272
+ string.each_line do |line|
272
273
  linenumber += 1
273
274
  line.chomp!
274
275
  unless accum.empty?
@@ -497,7 +498,7 @@ class Deplate::Input < Deplate::CommonObject
497
498
  unless pc && !pc.call(mx)
498
499
  pre = mx.pre_match
499
500
  unless pre.empty?
500
- rt << as_text(container, rt, mx.pre_match, alt, last)
501
+ rt << as_text(container, rt, mx.pre_match, alt, last, args)
501
502
  end
502
503
  txt = last + mx.pre_match
503
504
  begin
@@ -513,11 +514,11 @@ class Deplate::Input < Deplate::CommonObject
513
514
  end
514
515
  end
515
516
  txt = mx.pre_match + mx[0]
516
- rt << as_text(container, rt, txt, alt, last, rest)
517
+ rt << as_text(container, rt, txt, alt, last, rest, args)
517
518
  end
518
519
  last = mx[0]
519
520
  else
520
- rt << as_text(container, rt, rest, alt, last, "")
521
+ rt << as_text(container, rt, rest, alt, last, "", args)
521
522
  break
522
523
  end
523
524
  end
@@ -530,12 +531,12 @@ class Deplate::Input < Deplate::CommonObject
530
531
  return rt
531
532
  end
532
533
 
533
- def as_text(container, context, match, alt, last="", rest="")
534
+ def as_text(container, context, match, alt, last="", rest="", args={})
534
535
  case match
535
536
  when String
536
537
  match = Deplate::Particle::Text.pseudo_match(match)
537
538
  end
538
- Deplate::Particle::Text.new(@deplate, container, context, match, alt, last, rest)
539
+ Deplate::Particle::Text.new(@deplate, container, context, match, alt, last, rest, args)
539
540
  end
540
541
 
541
542
  def parse_with_particles(container, text, particles, alt=true)
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # deplate-headings.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: 10-M�r-2005.
6
- # @Last Change: 2007-03-31.
7
- # @Revision: 0.42
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.44
8
9
 
9
10
  # require 'deplate/input/deplate.rb'
10
11
 
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # deplate-restricted.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: 10-M�r-2005.
6
- # @Last Change: 2007-03-31.
7
- # @Revision: 0.44
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.46
8
9
 
9
10
  # Deplate: Standard input
10
11
  class Deplate::Input::DeplateRestricted < Deplate::Input
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # deplate.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: 10-M�r-2005.
6
- # @Last Change: 20-Nov-2005.
7
- # @Revision: 0.16
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.18
8
9
  #
9
10
  # = Description
10
11
  # = Usage
@@ -1,9 +1,10 @@
1
+ # encoding: ASCII
1
2
  # play.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: 2007-03-31.
5
- # @Last Change: 2007-09-30.
6
- # @Revision: 0.213
6
+ # @Last Change: 2009-02-02.
7
+ # @Revision: 0.215
7
8
 
8
9
  # require 'deplate/input/deplate.rb'
9
10
 
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # rdoc.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: 10-M�r-2005.
6
- # @Last Change: 2007-09-01.
7
- # @Revision: 0.298
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.300
8
9
  #
9
10
  # = Description
10
11
  # Based upon Programming Ruby 2, 190ff
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # template.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: 10-M�r-2005.
6
- # @Last Change: 2007-09-01.
7
- # @Revision: 0.125
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.127
8
9
 
9
10
  class Deplate::Input::Template < Deplate::Input
10
11
  self.myname = 'template'
@@ -37,6 +37,9 @@ LATEX_FLAGS=-interaction=nonstopmode
37
37
  PDFLATEX_FLAGS=$\{LATEX_FLAGS\}
38
38
  BIBTEX_FLAGS=
39
39
 
40
+ SWEAVE_DIR=$\{TEX_DIR\}
41
+ SWEAVE_DFLAGS=-d $\{TEX_DIR\} -f sweave
42
+
40
43
  copy_images=if ls *.{jpg,jpeg,png,gif} 2> /dev/null; then cp -uv *.{jpg,jpeg,png,gif} $(1); fi
41
44
  copy_css=if ls *.css 2> /dev/null; then cp -vu *.css $(1); fi
42
45
 
@@ -85,4 +88,9 @@ prepare_dvi:
85
88
 
86
89
  prepare_pdf:
87
90
 
91
+ prepare_sweave: prepare_tex
92
+
93
+ define postprocess_sweave
94
+ if [ "$\{CYGWIN\}" ]; then dos2unix $1; fi
95
+ endef
88
96
 
@@ -610,6 +610,12 @@ Ausgabedatei muss erneuert werden
610
610
  Output not found
611
611
  Ausgabedatei nicht gefunden
612
612
 
613
+ Please contact us
614
+ Kontaktieren Sie bitte den Autor
615
+
616
+ Please consider contributing a message catalog for your language
617
+ Sie k�nnten selbst einen Nachrichtenkatalog f�r Ihre Sprache beisteuern
618
+
613
619
  Please refer to slots by their names
614
620
  Die Ausgabeposition sollte per Namen angesprochen werden
615
621
 
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # macros.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: 25-M�r-2004.
6
- # @Last Change: 2008-04-14.
7
- # @Revision: 0.1354
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.1357
8
9
 
9
10
  require 'forwardable'
10
11
 
@@ -404,6 +405,7 @@ end
404
405
 
405
406
  class Deplate::Macro::Latex < Deplate::Macro
406
407
  register_as 'ltx'
408
+ register_as 'latex'
407
409
  set_formatter :format_ltx
408
410
 
409
411
  attr_reader :accum, :caption
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # mod-en.rb -- Standard messages
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: 07-Mai-2004.
6
- # @Last Change: 2007-09-15.
7
- # @Revision: 0.206
7
+ # @Last Change: 2009-02-05.
8
+ # @Revision: 0.213
8
9
 
9
10
  # The base class for localizations
10
11
  class Deplate::Messages
@@ -109,9 +110,12 @@ class Deplate::Messages
109
110
 
110
111
  def initialize(deplate)
111
112
  @deplate = deplate
112
- if (encoding = prop('encoding'))
113
- if (vencoding = @deplate.variables['encoding'])
114
- if @deplate.canonic_enc_name(vencoding) != @deplate.canonic_enc_name(encoding)
113
+ encoding = prop('encoding')
114
+ if encoding
115
+ vencoding = @deplate.variables['encoding']
116
+ if vencoding
117
+ encoder = @deplate.formatter || Deplate::Encoding
118
+ if encoder.canonic_enc_name(vencoding) != encoder.canonic_enc_name(encoding)
115
119
  @deplate.log(['Document encoding does not match message encoding', vencoding, encoding], :error)
116
120
  end
117
121
  else
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # metadata.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: 15-Aug-2005.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.6
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.8
8
9
  #
9
10
  # = Description
10
11
  # = Usage
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # yaml.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: 20-M�r-2005.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.13
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.15
8
9
  #
9
10
  # = Description
10
11
  # = Usage
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # xml.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: 20-M�r-2005.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.29
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.31
8
9
  #
9
10
  # = Description
10
11
  # = Usage
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # yaml.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: 20-M�r-2005.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.10
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.12
8
9
  #
9
10
  # = Description
10
11
  # = Usage
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # anyword.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: 11-Sep-2004.
6
- # @Last Change: 2007-06-30.
7
- # @Revision: 0.96
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.98
8
9
 
9
10
  class Deplate::Core
10
11
  def module_initialize_anyword
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # babelfish.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: 05-Sep-2004.
6
- # @Last Change: 25-Apr-2006.
7
- # @Revision: 0.22
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.24
8
9
  #
9
10
  # Description:
10
11
  #
@@ -1,9 +1,10 @@
1
+ # encoding: ASCII
1
2
  # @Author: Thomas Link (micathom AT gmail com)
2
3
  # @Website: http://deplate.sf.net/
3
4
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
4
5
  # @Created: 26-Feb-2005.
5
- # @Last Change: 2008-04-15.
6
- # @Revision: 0.115
6
+ # @Last Change: 2009-02-02.
7
+ # @Revision: 0.117
7
8
  #
8
9
  # = Description
9
10
  # This module provides a specialized syntax highlighter using
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # code-gvim.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-Feb-2005.
6
- # @Last Change: 2008-04-15.
7
- # @Revision: 0.107
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.109
8
9
  #
9
10
  # = Description
10
11
  # This module provides a specialized syntax highlighter using gvim. Adds
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # code-gvim.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-Feb-2005.
6
- # @Last Change: 2008-04-15.
7
- # @Revision: 0.111
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.113
8
9
  #
9
10
  # = Description
10
11
  # This module provides a specialized syntax highlighter using gvim. Adds
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # code-highlight.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: 27-Feb-2005.
6
- # @Last Change: 2008-04-15.
7
- # @Revision: 0.66
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.68
8
9
  #
9
10
  # = Description
10
11
  # Highlight code regions using Andr� Simon's
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # colored-log.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: 05-Mai-2005.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.2
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.4
8
9
  #
9
10
  # = Description
10
11
  # Enable colored log output
@@ -0,0 +1,33 @@
1
+ # encode.rb
2
+ # @Author: Thomas Link (micathom AT gmail com)
3
+ # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
4
+ # @Created: 2009-02-03.
5
+ # @Last Change: 2009-02-03.
6
+ # @Revision: 0.0.5
7
+
8
+
9
+ raise 'mod/encode requires Ruby 1.9.1 or higher' unless RUBY_VERSION >= '1.9.1'
10
+
11
+ class Deplate::Formatter
12
+
13
+ def plain_text_recode(text)
14
+ enc = @deplate.variables['encoding']
15
+ if enc
16
+ begin
17
+ return text.encode(enc)
18
+ rescue Exception => e
19
+ p e
20
+ p Encoding.default_internal
21
+ p Encoding.default_external
22
+ p enc, text, text.encoding
23
+ end
24
+ end
25
+ return text
26
+ end
27
+
28
+ end
29
+
30
+
31
+ # Local Variables:
32
+ # revisionRx: REVISION\s\+=\s\+\'
33
+ # End:
@@ -1,10 +1,11 @@
1
+ # encoding: ASCII
1
2
  # endnotes.rb -- display endnotes instead of footnotes
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: 20-Aug-2004.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.85
7
+ # @Last Change: 2009-02-02.
8
+ # @Revision: 0.87
8
9
 
9
10
 
10
11
  class Deplate::Formatter