ulmul 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ 2010-05-26 Takeshi Nishimatsu <t-nissie@imr.tohoku.ac.jp>
2
+
3
+ * ulmul.gemspec: slidy.js -> ulmul-slidy.js
4
+ Original slidy.js of 2009 is used.
5
+ Version 0.4.0.
6
+
1
7
  2008-12-27 Takeshi Nishimatsu
2
8
 
3
9
  * lib/ulmul.rb: documents for release.
data/README-en CHANGED
@@ -2,7 +2,7 @@
2
2
  "ULMUL" is an original Ultra Lightweight MarkUp Language.
3
3
  ULMUL texts can be converted into HTML5 with "ulmul2html5" command
4
4
  and into XHTML with "ulmul2xhtml" command.
5
- TeX stile equations are converted into MathML.
5
+ TeX style equations are converted into MathML.
6
6
  ULMUL is written in Ruby.
7
7
  You can also use ulmul.rb as a library.
8
8
 
@@ -16,6 +16,7 @@ Download ULMUL from: http://rubyforge.org/projects/ulmul or http://rubygems.org/
16
16
  etc. to read MathML.
17
17
  * ulmul2xhtml output is good with the Slidy presentation environment
18
18
  http://www.w3.org/Talks/Tools/Slidy/ using Firefox+CSS+XHTML+JavaScript.
19
+ Please use ulmul-slidy.js and ulmul-slidy.css in the package.
19
20
  * Lines starting from "#" are comments.
20
21
  * You can add your conversion rules to @subs_rules.
21
22
  * List of contents will be automatically generated.
@@ -110,7 +111,7 @@ See http://kb.mozillazine.org/About:config for details.
110
111
  === Examples
111
112
  $ ulmul2xhtml without-equations.txt > without-equations.html # XHTML1.0 Transitional
112
113
  $ ulmul2xhtml with-equations.txt > with-equations.html # XHTML1.1 + MathML2.0
113
- $ ulmul2xhtml -n 'Takeshi Nishimatsu' -s ulmul-slidy.css -j slidy.js presentation.txt > presentation.xhtml
114
+ $ ulmul2xhtml -n 'Takeshi Nishimatsu' -s ulmul-slidy.css -j ulmul-slidy.js presentation.txt > presentation.xhtml
114
115
  $ ulmul2html5 with-equations.txt > with-equations.html # HTML5
115
116
 
116
117
  === Command options
@@ -156,15 +157,16 @@ You can copy, modify and redistribute ulmul.rb,
156
157
  but only under the conditions described in
157
158
  the GNU General Public License (the "GPL").
158
159
 
159
- W3C has copyrights for slidy.js and ulmul-slidy.css (originally
160
- named slidy.css). Takeshi Nishimatsu modified them.
160
+ W3C has copyrights for ulmul-slidy.js and ulmul-slidy.css.
161
+ Their original names were slidy.js and slidy.css, respectively.
162
+ Takeshi Nishimatsu slightly modified them.
161
163
  You can download the original package, slidy.zip, from
162
164
  http://www.w3.org/Talks/Tools/Slidy/ . You can find
163
165
  their licenses at http://www.w3.org/Consortium/Legal/copyright-documents
164
166
  and http://www.w3.org/Consortium/Legal/copyright-software .
165
167
 
166
168
  == Author of ULMUL
167
- Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp)
169
+ Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp) http://t-nissie.users.sourceforge.net/
168
170
 
169
171
  # Local variables:
170
172
  # mode: rd
data/README-ja CHANGED
@@ -16,6 +16,7 @@ Rubyで書かれています。ulmul.rbをライブラリとして利用する
16
16
  math_ml.rb http://www.hinet.mydns.jp/?mathml.rb を使っています。
17
17
  * ウェブ・ブラウザ+CSS+XHTML+JavaScriptを使ったプレゼン環境
18
18
  Slidy http://www.w3.org/Talks/Tools/Slidy/ に対応したxhtmlが出力可能。
19
+ パッケージの中の ulmul-slidy.js と ulmul-slidy.css とを使ってください。
19
20
  * =begin, =end はあってもなくてもかまいません。
20
21
  * 行を#ではじめるとコメントになります。
21
22
  * ulmul.rbをライブラリとしても使えます。
@@ -102,6 +103,8 @@ Fig. 1 ruby.jpg
102
103
 
103
104
  == 使用方法
104
105
  ulmul2xhtmlとulmul2html5の2つのコマンドがあります。
106
+ 特に指定がなければ ulmul2xhtml.css と ulmul2html5.css とがそれぞれのCSSファイルのなります。
107
+ これら2つのファイルはパッケージに同梱されています。
105
108
 
106
109
  2010年4月現在、ulmul2xhtmlの出力を.htmlの拡張子を持ったファイルにリダイレクトして
107
110
  httpサーバからtext/htmlのMIMEタイプで送信されるようにすれば
@@ -116,7 +119,7 @@ IE8はMathMLで書かれた数式を含んだHTML5をうまく表示できない
116
119
  === 例
117
120
  $ ulmul2xhtml without-equations.txt > without-equations.html # XHTML1.0 Transitional
118
121
  $ ulmul2xhtml with-equations.txt > with-equations.html # XHTML1.1 + MathML2.0
119
- $ ulmul2xhtml -n 'Takeshi Nishimatsu' -s ulmul-slidy.css -j slidy.js presentation.txt > presentation.xhtml
122
+ $ ulmul2xhtml -n 'Takeshi Nishimatsu' -s ulmul-slidy.css -j ulmul-slidy.js presentation.txt > presentation.xhtml
120
123
  $ ulmul2html5 with-equations.txt > with-equations.html # HTML5
121
124
 
122
125
  === コマンド・ライン・オプション
@@ -157,15 +160,16 @@ You can copy, modify and redistribute ulmul.rb,
157
160
  but only under the conditions described in
158
161
  the GNU General Public License (the "GPL").
159
162
 
160
- W3C has copyrights for slidy.js and ulmul-slidy.css (originally
161
- named slidy.css). Takeshi Nishimatsu modified them.
163
+ W3C has copyrights for ulmul-slidy.js and ulmul-slidy.css.
164
+ Their original names were slidy.js and slidy.css, respectively.
165
+ Takeshi Nishimatsu slightly modified them.
162
166
  You can download the original package, slidy.zip, from
163
167
  http://www.w3.org/Talks/Tools/Slidy/ . You can find
164
168
  their licenses at http://www.w3.org/Consortium/Legal/copyright-documents
165
169
  and http://www.w3.org/Consortium/Legal/copyright-software .
166
170
 
167
171
  == 作者
168
- 西松タケシ (t_nissie{at}yahoo.co.jp)
172
+ 西松タケシ (t_nissie{at}yahoo.co.jp) http://t-nissie.users.sourceforge.net/
169
173
 
170
174
  # Local variables:
171
175
  # mode: rd
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  #! /usr/bin/env rake
2
2
  # -*-Ruby-*-
