deplate 0.7.3 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. data/AUTHORS.TXT +3 -0
  2. data/CHANGES.TXT +248 -175
  3. data/LICENSE.TXT +0 -0
  4. data/NEWS.TXT +28 -24
  5. data/README.TXT +0 -0
  6. data/TODO.TXT +174 -88
  7. data/VERSION.TXT +1 -1
  8. data/bin/deplate +0 -0
  9. data/bin/deplate.bat +0 -0
  10. data/etc/deplate.ini +91 -3
  11. data/lib/action_view/helpers/deplate.rb +45 -0
  12. data/lib/deplate.rb +6 -1
  13. data/lib/deplate/abstract-class.rb +0 -0
  14. data/lib/deplate/bib.rb +576 -0
  15. data/lib/deplate/builtin.rb +0 -0
  16. data/lib/deplate/cache.rb +55 -5
  17. data/lib/deplate/commands.rb +346 -183
  18. data/lib/deplate/common.rb +209 -48
  19. data/lib/deplate/converter.rb +12 -6
  20. data/lib/deplate/core.rb +777 -378
  21. data/lib/deplate/counters.rb +254 -0
  22. data/lib/deplate/css/article.css +4 -3
  23. data/lib/deplate/css/deplate.css +121 -5
  24. data/lib/deplate/css/heading-navbar.css +0 -0
  25. data/lib/deplate/css/layout-deplate-print.css +0 -0
  26. data/lib/deplate/css/layout-deplate.css +0 -0
  27. data/lib/deplate/css/sans-serif.css +0 -0
  28. data/lib/deplate/css/serif-e.css +0 -0
  29. data/lib/deplate/css/serif-rel.css +0 -0
  30. data/lib/deplate/css/serif.css +9 -3
  31. data/lib/deplate/css/slides.css +0 -0
  32. data/lib/deplate/css/tabbar-left.css +0 -0
  33. data/lib/deplate/css/tabbar-right-ie.css +3 -9
  34. data/lib/deplate/css/tabbar-right.css +51 -18
  35. data/lib/deplate/css/tabbar-top.css +7 -1
  36. data/lib/deplate/css/tabbar.css +0 -0
  37. data/lib/deplate/css/text-sans-serif.css +0 -0
  38. data/lib/deplate/css/text-serif.css +0 -0
  39. data/lib/deplate/define.rb +183 -177
  40. data/lib/deplate/deplate-string.rb +82 -0
  41. data/lib/deplate/docbook.rb +236 -128
  42. data/lib/deplate/elements.rb +584 -417
  43. data/lib/deplate/etc.rb +163 -101
  44. data/lib/deplate/external.rb +42 -11
  45. data/lib/deplate/fmt/dbk-article-4.1.2.rb +0 -0
  46. data/lib/deplate/fmt/dbk-article.rb +0 -0
  47. data/lib/deplate/fmt/dbk-book.rb +0 -0
  48. data/lib/deplate/fmt/dbk-ref.rb +3 -3
  49. data/lib/deplate/fmt/dbk-slides.rb +0 -0
  50. data/lib/deplate/fmt/dbk-snippet.rb +0 -0
  51. data/lib/deplate/fmt/html-snippet.rb +0 -0
  52. data/lib/deplate/fmt/html.rb +783 -550
  53. data/lib/deplate/fmt/htmlsite.rb +192 -199
  54. data/lib/deplate/fmt/htmlslides.rb +0 -0
  55. data/lib/deplate/fmt/htmlwebsite.rb +3 -3
  56. data/lib/deplate/fmt/latex-snippet.rb +0 -0
  57. data/lib/deplate/fmt/latex.rb +242 -83
  58. data/lib/deplate/fmt/null.rb +32 -0
  59. data/lib/deplate/fmt/php.rb +4 -4
  60. data/lib/deplate/fmt/phpsite.rb +6 -5
  61. data/lib/deplate/fmt/plain.rb +160 -106
  62. data/lib/deplate/fmt/template.rb +0 -0
  63. data/lib/deplate/fmt/xhtml10t.rb +0 -0
  64. data/lib/deplate/formatter-snippet.rb +0 -0
  65. data/lib/deplate/formatter.rb +613 -301
  66. data/lib/deplate/input.rb +202 -142
  67. data/lib/deplate/input/deplate-headings.rb +4 -6
  68. data/lib/deplate/input/deplate-restricted.rb +15 -9
  69. data/lib/deplate/input/deplate.rb +2 -4
  70. data/lib/deplate/input/rdoc.rb +39 -38
  71. data/lib/deplate/input/template.rb +0 -0
  72. data/lib/deplate/lib/Makefile.config +29 -0
  73. data/lib/deplate/lib/latex/deplate.sty +54 -0
  74. data/lib/deplate/lib/latex/highlight-extra.sty +0 -0
  75. data/lib/deplate/lib/latex/highlight-typical.sty +0 -0
  76. data/lib/deplate/lib/php/page-comment.inc.php +216 -0
  77. data/lib/deplate/lib/tabmenu.js +0 -0
  78. data/lib/deplate/locale/de.latin1 +155 -17
  79. data/lib/deplate/locale/ru.koi8-r +0 -0
  80. data/lib/deplate/locale/zh_cn.gb2312 +0 -0
  81. data/lib/deplate/macros.rb +133 -82
  82. data/lib/deplate/messages.rb +6 -4
  83. data/lib/deplate/metadata.rb +0 -0
  84. data/lib/deplate/metadata/marshal.rb +0 -0
  85. data/lib/deplate/metadata/xml.rb +0 -0
  86. data/lib/deplate/metadata/yaml.rb +0 -0
  87. data/lib/deplate/mod/anyword.rb +3 -3
  88. data/lib/deplate/mod/babelfish.rb +4 -4
  89. data/lib/deplate/mod/code-gvim.rb +8 -4
  90. data/lib/deplate/mod/code-highlight.rb +3 -3
  91. data/lib/deplate/mod/colored-log.rb +0 -0
  92. data/lib/deplate/mod/de.rb +2 -2
  93. data/lib/deplate/mod/en.rb +0 -0
  94. data/lib/deplate/mod/endnotes.rb +0 -0
  95. data/lib/deplate/mod/fr.rb +0 -0
  96. data/lib/deplate/mod/html-asciimath.rb +0 -0
  97. data/lib/deplate/mod/html-deplate-button.rb +0 -0
  98. data/lib/deplate/mod/html-headings-navbar.rb +5 -13
  99. data/lib/deplate/mod/html-jsmath.rb +39 -0
  100. data/lib/deplate/mod/html-obfuscate-email.rb +3 -3
  101. data/lib/deplate/mod/html-sidebar.rb +0 -0
  102. data/lib/deplate/mod/htmlslides-navbar-fh.rb +3 -3
  103. data/lib/deplate/mod/iconv.rb +0 -0
  104. data/lib/deplate/mod/imgurl.rb +4 -4
  105. data/lib/deplate/mod/inlatex-compound.rb +7 -10
  106. data/lib/deplate/mod/koma.rb +0 -0
  107. data/lib/deplate/mod/latex-emph-table-head.rb +0 -0
  108. data/lib/deplate/mod/latex-styles.rb +7 -4
  109. data/lib/deplate/mod/latex-verbatim-small.rb +0 -0
  110. data/lib/deplate/mod/makefile.rb +23 -7
  111. data/lib/deplate/mod/mark-external-urls.rb +3 -3
  112. data/lib/deplate/mod/markup-1-warn.rb +10 -10
  113. data/lib/deplate/mod/markup-1.rb +0 -0
  114. data/lib/deplate/mod/navbar-png.rb +24 -8
  115. data/lib/deplate/mod/noindent.rb +0 -0
  116. data/lib/deplate/mod/numpara.rb +0 -0
  117. data/lib/deplate/mod/particle-math.rb +4 -4
  118. data/lib/deplate/mod/php-extra.rb +46 -6
  119. data/lib/deplate/mod/pstoedit.rb +0 -0
  120. data/lib/deplate/mod/recode.rb +0 -0
  121. data/lib/deplate/mod/ru_koi8-r.rb +0 -0
  122. data/lib/deplate/mod/smart-dash.rb +26 -0
  123. data/lib/deplate/mod/smiley.rb +69 -7
  124. data/lib/deplate/mod/soffice.rb +0 -0
  125. data/lib/deplate/mod/symbols-latin1.rb +14 -23
  126. data/lib/deplate/mod/symbols-od-utf-8.rb +5 -3
  127. data/lib/deplate/mod/symbols-plain.rb +5 -35
  128. data/lib/deplate/mod/symbols-sgml.rb +8 -9
  129. data/lib/deplate/mod/symbols-utf-8.rb +8 -9
  130. data/lib/deplate/mod/symbols-xml.rb +5 -9
  131. data/lib/deplate/mod/syntax-region-alt.rb +5 -5
  132. data/lib/deplate/mod/utf8.rb +0 -0
  133. data/lib/deplate/mod/validate-html.rb +0 -0
  134. data/lib/deplate/mod/xmlrpc.rb +0 -0
  135. data/lib/deplate/mod/zh-cn-autospace.rb +18 -20
  136. data/lib/deplate/mod/zh-cn.rb +4 -6
  137. data/lib/deplate/nukumi2.rb +71 -0
  138. data/lib/deplate/once-method.rb +0 -0
  139. data/lib/deplate/output.rb +19 -21
  140. data/lib/deplate/particles.rb +178 -116
  141. data/lib/deplate/regions.rb +99 -58
  142. data/lib/deplate/skeletons.rb +122 -0
  143. data/lib/deplate/structured.rb +164 -106
  144. data/lib/deplate/template.rb +67 -43
  145. data/lib/deplate/templates/html-doc.html +0 -0
  146. data/lib/deplate/templates/html-left-tabbar-js.html +0 -0
  147. data/lib/deplate/templates/html-left-tabbar.html +0 -0
  148. data/lib/deplate/templates/html-tabbar-right-pcomments.php +22 -0
  149. data/lib/deplate/templates/html-tabbar-right-step.html +24 -0
  150. data/lib/deplate/templates/html-tabbar-right-table.html +0 -0
  151. data/lib/deplate/templates/html-tabbar-right.html +2 -4
  152. data/lib/deplate/templates/html-tabbar-top.html +0 -9
  153. data/lib/deplate/templates/html-tabbar.html +0 -0
  154. data/lib/deplate/variables.rb +127 -0
  155. data/lib/deplate/wiki-markup.rb +99 -33
  156. data/lib/deplate/xml.rb +18 -18
  157. data/lib/deplate/zh-cn.rb +0 -0
  158. data/lib/ps2ppm.rb +0 -0
  159. data/man/man1/deplate.1 +564 -474
  160. metadata +201 -186
