ulmul 0.1.0 → 0.3.0

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.
@@ -1,5 +1,5 @@
1
1
  # ulmul.gemspec -*-ruby-*-
2
- # Time-stamp: <2009-01-04 15:41:51 takeshi>
2
+ # Time-stamp: <2010-04-01 15:25:05 takeshi>
3
3
  # Author: Takeshi Nishimatsu
4
4
  ##
5
5
  Gem::Specification.new do |s|
@@ -7,13 +7,16 @@ Gem::Specification.new do |s|
7
7
  s.name = 'ulmul'
8
8
 
9
9
  s.bindir = 'bin'
10
- s.executables = ['ulmul.rb']
11
- s.default_executable= 'ulmul.rb'
10
+ s.executables = ['ulmul2html5', 'ulmul2xhtml']
11
+ s.default_executable= 'ulmul2html5'
12
12
 
13
13
  s.summary = 'ULMUL is an Ultra Lightweight Mark-Up Language'
14
- s.files = Dir.glob("{html}/**/*") << 'lib/ulmul.rb' <<
15
- 'tests/ulmul_test.rb' << 'style.css' << 'favicon.ico' << 'index.html' <<
16
- 'ChangeLog' << 'README-en.xhtml' << 'README-ja' << 'README-ja.xhtml' <<
14
+ s.files = Dir.glob("{html}/**/*") << 'lib/ulmul.rb' << 'tests/ulmul_test.rb' <<
15
+ 'ulmul2xhtml.css' << 'favicon.ico' <<
16
+ 'ulmul2html5.css' << 'XHTML-vs-HTML5.ja.txt' <<
17
+ 'ChangeLog' <<
18
+ 'README-en' << 'index.en.html' <<
19
+ 'README-ja' << 'index.ja.html' <<
17
20
  'Rakefile' << 'ulmul.gemspec' << 'setup.rb' <<
18
21
  'ruby.jpg' << 'slidy.js' << 'ulmul-slidy.css'
19
22
  s.author = 'Takeshi Nishimatsu'
@@ -1,6 +1,6 @@
1
1
  /* -*-CSS-*-
2
- * Style.css for README.html and INSTALL.html
3
- * Time-stamp: <2007-11-28 11:13:26 takeshi>
2
+ * style.css for index.??.html of ulmul
3
+ * Time-stamp: <2010-03-30 12:31:20 takeshi>
4
4
  * Author: Takeshi NISHIMATSU
5
5
  */
6
6
  body
@@ -63,3 +63,17 @@ pre
63
63
  color: darkblue;
64
64
  background-color: #f3f3f3;
65
65
  }