3
- # Time-stamp: <2010-04-01 08:37:35 takeshi>
3
+ # Time-stamp: <2010-05-26 17:48:08 takeshi>
4
4
  # Author: Takeshi Nishimatsu
5
5
  ##
6
6
  $LOAD_PATH.unshift('lib')
@@ -50,18 +50,27 @@ end
50
50
  desc "Publish to RubyForge"
51
51
  task :rubyforge => ["index.en.html",
52
52
  "index.ja.html",
53
- "style.css", "favicon.ico", "ruby.jpg"] do |t|
53
+ "index.var",
54
+ "ulmul2xhtml.css", "favicon.ico", "ruby.jpg"] do |t|
54
55
  t.prerequisites.each do |f|
55
- sh "scp #{f} t-nissie@rubyforge.org:/var/www/gforge-projects/ulmul/"
56
+ sh "scp #{f} t-nissie@rubyforge.org:/var/www/gforge-projects/ulmul/"
56
57
  end
58
+ sh "scp index.en.html t-nissie@rubyforge.org:/var/www/gforge-projects/ulmul/index.html"
59
+ sh "scp dot.htaccess t-nissie@rubyforge.org:/var/www/gforge-projects/ulmul/.htaccess"
60
+ end
61
+
62
+ desc "Create presentation.en.xhtml from README-en"
63
+ file "presentation.en.xhtml" => ["bin/ulmul2xhtml", "ulmul-slidy.css", "README-en",
64
+ "ulmul-slidy.js", "lib/ulmul.rb"] do |t|
65
+ sh "ruby -I lib #{t.prerequisites[0]} -n 'Takeshi Nishimatsu' -s #{t.prerequisites[1]} -j #{t.prerequisites[3]} -l en #{t.prerequisites[2]} > #{t.name}"
57
66
  end
58
67
 
59
68
  desc "Create index.en.html"
60
69
  file "index.en.html" => ["bin/ulmul2xhtml", "ulmul2xhtml.css", "README-en", "lib/ulmul.rb"] do |t|
61
- sh "ruby -I lib #{t.prerequisites[0]} -n 'Takeshi Nishimatsu' -l en #{t.prerequisites[2]} > #{t.name}"
70
+ sh "ruby -I lib #{t.prerequisites[0]} -n 'Takeshi Nishimatsu' -l en #{t.prerequisites[2]} | sed -e 's%</h1>%</h1><div class=\"navi\">[<a href=\"index.en.html\">English</a>/<a href=\"index.ja.html\">Japanese</a>]</div>%' > #{t.name}"
62
71
  end
63
72
 
64
73
  desc "Create index.ja.html"
65
74
  file "index.ja.html" => ["bin/ulmul2xhtml", "ulmul2xhtml.css", "README-ja", "lib/ulmul.rb"] do |t|
66
- sh "ruby -I lib #{t.prerequisites[0]} -n 'Takeshi Nishimatsu' -l ja #{t.prerequisites[2]} > #{t.name}"
75
+ sh "ruby -I lib #{t.prerequisites[0]} -n 'Takeshi Nishimatsu' -l ja #{t.prerequisites[2]} | sed -e 's%</h1>%</h1><div class=\"navi\">[<a href=\"index.en.html\">English</a>/<a href=\"index.ja.html\">Japanese</a>]</div>%' > #{t.name}"
67
76
  end
@@ -77,8 +77,9 @@ XHTMLとHTML5とを比較
77
77
 
78
78
 
79
79
  == 疑問点
80
- * <hr> or <hr/> ?
81
- * MathMLでよく使う<none/>は?
80
+ * HTML5 は <hr> or <hr/>
81
+ * MathMLでよく使う<none/>はHTML5で使ってよいの?
82
+ * HTML5で<p></p>の中に<math></math>を書いちゃいけないの?
82
83
 
83
84
  # Local variables:
84
85
  # mode: rd
@@ -12,12 +12,12 @@
12
12
  </head>
13
13
  <body>
14
14
  <div class="slide cover">
15
- <h1 id="LABEL-1">ULMUL (Ultra Lightweight MarkUp Language)</h1>
15
+ <h1 id="LABEL-1">ULMUL (Ultra Lightweight MarkUp Language)</h1><div class="navi">[<a href="index.en.html">English</a>/<a href="index.ja.html">Japanese</a>]</div>
16
16
  <p>
17
17
  "ULMUL" is an original Ultra Lightweight MarkUp Language.
18
18
  ULMUL texts can be converted into HTML5 with "ulmul2html5" command
19
19
  and into XHTML with "ulmul2xhtml" command.
20
- TeX stile equations are converted into MathML.
20
+ TeX style equations are converted into MathML.
21
21
  ULMUL is written in Ruby.
22
22
  You can also use ulmul.rb as a library.
23
23
  </p>
@@ -65,7 +65,8 @@ Download ULMUL from: <a href="http://rubyforge.org/projects/ulmul">http://rubyfo
65
65
  will be converted into MathML. You can use Firefox version 3.x, IE+MathPlayer,
66
66
  etc. to read MathML.</li>
67
67
  <li>ulmul2xhtml output is good with the Slidy presentation environment
68
- <a href="http://www.w3.org/Talks/Tools/Slidy/">http://www.w3.org/Talks/Tools/Slidy/</a> using Firefox+CSS+XHTML+JavaScript.</li>
68
+ <a href="http://www.w3.org/Talks/Tools/Slidy/">http://www.w3.org/Talks/Tools/Slidy/</a> using Firefox+CSS+XHTML+JavaScript.
69
+ Please use ulmul-slidy.js and ulmul-slidy.css in the package.</li>
69
70
  <li>Lines starting from "#" are comments.</li>
70
71
  <li>You can add your conversion rules to @subs_rules.</li>
71
72
  <li>List of contents will be automatically generated.</li>
@@ -229,7 +230,7 @@ See <a href="http://kb.mozillazine.org/About:config">http://kb.mozillazine.org/A
229
230
  <h3 id="LABEL-19">Examples</h3>
230
231
  <pre>$ ulmul2xhtml without-equations.txt &gt; without-equations.html # XHTML1.0 Transitional
231
232
  $ ulmul2xhtml with-equations.txt &gt; with-equations.html # XHTML1.1 + MathML2.0
232
- $ ulmul2xhtml -n 'Takeshi Nishimatsu' -s ulmul-slidy.css -j slidy.js presentation.txt &gt; presentation.xhtml
233
+ $ ulmul2xhtml -n 'Takeshi Nishimatsu' -s ulmul-slidy.css -j ulmul-slidy.js presentation.txt &gt; presentation.xhtml
233
234
  $ ulmul2html5 with-equations.txt &gt; with-equations.html # HTML5
234
235
  </pre>
235
236
  <h3 id="LABEL-20">Command options</h3>
@@ -310,8 +311,9 @@ but only under the conditions described in
310
311
  the GNU General Public License (the "GPL").