@@ -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: 07-Mai-2004.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.193
6
+ # @Last Change: 23-Apr-2006.
7
+ # @Revision: 0.195
8
8
 
9
9
  # The base class for localizations
10
10
  class Deplate::Messages
@@ -50,7 +50,8 @@ class Deplate::Messages
50
50
  # the formatter fmt (e.g., latex_lang instead of lang)
51
51
  def prop(key, fmt=nil)
52
52
  if fmt
53
- af = [fmt.formatter_name, key].join('_')
53
+ fmt_name = fmt.kind_of?(String) ? fmt : fmt.formatter_name
54
+ af = [fmt_name, key].join('_')
54
55
  if has_property?(af)
55
56
  return @properties[af]
56
57
  end
@@ -69,7 +70,8 @@ class Deplate::Messages
69
70
  # position. Comments can only occur in the head/key position as
70
71
  # there is no message starting with #.
71
72
  def load_catalog(lang)
72
- langs, catalogs = Deplate::Core.collect_deplate_options('locale', 'locale', '')
73
+ langs, catalogs = Deplate::Core.collect_deplate_options('locale', 'locale',
74
+ :suffix => '')
73
75
  fname = catalogs[lang]
74
76
  if fname
75
77
  cat = []
File without changes
File without changes
File without changes
File without changes
@@ -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: 11-Sep-2004.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.93
6
+ # @Last Change: 12-Nov-2005.
7
+ # @Revision: 0.94
8
8
 