66
+
67
+ figure img{
68
+ width: 30%;
69
+ margin-left: auto;
70
+ margin-right: auto;
71
+ display: block;
72
+ }
73
+
74
+ figure figcaption{
75
+ width: 40%;
76
+ margin-left: auto;
77
+ margin-right: auto;
78
+ display: block;
79
+ }
@@ -0,0 +1,79 @@
1
+ /* -*-CSS-*-
2
+ * style.css for index.??.html of ulmul
3
+ * Time-stamp: <2010-03-30 16:08:16 takeshi>
4
+ * Author: Takeshi NISHIMATSU
5
+ */
6
+ body
7
+ {
8
+ color: black;
9
+ font-family: verdana, arial, helvetica, sans-serif;
10
+ }
11
+
12
+ h1, h2, h3, h4, h6
13
+ {
14
+ font-family: verdana, arial, helvetica, sans-serif;
15
+ }
16
+
17
+ h1
18
+ {
19
+ color: darkblue;
20
+ background-color: #f0f0ff;
21
+ }
22
+
23
+ h2
24
+ {
25
+ border-top: blue 5px solid;
26
+ border-bottom: blue 1px solid;
27
+ padding-left: 8px;
28
+ background-color: #f0f0ff;
29
+ }
30
+
31
+ h3
32
+ {
33
+ border-top: blue 2px solid;
34
+ border-bottom: blue 1px solid;
35
+ padding-left: 4px;
36
+ }
37
+
38
+ h4
39
+ {
40
+ border-top: blue 1px solid;
41
+ padding-left: 4px;
42
+ background-color: #f0f0ff;
43
+ }
44
+
45
+ h5
46
+ {
47
+ font-size: larger;
48
+ font-family: courier, verdana, arial, helvetica, sans-serif;
49
+ padding-top: 10px;
50
+ color: darkblue;
51
+ }
52
+
53
+ pre
54
+ {
55
+ font-family: monospace, courier, verdana, arial, helvetica, sans-serif;
56
+ padding-right: 0.5em;
57
+ padding-left: 0.5em;
58
+ padding-top: 0.1ex;
59
+ padding-bottom: 0.1ex;
60
+ margin-left: 0.5em;
61
+ margin-right: 1.0em;
62
+ white-space: pre;
63
+ color: darkblue;
64
+ background-color: #f3f3f3;
65
+ }
66
+
67
+ div.figure img{
68
+ width: 30%;
69
+ margin-left: auto;
70
+ margin-right: auto;
71
+ display: block;
72
+ }
73
+
74
+ div.figure div.figcaption{
75
+ width: 40%;
76
+ margin-left: auto;
77
+ margin-right: auto;
78
+ display: block;
79
+ }
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.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takeshi Nishimatsu
@@ -9,8 +9,8 @@ autorequire: lib/ulmul.rb
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-04 00:00:00 +09:00
13
- default_executable: ulmul.rb
12
+ date: 2010-04-10 00:00:00 +09:00
13
+ default_executable: ulmul2html5
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mathml
@@ -22,10 +22,11 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: 0.8.1
24
24
  version:
25
- description: ULMUL is an Ultra Lightweight Mark-Up Language.
25
+ description: " ULMUL is an Ultra Lightweight Mark-Up Language.\n"
26
26
  email: t-nissie@imr.tohoku.ac.jp
27
27
  executables:
28
- - ulmul.rb
28
+ - ulmul2html5
29
+ - ulmul2xhtml
29
30
  extensions: []
30
31
 
31
32
  extra_rdoc_files: []
@@ -33,13 +34,15 @@ extra_rdoc_files: []
33
34
  files:
34
35
  - lib/ulmul.rb
35
36
  - tests/ulmul_test.rb
36
- - style.css
37
+ - ulmul2xhtml.css
37
38
  - favicon.ico
38
- - index.html
39
+ - ulmul2html5.css
40
+ - XHTML-vs-HTML5.ja.txt
39
41
  - ChangeLog
40
- - README-en.xhtml
42
+ - README-en
43
+ - index.en.html
41
44
  - README-ja
42
- - README-ja.xhtml
45
+ - index.ja.html
43
46
  - Rakefile
44
47
  - ulmul.gemspec
45
48
  - setup.rb
@@ -48,6 +51,8 @@ files:
48
51
  - ulmul-slidy.css
49
52
  has_rdoc: true
50
53
  homepage: http://ulmul.rubyforge.org/
54
+ licenses: []
55
+
51
56
  post_install_message:
52
57
  rdoc_options: []
53
58
 
@@ -68,9 +73,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
73
  requirements: []
69
74
 
70
75
  rubyforge_project: ulmul
71
- rubygems_version: 1.2.0
76
+ rubygems_version: 1.3.5
72
77
  signing_key:
73
- specification_version: 2
78
+ specification_version: 3
74
79
  summary: ULMUL is an Ultra Lightweight Mark-Up Language
75
80
  test_files:
76
81
  - tests/ulmul_test.rb