311
312
  </p>
312
313
  <p>
313
- W3C has copyrights for slidy.js and ulmul-slidy.css (originally
314
- named slidy.css). Takeshi Nishimatsu modified them.
314
+ W3C has copyrights for ulmul-slidy.js and ulmul-slidy.css.
315
+ Their original names were slidy.js and slidy.css, respectively.
316
+ Takeshi Nishimatsu slightly modified them.
315
317
  You can download the original package, slidy.zip, from
316
318
  <a href="http://www.w3.org/Talks/Tools/Slidy/">http://www.w3.org/Talks/Tools/Slidy/</a> . You can find
317
319
  their licenses at <a href="http://www.w3.org/Consortium/Legal/copyright-documents">http://www.w3.org/Consortium/Legal/copyright-documents</a>
@@ -323,7 +325,7 @@ and <a href="http://www.w3.org/Consortium/Legal/copyright-software">http://www.w
323
325
  <div class="slide">
324
326
  <h2 id="LABEL-31">Author of ULMUL</h2>
325
327
  <p>
326
- Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp)
328
+ Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp) <a href="http://t-nissie.users.sourceforge.net/">http://t-nissie.users.sourceforge.net/</a>
327
329
  </p>
328
330
  </div>
329
331
  </body>
@@ -12,7 +12,7 @@
12
12
  </head>
13
13
  <body>
14
14
  <div class="slide cover">
15
- <h1 id="LABEL-1">ULMUL取扱説明書</h1>
15
+ <h1 id="LABEL-1">ULMUL取扱説明書</h1><div class="navi">[<a href="index.en.html">English</a>/<a href="index.ja.html">Japanese</a>]</div>
16
16
  <p>
17
17
  ULMULは独自の軽量マークアップ言語 (Ultra Lightweight MarkUp Language) です。
18
18
  コマンドulmul2html5でHTML5に、ulmul2xhtmlでXHTMLに変換できます。
@@ -65,7 +65,8 @@ Rubyで書かれています。ulmul.rbをライブラリとして利用する
65
65
  Firefoxのバージョン3.0以上やIE+MathPlayerで読めるようです。
66
66
  math_ml.rb <a href="http://www.hinet.mydns.jp/?mathml.rb">http://www.hinet.mydns.jp/?mathml.rb</a> を使っています。</li>
67
67
  <li>ウェブ・ブラウザ+CSS+XHTML+JavaScriptを使ったプレゼン環境
68
- Slidy <a href="http://www.w3.org/Talks/Tools/Slidy/">http://www.w3.org/Talks/Tools/Slidy/</a> に対応したxhtmlが出力可能。</li>
68
+ Slidy <a href="http://www.w3.org/Talks/Tools/Slidy/">http://www.w3.org/Talks/Tools/Slidy/</a> に対応したxhtmlが出力可能。
69
+ パッケージの中の ulmul-slidy.js と ulmul-slidy.css とを使ってください。</li>
69
70
  <li>=begin, =end はあってもなくてもかまいません。</li>
70
71
  <li>行を#ではじめるとコメントになります。</li>
71
72
  <li>ulmul.rbをライブラリとしても使えます。</li>
@@ -218,6 +219,8 @@ Mass <math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><mi>m</mi
218
219
  <h2 id="LABEL-18">使用方法</h2>
219
220
  <p>
220
221
  ulmul2xhtmlとulmul2html5の2つのコマンドがあります。
222
+ 特に指定がなければ ulmul2xhtml.css と ulmul2html5.css とがそれぞれのCSSファイルのなります。
223
+ これら2つのファイルはパッケージに同梱されています。
221
224
  </p>
222
225
  <p>
223
226
  2010年4月現在、ulmul2xhtmlの出力を.htmlの拡張子を持ったファイルにリダイレクトして
@@ -235,7 +238,7 @@ IE8はMathMLで書かれた数式を含んだHTML5をうまく表示できない
235
238
  <h3 id="LABEL-19">例</h3>
236
239
  <pre>$ ulmul2xhtml without-equations.txt &gt; without-equations.html # XHTML1.0 Transitional
237
240
  $ ulmul2xhtml with-equations.txt &gt; with-equations.html # XHTML1.1 + MathML2.0
238
- $ ulmul2xhtml -n 'Takeshi Nishimatsu' -s ulmul-slidy.css -j slidy.js presentation.txt &gt; presentation.xhtml
241
+ $ ulmul2xhtml -n 'Takeshi Nishimatsu' -s ulmul-slidy.css -j ulmul-slidy.js presentation.txt &gt; presentation.xhtml
239
242
  $ ulmul2html5 with-equations.txt &gt; with-equations.html # HTML5
240
243
  </pre>
241
244
  <h3 id="LABEL-20">コマンド・ライン・オプション</h3>
@@ -312,8 +315,9 @@ but only under the conditions described in
312
315
  the GNU General Public License (the "GPL").
313
316
  </p>
314
317
  <p>
315
- W3C has copyrights for slidy.js and ulmul-slidy.css (originally
316
- named slidy.css). Takeshi Nishimatsu modified them.
318
+ W3C has copyrights for ulmul-slidy.js and ulmul-slidy.css.
319
+ Their original names were slidy.js and slidy.css, respectively.
320
+ Takeshi Nishimatsu slightly modified them.
317
321
  You can download the original package, slidy.zip, from
318
322
  <a href="http://www.w3.org/Talks/Tools/Slidy/">http://www.w3.org/Talks/Tools/Slidy/</a> . You can find
319
323
  their licenses at <a href="http://www.w3.org/Consortium/Legal/copyright-documents">http://www.w3.org/Consortium/Legal/copyright-documents</a>
@@ -325,7 +329,7 @@ and <a href="http://www.w3.org/Consortium/Legal/copyright-software">http://www.w
325
329
  <div class="slide">
326
330
  <h2 id="LABEL-31">作者</h2>
327
331
  <p>
328
- 西松タケシ (t_nissie{at}yahoo.co.jp)
332
+ 西松タケシ (t_nissie{at}yahoo.co.jp) <a href="http://t-nissie.users.sourceforge.net/">http://t-nissie.users.sourceforge.net/</a>
329
333
  </p>
330
334
  </div>
331
335
  </body>
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # ulmul.rb
3
- # Time-stamp: <2010-04-07 17:15:42 takeshi>
3
+ # Time-stamp: <2010-05-26 17:04:08 takeshi>
4
4
  # Author: Takeshi Nishimatsu
5
5
  ##
6
6
  require "rubygems"
@@ -72,7 +72,7 @@ class Contents
72
72
  end
73
73
 
74
74
  class Ulmul
75
- VERSION = '0.3.0'
75
+ VERSION = '0.4.0'
76
76
  CONTENTS_HERE="<!-- Contents -->"
77
77
  CONTENTS_RANGE_DEFAULT=2..3