9
9
  class Deplate::Core
10
10
  def module_initialize_anyword
@@ -34,7 +34,7 @@ class Deplate::Core
34
34
 
35
35
  rx = acc.collect {|n| "(?i:\\b%s\\b)" % Regexp.escape(n)}.join("|")
36
36
  body = <<-EOR
37
- @rx = /^#{rx}/
37
+ set_rx(/^#{rx}/)
38
38
  def setup_element
39
39
  @inter = nil
40
40
  @literal = nil
@@ -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: 05-Sep-2004.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.21
6
+ # @Last Change: 25-Apr-2006.
7
+ # @Revision: 0.22
8
8
  #
9
9
  # Description:
10
10
  #
@@ -18,8 +18,8 @@
18
18
  class Deplate::Formatter::HTML
19
19
  def prepare_babelfish
20
20
  if @deplate.formatter.matches?("html")
21
- babel = %{<script type="text/javascript" language="JavaScript1.2" src="http://www.altavista.com/r?entr"></script>}
22
- # babel = %{<script type="text/javascript" language="JavaScript1.2" src="http://www.altavista.com/r?inc_translate"></script>}
21
+ babel = %{<script type="text/javascript" src="http://www.altavista.com/r?entr"></script>}
22
+ # babel = %{<script type="text/javascript" src="http://www.altavista.com/r?inc_translate"></script>}
23
23
  output_at(:post, :pre_body_end, %{<div align="right" class="pageicons">%s</div>} % babel)
24
24
  end
25
25
  end
@@ -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-Feb-2005.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.93
6
+ # @Last Change: 23-Dez-2005.
7
+ # @Revision: 0.97
8
8
  #
9
9
  # = Description
10
10
  # This module provides a specialized syntax highlighter using gvim. Adds
@@ -23,7 +23,7 @@ class Deplate::Regions::Code
23
23
  add_highlighter(nil, "htmlsite", :gvim_to_html)
24
24
 
25
25
  def gvim_to_html(syntax, style, text)
26
- unless @deplate.options.allow_external
26
+ unless @deplate.allow_external
27
27
  return
28
28
  end
29
29
  gvim = %{#{Deplate::External.get_app('gvim')} -f +"syn on" +"let use_xhtml = 1" +"setf #{syntax}" +"colorscheme #{style || "default"}" +"run! syntax/2html.vim" +"wq" +"q" deplateGvim}
@@ -37,7 +37,11 @@ class Deplate::Regions::Code
37
37
  until io.eof?
38
38
  line = io.gets
39
39
  line.chomp!
40
- rv << line if line =~ /^<pre>$/ .. line =~ /^<\/pre\>$/
40
+ if line =~ /^<pre>$/ .. line =~ /^<\/pre\>$/
41
+ line.gsub!(/<font (\w+)="(.+?)">(.*?)<\/font>/,
42
+ '<span style="\\1: \\2;">\\3</span>')
43
+ rv << line
44
+ end
41
45
  end
42
46
  end
43
47
  rv << %{</div>}
@@ -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: 27-Feb-2005.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.41
6
+ # @Last Change: 23-Dez-2005.
7
+ # @Revision: 0.42
8
8
  #
9
9
  # = Description
10
10
  # Highlight code regions using Andr� Simon's
@@ -41,7 +41,7 @@ class Deplate::Regions::Code
41
41
  end
42
42
 
43
43
  def highlight(syntax, style, text)
44
- unless @deplate.options.allow_external
44
+ unless @deplate.allow_external
45
45
  return
46
46
  end
47
47
  formatter = @deplate.formatter
File without changes
@@ -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: 07-Mai-2004.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.79
6
+ # @Last Change: 23-Apr-2006.
7
+ # @Revision: 0.80
8
8
 
9
9
  require 'deplate/messages'
10
10
 
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -3,18 +3,8 @@
3
3
  # @Website: http://deplate.sf.net/
4
4
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
5
  # @Created: 15-Nov-2004.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.43
8
- #
9
- # Description:
10
- #
11
- # Usage:
12
- #
13
- # TODO:
14
- #
15
- # CHANGES:
16
- #
17
-
6
+ # @Last Change: 14-Apr-2006.
7
+ # @Revision: 0.45
18
8
 
19
9
  class Deplate::Formatter::HTML
20
10
  def formatter_initialize_headings_navbar
@@ -27,7 +17,9 @@ class Deplate::Formatter::HTML
27
17
  max_level = 1
28
18
  end
29
19
  if invoker.level <= max_level
30
- nb = @deplate.invoke_service("navigation_bar", {:invoker => invoker, 'noNavButtons' => true})
20
+ nb = invoke_service("navigation_bar",
21
+ :invoker => invoker,
22
+ 'noNavButtons' => true)
31
23
  join_blocks([nb, rv])
32
24
  else
33
25
  rv
@@ -0,0 +1,39 @@
1
+ # html-jsmath.rb -- Support for jsmath.js
2
+ # @Author: Thomas Link (samul AT web.de)
3
+ # @Website: http://deplate.sf.net/
4
+ # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
+ # @Created: 30-Dez-2004.
6
+ # @Last Change: 25-Apr-2006.
7
+ # @Revision: 0.58
8
+
9
+ class Deplate::Formatter::HTML
10
+ def prepare_html_jsmath
11
+ output_at(:pre, :body_pre, <<END_OF_HTML
12
+ <script type="text/javascript" src="jsMath/jsMath.js"></script>
13
+ <noscript>
14
+ <div style="color:#CC0000; text-align:center">
15
+ <b>Warning: <a href="http://www.math.union.edu/locate/jsMath">jsMath</a>
16
+ requires JavaScript to process the mathematics on this page.<br/>
17
+ If your browser supports JavaScript, be sure it is enabled.</b>
18
+ </div>
19
+ <hr/>
20
+ </noscript>
21
+ END_OF_HTML
22
+ )
23
+ output_at(:post, :body_post, <<END_OF_HTML
24
+ <script> jsMath.Process() </script>
25
+ END_OF_HTML
26
+ )
27
+ end
28
+
29
+ alias :format_math_re_jsmath :format_math
30
+ def format_math(invoker)
31
+ m = /\$(.*?)\$/.match(invoker.text)
32
+ if m
33
+ %{<span class="math">#{m[1]}</span>}
34
+ else
35
+ invoker.log(['Internal error', invoker.text], :error)
36
+ end
37
+ end
38
+ end
39
+
@@ -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: 13-Jul-2005.
6
- # @Last Change: 27-Okt-2005.
7
- # @Revision: 0.33
6
+ # @Last Change: 25-Apr-2006.
7
+ # @Revision: 0.34
8
8
 
9
9
  class Deplate::Formatter::HTML
10
10
  alias :format_url_re_js_obfuscate_email :format_url
@@ -36,7 +36,7 @@ class Deplate::Formatter::HTML
36
36
  end
37
37
  end
38
38
  end
39
- js = %{<script type="text/javascript" language="javascript"><!--
39
+ js = %{<script type="text/javascript"><!--
40
40
  document.write(String.fromCharCode(#{encoded}))
41
41
  --></script><noscript>#{noscript}</noscript>}
42
42
  else
File without changes
@@ -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: 23-Okt-2005.
7
- # @Revision: 0.435
6
+ # @Last Change: 02-Apr-2006.
7
+ # @Revision: 0.436
8
8
 
9
9
 
10
10
  class Deplate::Formatter::HTML_Site
@@ -13,7 +13,7 @@ class Deplate::Formatter::HTML_Site
13
13
  navmenu = []
14
14
  doctitle = @deplate.get_clip("title")
15
15
  doctitle = if doctitle then doctitle.elt.to_s else "" end
16
- @deplate.each_heading(1) do |section, title|
16
+ @deplate.each_heading(:top) do |section, title|
17
17
  unless section.args["noList"]
18
18
  f = section.output_file_name
19
19
  v = section.description.gsub(/<\/?[^>]*>/, "")
File without changes
@@ -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: 05-Mai-2005.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.26
6
+ # @Last Change: 30-Mrz-2006.
7
+ # @Revision: 0.28
8
8
  #
9
9
  # = Description
10
10
  # Insert URLs to images as image
@@ -14,14 +14,14 @@ require 'deplate/wiki-markup'
14
14
  # Insert URLs to images as image
15
15
  class Deplate::HyperLink::ImgUrl < Deplate::Input::Wiki::AbstractImgUrl
16
16
  insert_particle_before(Deplate::HyperLink::Url)
17
- @rx = /^((file|https?|mailto|ftps?|www):(\S+?)\.(png|jpg|jpeg|gif|bmp))/
17
+ set_rx(/^((file|https?|mailto|ftps?|www):(\S+?)\.(png|jpg|jpeg|gif|bmp))/)
18
18
  end
19
19
 
20
20
  class Deplate::HyperLink::Extended
21
21
  alias :process_re_imgurl :process
22
22
  def process
23
23
  if @dest =~ /\.(png|jpg|jpeg|gif|bmp)$/
24
- @elt = @deplate.formatter.include_image(encode_path(@dest), @args, true)
24
+ @elt = @deplate.formatter.include_image(self, encode_path(@dest), @args, true)
25
25
  else
26
26
  process_re_imgurl
27
27
  end
@@ -3,12 +3,10 @@
3
3
  # @Website: http://deplate.sf.net/
4
4
  # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
5
  # @Created: 07-Apr-2005.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.39
6
+ # @Last Change: 02-Jan-2006.
7
+ # @Revision: 0.49
8
8
  #
9
9
  # = Description
10
- # This doesn't work yet.
11
- #
12
10
  # This module changes the way deplate processes inline latex fragments.
13
11
  # By default, deplate converts each fragment for its own. When using
14
12
  # this module, the latex fragments are collected in one file, are
@@ -41,12 +39,11 @@ class Deplate::Formatter
41
39
  inlatex_compound(pseudo)
42
40
  fnames = pseudo.elt
43
41
  if fnames.size != @inlatex_container.size
44
- log("Conversion if compound Inline LaTeX failed", :error)
45
- else
46
- @inlatex_container.each_with_index do |o, i|
47
- e = fnames[i]
48
- o.elt = [e]
49
- end
42
+ log(['Unexpected number of output files',
43
+ "#{fnames.size} (#{@inlatex_container.size})"], :error)
44
+ end
45
+ if @inlatex_container.kind_of?(Array) and fnames.kind_of?(Array)
46
+ @inlatex_container.each_with_index {|o, i| o.elt = [fnames[i]]}
50
47
  end
51
48
  end
52
49
 
File without changes
File without changes
@@ -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-Nov-2004.
6
- # @Last Change: 23-Okt-2005.
7
- # @Revision: 0.345
6
+ # @Last Change: 23-Mrz-2006.
7
+ # @Revision: 0.350
8
8
  #
9
9
  # Description:
10
10
  #
@@ -18,7 +18,6 @@
18
18
 
19
19
  # The dummy base style
20
20
  class Deplate::Formatter::LaTeX::Styles
21
-
22
21
  def initialize(deplate)
23
22
  @deplate = deplate
24
23
  @formatter = deplate.formatter
@@ -435,9 +434,13 @@ class Deplate::Formatter::LaTeX
435
434
  styles += style_var.split(/\s*,\s*/) if style_var
436
435
  end
437
436
  styles.compact!
437
+ style_arg = invoker.args["style"]
438
438
  for style in styles
439
439
  styler = @style_engines[style] || setup_styler(style)
440
- rv = styler.send(agent, rv, invoker, *args)
440
+ if styler
441
+ style_arg.delete(style) if style_arg
442
+ rv = styler.send(agent, rv, invoker, *args)
443
+ end
441
444
  end
442
445
  rv
443
446
  end
File without changes
@@ -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: 28-Aug-2005.
6
- # @Last Change: 31-Okt-2005.
7
- # @Revision: 0.143
6
+ # @Last Change: 25-Apr-2006.
7
+ # @Revision: 0.156
8
8
  #
9
9
  # = Description
10
10
  # Create a standard makefile.
@@ -47,7 +47,7 @@ class Deplate::Core
47
47
  genericViewer = 'gnome-open'
48
48
  elsif ENV['KDEDIR']
49
49
  genericViewer = 'kfmclient'
50
- elsif ENV['CYGWIN'] || ENV['CYGWIN_PATH']
50
+ elsif ENV['CYGWIN'] || ENV['CYGWIN_PATH'] || ENV['CYGWIN_HOME']
51
51
  genericViewer = 'cygstart'
52
52
  else
53
53
  genericViewer = 'echo Not supported: genericViewer '
@@ -111,7 +111,7 @@ makefile:
111
111
  website:
112
112
  mkdir -p ${WEBSITE_DIR}
113
113
  ${DEPLATE} ${DFLAGS} ${WEBSITE_DFLAGS} ${FILE} ${OTHER}
114
- echo ${website_dir}/${BASE}.html > .last_output
114
+ echo ${WEBSITE_DIR}/${BASE}.html > .last_output
115
115
 
116
116
  %.html: %#{suffix}
117
117
  mkdir -p ${HTML_DIR}
@@ -148,7 +148,7 @@ website:
148
148
  latex $<; \\
149
149
  bibtex $*; \\
150
150
  latex $<; \\
151
- latex $<; \\
151
+ latex $<;
152
152
  echo ${TEX_DIR}/$@ > .last_output
153
153
 
154
154
  %.pdf: %.tex
@@ -177,14 +177,30 @@ cleantex:
177
177
  MAKEFILE
178
178
 
179
179
  log('Writing Makefile', :anyway)
180
- File.open(File.join(@options.dir, 'Makefile'), 'w') do |io|
180
+ File.open(Deplate::Core.file_join(@options.dir, 'Makefile'), 'w') do |io|
181
181
  io.puts makefile
182
182
  end
183
183
  if File.exist?('Makefile.config')
184
184
  log('Makefile.config already exists', :anyway)
185
185
  else
186
186
  log('Writing Makefile.config', :anyway)
187
- File.open(File.join(@options.dir, 'Makefile.config'), 'w') do |io|
187
+ fname = find_in_lib('Makefile.config', :pwd => true)
188
+ if fname
189
+ cfg = File.open(fname) {|io| io.read}
190
+ tmpl = Deplate::Template.new(:template => cfg)
191
+ args = {
192
+ 'base0' => base0,
193
+ 'base' => base,
194
+ 'files' => files ? files.join(' ') : nil,
195
+ 'options' => options.join(' '),
196
+ }
197
+ Deplate::Define.let_variables(self, args) do
198
+ config = tmpl.fill_in(self, :source => @source)
199
+ end
200
+ else
201
+ log(['File not found', 'Makefile.config'], :error)
202
+ end
203
+ File.open(Deplate::Core.file_join(@options.dir, 'Makefile.config'), 'w') do |io|
188
204
  io.puts config
189
205
  end
190
206
  end