@@ -1,294 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
3
- "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
6
- <head>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
- <title>ULMUL (ulmul.rb)</title>
9
- <meta name="author" content="takeshi" />
10
- <meta name="copyright" content="Copyright &#169; 2009 takeshi" />
11
- <link rel="stylesheet" href="style.css" type="text/css" />
12
- <link rel="shortcut icon" href="favicon.ico" />
13
- </head>
14
- <body>
15
- <div class="slide cover">
16
- <h1 id="LABEL-1">ULMUL (ulmul.rb)</h1>
17
- <p>
18
- ULMUL (ulmul.rb) is a converter from Ultra Lightweight MarkUp Language to
19
- (X)HTML. You can create HTML files, Slidy HTML files and MathML XHTML
20
- files very easily.
21
- </p>
22
- <p>
23
- The author is using ULMUL to generate his web pages.
24
- <a href="http://loto.sourceforge.net/feram/">http://loto.sourceforge.net/feram/</a> is converted from
25
- <a href="http://loto.sourceforge.net/feram/README">http://loto.sourceforge.net/feram/README</a> .
26
- <a href="http://loto.sourceforge.net/feram/doc/film.xhtml">http://loto.sourceforge.net/feram/doc/film.xhtml</a> is converted from
27
- <a href="http://loto.sourceforge.net/feram/doc/film.txt">http://loto.sourceforge.net/feram/doc/film.txt</a> .
28
- </p>
29
- <br />Contents:
30
- <ul>
31
- <li><a href="#LABEL-2">Where is the homepage of ULMUL?</a></li>
32
- <li><a href="#LABEL-3">Where can I download ulmul.rb?</a></li>
33
- <li><a href="#LABEL-4">How can I install ULMUL?</a>
34
- <ul>
35
- <li><a href="#LABEL-5">I. Conservative way; use setup.rb</a></li>
36
- <li><a href="#LABEL-6">II. RubyGems users can take an easy way</a></li>
37
- <li><a href="#LABEL-7">Files</a></li>
38
- </ul></li>
39
- <li><a href="#LABEL-8">How can I write a ULMUL text?</a>
40
- <ul>
41
- <li><a href="#LABEL-9">Events (each input line)</a></li>
42
- <li><a href="#LABEL-17">Other rules</a></li>
43
- <li><a href="#LABEL-18">Equations</a></li>
44
- <li><a href="#LABEL-19">Figures</a></li>
45
- </ul></li>
46
- <li><a href="#LABEL-20">Usage</a>
47
- <ul>
48
- <li><a href="#LABEL-21">Examples</a></li>
49
- <li><a href="#LABEL-22">Command options</a></li>
50
- </ul></li>
51
- <li><a href="#LABEL-29">TODO</a></li>
52
- <li><a href="#LABEL-30">Copying</a></li>
53
- <li><a href="#LABEL-31">Author of ULMUL</a></li>
54
- </ul>
55
-
56
- </div>
57
-
58
-
59
- <div class="slide">
60
- <h2 id="LABEL-2">Where is the homepage of ULMUL?</h2>
61
- <p>
62
- <a href="http://ulmul.rubyforge.org/">http://ulmul.rubyforge.org/</a>
63
- </p>
64
- </div>
65
-
66
-
67
- <div class="slide">
68
- <h2 id="LABEL-3">Where can I download ulmul.rb?</h2>
69
- <p>
70
- Go to <a href="http://rubyforge.org/projects/ulmul">http://rubyforge.org/projects/ulmul</a> .
71
- </p>
72
- </div>
73
-
74
-
75
- <div class="slide">
76
- <h2 id="LABEL-4">How can I install ULMUL?</h2>
77
- <p>
78
- There are two different ways to install ULMUL.
79
- </p>
80
- <h3 id="LABEL-5">I. Conservative way; use setup.rb</h3>
81
- <p>
82
- ulmul-X.Y.Z.tgz package can be installed as:
83
- </p>
84
- <pre> $ tar zxf ulmul-X.Y.Z.tgz
85
- $ cd ulmul-X.Y.Z
86
- $ su
87
- # ruby setup.rb
88
- </pre>
89
- <p>
90
- Note that the eimxml and mathml libraries are required.
91
- </p>
92
- <h3 id="LABEL-6">II. RubyGems users can take an easy way</h3>
93
- <p>
94
- There is an easy way, if you are a RubyGems user:
95
- </p>
96
- <pre> $ su
97
- # gem install ulmul
98
- </pre>
99
- <p>
100
- If you do not have the eimxml and mathml libraries, gem will download and install the
101
- library automatically.
102
- </p>
103
- <h3 id="LABEL-7">Files</h3>
104
-
105
- <ul>
106
- <li>ulmul.rb Ruby script.</li>
107
- <li>slidy.js JavaScript for Slidy. Slightly modified from the original.</li>
108
- <li>ulmul-slidy.css CSS file for Slidy. Largely modified from the original.</li>
109
- <li>style.css Example CSS file for normal web pages.</li>
110
- </ul>
111
- <p>
112
- If you installed ULMUL with gem, you may find these files in
113
- /usr/local/lib/ruby/gems/1.8/gems/ulmul-X.Y.Z/
114
- or /usr/lib/ruby/gems/1.8/gems/ulmul-X.Y.Z/ .
115
- </p>
116
- </div>
117
-
118
-
119
- <div class="slide">
120
- <h2 id="LABEL-8">How can I write a ULMUL text?</h2>
121
- <p>
122
- The encode of input file must be utf-8.
123
- </p>
124
- <h3 id="LABEL-9">Events (each input line)</h3>
125
- <h4 id="LABEL-10">empty</h4>
126
- <p>
127
- Empty lines devide paragraphs.
128
- </p>
129
- <h4 id="LABEL-11">heading</h4>
130
- <p>
131
- Starting with "= ", "== ", "=== ", "==== ", "===== ", and "====== ".
132
- "= " will be used for the title.
133
- </p>
134
- <h4 id="LABEL-12">asterisk</h4>
135
- <p>
136
- Lines starting with
137
- </p>
138
- <pre>" *"
139
- " *"
140
- " *"
141
- " *"
142
- " *"
143
- </pre>
144
- <p>
145
- become itemize.
146
- </p>
147
- <h4 id="LABEL-13">offset</h4>
148
- <p>
149
- Lines starting with some spaces but not asterisks become verbatim lines.
150
- </p>
151
- <h4 id="LABEL-14">end</h4>
152
- <p>
153
- EOF or "=end" end the process.
154
- </p>
155
- <h4 id="LABEL-15">ignore</h4>
156
- <p>
157
- Lines starting with"#" and "=begin" are ignored.
158
- </p>
159
- <h4 id="LABEL-16">normal</h4>
160
- <p>
161
- Other lines.
162
- </p>
163
- <h3 id="LABEL-17">Other rules</h3>
164
-
165
- <ul>
166
- <li>Lines after "=end" are ignored.</li>
167
- <li>Add your substitution rules to @subs_rules.</li>
168
- </ul>
169
- <h3 id="LABEL-18">Equations</h3>
170
- <p>
171
- Input:
172
- </p>
173
- <pre>Mass $m$ can be converted into energy $E$ as
174
- Eq. 1
175
- E=mc^2.
176
- /Eq.
177
- </pre>
178
- <p>
179
- Output:
180
- </p>
181
- <p>
182
- Mass <math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><mi>m</mi></math> can be converted into energy <math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><mi>E</mi></math> as
183
- <math xmlns='http://www.w3.org/1998/Math/MathML' display='block'>
184
- <mi>E</mi>
185
- <mo>=</mo>
186
- <mi>m</mi>
187
- <msup>
188
- <mi>c</mi>
189
- <mn>2</mn>
190
- </msup>
191
- <mo>.</mo>
192
- </math>
193
- </p>
194
- <h3 id="LABEL-19">Figures</h3>
195
- <p>
196
- Input:
197
- </p>
198
- <pre>Fig. 1 ruby.jpg
199
- The is a dummy figure for an example.
200
- /Fig.
201
- </pre>
202
- <p>
203
- Output:
204
- </p>
205
- <div class="figure">
206
- <img src="ruby.jpg" alt="ruby.jpg" />
207
- <div class="caption">
208
- The is a dummy figure for an example.
209
- </div>
210
- </div>
211
- </div>
212
-
213
-
214
- <div class="slide">
215
- <h2 id="LABEL-20">Usage</h2>
216
- <h3 id="LABEL-21">Examples</h3>
217
- <pre>% ruby ulmul.rb foo.txt
218
- % ruby ulmul.rb --style=style.css --name="John Smith" foo.ulmul &gt; foo.html
219
- % ./ulmul.rb --style=ulmul-slidy.css --javascript=slidy.js \
220
- --name="Takeshi Nishimatsu" presentation.txt &gt; presentation.xhtml
221
- </pre>
222
- <h3 id="LABEL-22">Command options</h3>
223
- <h4 id="LABEL-23">-s, --style</h4>
224
- <p>
225
- Specify stylesheet filename.
226
- </p>
227
- <h4 id="LABEL-24">-n, --name</h4>
228
- <p>
229
- Specify your name for copyright notices.
230
- </p>
231
- <h4 id="LABEL-25">-j, --javascript</h4>
232
- <p>
233
- Specify JavaScript filename.
234
- </p>
235
- <h4 id="LABEL-26">-l, --language</h4>
236
- <p>
237
- Specify natural language. Its default is "en".
238
- </p>
239
- <h4 id="LABEL-27">-c, --contents-range</h4>
240
- <p>
241
- Range of "Contents". Its default is "2..3".
242
- If you do not need "Contents" at the beginning of the
243
- output HTML file, set it 3..2.
244
- </p>
245
- <h4 id="LABEL-28">--help</h4>
246
- <p>
247
- Show a help message.
248
- </p>
249
- </div>
250
-
251
-
252
- <div class="slide">
253
- <h2 id="LABEL-29">TODO</h2>
254
-
255
- <ul>
256
- <li>rescue syntax errors (raises) in an input file and report the
257
- errors as #{$FILENAME}:#{file.lineno}:...</li>
258
- <li>Unit test, tests/ulmul_test.rb</li>
259
- <li>@body must be XML object, not a String.</li>
260
- <li>Tables.</li>
261
- <li>References to figures and tables.</li>
262
- <li>Citation.</li>
263
- </ul>
264
- </div>
265
-
266
-
267
- <div class="slide">
268
- <h2 id="LABEL-30">Copying</h2>
269
- <p>
270
- ulmul.rb is distributed in the hope that
271
- it will be useful, but WITHOUT ANY WARRANTY.
272
- You can copy, modify and redistribute ulmul.rb,
273
- but only under the conditions described in
274
- the GNU General Public License (the "GPL").
275
- </p>
276
- <p>
277
- W3C has copyrights for slidy.js and ulmul-slidy.css (originally
278
- named slidy.css). Takeshi Nishimatsu modified them.
279
- You can download the original package, slidy.zip, from
280
- <a href="http://www.w3.org/Talks/Tools/Slidy/">http://www.w3.org/Talks/Tools/Slidy/</a> . You can find
281
- their licenses at <a href="http://www.w3.org/Consortium/Legal/copyright-documents">http://www.w3.org/Consortium/Legal/copyright-documents</a>
282
- and <a href="http://www.w3.org/Consortium/Legal/copyright-software">http://www.w3.org/Consortium/Legal/copyright-software</a> .
283
- </p>
284
- </div>
285
-
286
-
287
- <div class="slide">
288
- <h2 id="LABEL-31">Author of ULMUL</h2>
289
- <p>
290
- Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp)
291
- </p>
292
- </div>
293
- </body>
294
- </html>