78
78
  TABLE={
@@ -1,6 +1,6 @@
1
- /* slidy.js
1
+ /* ulmul-slidy.js
2
2
 
3
- Copyright (c) 2005 W3C (MIT, ERCIM, Keio), All Rights Reserved.
3
+ Copyright (c) 2005-2009 W3C (MIT, ERCIM, Keio), All Rights Reserved.
4
4
  W3C liability, trademark, document use and software licensing
5
5
  rules apply, see:
6
6
 
@@ -8,7 +8,7 @@
8
8
  http://www.w3.org/Consortium/Legal/copyright-software
9
9
 
10
10
 
11
- Slightly modified by Takeshi Nishimatsu in 2007-09-21:
11
+ From slidy.js to ulmul-slidy.js, slightly modified by Takeshi Nishimatsu in 2007-09-21:
12
12
  Original: if (node.nodeName == "H1" || node.nodeName == "h1")
13
13
  This one: if (node.nodeName == "H1" || node.nodeName == "h1" || node.nodeName == "H2" || node.nodeName == "h2")
14
14
 
@@ -17,24 +17,54 @@
17
17
  var ns_pos = (typeof window.pageYOffset!='undefined');
18
18
  var khtml = ((navigator.userAgent).indexOf("KHTML") >= 0 ? true : false);
19
19
  var opera = ((navigator.userAgent).indexOf("Opera") >= 0 ? true : false);
20
+ var ie = (typeof document.all != "undefined" && !opera);
20
21
  var ie7 = (!ns_pos && navigator.userAgent.indexOf("MSIE 7") != -1);
22
+ var ie8 = (!ns_pos && navigator.userAgent.indexOf("MSIE 8") != -1);
23
+ var slidy_started = false;
21
24
 
22
- window.onload = startup; // equivalent to onload on body element
25
+ if (ie && !ie8)
26
+ document.write("<iframe id='historyFrame' src='javascript:\"<html"+"></"+"html>\"' height='1' width='1' style='position:absolute;left:-800px'></iframe>");
23
27
 
24
28
  // IE only event handlers to ensure all slides are printed
25
29
  // I don't yet know how to emulate these for other browsers
26
- window.onbeforeprint = beforePrint;
27
- window.onafterprint = afterPrint;
30
+ if (typeof beforePrint != 'undefined')
31
+ {
32
+ window.onbeforeprint = beforePrint;
33
+ window.onafterprint = afterPrint;
34
+ }
35
+
36
+ // to avoid a clash with other scripts or onload attribute on <body>
37
+ // we use something smarter than window.onload
38
+ //window.onload = startup;
39
+
40
+
41
+ if (ie)
42
+ setTimeout(ieSlidyInit, 100);
43
+ else if (document.addEventListener)
44
+ document.addEventListener("DOMContentLoaded", startup, false);
45
+
46
+ function ieSlidyInit()
47
+ {
48
+ if (//document.readyState == "interactive" ||
49
+ document.readyState == "complete" ||
50
+ document.readyState == "loaded")
51
+ {
52
+ startup();
53
+ }
54
+ else
55
+ {
56
+ setTimeout(ieSlidyInit, 100);
57
+ }
58
+ }
28
59
 
29
- // hack to hide slides while loading
30
- setTimeout(hideAll, 50);
60
+ setTimeout(hideSlides, 50);
31
61
 
32
- function hideAll()
62
+ function hideSlides()
33
63
  {
34
64
  if (document.body)
35
65
  document.body.style.visibility = "hidden";
36
66
  else
37
- setTimeout(hideAll, 50);
67
+ setTimeout(hideSlides, 50);
38
68
  }
39
69
 
40
70
  var slidenum = 0; // integer slide count: 0, 1, 2, ...
@@ -64,7 +94,6 @@ var sizeIndex = 0;
64
94
  var sizeAdjustment = 0;
65
95
  var sizes = new Array("10pt", "12pt", "14pt", "16pt", "18pt", "20pt",
66
96
  "22pt", "24pt", "26pt", "28pt", "30pt", "32pt");
67
-
68
97
  var okayForIncremental = incrementalElementList();
69
98
 
70
99
  // needed for efficient resizing
@@ -81,104 +110,120 @@ var lang = "en";
81
110
 
82
111
  //var localize = {};
83
112
 
84
- // for each language there is an associative array
85
- var strings_es = {
86
- "slide":"pág.",
87
- "help?":"Ayuda",
88
- "contents?":"Índice",
89
- "table of contents":"tabla de contenidos",
90
- "Table of Contents":"Tabla de Contenidos",
91
- "restart presentation":"Reiniciar presentación",
92
- "restart?":"Inicio"
93
- };
94
-
95
- strings_es[helpText] =
96
- "Utilice el ratón, barra espaciadora, teclas Izda/Dhca, " +
97
- "o Re pág y Av pág. Use S y B para cambiar el tamaño de fuente.";
98
-
99
- var strings_nl = {
100
- "slide":"pagina",
101
- "help?":"Help?",
102
- "contents?":"Inhoud?",
103
- "table of contents":"inhoudsopgave",
104
- "Table of Contents":"Inhoudsopgave",
105
- "restart presentation":"herstart presentatie",
106
- "restart?":"Herstart?"
107
- };
108
-
109
- strings_nl[helpText] =
110
- "Navigeer d.m.v. het muis, spatiebar, Links/Rechts toetsen, " +
111
- "of PgUp en PgDn. Gebruik S en B om de karaktergrootte te veranderen.";
112
-
113
- var strings_de = {
114
- "slide":"Seite",
115
- "help?":"Hilfe",
116
- "contents?":"Übersicht",
117
- "table of contents":"Inhaltsverzeichnis",
118
- "Table of Contents":"Inhaltsverzeichnis",
119
- "restart presentation":"Präsentation neu starten",
120
- "restart?":"Neustart"
121
- };
122
-
123
- strings_de[helpText] =
124
- "Benutzen Sie die Maus, Leerschlag, die Cursortasten links/rechts" +
125
- "oder Page up/Page Down zum Wechseln der Seiten und S und B für die Schriftgrösse.";
126
-
127
- var strings_pl = {
128
- "slide":"slajd",
129
- "help?":"pomoc?",
130
- "contents?":"spis treści?",
131
- "table of contents":"spis treści",
132
- "Table of Contents":"Spis Treści",
133
- "restart presentation":"Restartuj prezentację",
134
- "restart?":"restart?"
135
- };
136
-
137
- strings_pl[helpText] =
138
- "Zmieniaj slajdy klikając myszą, naciskając spację, strzałki lewo/prawo" +
139
- "lub PgUp / PgDn. Użyj klawiszy S i B, aby zmienić rozmiar czczionki.";
140
-
141
- var strings_fr = {
142
- "slide":"page",
143
- "help?":"Aide",
144
- "contents?":"Index",
145
- "table of contents":"table des matières",
146
- "Table of Contents":"Table des matières",
147
- "restart presentation":"Recommencer l'exposé",
148
- "restart?":"Début"
149
- };
150
-
151
- strings_fr[helpText] =
152
-     "Naviguez avec la souris, la barre d'espace, les flèches" +
153
- "gauche/droite ou les touches Pg Up, Pg Dn. Utilisez " +
154
-     "les touches S et B pour modifier la taille de la police.";
155
-
156
- var strings_hu = {
157
- "slide":"oldal",
158
- "help?":"segítség",
159
- "contents?":"tartalom",
160
- "table of contents":"tartalomjegyzék",
161
- "Table of Contents":"Tartalomjegyzék",
162
- "restart presentation":"bemutató újraindítása",
163
- "restart?":"újraindítás"
164
- };
165
-
166
- strings_hu[helpText] =
167
- "Az oldalak közti lépkedéshez kattintson az egérrel, vagy használja a szóköz, a bal, vagy a jobb nyíl, " +
168
- "illetve a Page Down, Page Up billentyűket. Az S és a B billentyűkkel változtathatja a szöveg méretét.";
169
-
170
- var strings_it = {
171
- "slide":"pag.",
172
- "help?":"Aiuto",
173
- "contents?":"Indice",
174
- "table of contents":"indice",
175
- "Table of Contents":"Indice",
176
- "restart presentation":"Ricominciare la presentazione",
177
- "restart?":"Inizio"
178
- };
179
-
180
- strings_it[helpText] =
181
- "Navigare con mouse, barra spazio, frecce sinistra/destra o " +
113
+ // for each language there is an associative array
114
+ var strings_es = {
115
+ "slide":"pág.",
116
+ "help?":"Ayuda",
117
+ "contents?":"Índice",
118
+ "table of contents":"tabla de contenidos",
119
+ "Table of Contents":"Tabla de Contenidos",
120
+ "restart presentation":"Reiniciar presentación",
121
+ "restart?":"Inicio"
122
+ };
123
+
124
+ strings_es[helpText] =
125
+ "Utilice el ratón, barra espaciadora, teclas Izda/Dcha, " +
126
+ "o Re pág y Av pág. Use S y B para cambiar el tamaño de fuente.";
127
+
128
+ var strings_ca = {
129
+ "slide":"pàg..",
130
+ "help?":"Ajuda",
131
+ "contents?":"Índex",
132
+ "table of contents":"taula de continguts",
133
+ "Table of Contents":"Taula de Continguts",
134
+ "restart presentation":"Reiniciar presentació",
135
+ "restart?":"Inici"
136
+ };
137
+
138
+ strings_ca[helpText] =
139
+ "Utilitzi el ratolí, barra espaiadora, tecles Esq./Dta. " +
140
+ "o Re pàg y Av pàg. Usi S i B per canviar grandària de font.";
141
+
142
+ var strings_nl = {
143
+ "slide":"pagina",
144
+ "help?":"Help?",
145
+ "contents?":"Inhoud?",
146
+ "table of contents":"inhoudsopgave",
147
+ "Table of Contents":"Inhoudsopgave",
148
+ "restart presentation":"herstart presentatie",
149
+ "restart?":"Herstart?"
150
+ };
151
+
152
+ strings_nl[helpText] =
153
+ "Navigeer d.m.v. het muis, spatiebar, Links/Rechts toetsen, " +
154
+ "of PgUp en PgDn. Gebruik S en B om de karaktergrootte te veranderen.";
155
+
156
+ var strings_de = {
157
+ "slide":"Seite",
158
+ "help?":"Hilfe",
159
+ "contents?":"Übersicht",
160
+ "table of contents":"Inhaltsverzeichnis",
161
+ "Table of Contents":"Inhaltsverzeichnis",
162
+ "restart presentation":"Präsentation neu starten",
163
+ "restart?":"Neustart"
164
+ };
165
+
166
+ strings_de[helpText] =
167
+ "Benutzen Sie die Maus, Leerschlag, die Cursortasten links/rechts oder " +
168
+ "Page up/Page Down zum Wechseln der Seiten und S und B für die Schriftgrösse.";
169
+
170
+ var strings_pl = {
171
+ "slide":"slajd",
172
+ "help?":"pomoc?",
173
+ "contents?":"spis treści?",
174
+ "table of contents":"spis treści",
175
+ "Table of Contents":"Spis Treści",
176
+ "restart presentation":"Restartuj prezentację",
177
+ "restart?":"restart?"
178
+ };
179
+
180
+ strings_pl[helpText] =
181
+ "Zmieniaj slajdy klikając myszą, naciskając spację, strzałki lewo/prawo" +
182
+ "lub PgUp / PgDn. Użyj klawiszy S i B, aby zmienić rozmiar czczionki.";
183
+
184
+ var strings_fr = {
185
+ "slide":"page",
186
+ "help?":"Aide",
187
+ "contents?":"Index",
188
+ "table of contents":"table des matières",
189
+ "Table of Contents":"Table des matières",
190
+ "restart presentation":"Recommencer l'exposé",
191
+ "restart?":"Début"
192
+ };
193
+
194
+ strings_fr[helpText] =
195
+ "Naviguez avec la souris, la barre d'espace, les flèches " +
196
+ "gauche/droite ou les touches Pg Up, Pg Dn. Utilisez " +
197
+ "les touches S et B pour modifier la taille de la police.";
198
+
199
+ var strings_hu = {
200
+ "slide":"oldal",
201
+ "help?":"segítség",
202
+ "contents?":"tartalom",
203
+ "table of contents":"tartalomjegyzék",
204
+ "Table of Contents":"Tartalomjegyzék",
205
+ "restart presentation":"bemutató újraindítása",
206
+ "restart?":"újraindítás"
207
+ };
208
+
209
+ strings_hu[helpText] =
210
+ "Az oldalak közti lépkedéshez kattintson az egérrel, vagy " +
211
+ "használja a szóköz, a bal, vagy a jobb nyíl, illetve a Page Down, " +
212
+ "Page Up billentyűket. Az S és a B billentyűkkel változtathatja " +
213
+ "a szöveg méretét.";
214
+
215
+ var strings_it = {
216
+ "slide":"pag.",
217
+ "help?":"Aiuto",
218
+ "contents?":"Indice",
219
+ "table of contents":"indice",
220
+ "Table of Contents":"Indice",
221
+ "restart presentation":"Ricominciare la presentazione",
222
+ "restart?":"Inizio"
223
+ };
224
+
225
+ strings_it[helpText] =
226
+ "Navigare con mouse, barra spazio, frecce sinistra/destra o " +
182
227
  "PgUp e PgDn. Usare S e B per cambiare la dimensione dei caratteri.";
183
228
 
184
229
  var strings_el = {
@@ -194,7 +239,7 @@ var strings_el = {
194
239
  strings_el[helpText] =
195
240
  "Πλοηγηθείτε με το κλίκ του ποντικιού, το space, τα βέλη αριστερά/δεξιά, " +
196
241
  "ή Page Up και Page Down. Χρησιμοποιήστε τα πλήκτρα S και B για να αλλάξετε " +
197
- "το μέγεθος της γραμματοσειράς.";
242
+ "το μέγεθος της γραμματοσειράς.";
198
243
 
199
244
  var strings_ja = {
200
245
  "slide":"スライド",
@@ -210,24 +255,62 @@ strings_ja[helpText] =
210
255
  "マウス左クリック ・ スペース ・ 左右キー " +
211
256
  "または Page Up ・ Page Downで操作, S ・ Bでフォントサイズ変更";
212
257
 
213
-
214
- // each such language array is declared in the localize array
215
- // used indirectly as in help.innerHTML = "help".localize();
216
- var localize = {
217
- "es":strings_es,
218
- "nl":strings_nl,
219
- "de":strings_de,
220
- "pl":strings_pl,
221
- "fr":strings_fr,
222
- "hu":strings_hu,
258
+ var strings_zh = {
259
+ "slide":"幻灯片",
260
+ "help?":"帮助?",
261
+ "contents?":"内容?",
262
+ "table of contents":"目录",
263
+ "Table of Contents":"目录",
264
+ "restart presentation":"重新启动展示",
265
+ "restart?":"重新启动?"
266
+ };
267
+
268
+ strings_zh[helpText] =
269
+ "用鼠标点击, 空格条, 左右箭头, Pg Up 和 Pg Dn 导航. " +
270
+ "用 S, B 改变字体大小.";
271
+
272
+ var strings_ru = {
273
+ "slide":"слайд",
274
+ "help?":"помощь?",
275
+ "contents?":"содержание?",
276
+ "table of contents":"оглавление",
277
+ "Table of Contents":"Оглавление",
278
+ "restart presentation":"перезапустить презентацию",
279
+ "restart?":"перезапуск?"
280
+ };
281
+
282
+ strings_ru[helpText] =
283
+ "Перемещайтесь кликая мышкой, используя клавишу пробел, стрелки" +
284
+ "влево/вправо или Pg Up и Pg Dn. Клавиши S и B меняют размер шрифта.";
285
+
286
+
287
+ // each such language array is declared in the localize array
288
+ // used indirectly as in help.innerHTML = "help".localize();
289
+ var localize = {
290
+ "es":strings_es,
291
+ "ca":strings_ca,
292
+ "nl":strings_nl,
293
+ "de":strings_de,
294
+ "pl":strings_pl,
295
+ "fr":strings_fr,
296
+ "hu":strings_hu,
223
297
  "it":strings_it,
224
298
  "el":strings_el,
225
- "jp":strings_ja
299
+ "jp":strings_ja,
300
+ "zh":strings_zh,
301
+ "ru":strings_ru
226
302
  };
227
303
 
228
304
  /* general initialization */
229
305
  function startup()
230
306
  {
307
+ if (slidy_started)
308
+ {
309
+ alert("already started");
310
+ return;
311
+ }
312
+ slidy_started = true;
313
+
231
314
  // find human language from html element
232
315
  // for use in localizing strings
233
316
  lang = document.body.parentNode.getAttribute("lang");
@@ -284,8 +367,10 @@ function startup()
284
367
  document.onkeydown = keyDown;
285
368
  window.onresize = resized;
286
369
  window.onscroll = scrolled;
370
+ window.onunload = unloaded;
287
371
  singleSlideView();
288
372
 
373
+
289
374
  setLocation();
290
375
  resized();
291
376
 
@@ -293,6 +378,7 @@ function startup()
293
378
  setTimeout("ieHack()", 100);
294
379
 
295
380
  showToolbar();
381
+ setInterval("checkLocation()", 200); // for back button detection
296
382
  }
297
383
 
298
384
  // add localize method to all strings for use
@@ -353,6 +439,11 @@ function ieHack()
353
439
  window.resizeBy(0, 1);
354
440
  }
