deplate 0.8.2 → 0.8.3
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.
- data/CHANGES.TXT +27 -57
- data/NEWS.TXT +7 -0
- data/VERSION.TXT +1 -1
- data/etc/deplate.ini +1 -3
- data/lib/deplate/commands.rb +3 -3
- data/lib/deplate/core.rb +4 -4
- data/lib/deplate/elements.rb +14 -9
- data/lib/deplate/etc.rb +3 -2
- data/lib/deplate/fmt/html.rb +4 -3
- data/lib/deplate/fmt/latex.rb +19 -12
- data/lib/deplate/formatter.rb +81 -65
- data/lib/deplate/regions.rb +2 -2
- data/lib/deplate/themes/presentation.html/css/presentation.css +5 -2
- data/lib/deplate/themes/presentation.html/css/{highstep.css → presentation_highstep.css} +1 -1
- data/lib/deplate/themes/presentation.html/css/{website.css → presentation_website.css} +0 -0
- data/lib/deplate/themes/presentation.html/theme.ini +1 -1
- metadata +6 -6
data/CHANGES.TXT
CHANGED
@@ -1,61 +1,31 @@
|
|
1
|
-
|
1
|
+
2008-07-10 Thomas Link (micathom at gmail com)
|
2
|
+
* core.rb (set_theme): Typo.
|
2
3
|
|
3
|
-
|
4
|
-
*
|
5
|
-
|
6
|
-
|
7
|
-
*
|
8
|
-
|
9
|
-
*
|
10
|
-
|
11
|
-
* latex.rb:
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
*
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
* elements.rb:
|
22
|
-
|
23
|
-
*
|
24
|
-
|
25
|
-
*
|
26
|
-
|
27
|
-
|
28
|
-
* formatter.rb: @format_advice_blacklist: Disable advices for
|
29
|
-
certain agents/methods.
|
30
|
-
* latex-styles.rb: Disable standard-processing of the style property
|
31
|
-
for tables.
|
32
|
-
* core.rb: ''allow=all'' pseudo state, run in "unsafe" mode and
|
33
|
-
allow everything.
|
34
|
-
* html-mathml.rb: Experimental support for mathml (requires to use
|
35
|
-
xhtml11m output format; you'll have to install the mathml package by
|
36
|
-
KURODA Hiraku: http://mathml.rubyforge.org).
|
37
|
-
* makefile: Made xhtml a "first-class" :) goal.
|
38
|
-
* macros.rb: The math macro takes a block! argument that makes it
|
39
|
-
wrap the text in ''\\[latex\\]''.
|
40
|
-
* particle-math.rb: Support for ''$$formula$$'' for block formulas.
|
41
|
-
* xhtml11m.rb: An uninformed hack on top of xhtml10t to support
|
42
|
-
mathml.
|
43
|
-
* makefile: xhtml now defaults to xhtml11m.
|
44
|
-
* code-coderay.rb: Support for the ruby syntax markup library
|
45
|
-
coderay http://coderay.rubychan.de
|
46
|
-
* latex.rb: format_quote(): Body gets wrapped twice.
|
47
|
-
TBD: Check if this is a more subtle problem. See
|
48
|
-
https://sourceforge.net/forum/message.php?msg_id=5041702
|
49
|
-
* formatter.rb: New variables ''wrapMargin'' and
|
50
|
-
''wrapMarginInner''.
|
51
|
-
* core.rb: Some support for themes (aka collections of an ini file,
|
52
|
-
css files, templates, a library, and a prelude)
|
53
|
-
* regions.rb: Fixed problem with R & newer version of xtable.
|
54
|
-
* core.rb: The rule for creating "clean" file names has slightly
|
55
|
-
changed again (_ becomes __ and not _5F)
|
56
|
-
* elements.rb: register_heading(): use @id instead of id in order to
|
57
|
-
prevent double cleansing.
|
58
|
-
* core.rb: Resource files for themes.
|
4
|
+
2008-07-09 Thomas Link (micathom at gmail com)
|
5
|
+
* etc.rb (footnote_setup): For inline footnotes, set args[:minor] =
|
6
|
+
true for all elements.
|
7
|
+
* latex.rb (format_paragraph): Respect args[:minor].
|
8
|
+
* formatter.rb (wrap_text): If a line matches /^\s+$/, push nil in
|
9
|
+
order to avoid additional linebreaks.
|
10
|
+
* latex.rb (format_footnote): The footnote body is surrounded by
|
11
|
+
linebreaks in the latex output.
|
12
|
+
* latex.rb (format_environment): rstrip the body.
|
13
|
+
* formatter.rb (wrap_text): strscan-based word wrap.
|
14
|
+
|
15
|
+
2008-07-08 Thomas Link (micathom at gmail com)
|
16
|
+
* html.rb (format_list_item): List items have an additional
|
17
|
+
"#{type}-#{level}" class
|
18
|
+
* formatter.rb (break_line): Removed
|
19
|
+
* formatter.rb (wrap_text): Rewrite. wrapMarginInner became
|
20
|
+
wrapMargin; wrapMarginInner is gone
|
21
|
+
* latex.rb (format_list_item): Adapted for new wrap_text algorithm
|
22
|
+
* elements.rb (Deplate::Element::Command.accumulate): Optional bang
|
23
|
+
"!" for commands
|
24
|
+
* elements.rb (Deplate::Element::Region#setup): Optional bang "!"
|
25
|
+
for regions
|
26
|
+
* commands.rb (Deplate::Command::CAP): "#CAP!" is equivalent to
|
27
|
+
''extended!''. There is a chance though this results in incorrect output
|
28
|
+
with, e.g., the docbook formatter
|
59
29
|
|
60
30
|
|
61
31
|
# vim: ft=changelog:tw=72
|
data/NEWS.TXT
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
* deplate 0.8.2
|
2
2
|
|
3
|
+
''deplate'' is a [[http://www.ruby-lang.org][ruby]] based tool for
|
4
|
+
converting documents written in wiki-like markup to LaTeX, HTML, "HTML
|
5
|
+
slides", or docbook. It supports page templates, embedded LaTeX code,
|
6
|
+
footnotes, citations, bibliographies, automatic generation of an index,
|
7
|
+
table of contents etc. It can be used to create web pages and (via
|
8
|
+
LaTeX or Docbook) high-quality printouts from the same source.
|
9
|
+
|
3
10
|
This release incorporates the usual set of bugfixes and general improvements.
|
4
11
|
|
5
12
|
Incompatible changes:
|
data/VERSION.TXT
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.3final-3107
|
data/etc/deplate.ini
CHANGED
@@ -229,11 +229,9 @@
|
|
229
229
|
|
230
230
|
; verbatimMargin :: Wrap verbatim regions at this width (NUMBER)
|
231
231
|
|
232
|
-
; wrapMargin ::
|
232
|
+
; wrapMargin :: Wrap margin; set to 0 to prevent text wrap
|
233
233
|
; (NUMBER, default: 72)
|
234
234
|
|
235
|
-
; wrapMarginInner :: Inner wrap margin (NUMBER, default: 66)
|
236
|
-
|
237
235
|
|
238
236
|
; *** Output Format
|
239
237
|
; **** HTML
|
data/lib/deplate/commands.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: 08-Mai-2004.
|
6
|
-
# @Last Change: 2008-07-
|
7
|
-
# @Revision: 0.
|
6
|
+
# @Last Change: 2008-07-08.
|
7
|
+
# @Revision: 0.1310
|
8
8
|
|
9
9
|
# Description:
|
10
10
|
#
|
@@ -114,7 +114,7 @@ class Deplate::Command::CAP < Deplate::Command
|
|
114
114
|
Deplate::Core.log("%s: %s" % [cmd, text], :debug, src)
|
115
115
|
last = array.last
|
116
116
|
if last
|
117
|
-
last.set_caption(Deplate::CaptionDef.new(text, args, src), false, args['extended'])
|
117
|
+
last.set_caption(Deplate::CaptionDef.new(text, args, src), false, args['extended'] || args['bang'])
|
118
118
|
else
|
119
119
|
Deplate::Core.log(["Cannot attach caption to", nil], :error, src)
|
120
120
|
end
|
data/lib/deplate/core.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# @Website: http://deplate.sf.net/
|
4
4
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
5
|
# @Created: 24-Feb-2004.
|
6
|
-
# @Last Change: 2008-07-
|
6
|
+
# @Last Change: 2008-07-10.
|
7
7
|
|
8
8
|
require 'uri'
|
9
9
|
require 'optparse'
|
@@ -26,10 +26,10 @@ module Deplate; end
|
|
26
26
|
class Deplate::Core
|
27
27
|
extend Forwardable
|
28
28
|
|
29
|
-
Version = '0.8.
|
29
|
+
Version = '0.8.3'
|
30
30
|
# VersionSfx = 'a'
|
31
31
|
VersionSfx = 'final'
|
32
|
-
MicroRev = '
|
32
|
+
MicroRev = '3107'
|
33
33
|
|
34
34
|
if ENV['HOME']
|
35
35
|
CfgDir = File.join(ENV['HOME'].gsub(/\\/, '/'), '.deplate')
|
@@ -655,7 +655,7 @@ MESSAGE
|
|
655
655
|
end
|
656
656
|
end
|
657
657
|
else
|
658
|
-
log(['Unknown theme',
|
658
|
+
log(['Unknown theme', name], :error)
|
659
659
|
end
|
660
660
|
end
|
661
661
|
|
data/lib/deplate/elements.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: 26-M�r-2004.
|
6
|
-
# @Last Change: 2008-07-
|
7
|
-
# @Revision: 0.
|
6
|
+
# @Last Change: 2008-07-09.
|
7
|
+
# @Revision: 0.4539
|
8
8
|
|
9
9
|
require "deplate/abstract-class"
|
10
10
|
|
@@ -315,9 +315,9 @@ class Deplate::Element < Deplate::BaseElement
|
|
315
315
|
end
|
316
316
|
if elt
|
317
317
|
acc = []
|
318
|
-
acc <<
|
318
|
+
pre = format_prologue and acc << pre
|
319
319
|
acc << elt
|
320
|
-
acc <<
|
320
|
+
post = format_epilogue and acc << post
|
321
321
|
label_accum(acc, formatting_method) if doc_type == :body
|
322
322
|
rv = @deplate.formatter.join_blocks(acc.compact)
|
323
323
|
else
|
@@ -870,14 +870,16 @@ end
|
|
870
870
|
|
871
871
|
class Deplate::Element::Region < Deplate::Element
|
872
872
|
register_element
|
873
|
-
set_rx(/^(\s*)#([A-Z]([a-z][A-Za-z]*)?)\b(.*)(\<\<(.*)|:)\s*$/)
|
873
|
+
set_rx(/^(\s*)#([A-Z]([a-z][A-Za-z]*)?)\b(!)?(.*)(\<\<(.*)|:)\s*$/)
|
874
874
|
|
875
875
|
class_attribute :rxi_indent, 1
|
876
876
|
class_attribute :rxi_name, 2
|
877
|
-
class_attribute :
|
878
|
-
class_attribute :
|
877
|
+
class_attribute :rxi_bang, 4
|
878
|
+
class_attribute :rxi_args, 5
|
879
|
+
class_attribute :rxi_endrx, 7
|
879
880
|
|
880
881
|
def_get :name, lambda {@match[self.class.rxi_name]}
|
882
|
+
def_get :bang, lambda {@match[self.class.rxi_bang]}
|
881
883
|
def_get :args, lambda {@match[self.class.rxi_args]}
|
882
884
|
def_get :indent, lambda {@match[self.class.rxi_indent]}
|
883
885
|
def_get :endrx, lambda {
|
@@ -901,6 +903,7 @@ class Deplate::Element::Region < Deplate::Element
|
|
901
903
|
rv[rxi_args] = args[:args]
|
902
904
|
rv[rxi_name] = args[:name]
|
903
905
|
rv[rxi_endrx] = args[:endrx]
|
906
|
+
rv[rxi_bang] = args[:bang]
|
904
907
|
rv
|
905
908
|
end
|
906
909
|
end
|
@@ -919,6 +922,7 @@ class Deplate::Element::Region < Deplate::Element
|
|
919
922
|
@args, @regNote = @deplate.input.parse_args(get_args)
|
920
923
|
end
|
921
924
|
@args = @args.merge(@deplate.variables["args@#{@name}"] || {})
|
925
|
+
@args['bang'] = true if get_bang
|
922
926
|
Deplate::Region.deprecated_regnote(self, @args, @regNote)
|
923
927
|
region = @deplate.input.regions[@name]
|
924
928
|
unless region
|
@@ -959,7 +963,7 @@ end
|
|
959
963
|
|
960
964
|
class Deplate::Element::Command < Deplate::Element
|
961
965
|
register_element
|
962
|
-
set_rx(/^\s*#([A-Z]+)
|
966
|
+
set_rx(/^\s*#([A-Z]+)(!)?\s*?((\s[^:]+)?(:\s*(.+?)\s*)?)$/)
|
963
967
|
attr :name
|
964
968
|
|
965
969
|
class << self
|
@@ -976,8 +980,9 @@ class Deplate::Element::Command < Deplate::Element
|
|
976
980
|
cmd = match[1]
|
977
981
|
Deplate::Core.log(['Command', cmd, text], :debug)
|
978
982
|
begin
|
979
|
-
args, text = deplate.input.parse_args(match[
|
983
|
+
args, text = deplate.input.parse_args(match[3])
|
980
984
|
args = args.merge(deplate.variables["args@#{cmd}"] || {})
|
985
|
+
args['bang'] = true if match[2]
|
981
986
|
case cmd
|
982
987
|
when 'IF'
|
983
988
|
deplate.switches << !check_switch(deplate, text)
|
data/lib/deplate/etc.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: 16-Okt-2005.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
6
|
+
# @Last Change: 2008-07-09.
|
7
|
+
# @Revision: 0.319
|
8
8
|
|
9
9
|
require 'deplate/common'
|
10
10
|
|
@@ -90,6 +90,7 @@ module Deplate::Footnote
|
|
90
90
|
# @level = @container.level
|
91
91
|
fn = Deplate::Regions::Footnote.new(@deplate, @source, @fnId, {}, self)
|
92
92
|
fn.finish
|
93
|
+
fn.elt.each {|e| e.args[:minor] = true}
|
93
94
|
else
|
94
95
|
@fnId ||= text
|
95
96
|
end
|
data/lib/deplate/fmt/html.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: 17-M�r-2004.
|
6
|
-
# @Last Change: 2008-07-
|
7
|
-
# @Revision: 0.
|
6
|
+
# @Last Change: 2008-07-10.
|
7
|
+
# @Revision: 0.4328
|
8
8
|
|
9
9
|
# require 'cgi'
|
10
10
|
require 'uri'
|
@@ -378,6 +378,7 @@ EOT
|
|
378
378
|
end
|
379
379
|
|
380
380
|
def wrap_text(text, args={})
|
381
|
+
# args[:break_at] ||= '>'
|
381
382
|
args[:check] ||= lambda do |line|
|
382
383
|
line =~ /<[^>]*$/
|
383
384
|
end
|
@@ -431,7 +432,7 @@ EOT
|
|
431
432
|
def format_list_item(invoker, type, level, item, args={})
|
432
433
|
indent = format_indent(level, true)
|
433
434
|
body = item.body
|
434
|
-
opts = {'class' => []}
|
435
|
+
opts = {'class' => ["#{type}-#{level}"]}
|
435
436
|
html_class ||= get_html_class(invoker, :add => item.style, :set => false)
|
436
437
|
if html_class
|
437
438
|
opts['class'] << html_class
|
data/lib/deplate/fmt/latex.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# latex.rb
|
2
2
|
# @Author: Thomas Link (micathom AT gmail com)
|
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: 2008-07-
|
7
|
-
# @Revision: 0.
|
6
|
+
# @Last Change: 2008-07-10.
|
7
|
+
# @Revision: 0.2164
|
8
8
|
|
9
9
|
require "deplate/formatter"
|
10
10
|
|
@@ -291,19 +291,20 @@ class Deplate::Formatter::LaTeX < Deplate::Formatter
|
|
291
291
|
indent = format_indent(level, true)
|
292
292
|
ctag = list_wide? ? '' : :empty
|
293
293
|
explv = list_item_explicit_value(item)
|
294
|
+
hang = 4
|
294
295
|
if explv
|
295
296
|
explv = %{[#{explv}]}
|
296
297
|
end
|
297
298
|
case type
|
298
299
|
when "Ordered"
|
299
|
-
return wrap_text("#{indent}\\item#{explv} #{item.body}", :
|
300
|
+
return wrap_text("#{indent}\\item#{explv} #{item.body}", :hanging => hang), ctag
|
300
301
|
when "Itemize"
|
301
|
-
return wrap_text("#{indent}\\item #{item.body}", :
|
302
|
+
return wrap_text("#{indent}\\item #{item.body}", :hanging => hang), ctag
|
302
303
|
when "Description"
|
303
|
-
return wrap_text("#{indent}\\item[#{item.item}] #{item.body}", :
|
304
|
+
return wrap_text("#{indent}\\item[#{item.item}] #{item.body}", :hanging => hang), ctag
|
304
305
|
when 'Custom'
|
305
306
|
t = item.opts[:custom]
|
306
|
-
return wrap_text("#{indent}\\#{t}Item{#{item.item}}{#{item.body}}", :
|
307
|
+
return wrap_text("#{indent}\\#{t}Item{#{item.item}}{#{item.body}}", :hanging => hang), ctag
|
307
308
|
when 'Task'
|
308
309
|
pri = item.opts[:priority]
|
309
310
|
cat = item.opts[:category]
|
@@ -321,10 +322,11 @@ class Deplate::Formatter::LaTeX < Deplate::Formatter
|
|
321
322
|
body = "\\taskdone{#{body}}"
|
322
323
|
end
|
323
324
|
it = "#{indent}\\task{#{lab}}{#{body}}"
|
324
|
-
return wrap_text(it, :
|
325
|
+
return wrap_text(it, :hanging => hang), nil
|
325
326
|
when "Paragraph"
|
326
327
|
fs = list_wide? ? "\n%s\n" : "\n%s"
|
327
|
-
return fs % wrap_text("#{indent}#{item.body}", :indent => " "), nil
|
328
|
+
# return fs % wrap_text("#{indent}#{item.body}", :indent => " "), nil
|
329
|
+
return fs % wrap_text("#{indent}#{item.body}"), nil
|
328
330
|
when 'Container'
|
329
331
|
fs = list_wide? ? "\n%s\n" : "\n%s"
|
330
332
|
return fs % item.body, nil
|
@@ -376,7 +378,7 @@ class Deplate::Formatter::LaTeX < Deplate::Formatter
|
|
376
378
|
|
377
379
|
################################################ General {{{1
|
378
380
|
def format_environment(invoker, env, text, opts=nil)
|
379
|
-
join_blocks(["\\begin{#{env}}", text, "\\end{#{env}}\n"])
|
381
|
+
join_blocks(["\\begin{#{env}}", text.rstrip, "\\end{#{env}}\n"])
|
380
382
|
end
|
381
383
|
|
382
384
|
def format_label(invoker, mode=nil, label=nil)
|
@@ -680,7 +682,12 @@ class Deplate::Formatter::LaTeX < Deplate::Formatter
|
|
680
682
|
end
|
681
683
|
|
682
684
|
def format_paragraph(invoker)
|
683
|
-
|
685
|
+
rv = wrap_text(invoker.elt)
|
686
|
+
if invoker.args[:minor]
|
687
|
+
return rv
|
688
|
+
else
|
689
|
+
return join_blocks([rv, ""])
|
690
|
+
end
|
684
691
|
end
|
685
692
|
|
686
693
|
|
@@ -925,7 +932,7 @@ class Deplate::Formatter::LaTeX < Deplate::Formatter
|
|
925
932
|
if elt
|
926
933
|
body = elt.format_current
|
927
934
|
if body
|
928
|
-
return "\\footnote{#{body.rstrip}}"
|
935
|
+
return "\\footnote{%\n#{body.rstrip}%\n}"
|
929
936
|
end
|
930
937
|
end
|
931
938
|
return ''
|
data/lib/deplate/formatter.rb
CHANGED
@@ -3,11 +3,12 @@
|
|
3
3
|
# @Website: http://deplate.sf.net/
|
4
4
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
5
|
# @Created: 31-Okt-2004.
|
6
|
-
# @Last Change: 2008-07-
|
7
|
-
# @Revision: 0.
|
6
|
+
# @Last Change: 2008-07-10.
|
7
|
+
# @Revision: 0.2017
|
8
8
|
|
9
9
|
require 'deplate/abstract-class'
|
10
10
|
require 'deplate/common'
|
11
|
+
require 'strscan'
|
11
12
|
|
12
13
|
# Description:
|
13
14
|
# An abstract formatter class
|
@@ -794,74 +795,89 @@ class Deplate::Formatter < Deplate::CommonObject
|
|
794
795
|
# Takes an optional block that takes a string as argument and returns
|
795
796
|
# true if we shouldn't wrap the text at this position
|
796
797
|
def wrap_text(text, args={})
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
hanging = args[:hanging] || nil
|
807
|
-
hang_idt = hanging ? ' ' * hanging : nil
|
808
|
-
acc = []
|
809
|
-
block = args[:check]
|
810
|
-
break_at = args[:break_at]
|
811
|
-
if break_at
|
812
|
-
rx = /(\s+|([#{break_at}]+))/
|
813
|
-
else
|
814
|
-
rx = /\s+/
|
815
|
-
end
|
798
|
+
margin = args[:margin] || (wm = @deplate.variables['wrapMargin'] and wm.to_i) || 72
|
799
|
+
return text if margin == 0
|
800
|
+
moreIndent = args[:indent] || ''
|
801
|
+
hanging = args[:hanging] || 0
|
802
|
+
hang_idt = ' ' * hanging
|
803
|
+
block = args[:check]
|
804
|
+
break_at = args[:break_at]
|
805
|
+
acc = []
|
806
|
+
rx = /(\n|[[:space:]#{break_at}]+)/
|
816
807
|
text.each do |text|
|
817
|
-
if text.kind_of?(Array)
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
x = m[1].size + 1
|
857
|
-
return tt[0..-x], m[1] + m.post_match
|
808
|
+
# if text.kind_of?(Array)
|
809
|
+
# log("We shouldn't be here. If you can track down when this happens, please send an example to the author.", :error)
|
810
|
+
# puts caller[0..10].join("\n")
|
811
|
+
# return ''
|
812
|
+
# elsif /^\s+$/ =~ text
|
813
|
+
if /^\s*$/ =~ text
|
814
|
+
acc << nil
|
815
|
+
next
|
816
|
+
else
|
817
|
+
m = /^(\s*)(.*)$/.match(text.chomp)
|
818
|
+
accum = [m[1]]
|
819
|
+
idt = m[1] + moreIndent + hang_idt
|
820
|
+
marg = margin - idt.size
|
821
|
+
lmar = 0
|
822
|
+
pos0 = 0
|
823
|
+
col0 = 0
|
824
|
+
line = m[2]
|
825
|
+
scanner = StringScanner.new(line)
|
826
|
+
mpos = scanner.skip_until(rx)
|
827
|
+
while mpos
|
828
|
+
pos = scanner.pos
|
829
|
+
col = pos - lmar
|
830
|
+
part = line[lmar, col - scanner.matched_size]
|
831
|
+
good = !(block and block.call(part))
|
832
|
+
if col - scanner.matched_size > marg and good
|
833
|
+
accum << idt unless lmar == 0
|
834
|
+
if pos0 == lmar
|
835
|
+
part = line[lmar, col]
|
836
|
+
accum << part
|
837
|
+
push_linebreak(accum, part)
|
838
|
+
lmar = pos
|
839
|
+
mpos = scanner.skip_until(rx)
|
840
|
+
else
|
841
|
+
part = line[lmar, col0]
|
842
|
+
accum << part
|
843
|
+
push_linebreak(accum, part)
|
844
|
+
lmar = pos0
|
845
|
+
next
|
846
|
+
end
|
858
847
|
else
|
859
|
-
|
848
|
+
mpos = scanner.skip_until(rx)
|
849
|
+
end
|
850
|
+
if good
|
851
|
+
pos0 = pos
|
852
|
+
col0 = col
|
860
853
|
end
|
861
854
|
end
|
862
|
-
|
863
|
-
|
855
|
+
part = line[lmar, col0]
|
856
|
+
# if /\S/ =~ part
|
857
|
+
accum << idt unless lmar == 0
|
858
|
+
# p "DBG wrap_text", line
|
859
|
+
# p !(block and block.call(part))
|
860
|
+
if line.size - lmar - 1 > marg and pos0 != lmar and !(block and block.call(part))
|
861
|
+
# p "DBG1", part
|
862
|
+
accum << part
|
863
|
+
push_linebreak(accum, part)
|
864
|
+
accum << idt << line[pos0, line.size - pos0]
|
865
|
+
else
|
866
|
+
part = line[lmar, line.size - lmar]
|
867
|
+
# p "DBG2", part
|
868
|
+
accum << part
|
869
|
+
end
|
870
|
+
# end
|
871
|
+
acc << accum.join
|
872
|
+
end
|
864
873
|
end
|
874
|
+
return acc.join("\n")
|
875
|
+
end
|
876
|
+
|
877
|
+
def push_linebreak(accum, part, add_blank=true)
|
878
|
+
if part
|
879
|
+
accum << ' ' if add_blank and /\s$/ !~ part
|
880
|
+
accum << "\n"
|
865
881
|
end
|
866
882
|
end
|
867
883
|
|
data/lib/deplate/regions.rb
CHANGED
@@ -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-
|
5
|
-
/* @Revision: 0.
|
4
|
+
/* @Last Change: 2008-07-08. */
|
5
|
+
/* @Revision: 0.637 */
|
6
6
|
|
7
7
|
body, table, div {
|
8
8
|
/* font-family: Georgia, Bookman, Times, Serif; */
|
@@ -72,6 +72,9 @@ blockquote.abstract {
|
|
72
72
|
font-style: italic;
|
73
73
|
}
|
74
74
|
|
75
|
+
li.Itemize-1 {
|
76
|
+
list-style-type : none;
|
77
|
+
}
|
75
78
|
dt {
|
76
79
|
font-weight: bold;
|
77
80
|
}
|
File without changes
|
@@ -8,7 +8,7 @@ mod html-obfuscate-email
|
|
8
8
|
% mod code-gvim71
|
9
9
|
|
10
10
|
option template=presentation.html
|
11
|
-
css=+doc.css,
|
11
|
+
css=+doc.css, presentation_website.css, +presentation_highstep.css, +presentation.css
|
12
12
|
|
13
13
|
; autoFileNames=true
|
14
14
|
stepwiseContinous=confirm
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deplate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Link
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-07-
|
12
|
+
date: 2008-07-10 00:00:00 +02:00
|
13
13
|
default_executable: deplate
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -223,9 +223,9 @@ files:
|
|
223
223
|
- lib/deplate/themes
|
224
224
|
- lib/deplate/themes/presentation.html
|
225
225
|
- lib/deplate/themes/presentation.html/css
|
226
|
-
- lib/deplate/themes/presentation.html/css/highstep.css
|
227
226
|
- lib/deplate/themes/presentation.html/css/presentation.css
|
228
|
-
- lib/deplate/themes/presentation.html/css/
|
227
|
+
- lib/deplate/themes/presentation.html/css/presentation_highstep.css
|
228
|
+
- lib/deplate/themes/presentation.html/css/presentation_website.css
|
229
229
|
- lib/deplate/themes/presentation.html/prelude.txt
|
230
230
|
- lib/deplate/themes/presentation.html/resources
|
231
231
|
- lib/deplate/themes/presentation.html/resources/spacer.png
|
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
267
|
version:
|
268
268
|
requirements: []
|
269
269
|
|
270
|
-
rubyforge_project:
|
270
|
+
rubyforge_project: deplategem
|
271
271
|
rubygems_version: 1.2.0
|
272
272
|
signing_key:
|
273
273
|
specification_version: 2
|