deplate 0.7.3 → 0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS.TXT +3 -0
- data/CHANGES.TXT +248 -175
- data/LICENSE.TXT +0 -0
- data/NEWS.TXT +28 -24
- data/README.TXT +0 -0
- data/TODO.TXT +174 -88
- data/VERSION.TXT +1 -1
- data/bin/deplate +0 -0
- data/bin/deplate.bat +0 -0
- data/etc/deplate.ini +91 -3
- data/lib/action_view/helpers/deplate.rb +45 -0
- data/lib/deplate.rb +6 -1
- data/lib/deplate/abstract-class.rb +0 -0
- data/lib/deplate/bib.rb +576 -0
- data/lib/deplate/builtin.rb +0 -0
- data/lib/deplate/cache.rb +55 -5
- data/lib/deplate/commands.rb +346 -183
- data/lib/deplate/common.rb +209 -48
- data/lib/deplate/converter.rb +12 -6
- data/lib/deplate/core.rb +777 -378
- data/lib/deplate/counters.rb +254 -0
- data/lib/deplate/css/article.css +4 -3
- data/lib/deplate/css/deplate.css +121 -5
- data/lib/deplate/css/heading-navbar.css +0 -0
- data/lib/deplate/css/layout-deplate-print.css +0 -0
- data/lib/deplate/css/layout-deplate.css +0 -0
- data/lib/deplate/css/sans-serif.css +0 -0
- data/lib/deplate/css/serif-e.css +0 -0
- data/lib/deplate/css/serif-rel.css +0 -0
- data/lib/deplate/css/serif.css +9 -3
- data/lib/deplate/css/slides.css +0 -0
- data/lib/deplate/css/tabbar-left.css +0 -0
- data/lib/deplate/css/tabbar-right-ie.css +3 -9
- data/lib/deplate/css/tabbar-right.css +51 -18
- data/lib/deplate/css/tabbar-top.css +7 -1
- data/lib/deplate/css/tabbar.css +0 -0
- data/lib/deplate/css/text-sans-serif.css +0 -0
- data/lib/deplate/css/text-serif.css +0 -0
- data/lib/deplate/define.rb +183 -177
- data/lib/deplate/deplate-string.rb +82 -0
- data/lib/deplate/docbook.rb +236 -128
- data/lib/deplate/elements.rb +584 -417
- data/lib/deplate/etc.rb +163 -101
- data/lib/deplate/external.rb +42 -11
- data/lib/deplate/fmt/dbk-article-4.1.2.rb +0 -0
- data/lib/deplate/fmt/dbk-article.rb +0 -0
- data/lib/deplate/fmt/dbk-book.rb +0 -0
- data/lib/deplate/fmt/dbk-ref.rb +3 -3
- data/lib/deplate/fmt/dbk-slides.rb +0 -0
- data/lib/deplate/fmt/dbk-snippet.rb +0 -0
- data/lib/deplate/fmt/html-snippet.rb +0 -0
- data/lib/deplate/fmt/html.rb +783 -550
- data/lib/deplate/fmt/htmlsite.rb +192 -199
- data/lib/deplate/fmt/htmlslides.rb +0 -0
- data/lib/deplate/fmt/htmlwebsite.rb +3 -3
- data/lib/deplate/fmt/latex-snippet.rb +0 -0
- data/lib/deplate/fmt/latex.rb +242 -83
- data/lib/deplate/fmt/null.rb +32 -0
- data/lib/deplate/fmt/php.rb +4 -4
- data/lib/deplate/fmt/phpsite.rb +6 -5
- data/lib/deplate/fmt/plain.rb +160 -106
- data/lib/deplate/fmt/template.rb +0 -0
- data/lib/deplate/fmt/xhtml10t.rb +0 -0
- data/lib/deplate/formatter-snippet.rb +0 -0
- data/lib/deplate/formatter.rb +613 -301
- data/lib/deplate/input.rb +202 -142
- data/lib/deplate/input/deplate-headings.rb +4 -6
- data/lib/deplate/input/deplate-restricted.rb +15 -9
- data/lib/deplate/input/deplate.rb +2 -4
- data/lib/deplate/input/rdoc.rb +39 -38
- data/lib/deplate/input/template.rb +0 -0
- data/lib/deplate/lib/Makefile.config +29 -0
- data/lib/deplate/lib/latex/deplate.sty +54 -0
- data/lib/deplate/lib/latex/highlight-extra.sty +0 -0
- data/lib/deplate/lib/latex/highlight-typical.sty +0 -0
- data/lib/deplate/lib/php/page-comment.inc.php +216 -0
- data/lib/deplate/lib/tabmenu.js +0 -0
- data/lib/deplate/locale/de.latin1 +155 -17
- data/lib/deplate/locale/ru.koi8-r +0 -0
- data/lib/deplate/locale/zh_cn.gb2312 +0 -0
- data/lib/deplate/macros.rb +133 -82
- data/lib/deplate/messages.rb +6 -4
- data/lib/deplate/metadata.rb +0 -0
- data/lib/deplate/metadata/marshal.rb +0 -0
- data/lib/deplate/metadata/xml.rb +0 -0
- data/lib/deplate/metadata/yaml.rb +0 -0
- data/lib/deplate/mod/anyword.rb +3 -3
- data/lib/deplate/mod/babelfish.rb +4 -4
- data/lib/deplate/mod/code-gvim.rb +8 -4
- data/lib/deplate/mod/code-highlight.rb +3 -3
- data/lib/deplate/mod/colored-log.rb +0 -0
- data/lib/deplate/mod/de.rb +2 -2
- data/lib/deplate/mod/en.rb +0 -0
- data/lib/deplate/mod/endnotes.rb +0 -0
- data/lib/deplate/mod/fr.rb +0 -0
- data/lib/deplate/mod/html-asciimath.rb +0 -0
- data/lib/deplate/mod/html-deplate-button.rb +0 -0
- data/lib/deplate/mod/html-headings-navbar.rb +5 -13
- data/lib/deplate/mod/html-jsmath.rb +39 -0
- data/lib/deplate/mod/html-obfuscate-email.rb +3 -3
- data/lib/deplate/mod/html-sidebar.rb +0 -0
- data/lib/deplate/mod/htmlslides-navbar-fh.rb +3 -3
- data/lib/deplate/mod/iconv.rb +0 -0
- data/lib/deplate/mod/imgurl.rb +4 -4
- data/lib/deplate/mod/inlatex-compound.rb +7 -10
- data/lib/deplate/mod/koma.rb +0 -0
- data/lib/deplate/mod/latex-emph-table-head.rb +0 -0
- data/lib/deplate/mod/latex-styles.rb +7 -4
- data/lib/deplate/mod/latex-verbatim-small.rb +0 -0
- data/lib/deplate/mod/makefile.rb +23 -7
- data/lib/deplate/mod/mark-external-urls.rb +3 -3
- data/lib/deplate/mod/markup-1-warn.rb +10 -10
- data/lib/deplate/mod/markup-1.rb +0 -0
- data/lib/deplate/mod/navbar-png.rb +24 -8
- data/lib/deplate/mod/noindent.rb +0 -0
- data/lib/deplate/mod/numpara.rb +0 -0
- data/lib/deplate/mod/particle-math.rb +4 -4
- data/lib/deplate/mod/php-extra.rb +46 -6
- data/lib/deplate/mod/pstoedit.rb +0 -0
- data/lib/deplate/mod/recode.rb +0 -0
- data/lib/deplate/mod/ru_koi8-r.rb +0 -0
- data/lib/deplate/mod/smart-dash.rb +26 -0
- data/lib/deplate/mod/smiley.rb +69 -7
- data/lib/deplate/mod/soffice.rb +0 -0
- data/lib/deplate/mod/symbols-latin1.rb +14 -23
- data/lib/deplate/mod/symbols-od-utf-8.rb +5 -3
- data/lib/deplate/mod/symbols-plain.rb +5 -35
- data/lib/deplate/mod/symbols-sgml.rb +8 -9
- data/lib/deplate/mod/symbols-utf-8.rb +8 -9
- data/lib/deplate/mod/symbols-xml.rb +5 -9
- data/lib/deplate/mod/syntax-region-alt.rb +5 -5
- data/lib/deplate/mod/utf8.rb +0 -0
- data/lib/deplate/mod/validate-html.rb +0 -0
- data/lib/deplate/mod/xmlrpc.rb +0 -0
- data/lib/deplate/mod/zh-cn-autospace.rb +18 -20
- data/lib/deplate/mod/zh-cn.rb +4 -6
- data/lib/deplate/nukumi2.rb +71 -0
- data/lib/deplate/once-method.rb +0 -0
- data/lib/deplate/output.rb +19 -21
- data/lib/deplate/particles.rb +178 -116
- data/lib/deplate/regions.rb +99 -58
- data/lib/deplate/skeletons.rb +122 -0
- data/lib/deplate/structured.rb +164 -106
- data/lib/deplate/template.rb +67 -43
- data/lib/deplate/templates/html-doc.html +0 -0
- data/lib/deplate/templates/html-left-tabbar-js.html +0 -0
- data/lib/deplate/templates/html-left-tabbar.html +0 -0
- data/lib/deplate/templates/html-tabbar-right-pcomments.php +22 -0
- data/lib/deplate/templates/html-tabbar-right-step.html +24 -0
- data/lib/deplate/templates/html-tabbar-right-table.html +0 -0
- data/lib/deplate/templates/html-tabbar-right.html +2 -4
- data/lib/deplate/templates/html-tabbar-top.html +0 -9
- data/lib/deplate/templates/html-tabbar.html +0 -0
- data/lib/deplate/variables.rb +127 -0
- data/lib/deplate/wiki-markup.rb +99 -33
- data/lib/deplate/xml.rb +18 -18
- data/lib/deplate/zh-cn.rb +0 -0
- data/lib/ps2ppm.rb +0 -0
- data/man/man1/deplate.1 +564 -474
- metadata +201 -186
data/lib/deplate/messages.rb
CHANGED
@@ -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-
|
7
|
-
# @Revision: 0.
|
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
|
-
|
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 = []
|
data/lib/deplate/metadata.rb
CHANGED
File without changes
|
File without changes
|
data/lib/deplate/metadata/xml.rb
CHANGED
File without changes
|
File without changes
|
data/lib/deplate/mod/anyword.rb
CHANGED
@@ -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:
|
7
|
-
# @Revision: 0.
|
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
|
-
|
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:
|
7
|
-
# @Revision: 0.
|
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"
|
22
|
-
# babel = %{<script type="text/javascript"
|
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-
|
7
|
-
# @Revision: 0.
|
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.
|
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
|
-
|
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-
|
7
|
-
# @Revision: 0.
|
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.
|
44
|
+
unless @deplate.allow_external
|
45
45
|
return
|
46
46
|
end
|
47
47
|
formatter = @deplate.formatter
|
File without changes
|
data/lib/deplate/mod/de.rb
CHANGED
data/lib/deplate/mod/en.rb
CHANGED
File without changes
|
data/lib/deplate/mod/endnotes.rb
CHANGED
File without changes
|
data/lib/deplate/mod/fr.rb
CHANGED
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:
|
7
|
-
# @Revision: 0.
|
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 =
|
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:
|
7
|
-
# @Revision: 0.
|
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"
|
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:
|
7
|
-
# @Revision: 0.
|
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(
|
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(/<\/?[^>]*>/, "")
|
data/lib/deplate/mod/iconv.rb
CHANGED
File without changes
|
data/lib/deplate/mod/imgurl.rb
CHANGED
@@ -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:
|
7
|
-
# @Revision: 0.
|
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
|
-
|
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:
|
7
|
-
# @Revision: 0.
|
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(
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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
|
|
data/lib/deplate/mod/koma.rb
CHANGED
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-
|
7
|
-
# @Revision: 0.
|
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
|
-
|
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
|
data/lib/deplate/mod/makefile.rb
CHANGED
@@ -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:
|
7
|
-
# @Revision: 0.
|
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 ${
|
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(
|
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
|
-
|
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
|