355
441
 
442
+ function unloaded(e)
443
+ {
444
+ //alert("unloaded");
445
+ }
446
+
356
447
  // Firefox reload SVG bug work around
357
448
  function reload(e)
358
449
  {
@@ -520,23 +611,6 @@ function showToolbar()
520
611
  }
521
612
  }
522
613
 
523
- function test()
524
- {
525
- var s = "docH: " + documentHeight() +
526
- " winH: " + lastHeight +
527
- " yoffset: " + scrollYOffset() +
528
- " toolbot: " + (documentHeight() - lastHeight - scrollYOffset());
529
-
530
- //alert(s);
531
-
532
- var slide = slides[slidenum];
533
- // IE getAttribute requires "class" to be "className"
534
- var name = ns_pos ? "class" : "className";
535
- var style = (slide.currentStyle ? slide.currentStyle["backgroundColor"] :
536
- document.defaultView.getComputedStyle(slide, '').getPropertyValue("background-color"));
537
- alert("class='" + slide.getAttribute(name) + "' backgroundColor: " + style);
538
- }
539
-
540
614
  function hideToolbar()
541
615
  {
542
616
  toolbar.style.display = "none";
@@ -771,11 +845,17 @@ function keyDown(event)
771
845
 
772
846
  if (key == 34) // Page Down
773
847
  {
848
+ if (viewAll)
849
+ return true;
850
+
774
851
  nextSlide(false);
775
852
  return cancel(event);
776
853
  }
777
854
  else if (key == 33) // Page Up
778
855
  {
856
+ if (viewAll)
857
+ return true;
858
+
779
859
  previousSlide(false);
780
860
  return cancel(event);
781
861
  }
@@ -935,8 +1015,7 @@ function mouseButtonClick(e)
935
1015
  }
