ulmul 0.7.0 → 0.8.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.
- checksums.yaml +4 -4
- data/Changes +10 -0
- data/README-en +32 -30
- data/README-ja +37 -27
- data/Rakefile +16 -1
- data/index.en.html +72 -35
- data/index.ja.html +82 -33
- data/lib/ulmul.rb +22 -10
- data/ulmul.gemspec +3 -1
- data/ulmul2html5.css +12 -2
- data/ulmul2xhtml.css +12 -1
- metadata +25 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6d98397029e09b8f620ee2e4cb2ae5e8c58f5bb0c0785e7740e0d140ec370661
|
|
4
|
+
data.tar.gz: 0b756285e3973867c9a6312699f2436673d369b00b6ac2743394594125a3c66c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af1edfafd8a72c3dc02e93b9806d0704250feb13f001284aea985a26a65e482f0ab11e0d8e3e5abf3c15a50f61cef8df1b546f9582065c380e373c9ec029b1d5
|
|
7
|
+
data.tar.gz: ac5c60e4198a88ecfbc897d611776abef5da4bab6660b5cf85552d1f308c655f0e93b59df329340350c34808301170d8c1e4db90b4e7c555a381d825b57a8d35
|
data/Changes
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
= Changes in each version
|
|
2
|
+
== 0.8.0
|
|
3
|
+
* Now ulmul2html5 can read GFM tables in files and write HTML tables.
|
|
4
|
+
|
|
5
|
+
= Changes in each version
|
|
6
|
+
== 0.7.1
|
|
7
|
+
* Report illegal indent errors in itemize
|
|
8
|
+
|
|
9
|
+
== 0.7.0
|
|
10
|
+
* Use math_ml 1.0
|
|
11
|
+
|
|
2
12
|
== 0.5.3
|
|
3
13
|
* For aasm-4.0.8, :on_transition is replaced by :after
|
|
4
14
|
|
data/README-en
CHANGED
|
@@ -5,17 +5,18 @@ ULMUL text with TeX style equations into HTML5 documents with
|
|
|
5
5
|
MathML or MathJax, respectively. ULMUL is written in Ruby.
|
|
6
6
|
You can also use ulmul.rb as a library.
|
|
7
7
|
|
|
8
|
-
Homepage of ULMUL:
|
|
8
|
+
Homepage of ULMUL: https://t-nissie.users.sourceforge.net/ULMUL/
|
|
9
9
|
|
|
10
|
-
Ruby Gem
|
|
10
|
+
Ruby Gem: https://rubygems.org/gems/ulmul
|
|
11
11
|
|
|
12
12
|
Repository of ULMUL: https://github.com/t-nissie/ULMUL
|
|
13
13
|
|
|
14
14
|
== Features
|
|
15
15
|
* TeX style equations between two dollar marks ($) and between "\Eq:foo" and "/Eq:foo"
|
|
16
|
-
will be converted into MathML.
|
|
16
|
+
will be converted into MathML. Any browsers such as Firefox, Chrome Edge, and Safari can render MathML nowadays.
|
|
17
|
+
* ULMUL uses MathML Library https://rubygems.org/gems/math_ml .
|
|
17
18
|
* ulmul2html5 output is good with the Slidy presentation environment
|
|
18
|
-
|
|
19
|
+
https://www.w3.org/Talks/Tools/Slidy/ using Firefox+CSS+XHTML+JavaScript.
|
|
19
20
|
Please use ulmul-slidy.js and ulmul-slidy.css in the package.
|
|
20
21
|
* Figures, tables and code can be inserted to the document.
|
|
21
22
|
They can be easily referred in the text.
|
|
@@ -27,10 +28,8 @@ Repository of ULMUL: https://github.com/t-nissie/ULMUL
|
|
|
27
28
|
Specify your natural language with a --language option, e.g. --language=en.
|
|
28
29
|
|
|
29
30
|
== Installation of ULMUL
|
|
30
|
-
Please use gem
|
|
31
|
+
Please use its gem https://rubygems.org/gems/ulmul for installation.
|
|
31
32
|
$ sudo gem install ulmul
|
|
32
|
-
If you do not have the eim_xml, math_ml, aasm and exifr libraries,
|
|
33
|
-
gem will download and install the libraries automatically.
|
|
34
33
|
|
|
35
34
|
== How to write ULMUL texts
|
|
36
35
|
The encode of input file must be utf-8.
|
|
@@ -44,6 +43,7 @@ Starting with "= ", "== ", "=== ", "==== ", "===== ", and "====== ".
|
|
|
44
43
|
"= " will be used for the title.
|
|
45
44
|
==== asterisk
|
|
46
45
|
Lines starting with asterisks become itemizing list.
|
|
46
|
+
Indent lines by two characters.
|
|
47
47
|
For example,
|
|
48
48
|
# Nesting is allowed up to 4th--5th level.
|
|
49
49
|
* First
|
|
@@ -92,8 +92,8 @@ Mass $m$ can be converted into energy $E$ as
|
|
|
92
92
|
You can refer the equation in a way like "Eq:Einstein", as Eq:Emc2.
|
|
93
93
|
|
|
94
94
|
To view the equations in MathML correctly, please use
|
|
95
|
-
* Firefox 4
|
|
96
|
-
* IE9
|
|
95
|
+
* Firefox 4 https://mozilla.jp/firefox/
|
|
96
|
+
* IE9 https://windows.microsoft.com/en-US/internet-explorer/products/ie/home
|
|
97
97
|
* etc.
|
|
98
98
|
|
|
99
99
|
=== Figures
|
|
@@ -117,21 +117,23 @@ Output:
|
|
|
117
117
|
/Fig:ruby
|
|
118
118
|
|
|
119
119
|
=== Tables
|
|
120
|
-
|
|
120
|
+
Put a GFM-formed table file, benchmark.table for example, outside.
|
|
121
121
|
Start a Table environment with "\Table:bar"
|
|
122
122
|
and terminate it with "/Table:bar", where "bar" is a tag for the table.
|
|
123
123
|
You can write a table caption between them.
|
|
124
|
-
You can refer the table with "Table:bar"
|
|
124
|
+
You can refer the table with "Table:bar".
|
|
125
125
|
|
|
126
126
|
Input:
|
|
127
|
-
\Table:
|
|
128
|
-
|
|
129
|
-
/
|
|
127
|
+
\Table:mercaribenchmark benchmark.table
|
|
128
|
+
Benchmark results of a Ruby script mercari.rb and a Crystal code mercari.cr.
|
|
129
|
+
For more details, see the gist page of https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5
|
|
130
|
+
/Table:mercaribenchmark
|
|
130
131
|
|
|
131
132
|
Output:
|
|
132
|
-
\Table:
|
|
133
|
-
|
|
134
|
-
/
|
|
133
|
+
\Table:mercaribenchmark benchmark.table
|
|
134
|
+
Benchmark results of a Ruby script mercari.rb and a Crystal code mercari.cr.
|
|
135
|
+
For more details, see the gist page of https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5
|
|
136
|
+
/Table:mercaribenchmark
|
|
135
137
|
|
|
136
138
|
=== Code
|
|
137
139
|
Start a Code environment with "\Code:baz FILENAME"
|
|
@@ -175,18 +177,18 @@ Its default is 3.
|
|
|
175
177
|
If you do not need the Table of Contents, specify 1.
|
|
176
178
|
|
|
177
179
|
=== ULMUL and Slidy examples
|
|
178
|
-
*
|
|
179
|
-
* Its source is
|
|
180
|
-
*
|
|
181
|
-
* It is a Slidy presentation made from
|
|
182
|
-
*
|
|
183
|
-
* Its source is
|
|
180
|
+
* https://loto.sourceforge.net/feram/
|
|
181
|
+
* Its source is https://loto.sourceforge.net/feram/README
|
|
182
|
+
* https://loto.sourceforge.net/feram/doc/film.xhtml
|
|
183
|
+
* It is a Slidy presentation made from https://loto.sourceforge.net/feram/doc/film.txt
|
|
184
|
+
* https://t-nissie.users.sourceforge.net/ULMUL/index.en.html
|
|
185
|
+
* Its source is https://t-nissie.users.sourceforge.net/ULMUL/README-en (this document)
|
|
184
186
|
|
|
185
187
|
== Usage of ulmul2mathjax
|
|
186
|
-
It uses MathJax
|
|
188
|
+
It uses MathJax https://www.mathjax.org/ to show equations.
|
|
187
189
|
$ ulmul2mathjax --help
|
|
188
190
|
$ ulmul2mathjax -s ulmul2html5.css -j https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js \
|
|
189
|
-
-j '
|
|
191
|
+
-j 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default' README-en > README-en-mathjax.html
|
|
190
192
|
|
|
191
193
|
== Usage of ulmul2latex
|
|
192
194
|
$ ulmul2latex --help
|
|
@@ -208,7 +210,7 @@ You can clone the source tree of ULMUL from GitHub with git(1) command:
|
|
|
208
210
|
$ git clone https://github.com/t-nissie/ULMUL.git ulmul
|
|
209
211
|
|
|
210
212
|
== Copying
|
|
211
|
-
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2017,2022,2024 by Takeshi Nishimatsu
|
|
213
|
+
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2017,2022,2024,2025,2026 by Takeshi Nishimatsu
|
|
212
214
|
|
|
213
215
|
ulmul.rb is distributed in the hope that
|
|
214
216
|
it will be useful, but WITHOUT ANY WARRANTY.
|
|
@@ -220,12 +222,12 @@ W3C has copyrights for ulmul-slidy.js and ulmul-slidy.css.
|
|
|
220
222
|
Their original names were slidy.js and slidy.css, respectively.
|
|
221
223
|
Takeshi Nishimatsu slightly modified them.
|
|
222
224
|
You can download the original package, slidy.zip, from
|
|
223
|
-
|
|
224
|
-
their licenses at
|
|
225
|
-
and
|
|
225
|
+
https://www.w3.org/Talks/Tools/Slidy/ . You can find
|
|
226
|
+
their licenses at https://www.w3.org/Consortium/Legal/copyright-documents
|
|
227
|
+
and https://www.w3.org/Consortium/Legal/copyright-software .
|
|
226
228
|
|
|
227
229
|
== Author of ULMUL
|
|
228
|
-
Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp)
|
|
230
|
+
Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp) https://t-nissie.users.sourceforge.net/
|
|
229
231
|
|
|
230
232
|
# Local variables:
|
|
231
233
|
# mode: rd
|
data/README-ja
CHANGED
|
@@ -5,21 +5,21 @@ ULMULは独自の軽量マークアップ言語 (Ultra Lightweight MarkUp Langua
|
|
|
5
5
|
ulmul2latexでLaTeXにも変換できます。
|
|
6
6
|
Rubyで書かれています。ulmul.rbをライブラリとして利用することも可能です。
|
|
7
7
|
|
|
8
|
-
ホームページ:
|
|
8
|
+
ホームページ: https://t-nissie.users.sourceforge.net/ULMUL/
|
|
9
9
|
|
|
10
|
-
Ruby Gem:
|
|
10
|
+
Ruby Gem: https://rubygems.org/gems/ulmul
|
|
11
11
|
|
|
12
|
-
レポジトリ: https://github.com/t-nissie/ULMUL
|
|
12
|
+
Gitレポジトリ: https://github.com/t-nissie/ULMUL
|
|
13
13
|
|
|
14
14
|
== 特徴
|
|
15
15
|
* 文章中の2つのドル記号($)で挟まれた部分と"\Eq:foo"と"/Eq:foo"とで挟まれた行が
|
|
16
16
|
数式としてTeX形式からMathML形式に変換されます。MathMLとはXMLで数式を記述
|
|
17
17
|
するための規格です。込み入った規格なので人間が直接MathMLを記述する
|
|
18
18
|
ことは想定されていませんが、ULMULでやっているようにTeXなどからの変換により
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
生成することができます。今日ではMathMLはFirefox, Chrome, Edge, Safariなどたいていのブラウザで表示できるようです。
|
|
20
|
+
MathML Library https://rubygems.org/gems/math_ml を使っています。
|
|
21
21
|
* ウェブ・ブラウザ+CSS+XHTML+JavaScriptを使ったプレゼン環境
|
|
22
|
-
Slidy
|
|
22
|
+
Slidy https://www.w3.org/Talks/Tools/Slidy/ に対応したxhtmlが出力可能。
|
|
23
23
|
パッケージの中の ulmul-slidy.js と ulmul-slidy.css とを使ってください。
|
|
24
24
|
* 図、表、コードが挿入でき、文中でそれらの参照ができます。
|
|
25
25
|
* =begin, =end はあってもなくてもかまいません。
|
|
@@ -31,7 +31,8 @@ Ruby Gem: http://rubygems.org/gems/ulmul
|
|
|
31
31
|
* テキストファイルはutf-8で書きます。自然言語は--language=jaなどとオプションで指定できます。
|
|
32
32
|
|
|
33
33
|
== インストール方法
|
|
34
|
-
RubyGems https://rubygems.org/
|
|
34
|
+
RubyGems https://rubygems.org/gems/ulmul
|
|
35
|
+
でインストールすれば必要なライブラリも自動的にインストールされます:
|
|
35
36
|
$ sudo gem install ulmul
|
|
36
37
|
|
|
37
38
|
== ULMULテキストの書き方
|
|
@@ -45,7 +46,7 @@ ulmul.rbは状態遷移 (state machine) ライブラリaasmを使っていて、
|
|
|
45
46
|
"= ", "== ", "=== ", "==== ", "===== ", または "====== " で始めてください。
|
|
46
47
|
「= ABCD EFGH」ならABCD EFGHがタイトルになります。Slidyの表紙にもなります。
|
|
47
48
|
==== アスタリスクで始まる行は箇条書きになります (asterisk)
|
|
48
|
-
|
|
49
|
+
2文字づつインデントして、4〜5段までネストした箇条書きが可能です:
|
|
49
50
|
たとえば、
|
|
50
51
|
# Nesting is allowed uo to 4th--5th level.
|
|
51
52
|
* First
|
|
@@ -99,11 +100,6 @@ Mass $m$ can be converted into energy $E$ as
|
|
|
99
100
|
|
|
100
101
|
数式は"Eq:Einstein"のように参照します。こんなかんじEq:Emc2。
|
|
101
102
|
|
|
102
|
-
数式を正しくご覧いただくには
|
|
103
|
-
* Firefox 4 http://mozilla.jp/firefox/
|
|
104
|
-
* IE9 http://windows.microsoft.com/ja-JP/internet-explorer/downloads/ie
|
|
105
|
-
などのブラウザを試してみて下さい。
|
|
106
|
-
|
|
107
103
|
=== 図の挿入方法
|
|
108
104
|
「図環境」は "\Fig:foo FILENAME.jpg" で始めて "/Fig:foo" で閉じてください。
|
|
109
105
|
間に図のキャプションを書くことができます。
|
|
@@ -125,7 +121,21 @@ Mass $m$ can be converted into energy $E$ as
|
|
|
125
121
|
/Fig:ruby
|
|
126
122
|
|
|
127
123
|
=== 表の挿入方法
|
|
128
|
-
Table
|
|
124
|
+
表Tableは外部に例えばbenchmark.tableを用意してTable:mercaribenchmarkのように挿入できます。
|
|
125
|
+
benchmark.tableはGFMと同じ形式で書いてください。
|
|
126
|
+
外部に置くのは表の自動生成を想定しているためです。
|
|
127
|
+
|
|
128
|
+
入力:
|
|
129
|
+
\Table:mercaribenchmark benchmark.table
|
|
130
|
+
Benchmark results of a Ruby script mercari.rb and a Crystal code mercari.cr.
|
|
131
|
+
For more details, see the gist page of https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5
|
|
132
|
+
/Table:mercaribenchmark
|
|
133
|
+
|
|
134
|
+
出力:
|
|
135
|
+
\Table:mercaribenchmark benchmark.table
|
|
136
|
+
Benchmark results of a Ruby script mercari.rb and a Crystal code mercari.cr.
|
|
137
|
+
For more details, see the gist page of https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5
|
|
138
|
+
/Table:mercaribenchmark
|
|
129
139
|
|
|
130
140
|
=== コードの挿入方法
|
|
131
141
|
「コード環境」は "\Code:baz FILENAME" で始めて "/Code:baz" で閉じてください。
|
|
@@ -166,18 +176,18 @@ JavaScriptのファイル名を指定します。
|
|
|
166
176
|
目次が必要なければ1を指定してください。
|
|
167
177
|
|
|
168
178
|
=== 実際の使用例
|
|
169
|
-
*
|
|
170
|
-
* ソースは
|
|
171
|
-
*
|
|
172
|
-
* ソースは
|
|
173
|
-
*
|
|
174
|
-
* ソースは
|
|
179
|
+
* https://loto.sourceforge.net/feram/
|
|
180
|
+
* ソースは https://github.com/t-nissie/feram
|
|
181
|
+
* https://loto.sourceforge.net/feram/doc/film.xhtml
|
|
182
|
+
* ソースは https://loto.sourceforge.net/feram/doc/film.txt
|
|
183
|
+
* https://t-nissie.users.sourceforge.net/ULMUL/index.ja.html
|
|
184
|
+
* ソースは https://t-nissie.users.sourceforge.net/ULMUL/README-ja (この文章)
|
|
175
185
|
|
|
176
186
|
== ulmul2mathjaxの使用方法
|
|
177
|
-
数式を MathJax
|
|
187
|
+
数式を MathJax https://www.mathjax.org/ で出力します。
|
|
178
188
|
$ ulmul2mathjax --help
|
|
179
189
|
$ ulmul2mathjax -s ulmul2html5.css -j https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js \
|
|
180
|
-
-j '
|
|
190
|
+
-j 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default' README-en > README-en-mathjax.html
|
|
181
191
|
|
|
182
192
|
== ulmul2latexの使用方法
|
|
183
193
|
$ ulmul2latex --help
|
|
@@ -194,7 +204,7 @@ git(1)コマンドを使って
|
|
|
194
204
|
と匿名でcloneできます。
|
|
195
205
|
|
|
196
206
|
== 著作権表示
|
|
197
|
-
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2017,2022,2024 by Takeshi Nishimatsu
|
|
207
|
+
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2017,2022,2024,2025,2026 by Takeshi Nishimatsu
|
|
198
208
|
|
|
199
209
|
ulmul.rb is distributed in the hope that
|
|
200
210
|
it will be useful, but WITHOUT ANY WARRANTY.
|
|
@@ -206,12 +216,12 @@ W3C has copyrights for ulmul-slidy.js and ulmul-slidy.css.
|
|
|
206
216
|
Their original names were slidy.js and slidy.css, respectively.
|
|
207
217
|
Takeshi Nishimatsu slightly modified them.
|
|
208
218
|
You can download the original package, slidy.zip, from
|
|
209
|
-
|
|
210
|
-
their licenses at
|
|
211
|
-
and
|
|
219
|
+
https://www.w3.org/Talks/Tools/Slidy/ . You can find
|
|
220
|
+
their licenses at https://www.w3.org/Consortium/Legal/copyright-documents
|
|
221
|
+
and https://www.w3.org/Consortium/Legal/copyright-software .
|
|
212
222
|
|
|
213
223
|
== 作者
|
|
214
|
-
西松タケシ (t_nissie{at}yahoo.co.jp)
|
|
224
|
+
西松タケシ (t_nissie{at}yahoo.co.jp) https://t-nissie.users.sourceforge.net/
|
|
215
225
|
|
|
216
226
|
# Local variables:
|
|
217
227
|
# mode: rd
|
data/Rakefile
CHANGED
|
@@ -29,7 +29,8 @@ end
|
|
|
29
29
|
task :default => [ :test ]
|
|
30
30
|
|
|
31
31
|
desc "Run the unit and functional tests"
|
|
32
|
-
task :test
|
|
32
|
+
task :test => [ :illegallyIndentedAstariskLineInItemize,
|
|
33
|
+
:illegallyIndentedLineInItemize ]
|
|
33
34
|
Rake::TestTask.new do |t|
|
|
34
35
|
t.libs << 'lib' << 'test'
|
|
35
36
|
t.pattern = 'test/**/*_test.rb'
|
|
@@ -79,3 +80,17 @@ file "README-en.tex" => ["bin/ulmul2latex", "README-en", "lib/ulmul.rb", "Rakefi
|
|
|
79
80
|
-e 's/subs_/subs\\\\_/' -e 's/eim_/eim\\\\_/' -e 's/math_/math\\\\_/' -e 's/ulmul_/ulmul\\\\_/' \
|
|
80
81
|
-e 's/t_nissie/t\\\\_nissie/' -e 's/\"\\\\Eq/\"$\\\\backslash$Eq/' -e 's/\"\\\\Fig/\"$\\\\backslash$Fig/' -e 's/\"\\\\Table/\"$\\\\backslash$Table/' -e 's/\"\\\\Code/\"$\\\\backslash$Code/' > #{t.name}"
|
|
81
82
|
end
|
|
83
|
+
|
|
84
|
+
desc "Illegally indented astarisk line in itemize"
|
|
85
|
+
task :illegallyIndentedAstariskLineInItemize =>
|
|
86
|
+
["bin/ulmul2html5", "test/itemize-astarisk-error.ulmul", "lib/ulmul.rb", "Rakefile"] do |t|
|
|
87
|
+
sh "ruby -I lib #{t.prerequisites[0]} #{t.prerequisites[1]} 2>&1 |\
|
|
88
|
+
grep --color '#{t.prerequisites[1]}:9: Illegally indented astarisk line in itemize:'"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
desc "Illegally indented line in itemize"
|
|
92
|
+
task :illegallyIndentedLineInItemize =>
|
|
93
|
+
["bin/ulmul2html5", "test/itemize-indent-error.ulmul", "lib/ulmul.rb", "Rakefile"] do |t|
|
|
94
|
+
sh "ruby -I lib #{t.prerequisites[0]} #{t.prerequisites[1]} 2>&1 |\
|
|
95
|
+
grep --color '#{t.prerequisites[1]}:15: Illegally indented line in itemize:'"
|
|
96
|
+
end
|
data/index.en.html
CHANGED
|
@@ -26,10 +26,10 @@ MathML or MathJax, respectively. ULMUL is written in Ruby.
|
|
|
26
26
|
You can also use ulmul.rb as a library.
|
|
27
27
|
</p>
|
|
28
28
|
<p>
|
|
29
|
-
Homepage of ULMUL: <a href="
|
|
29
|
+
Homepage of ULMUL: <a href="https://t-nissie.users.sourceforge.net/ULMUL/">https://t-nissie.users.sourceforge.net/ULMUL/</a>
|
|
30
30
|
</p>
|
|
31
31
|
<p>
|
|
32
|
-
Ruby Gem
|
|
32
|
+
Ruby Gem: <a href="https://rubygems.org/gems/ulmul">https://rubygems.org/gems/ulmul</a>
|
|
33
33
|
</p>
|
|
34
34
|
<p>
|
|
35
35
|
Repository of ULMUL: <a href="https://github.com/t-nissie/ULMUL">https://github.com/t-nissie/ULMUL</a>
|
|
@@ -72,9 +72,10 @@ Table of Contents:
|
|
|
72
72
|
|
|
73
73
|
<ul>
|
|
74
74
|
<li>TeX style equations between two dollar marks ($) and between "\Eq:foo" and "/Eq:foo"
|
|
75
|
-
will be converted into MathML.
|
|
75
|
+
will be converted into MathML. Any browsers such as Firefox, Chrome Edge, and Safari can render MathML nowadays.</li>
|
|
76
|
+
<li>ULMUL uses MathML Library <a href="https://rubygems.org/gems/math_ml">https://rubygems.org/gems/math_ml</a> .</li>
|
|
76
77
|
<li>ulmul2html5 output is good with the Slidy presentation environment
|
|
77
|
-
<a href="
|
|
78
|
+
<a href="https://www.w3.org/Talks/Tools/Slidy/">https://www.w3.org/Talks/Tools/Slidy/</a> using Firefox+CSS+XHTML+JavaScript.
|
|
78
79
|
Please use ulmul-slidy.js and ulmul-slidy.css in the package.</li>
|
|
79
80
|
<li>Figures, tables and code can be inserted to the document.
|
|
80
81
|
They can be easily referred in the text.</li>
|
|
@@ -91,15 +92,11 @@ Table of Contents:
|
|
|
91
92
|
<div class="slide">
|
|
92
93
|
<h2 id="LABEL-3">Installation of ULMUL</h2>
|
|
93
94
|
<p>
|
|
94
|
-
Please use gem
|
|
95
|
+
Please use its gem <a href="https://rubygems.org/gems/ulmul">https://rubygems.org/gems/ulmul</a> for installation.
|
|
95
96
|
</p>
|
|
96
97
|
<pre>
|
|
97
98
|
$ sudo gem install ulmul
|
|
98
99
|
</pre>
|
|
99
|
-
<p>
|
|
100
|
-
If you do not have the eim_xml, math_ml, aasm and exifr libraries,
|
|
101
|
-
gem will download and install the libraries automatically.
|
|
102
|
-
</p>
|
|
103
100
|
</div>
|
|
104
101
|
|
|
105
102
|
|
|
@@ -125,6 +122,7 @@ Starting with "= ", "== ", "=== ", "==== ", "===== ", and "====== ".
|
|
|
125
122
|
<h4 id="LABEL-8">asterisk</h4>
|
|
126
123
|
<p>
|
|
127
124
|
Lines starting with asterisks become itemizing list.
|
|
125
|
+
Indent lines by two characters.
|
|
128
126
|
For example,
|
|
129
127
|
</p>
|
|
130
128
|
<pre>
|
|
@@ -207,8 +205,8 @@ To view the equations in MathML correctly, please use
|
|
|
207
205
|
</p>
|
|
208
206
|
|
|
209
207
|
<ul>
|
|
210
|
-
<li>Firefox 4 <a href="
|
|
211
|
-
<li>IE9 <a href="
|
|
208
|
+
<li>Firefox 4 <a href="https://mozilla.jp/firefox/">https://mozilla.jp/firefox/</a></li>
|
|
209
|
+
<li>IE9 <a href="https://windows.microsoft.com/en-US/internet-explorer/products/ie/home">https://windows.microsoft.com/en-US/internet-explorer/products/ie/home</a></li>
|
|
212
210
|
<li>etc.</li>
|
|
213
211
|
</ul>
|
|
214
212
|
<h3 id="LABEL-15">Figures</h3>
|
|
@@ -241,29 +239,68 @@ Output:
|
|
|
241
239
|
</figure>
|
|
242
240
|
<h3 id="LABEL-16">Tables</h3>
|
|
243
241
|
<p>
|
|
244
|
-
|
|
242
|
+
Put a GFM-formed table file, benchmark.table for example, outside.
|
|
245
243
|
Start a Table environment with "\Table:bar"
|
|
246
244
|
and terminate it with "/Table:bar", where "bar" is a tag for the table.
|
|
247
245
|
You can write a table caption between them.
|
|
248
|
-
You can refer the table with "Table:bar"
|
|
246
|
+
You can refer the table with "Table:bar".
|
|
249
247
|
</p>
|
|
250
248
|
<p>
|
|
251
249
|
Input:
|
|
252
250
|
</p>
|
|
253
251
|
<pre>
|
|
254
|
-
\Table:
|
|
255
|
-
|
|
256
|
-
/
|
|
252
|
+
\Table:mercaribenchmark benchmark.table
|
|
253
|
+
Benchmark results of a Ruby script mercari.rb and a Crystal code mercari.cr.
|
|
254
|
+
For more details, see the gist page of https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5
|
|
255
|
+
/Table:mercaribenchmark
|
|
257
256
|
</pre>
|
|
258
257
|
<p>
|
|
259
258
|
Output:
|
|
260
259
|
</p>
|
|
261
|
-
<table
|
|
262
|
-
<
|
|
263
|
-
|
|
264
|
-
</
|
|
265
|
-
|
|
266
|
-
<
|
|
260
|
+
<table id="Table:mercaribenchmark">
|
|
261
|
+
<tablecaption>
|
|
262
|
+
Table 1: Benchmark results of a Ruby script mercari.rb and a Crystal code mercari.cr.
|
|
263
|
+
For more details, see the gist page of <a href="https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5">https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5</a>
|
|
264
|
+
</tablecaption>
|
|
265
|
+
<thead>
|
|
266
|
+
<tr>
|
|
267
|
+
<th style="text-align: left">コマンド</th>
|
|
268
|
+
<th style="text-align: right">実行時間(秒)</th>
|
|
269
|
+
<th style="text-align: left">コメント</th>
|
|
270
|
+
</tr>
|
|
271
|
+
</thead>
|
|
272
|
+
<tbody>
|
|
273
|
+
<tr>
|
|
274
|
+
<td style="text-align: left">ruby</td>
|
|
275
|
+
<td style="text-align: right">16.957</td>
|
|
276
|
+
<td style="text-align: left"> </td>
|
|
277
|
+
</tr>
|
|
278
|
+
<tr>
|
|
279
|
+
<td style="text-align: left">ruby –jit</td>
|
|
280
|
+
<td style="text-align: right">16.102</td>
|
|
281
|
+
<td style="text-align: left"> </td>
|
|
282
|
+
</tr>
|
|
283
|
+
<tr>
|
|
284
|
+
<td style="text-align: left">ruby –yjit</td>
|
|
285
|
+
<td style="text-align: right">16.056</td>
|
|
286
|
+
<td style="text-align: left"> </td>
|
|
287
|
+
</tr>
|
|
288
|
+
<tr>
|
|
289
|
+
<td style="text-align: left">mercari-nesquikcsv.rb</td>
|
|
290
|
+
<td style="text-align: right">11.117</td>
|
|
291
|
+
<td style="text-align: left">NesquikCSVはUTF-8に対応している</td>
|
|
292
|
+
</tr>
|
|
293
|
+
<tr>
|
|
294
|
+
<td style="text-align: left">crystal build</td>
|
|
295
|
+
<td style="text-align: right">17.112</td>
|
|
296
|
+
<td style="text-align: left"> </td>
|
|
297
|
+
</tr>
|
|
298
|
+
<tr>
|
|
299
|
+
<td style="text-align: left">crystal build –release</td>
|
|
300
|
+
<td style="text-align: right">3.224</td>
|
|
301
|
+
<td style="text-align: left">コンパイルオプション–releaseを忘れてはいけない</td>
|
|
302
|
+
</tr>
|
|
303
|
+
</tbody>
|
|
267
304
|
</table>
|
|
268
305
|
<h3 id="LABEL-17">Code</h3>
|
|
269
306
|
<p>
|
|
@@ -339,17 +376,17 @@ If you do not need the Table of Contents, specify 1.
|
|
|
339
376
|
<h3 id="LABEL-27">ULMUL and Slidy examples</h3>
|
|
340
377
|
|
|
341
378
|
<ul>
|
|
342
|
-
<li><a href="
|
|
379
|
+
<li><a href="https://loto.sourceforge.net/feram/">https://loto.sourceforge.net/feram/</a>
|
|
343
380
|
<ul>
|
|
344
|
-
<li>Its source is <a href="
|
|
381
|
+
<li>Its source is <a href="https://loto.sourceforge.net/feram/README">https://loto.sourceforge.net/feram/README</a></li>
|
|
345
382
|
</ul></li>
|
|
346
|
-
<li><a href="
|
|
383
|
+
<li><a href="https://loto.sourceforge.net/feram/doc/film.xhtml">https://loto.sourceforge.net/feram/doc/film.xhtml</a>
|
|
347
384
|
<ul>
|
|
348
|
-
<li>It is a Slidy presentation made from <a href="
|
|
385
|
+
<li>It is a Slidy presentation made from <a href="https://loto.sourceforge.net/feram/doc/film.txt">https://loto.sourceforge.net/feram/doc/film.txt</a></li>
|
|
349
386
|
</ul></li>
|
|
350
|
-
<li><a href="
|
|
387
|
+
<li><a href="https://t-nissie.users.sourceforge.net/ULMUL/index.en.html">https://t-nissie.users.sourceforge.net/ULMUL/index.en.html</a>
|
|
351
388
|
<ul>
|
|
352
|
-
<li>Its source is <a href="
|
|
389
|
+
<li>Its source is <a href="https://t-nissie.users.sourceforge.net/ULMUL/README-en">https://t-nissie.users.sourceforge.net/ULMUL/README-en</a> (this document)</li>
|
|
353
390
|
</ul></li>
|
|
354
391
|
</ul>
|
|
355
392
|
</div>
|
|
@@ -358,12 +395,12 @@ If you do not need the Table of Contents, specify 1.
|
|
|
358
395
|
<div class="slide">
|
|
359
396
|
<h2 id="LABEL-28">Usage of ulmul2mathjax</h2>
|
|
360
397
|
<p>
|
|
361
|
-
It uses MathJax <a href="
|
|
398
|
+
It uses MathJax <a href="https://www.mathjax.org/">https://www.mathjax.org/</a> to show equations.
|
|
362
399
|
</p>
|
|
363
400
|
<pre>
|
|
364
401
|
$ ulmul2mathjax --help
|
|
365
402
|
$ ulmul2mathjax -s ulmul2html5.css -j https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js \
|
|
366
|
-
-j '
|
|
403
|
+
-j 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default' README-en > README-en-mathjax.html
|
|
367
404
|
</pre>
|
|
368
405
|
</div>
|
|
369
406
|
|
|
@@ -412,7 +449,7 @@ $ git clone https://github.com/t-nissie/ULMUL.git ulmul
|
|
|
412
449
|
<div class="slide">
|
|
413
450
|
<h2 id="LABEL-32">Copying</h2>
|
|
414
451
|
<p>
|
|
415
|
-
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2017,2022,2024 by Takeshi Nishimatsu
|
|
452
|
+
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2017,2022,2024,2025,2026 by Takeshi Nishimatsu
|
|
416
453
|
</p>
|
|
417
454
|
<p>
|
|
418
455
|
ulmul.rb is distributed in the hope that
|
|
@@ -426,9 +463,9 @@ W3C has copyrights for ulmul-slidy.js and ulmul-slidy.css.
|
|
|
426
463
|
Their original names were slidy.js and slidy.css, respectively.
|
|
427
464
|
Takeshi Nishimatsu slightly modified them.
|
|
428
465
|
You can download the original package, slidy.zip, from
|
|
429
|
-
<a href="
|
|
430
|
-
their licenses at <a href="
|
|
431
|
-
and <a href="
|
|
466
|
+
<a href="https://www.w3.org/Talks/Tools/Slidy/">https://www.w3.org/Talks/Tools/Slidy/</a> . You can find
|
|
467
|
+
their licenses at <a href="https://www.w3.org/Consortium/Legal/copyright-documents">https://www.w3.org/Consortium/Legal/copyright-documents</a>
|
|
468
|
+
and <a href="https://www.w3.org/Consortium/Legal/copyright-software">https://www.w3.org/Consortium/Legal/copyright-software</a> .
|
|
432
469
|
</p>
|
|
433
470
|
</div>
|
|
434
471
|
|
|
@@ -436,7 +473,7 @@ and <a href="http://www.w3.org/Consortium/Legal/copyright-software">http://www.w
|
|
|
436
473
|
<div class="slide">
|
|
437
474
|
<h2 id="LABEL-33">Author of ULMUL</h2>
|
|
438
475
|
<p>
|
|
439
|
-
Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp) <a href="
|
|
476
|
+
Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp) <a href="https://t-nissie.users.sourceforge.net/">https://t-nissie.users.sourceforge.net/</a>
|
|
440
477
|
</p>
|
|
441
478
|
</div>
|
|
442
479
|
</body>
|
data/index.ja.html
CHANGED
|
@@ -26,13 +26,13 @@ ulmul2latexでLaTeXにも変換できます。
|
|
|
26
26
|
Rubyで書かれています。ulmul.rbをライブラリとして利用することも可能です。
|
|
27
27
|
</p>
|
|
28
28
|
<p>
|
|
29
|
-
ホームページ: <a href="
|
|
29
|
+
ホームページ: <a href="https://t-nissie.users.sourceforge.net/ULMUL/">https://t-nissie.users.sourceforge.net/ULMUL/</a>
|
|
30
30
|
</p>
|
|
31
31
|
<p>
|
|
32
|
-
Ruby Gem: <a href="
|
|
32
|
+
Ruby Gem: <a href="https://rubygems.org/gems/ulmul">https://rubygems.org/gems/ulmul</a>
|
|
33
33
|
</p>
|
|
34
34
|
<p>
|
|
35
|
-
レポジトリ: <a href="https://github.com/t-nissie/ULMUL">https://github.com/t-nissie/ULMUL</a>
|
|
35
|
+
Gitレポジトリ: <a href="https://github.com/t-nissie/ULMUL">https://github.com/t-nissie/ULMUL</a>
|
|
36
36
|
</p>
|
|
37
37
|
<br />
|
|
38
38
|
<div class="table of contents">
|
|
@@ -74,10 +74,10 @@ Table of Contents:
|
|
|
74
74
|
数式としてTeX形式からMathML形式に変換されます。MathMLとはXMLで数式を記述
|
|
75
75
|
するための規格です。込み入った規格なので人間が直接MathMLを記述する
|
|
76
76
|
ことは想定されていませんが、ULMULでやっているようにTeXなどからの変換により
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
生成することができます。今日ではMathMLはFirefox, Chrome, Edge, Safariなどたいていのブラウザで表示できるようです。
|
|
78
|
+
MathML Library <a href="https://rubygems.org/gems/math_ml">https://rubygems.org/gems/math_ml</a> を使っています。</li>
|
|
79
79
|
<li>ウェブ・ブラウザ+CSS+XHTML+JavaScriptを使ったプレゼン環境
|
|
80
|
-
Slidy <a href="
|
|
80
|
+
Slidy <a href="https://www.w3.org/Talks/Tools/Slidy/">https://www.w3.org/Talks/Tools/Slidy/</a> に対応したxhtmlが出力可能。
|
|
81
81
|
パッケージの中の ulmul-slidy.js と ulmul-slidy.css とを使ってください。</li>
|
|
82
82
|
<li>図、表、コードが挿入でき、文中でそれらの参照ができます。</li>
|
|
83
83
|
<li>=begin, =end はあってもなくてもかまいません。</li>
|
|
@@ -94,7 +94,8 @@ Table of Contents:
|
|
|
94
94
|
<div class="slide">
|
|
95
95
|
<h2 id="LABEL-3">インストール方法</h2>
|
|
96
96
|
<p>
|
|
97
|
-
RubyGems <a href="https://rubygems.org/">https://rubygems.org
|
|
97
|
+
RubyGems <a href="https://rubygems.org/gems/ulmul">https://rubygems.org/gems/ulmul</a>
|
|
98
|
+
でインストールすれば必要なライブラリも自動的にインストールされます:
|
|
98
99
|
</p>
|
|
99
100
|
<pre>
|
|
100
101
|
$ sudo gem install ulmul
|
|
@@ -123,7 +124,7 @@ ulmul.rbは状態遷移 (state machine) ライブラリaasmを使っていて、
|
|
|
123
124
|
</p>
|
|
124
125
|
<h4 id="LABEL-8">アスタリスクで始まる行は箇条書きになります (asterisk)</h4>
|
|
125
126
|
<p>
|
|
126
|
-
|
|
127
|
+
2文字づつインデントして、4〜5段までネストした箇条書きが可能です:
|
|
127
128
|
たとえば、
|
|
128
129
|
</p>
|
|
129
130
|
<pre>
|
|
@@ -208,17 +209,6 @@ Mass <math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><mi>m</mi
|
|
|
208
209
|
<p>
|
|
209
210
|
数式は"Eq:Einstein"のように参照します。こんなかんじ<a href="#Eq:Emc2">Eq. (1)</a>。
|
|
210
211
|
</p>
|
|
211
|
-
<p>
|
|
212
|
-
数式を正しくご覧いただくには
|
|
213
|
-
</p>
|
|
214
|
-
|
|
215
|
-
<ul>
|
|
216
|
-
<li>Firefox 4 <a href="http://mozilla.jp/firefox/">http://mozilla.jp/firefox/</a></li>
|
|
217
|
-
<li>IE9 <a href="http://windows.microsoft.com/ja-JP/internet-explorer/downloads/ie">http://windows.microsoft.com/ja-JP/internet-explorer/downloads/ie</a></li>
|
|
218
|
-
</ul>
|
|
219
|
-
<p>
|
|
220
|
-
などのブラウザを試してみて下さい。
|
|
221
|
-
</p>
|
|
222
212
|
<h3 id="LABEL-15">図の挿入方法</h3>
|
|
223
213
|
<p>
|
|
224
214
|
「図環境」は "\Fig:foo FILENAME.jpg" で始めて "/Fig:foo" で閉じてください。
|
|
@@ -249,8 +239,67 @@ Mass <math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><mi>m</mi
|
|
|
249
239
|
</figure>
|
|
250
240
|
<h3 id="LABEL-16">表の挿入方法</h3>
|
|
251
241
|
<p>
|
|
252
|
-
Table
|
|
242
|
+
表Tableは外部に例えばbenchmark.tableを用意して<a href="#Table:mercaribenchmark">Table 1</a>のように挿入できます。
|
|
243
|
+
benchmark.tableはGFMと同じ形式で書いてください。
|
|
244
|
+
外部に置くのは表の自動生成を想定しているためです。
|
|
245
|
+
</p>
|
|
246
|
+
<p>
|
|
247
|
+
入力:
|
|
248
|
+
</p>
|
|
249
|
+
<pre>
|
|
250
|
+
\Table:mercaribenchmark benchmark.table
|
|
251
|
+
Benchmark results of a Ruby script mercari.rb and a Crystal code mercari.cr.
|
|
252
|
+
For more details, see the gist page of https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5
|
|
253
|
+
/Table:mercaribenchmark
|
|
254
|
+
</pre>
|
|
255
|
+
<p>
|
|
256
|
+
出力:
|
|
253
257
|
</p>
|
|
258
|
+
<table id="Table:mercaribenchmark">
|
|
259
|
+
<tablecaption>
|
|
260
|
+
Table 1: Benchmark results of a Ruby script mercari.rb and a Crystal code mercari.cr.
|
|
261
|
+
For more details, see the gist page of <a href="https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5">https://gist.github.com/t-nissie/22a4a9525d423208c7f784ce507d0bc5</a>
|
|
262
|
+
</tablecaption>
|
|
263
|
+
<thead>
|
|
264
|
+
<tr>
|
|
265
|
+
<th style="text-align: left">コマンド</th>
|
|
266
|
+
<th style="text-align: right">実行時間(秒)</th>
|
|
267
|
+
<th style="text-align: left">コメント</th>
|
|
268
|
+
</tr>
|
|
269
|
+
</thead>
|
|
270
|
+
<tbody>
|
|
271
|
+
<tr>
|
|
272
|
+
<td style="text-align: left">ruby</td>
|
|
273
|
+
<td style="text-align: right">16.957</td>
|
|
274
|
+
<td style="text-align: left"> </td>
|
|
275
|
+
</tr>
|
|
276
|
+
<tr>
|
|
277
|
+
<td style="text-align: left">ruby –jit</td>
|
|
278
|
+
<td style="text-align: right">16.102</td>
|
|
279
|
+
<td style="text-align: left"> </td>
|
|
280
|
+
</tr>
|
|
281
|
+
<tr>
|
|
282
|
+
<td style="text-align: left">ruby –yjit</td>
|
|
283
|
+
<td style="text-align: right">16.056</td>
|
|
284
|
+
<td style="text-align: left"> </td>
|
|
285
|
+
</tr>
|
|
286
|
+
<tr>
|
|
287
|
+
<td style="text-align: left">mercari-nesquikcsv.rb</td>
|
|
288
|
+
<td style="text-align: right">11.117</td>
|
|
289
|
+
<td style="text-align: left">NesquikCSVはUTF-8に対応している</td>
|
|
290
|
+
</tr>
|
|
291
|
+
<tr>
|
|
292
|
+
<td style="text-align: left">crystal build</td>
|
|
293
|
+
<td style="text-align: right">17.112</td>
|
|
294
|
+
<td style="text-align: left"> </td>
|
|
295
|
+
</tr>
|
|
296
|
+
<tr>
|
|
297
|
+
<td style="text-align: left">crystal build –release</td>
|
|
298
|
+
<td style="text-align: right">3.224</td>
|
|
299
|
+
<td style="text-align: left">コンパイルオプション–releaseを忘れてはいけない</td>
|
|
300
|
+
</tr>
|
|
301
|
+
</tbody>
|
|
302
|
+
</table>
|
|
254
303
|
<h3 id="LABEL-17">コードの挿入方法</h3>
|
|
255
304
|
<p>
|
|
256
305
|
「コード環境」は "\Code:baz FILENAME" で始めて "/Code:baz" で閉じてください。
|
|
@@ -322,17 +371,17 @@ JavaScriptのファイル名を指定します。
|
|
|
322
371
|
<h3 id="LABEL-27">実際の使用例</h3>
|
|
323
372
|
|
|
324
373
|
<ul>
|
|
325
|
-
<li><a href="
|
|
374
|
+
<li><a href="https://loto.sourceforge.net/feram/">https://loto.sourceforge.net/feram/</a>
|
|
326
375
|
<ul>
|
|
327
|
-
<li>ソースは <a href="
|
|
376
|
+
<li>ソースは <a href="https://github.com/t-nissie/feram">https://github.com/t-nissie/feram</a></li>
|
|
328
377
|
</ul></li>
|
|
329
|
-
<li><a href="
|
|
378
|
+
<li><a href="https://loto.sourceforge.net/feram/doc/film.xhtml">https://loto.sourceforge.net/feram/doc/film.xhtml</a>
|
|
330
379
|
<ul>
|
|
331
|
-
<li>ソースは <a href="
|
|
380
|
+
<li>ソースは <a href="https://loto.sourceforge.net/feram/doc/film.txt">https://loto.sourceforge.net/feram/doc/film.txt</a></li>
|
|
332
381
|
</ul></li>
|
|
333
|
-
<li><a href="
|
|
382
|
+
<li><a href="https://t-nissie.users.sourceforge.net/ULMUL/index.ja.html">https://t-nissie.users.sourceforge.net/ULMUL/index.ja.html</a>
|
|
334
383
|
<ul>
|
|
335
|
-
<li>ソースは <a href="
|
|
384
|
+
<li>ソースは <a href="https://t-nissie.users.sourceforge.net/ULMUL/README-ja">https://t-nissie.users.sourceforge.net/ULMUL/README-ja</a> (この文章)</li>
|
|
336
385
|
</ul></li>
|
|
337
386
|
</ul>
|
|
338
387
|
</div>
|
|
@@ -341,12 +390,12 @@ JavaScriptのファイル名を指定します。
|
|
|
341
390
|
<div class="slide">
|
|
342
391
|
<h2 id="LABEL-28">ulmul2mathjaxの使用方法</h2>
|
|
343
392
|
<p>
|
|
344
|
-
数式を MathJax <a href="
|
|
393
|
+
数式を MathJax <a href="https://www.mathjax.org/">https://www.mathjax.org/</a> で出力します。
|
|
345
394
|
</p>
|
|
346
395
|
<pre>
|
|
347
396
|
$ ulmul2mathjax --help
|
|
348
397
|
$ ulmul2mathjax -s ulmul2html5.css -j https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js \
|
|
349
|
-
-j '
|
|
398
|
+
-j 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default' README-en > README-en-mathjax.html
|
|
350
399
|
</pre>
|
|
351
400
|
</div>
|
|
352
401
|
|
|
@@ -384,7 +433,7 @@ $ git clone https://github.com/t-nissie/ULMUL.git ulmul
|
|
|
384
433
|
<div class="slide">
|
|
385
434
|
<h2 id="LABEL-31">著作権表示</h2>
|
|
386
435
|
<p>
|
|
387
|
-
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2017,2022,2024 by Takeshi Nishimatsu
|
|
436
|
+
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2017,2022,2024,2025,2026 by Takeshi Nishimatsu
|
|
388
437
|
</p>
|
|
389
438
|
<p>
|
|
390
439
|
ulmul.rb is distributed in the hope that
|
|
@@ -398,9 +447,9 @@ W3C has copyrights for ulmul-slidy.js and ulmul-slidy.css.
|
|
|
398
447
|
Their original names were slidy.js and slidy.css, respectively.
|
|
399
448
|
Takeshi Nishimatsu slightly modified them.
|
|
400
449
|
You can download the original package, slidy.zip, from
|
|
401
|
-
<a href="
|
|
402
|
-
their licenses at <a href="
|
|
403
|
-
and <a href="
|
|
450
|
+
<a href="https://www.w3.org/Talks/Tools/Slidy/">https://www.w3.org/Talks/Tools/Slidy/</a> . You can find
|
|
451
|
+
their licenses at <a href="https://www.w3.org/Consortium/Legal/copyright-documents">https://www.w3.org/Consortium/Legal/copyright-documents</a>
|
|
452
|
+
and <a href="https://www.w3.org/Consortium/Legal/copyright-software">https://www.w3.org/Consortium/Legal/copyright-software</a> .
|
|
404
453
|
</p>
|
|
405
454
|
</div>
|
|
406
455
|
|
|
@@ -408,7 +457,7 @@ and <a href="http://www.w3.org/Consortium/Legal/copyright-software">http://www.w
|
|
|
408
457
|
<div class="slide">
|
|
409
458
|
<h2 id="LABEL-32">作者</h2>
|
|
410
459
|
<p>
|
|
411
|
-
西松タケシ (t_nissie{at}yahoo.co.jp) <a href="
|
|
460
|
+
西松タケシ (t_nissie{at}yahoo.co.jp) <a href="https://t-nissie.users.sourceforge.net/">https://t-nissie.users.sourceforge.net/</a>
|
|
412
461
|
</p>
|
|
413
462
|
</div>
|
|
414
463
|
</body>
|
data/lib/ulmul.rb
CHANGED
|
@@ -7,6 +7,8 @@ require "rubygems"
|
|
|
7
7
|
require "date"
|
|
8
8
|
require "math_ml/string"
|
|
9
9
|
require "aasm"
|
|
10
|
+
require "kramdown"
|
|
11
|
+
require "kramdown-parser-gfm"
|
|
10
12
|
|
|
11
13
|
# For m17n of Ruby 1.9.x. Thanks, Masayoshi Takahashi-san [ruby-list:47159].
|
|
12
14
|
if defined?(Encoding) && Encoding.respond_to?("default_external")
|
|
@@ -25,7 +27,10 @@ module Itemize
|
|
|
25
27
|
when /^ \* (.*)/ then 3
|
|
26
28
|
when /^ \* (.*)/ then 4
|
|
27
29
|
when /^ \* (.*)/ then 5
|
|
28
|
-
else
|
|
30
|
+
else
|
|
31
|
+
STDERR << filename << ":" << lnumber <<
|
|
32
|
+
": Illegally indented astarisk line in itemize: \"#{line.chomp}\"\n"
|
|
33
|
+
raise 'Illegally indented astarisk line in itemize'
|
|
29
34
|
end
|
|
30
35
|
str = @subs_rules.call(Regexp.last_match[1])
|
|
31
36
|
if new_level>@level_of_state+1
|
|
@@ -53,7 +58,10 @@ module Itemize
|
|
|
53
58
|
when /^ (\S.*)/ then 3
|
|
54
59
|
when /^ (\S.*)/ then 4
|
|
55
60
|
when /^ (\S.*)/ then 5
|
|
56
|
-
else
|
|
61
|
+
else
|
|
62
|
+
STDERR << filename << ":" << lnumber <<
|
|
63
|
+
": Illegally indented line in itemize: \"#{line.chomp}\"\n"
|
|
64
|
+
raise 'Illegally indented line in itemize'
|
|
57
65
|
end
|
|
58
66
|
str = @subs_rules.call(Regexp.last_match[1])
|
|
59
67
|
(@level_of_state-1).downto(new_level){|i| @body << ITEM_TERMINATOR << "\n" << " "*i << ITEMIZE_TERMINATOR}
|
|
@@ -82,7 +90,7 @@ end
|
|
|
82
90
|
class Ulmul
|
|
83
91
|
include AASM
|
|
84
92
|
include Itemize
|
|
85
|
-
VERSION = '0.
|
|
93
|
+
VERSION = '0.8.0'
|
|
86
94
|
|
|
87
95
|
aasm.initial_state :st_ground
|
|
88
96
|
|
|
@@ -337,13 +345,17 @@ module HTML
|
|
|
337
345
|
end
|
|
338
346
|
|
|
339
347
|
def cb_env_end2table()
|
|
340
|
-
|
|
341
|
-
@body <<
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
348
|
+
begin
|
|
349
|
+
@body << Kramdown::Document.new(File.read(@env_file), input: 'GFM', hard_wrap: false).to_html.sub(
|
|
350
|
+
"<table>", "<table id=\"#{@env_label}\">\n" +
|
|
351
|
+
" <tablecaption>\n" +
|
|
352
|
+
" Table #{@tables.length}: " +
|
|
353
|
+
@subs_rules.call(@env_caption) +
|
|
354
|
+
" </tablecaption>")
|
|
355
|
+
rescue Errno::ENOENT => ex
|
|
356
|
+
STDERR << ex << "\n"
|
|
357
|
+
exit 1
|
|
358
|
+
end
|
|
347
359
|
end
|
|
348
360
|
|
|
349
361
|
def cb_env_end2code()
|
data/ulmul.gemspec
CHANGED
|
@@ -24,15 +24,17 @@ Gem::Specification.new do |s|
|
|
|
24
24
|
'ulmul-slidy.css']
|
|
25
25
|
s.author = 'Takeshi Nishimatsu'
|
|
26
26
|
s.email = 't_nissie@yahoo.co.jp'
|
|
27
|
-
s.license = '
|
|
27
|
+
s.license = 'GPL-3.0-only'
|
|
28
28
|
s.homepage = 'http://t-nissie.users.sourceforge.net/ULMUL/'
|
|
29
29
|
s.test_files = ['test/unit/ulmul_test.rb']
|
|
30
|
+
s.required_ruby_version = '>= 3.2.0'
|
|
30
31
|
|
|
31
32
|
# s.extra_rdoc_files = %w(README)
|
|
32
33
|
|
|
33
34
|
s.add_dependency('math_ml', "~> 1.0", '>= 1.0.0')
|
|
34
35
|
s.add_dependency('aasm', "~> 5.5", '>= 5.5.0')
|
|
35
36
|
s.add_dependency('exifr', "~> 1.4", '>= 1.4.0')
|
|
37
|
+
s.add_dependency('kramdown-parser-gfm', "~> 1.1", '>= 1.1.0')
|
|
36
38
|
|
|
37
39
|
s.description = <<-EOF
|
|
38
40
|
ULMUL is an original Ultra Lightweight MarkUp Language.
|
data/ulmul2html5.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* -*-CSS-*-
|
|
2
2
|
* style.css for index.??.html of ulmul
|
|
3
|
-
* Time-stamp: <
|
|
3
|
+
* Time-stamp: <2026-01-09 19:28:07 takeshi>
|
|
4
4
|
* Author: Takeshi NISHIMATSU
|
|
5
5
|
*/
|
|
6
6
|
body
|
|
@@ -76,8 +76,18 @@ figure figcaption{
|
|
|
76
76
|
display: block;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
th,td {
|
|
80
|
+
border: 2px solid #ccc;
|
|
81
|
+
padding: 8px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
tablecaption{
|
|
85
|
+
width: 80%;
|
|
86
|
+
margin: auto;
|
|
87
|
+
display: block;
|
|
88
|
+
}
|
|
89
|
+
|
|
79
90
|
table {
|
|
80
|
-
border: blue 2px solid;
|
|
81
91
|
text-align: center;
|
|
82
92
|
margin: auto;
|
|
83
93
|
}
|
data/ulmul2xhtml.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* -*-CSS-*-
|
|
2
2
|
* style.css for index.??.html of ulmul
|
|
3
|
-
* Time-stamp: <
|
|
3
|
+
* Time-stamp: <2026-01-09 19:32:55 takeshi>
|
|
4
4
|
* Author: Takeshi NISHIMATSU
|
|
5
5
|
*/
|
|
6
6
|
body
|
|
@@ -78,6 +78,17 @@ div.figure div.figcaption{
|
|
|
78
78
|
display: block;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
th,td {
|
|
82
|
+
border: 2px solid #ccc;
|
|
83
|
+
padding: 8px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
tablecaption{
|
|
87
|
+
width: 80%;
|
|
88
|
+
margin: auto;
|
|
89
|
+
display: block;
|
|
90
|
+
}
|
|
91
|
+
|
|
81
92
|
table {
|
|
82
93
|
border: blue 2px solid;
|
|
83
94
|
text-align: center;
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ulmul
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takeshi Nishimatsu
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: math_ml
|
|
@@ -70,6 +69,26 @@ dependencies:
|
|
|
70
69
|
- - ">="
|
|
71
70
|
- !ruby/object:Gem::Version
|
|
72
71
|
version: 1.4.0
|
|
72
|
+
- !ruby/object:Gem::Dependency
|
|
73
|
+
name: kramdown-parser-gfm
|
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
|
75
|
+
requirements:
|
|
76
|
+
- - "~>"
|
|
77
|
+
- !ruby/object:Gem::Version
|
|
78
|
+
version: '1.1'
|
|
79
|
+
- - ">="
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: 1.1.0
|
|
82
|
+
type: :runtime
|
|
83
|
+
prerelease: false
|
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - "~>"
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '1.1'
|
|
89
|
+
- - ">="
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: 1.1.0
|
|
73
92
|
description: |2
|
|
74
93
|
ULMUL is an original Ultra Lightweight MarkUp Language.
|
|
75
94
|
You can write TeX-style equations in ULMUL texts.
|
|
@@ -113,9 +132,8 @@ files:
|
|
|
113
132
|
- ulmul2xhtml.css
|
|
114
133
|
homepage: http://t-nissie.users.sourceforge.net/ULMUL/
|
|
115
134
|
licenses:
|
|
116
|
-
-
|
|
135
|
+
- GPL-3.0-only
|
|
117
136
|
metadata: {}
|
|
118
|
-
post_install_message:
|
|
119
137
|
rdoc_options: []
|
|
120
138
|
require_paths:
|
|
121
139
|
- lib
|
|
@@ -123,15 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
123
141
|
requirements:
|
|
124
142
|
- - ">="
|
|
125
143
|
- !ruby/object:Gem::Version
|
|
126
|
-
version:
|
|
144
|
+
version: 3.2.0
|
|
127
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
146
|
requirements:
|
|
129
147
|
- - ">="
|
|
130
148
|
- !ruby/object:Gem::Version
|
|
131
149
|
version: '0'
|
|
132
150
|
requirements: []
|
|
133
|
-
rubygems_version:
|
|
134
|
-
signing_key:
|
|
151
|
+
rubygems_version: 4.0.0
|
|
135
152
|
specification_version: 4
|
|
136
153
|
summary: ULMUL is an Ultra Lightweight Mark-Up Language
|
|
137
154
|
test_files:
|