936
1016
  else leftclick = true;
937
1017
 
938
- // dismiss table of contents
939
- hideTableOfContents();
1018
+ //alert("selected text length = "+selectedTextLen);
940
1019
 
941
1020
  if (selectedTextLen > 0)
942
1021
  {
@@ -946,12 +1025,16 @@ function mouseButtonClick(e)
946
1025
  return false;
947
1026
  }
948
1027
 
1028
+ // dismiss table of contents
1029
+ hideTableOfContents();
1030
+
949
1031
  // check if target is something that probably want's clicks
950
1032
  // e.g. embed, object, input, textarea, select, option
951
1033
 
952
1034
  if (mouseClickEnabled && leftclick &&
953
1035
  target.nodeName != "EMBED" &&
954
1036
  target.nodeName != "OBJECT" &&
1037
+ target.nodeName != "VIDEO" &&
955
1038
  target.nodeName != "INPUT" &&
956
1039
  target.nodeName != "TEXTAREA" &&
957
1040
  target.nodeName != "SELECT" &&
@@ -1088,6 +1171,22 @@ function lastSlide()
1088
1171
  }
1089
1172
  }
1090
1173
 
1174
+ // first slide is 0
1175
+ function gotoSlide(num)
1176
+ {
1177
+ //alert("going to slide " + (num+1));
1178
+ var slide = slides[slidenum];
1179
+ hideSlide(slide);
1180
+ slidenum = num;
1181
+ slide = slides[slidenum];
1182
+ lastShown = null;
1183
+ setVisibilityAllIncremental("hidden");
1184
+ setEosStatus(!nextIncrementalItem(lastShown));
1185
+ document.title = title + " (" + (slidenum+1) + ")";
1186
+ showSlide(slide);
1187
+ showSlideNumber();
1188
+ }
1189
+
1091
1190
  function setEosStatus(state)
1092
1191
  {
1093
1192
  if (eos)
@@ -1248,35 +1347,49 @@ function hasToken(str, token)
1248
1347
 
1249
1348
  function getClassList(element)
1250
1349
  {
1251
- if (typeof window.pageYOffset =='undefined')
1252
- return element.getAttribute("className");
1350
+ if (typeof element.className != 'undefined')
1351
+ return element.className;
1253
1352
 
1254
- return element.getAttribute("class");
1353
+ var clsname = (ns_pos||ie8) ? "class" : "className";
1354
+ return element.getAttribute(clsname);
1255
1355
  }
1256
1356
 
1257
1357
  function hasClass(element, name)
1258
1358
  {
1259
1359
  var regexp = new RegExp("(^| )" + name + "\W*");
1260
1360
 
1261
- if (regexp.test(getClassList(element)))
1262
- return true;
1263
-
1264
- return false;
1361
+ if (typeof element.className != 'undefined')
1362
+ return regexp.test(element.className);
1265
1363
 
1364
+ var clsname = (ns_pos||ie8) ? "class" : "className";
1365
+ return regexp.test(element.getAttribute(clsname));
1266
1366
  }
1267
1367
 
1268
1368
  function removeClass(element, name)
1269
1369
  {
1270
- // IE getAttribute requires "class" to be "className"
1271
- var clsname = ns_pos ? "class" : "className";
1272
- var clsval = element.getAttribute(clsname);
1273
-
1274
1370
  var regexp = new RegExp("(^| )" + name + "\W*");
1371
+ var clsval = "";
1275
1372
 
1276
- if (clsval)
1373
+ if (typeof element.className != 'undefined')
1277
1374
  {
1278
- clsval = clsval.replace(regexp, "");
1279
- element.setAttribute(clsname, clsval);
1375
+ clsval = element.className;
1376
+
1377
+ if (clsval)
1378
+ {
1379
+ clsval = clsval.replace(regexp, "");
1380
+ element.className = clsval;
1381
+ }
1382
+ }
1383
+ else
1384
+ {
1385
+ var clsname = (ns_pos||ie8) ? "class" : "className";
1386
+ clsval = element.getAttribute(clsname);
1387
+
1388
+ if (clsval)
1389
+ {
1390
+ clsval = clsval.replace(regexp, "");
1391
+ element.setAttribute(clsname, clsval);
1392
+ }
1280
1393
  }
1281
1394
  }
1282
1395
 
@@ -1284,10 +1397,15 @@ function addClass(element, name)
1284
1397
  {
1285
1398
  if (!hasClass(element, name))
1286
1399
  {
1287
- // IE getAttribute requires "class" to be "className"
1288
- var clsname = ns_pos ? "class" : "className";
1289
- var clsval = element.getAttribute(clsname);
1290
- element.setAttribute(clsname, (clsval ? clsval + " " + name : name));
1400
+ if (typeof element.className != 'undefined')
1401
+ element.className += " " + name;
1402
+ else
1403
+ {
1404
+ var clsname = (ns_pos||ie8) ? "class" : "className";
1405
+ var clsval = element.getAttribute(clsname);
1406
+ clsval = clsval ? clsval + " " + name : name;
1407
+ element.setAttribute(clsname, clsval);
1408
+ }
1291
1409
  }
1292
1410
  }
1293
1411
 
@@ -1314,7 +1432,7 @@ function wrapImplicitSlides()
1314
1432
  node = heading.nextSibling;
1315
1433
 
1316
1434
  div = document.createElement("div");
1317
- div.setAttribute((ns_pos ? "class" : "className"), "slide");
1435
+ addClass(div, "slide");
1318
1436
  document.body.replaceChild(div, heading);
1319
1437
  div.appendChild(heading);
1320
1438
 
@@ -1731,6 +1849,9 @@ function pageAddress(uri)
1731
1849
  {
1732
1850
  var i = uri.indexOf("#");
1733
1851
 
1852
+ if (i < 0)
1853
+ i = uri.indexOf("%23");
1854
+
1734
1855
  // check if anchor is entire page
1735
1856
 
1736
1857
  if (i < 0)
@@ -1745,22 +1866,73 @@ function showSlideNumber()
1745
1866
  (slidenum + 1) + "/" + slides.length;
1746
1867
  }
1747
1868
 
1869
+ // every 200mS check if the location has been changed as a
1870
+ // result of the user activating the Back button/menu item
1871
+ // doesn't work for Opera < 9.5
1872
+ function checkLocation()
1873
+ {
1874
+ var hash = location.hash;
1875
+
1876
+ if (slidenum > 0 && (hash == "" || hash == "#"))
1877
+ gotoSlide(0);
1878
+ else if (hash.length > 2 && hash != "#("+(slidenum+1)+")")
1879
+ {
1880
+ var num = parseInt(location.hash.substr(2));
1881
+
1882
+ if (!isNaN(num))
1883
+ gotoSlide(num-1);
1884
+ }
1885
+ }
1886
+
1887
+ // this doesn't push location onto history stack for IE
1888
+ // for which a hidden iframe hack is needed: load page into
1889
+ // the iframe with script that set's parent's location.hash
1890
+ // but that won't work for standalone use unless we can
1891
+ // create the page dynamically via a javascript: URL
1748
1892
  function setLocation()
1749
1893
  {
1750
1894
  var uri = pageAddress(location.href);
1895
+ var hash = "#(" + (slidenum+1) + ")";
1751
1896
 
1752
- //if (slidenum > 0)
1753
- uri = uri + "#(" + (slidenum+1) + ")";
1897
+ if (slidenum >= 0)
1898
+ uri = uri + hash;
1754
1899
 
1755
- if (uri != location.href && !khtml)
1900
+ if (ie && !ie8)
1901
+ pushHash(hash);
1902
+
1903
+ if (uri != location.href /*&& !khtml */)
1756
1904
  location.href = uri;
1757
1905
 
1758
- document.title = title + " (" + (slidenum+1) + ")";
1759
- //document.title = (slidenum+1) + ") " + slideName(slidenum);
1906
+ if (khtml)
1907
+ hash = "(" + (slidenum+1) + ")";
1760
1908
 
1909
+ if (!ie && location.hash != hash && location.hash != "")
1910
+ location.hash = hash;
1911
+
1912
+ document.title = title + " (" + (slidenum+1) + ")";
1761
1913
  showSlideNumber();
1762
1914
  }
1763
1915
 
1916
+ // only used for IE6 and IE7
1917
+ function onFrameLoaded(hash)
1918
+ {
1919
+ location.hash = hash;
1920
+ var uri = pageAddress(location.href);
1921
+ location.href = uri + hash;
1922
+ }
1923
+
1924
+ // history hack with thanks to Bertrand Le Roy
1925
+ function pushHash(hash)
1926
+ {
1927
+ if (hash == "") hash = "#(1)";
1928
+ window.location.hash = hash;
1929
+ var doc = document.getElementById("historyFrame").contentWindow.document;
1930
+ doc.open("javascript:'<html></html>'");
1931
+ doc.write("<html><head><script type=\"text/javascript\">parent.onFrameLoaded('"+
1932
+ (hash) + "');</script></head><body>hello mum</body></html>");
1933
+ doc.close();
1934
+ }
1935
+
1764
1936
  // find current slide based upon location
1765
1937
  // first find target anchor and then look
1766
1938
  // for associated div element enclosing it
@@ -1876,8 +2048,7 @@ function slideName(index)
1876
2048
 
1877
2049
  // find first h1 element in DOM tree
1878
2050
  function findHeading(node)
1879
- {
1880
- if (!node || node.nodeType != 1)
2051
+ { if (!node || node.nodeType != 1)
1881
2052
  return null;
1882
2053
 
1883
2054
  if (node.nodeName == "H1" || node.nodeName == "h1" || node.nodeName == "H2" || node.nodeName == "h2")
@@ -1959,7 +2130,7 @@ function findSizeAdjust()
1959
2130
  return 1 * content;
1960
2131
  }
1961
2132
 
1962
- return 0;
2133
+ return 1;
1963
2134
  }
1964
2135
 
1965
2136
  function addToolbar()
@@ -2006,17 +2177,8 @@ function addToolbar()
2006
2177
  var gap2 = document.createTextNode(" ");
2007
2178
  left.appendChild(gap2);
2008
2179
 
2009
- var i = location.href.indexOf("#");
2010
-
2011
- // check if anchor is entire page
2012
-
2013
- if (i > 0)
2014
- page = location.href.substr(0, i);
2015
- else
2016
- page = location.href;
2017
-
2018
2180
  var start = document.createElement("a");
2019
- start.setAttribute("href", page);
2181
+ start.setAttribute("href", "javascript:firstSlide()");
2020
2182
  start.setAttribute("title", "restart presentation".localize());
2021
2183
  start.innerHTML = "restart?".localize();
2022
2184
  // start.setAttribute("href", "javascript:printSlides()");
@@ -2082,17 +2244,8 @@ function addToolbar()
2082
2244
  var gap2 = document.createTextNode(" ");
2083
2245
  toolbar.appendChild(gap2);
2084
2246
 
2085
- var i = location.href.indexOf("#");
2086
-
2087
- // check if anchor is entire page
2088
-
2089
- if (i > 0)
2090
- page = location.href.substr(0, i);
2091
- else
2092
- page = location.href;
2093
-
2094
2247
  var start = document.createElement("a");
2095
- start.setAttribute("href", page);
2248
+ start.setAttribute("href", "javascript:firstSlide()");
2096
2249
  start.setAttribute("title", "restart presentation".localize());
2097
2250
  start.innerHTML = "restart?".localize();
2098
2251
  // start.setAttribute("href", "javascript:printSlides()");
@@ -2385,9 +2538,14 @@ function tableOfContents()
2385
2538
  this.first.focus();
2386
2539
  }
2387
2540
 
2541
+ toc.onmouseup = mouseButtonUp;
2542
+
2388
2543
  toc.onclick = function (e) {
2389
2544
  e||(e=window.event);
2390
- hideTableOfContents();
2545
+
2546
+ if (selectedTextLen <= 0)
2547
+ hideTableOfContents();
2548
+
2391
2549
  stopPropagation(e);
2392
2550
 
2393
2551
  if (e.cancel != undefined)
@@ -1,5 +1,5 @@
1
1
  # ulmul.gemspec -*-ruby-*-
2
- # Time-stamp: <2010-04-01 15:25:05 takeshi>
2
+ # Time-stamp: <2010-05-25 21:34:42 takeshi>
3
3
  # Author: Takeshi Nishimatsu
4
4
  ##
5
5
  Gem::Specification.new do |s|
@@ -18,7 +18,9 @@ Gem::Specification.new do |s|
18
18
  'README-en' << 'index.en.html' <<
19
19
  'README-ja' << 'index.ja.html' <<
20
20
  'Rakefile' << 'ulmul.gemspec' << 'setup.rb' <<
21
- 'ruby.jpg' << 'slidy.js' << 'ulmul-slidy.css'
21
+ 'ruby.jpg' <<
22
+ 'ulmul-slidy.js' <<
23
+ 'ulmul-slidy.css'
22
24
  s.author = 'Takeshi Nishimatsu'
23
25
  s.email = 't-nissie@imr.tohoku.ac.jp'
24
26
  s.rubyforge_project = 'ulmul'
@@ -1,6 +1,6 @@
1
1
  /* -*-CSS-*-
2
2
  * style.css for index.??.html of ulmul
3
- * Time-stamp: <2010-03-30 12:31:20 takeshi>
3
+ * Time-stamp: <2010-04-10 17:45:09 takeshi>
4
4
  * Author: Takeshi NISHIMATSU
5
5
  */
6
6
  body
@@ -77,3 +77,6 @@ figure figcaption{
77
77
  margin-right: auto;
78
78
  display: block;
79
79
  }
80
+
81
+ div.navi { text-align: right;
82
+ margin-right: 1.0em; }
@@ -1,6 +1,6 @@
1
1
  /* -*-CSS-*-
2
2
  * style.css for index.??.html of ulmul
3
- * Time-stamp: <2010-03-30 16:08:16 takeshi>
3
+ * Time-stamp: <2010-04-10 17:45:16 takeshi>
4
4
  * Author: Takeshi NISHIMATSU
5
5
  */
6
6
  body
@@ -77,3 +77,6 @@ div.figure div.figcaption{
77
77
  margin-right: auto;
78
78
  display: block;
79
79
  }
80
+
81
+ div.navi { text-align: right;
82
+ margin-right: 1.0em; }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ulmul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takeshi Nishimatsu
@@ -9,7 +9,7 @@ autorequire: lib/ulmul.rb
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-10 00:00:00 +09:00
12
+ date: 2010-05-27 00:00:00 +09:00
13
13
  default_executable: ulmul2html5
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -47,7 +47,7 @@ files:
47
47
  - ulmul.gemspec
48
48
  - setup.rb
49
49
  - ruby.jpg
50
- - slidy.js
50
+ - ulmul-slidy.js
51
51
  - ulmul-slidy.css
52
52
  has_rdoc: true
53
53
  homepage: http://ulmul.rubyforge.org/