mathjax-yard 1.0.1 → 1.0.2
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/README.md +45 -11
- data/Rakefile +26 -3
- data/doc/MathJaxYard.html +3 -3
- data/doc/MathJaxYard/Command.html +214 -128
- data/doc/_index.html +15 -3
- data/doc/file.Home.html +96 -2
- data/doc/file.README.html +45 -9
- data/doc/file.README_ja.html +28 -10
- data/doc/file.Why_mathjax-yard.html +176 -0
- data/doc/file.Why_mathjax-yard.mjx.html +176 -0
- data/doc/file.atom.html +29 -122
- data/doc/file.atom.mjx.html +112 -0
- data/doc/file.potential.html +97 -0
- data/doc/file.potential.mjx.html +96 -0
- data/doc/file_list.html +14 -2
- data/doc/index.html +45 -9
- data/doc/method_list.html +12 -6
- data/doc/top-level-namespace.html +1 -1
- data/docs/README_ja.hiki +91 -0
- data/docs/Why_mathjax-yard.hiki +49 -0
- data/docs/atom.hiki +30 -0
- data/docs/potential.hiki +10 -0
- data/lib/mathjax-yard.rb +41 -51
- data/lib/mathjax-yard/init.rb +34 -0
- data/lib/mathjax-yard/version.rb +1 -1
- data/mathjax.yml +13 -17
- metadata +12 -3
- data/doc/file.potential2.html +0 -196
data/doc/_index.html
CHANGED
@@ -82,15 +82,27 @@
|
|
82
82
|
<li class="r2"><a href="file.atom.html" title="atom">atom</a></li>
|
83
83
|
|
84
84
|
|
85
|
-
<li class="r1"><a href="file.
|
85
|
+
<li class="r1"><a href="file.atom.mjx.html" title="atom.mjx">atom.mjx</a></li>
|
86
86
|
|
87
87
|
|
88
|
-
<li class="r2"><a href="file.
|
88
|
+
<li class="r2"><a href="file.Home.html" title="Home">Home</a></li>
|
89
|
+
|
90
|
+
|
91
|
+
<li class="r1"><a href="file.potential.html" title="potential">potential</a></li>
|
92
|
+
|
93
|
+
|
94
|
+
<li class="r2"><a href="file.potential.mjx.html" title="potential.mjx">potential.mjx</a></li>
|
89
95
|
|
90
96
|
|
91
97
|
<li class="r1"><a href="file.README_ja.html" title="README_ja">README_ja</a></li>
|
92
98
|
|
93
99
|
|
100
|
+
<li class="r2"><a href="file.Why_mathjax-yard.html" title="Why_mathjax-yard">Why_mathjax-yard</a></li>
|
101
|
+
|
102
|
+
|
103
|
+
<li class="r1"><a href="file.Why_mathjax-yard.mjx.html" title="Why_mathjax-yard.mjx">Why_mathjax-yard.mjx</a></li>
|
104
|
+
|
105
|
+
|
94
106
|
</ul>
|
95
107
|
|
96
108
|
<div class="clear"></div>
|
@@ -140,7 +152,7 @@
|
|
140
152
|
</div>
|
141
153
|
|
142
154
|
<div id="footer">
|
143
|
-
Generated on
|
155
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
144
156
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
145
157
|
0.8.7.6 (ruby-2.2.2).
|
146
158
|
</div>
|
data/doc/file.Home.html
CHANGED
@@ -73,11 +73,105 @@
|
|
73
73
|
|
74
74
|
<iframe id="search_frame"></iframe>
|
75
75
|
|
76
|
-
<div id="content"><div id='filecontents'><
|
76
|
+
<div id="content"><div id='filecontents'><h1>MathJaxYard</h1>
|
77
|
+
|
78
|
+
<p>mathjax-yardはyardによるmarkdown変換においてmathjaxを使えるようにする拡張機能です.</p>
|
79
|
+
|
80
|
+
<ul>
|
81
|
+
<li><a href="file.Why_mathjax-yard.mjx.html">なぜ開発したか</a></li>
|
82
|
+
<li><a href="file.atom.mjx.html">数式サンプル1</a></li>
|
83
|
+
<li><a href="file.potential.mjx.html">数式サンプル2</a></li>
|
84
|
+
</ul>
|
85
|
+
|
86
|
+
<h2>Installation</h2>
|
87
|
+
|
88
|
+
<p>Add this line to your application's Gemfile:</p>
|
89
|
+
|
90
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span>
|
91
|
+
</code></pre>
|
92
|
+
|
93
|
+
<p>And then execute:</p>
|
94
|
+
|
95
|
+
<pre class="code ruby"><code class="ruby">$ bundle
|
96
|
+
</code></pre>
|
97
|
+
|
98
|
+
<p>Or install it yourself as:</p>
|
99
|
+
|
100
|
+
<pre class="code ruby"><code class="ruby">$ gem install mathjax-yard
|
101
|
+
</code></pre>
|
102
|
+
|
103
|
+
<h2>Usage</h2>
|
104
|
+
|
105
|
+
<p>mathjax-yardはcommand line toolとしての使用を意図して作られています.例えば,Rakefileでの使用例は次の通りです.</p>
|
106
|
+
|
107
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make documents by yard</span><span class='tstring_end'>"</span></span>
|
108
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:yard</span> <span class='kw'>do</span>
|
109
|
+
<span class='const'>YARD</span><span class='op'>::</span><span class='const'>Rake</span><span class='op'>::</span><span class='const'>YardocTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
110
|
+
<span class='kw'>end</span>
|
111
|
+
|
112
|
+
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>arrange yard target by mathjax-yard</span><span class='tstring_end'>"</span></span>
|
113
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:pre_math</span> <span class='kw'>do</span>
|
114
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
115
|
+
<span class='kw'>end</span>
|
116
|
+
|
117
|
+
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make yard documents with yardmath</span><span class='tstring_end'>"</span></span>
|
118
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:myard</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='symbol'>:pre_math</span><span class='comma'>,</span><span class='symbol'>:yard</span><span class='rbracket'>]</span> <span class='kw'>do</span>
|
119
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard --post</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
120
|
+
<span class='kw'>end</span>
|
121
|
+
</code></pre>
|
122
|
+
|
123
|
+
<p>yardのデフォルトでの動作をなぞって,動作するように作られています.</p>
|
124
|
+
|
125
|
+
<ul>
|
126
|
+
<li>mathjax-yardは./<em>/</em>.mdを探索し,それらの中に'\$\$'あるいは'\$\$..\$\$'があると\$MATHJAX20\$などというタグに付け替え,</li>
|
127
|
+
<li><em>.mj.mdとしたファイルに元ファイルのバックアップを取り,</em>.mdにタグ付け替えした内容を保存します.</li>
|
128
|
+
<li>また,同時に, 'mathjax.yml'にそれらのhash関係をyaml形式で保存します.</li>
|
129
|
+
<li>通常のrake yardで変換したのち,</li>
|
130
|
+
<li>'mathjax-yard --post'によって,'doc/file.*.mjx.html'に残されたtagを元に戻します.</li>
|
131
|
+
<li>また同時に,mjx.mdファイルを消します.</li>
|
132
|
+
</ul>
|
133
|
+
|
134
|
+
<p>yardのoptionは,.yardoptsに</p>
|
135
|
+
|
136
|
+
<pre class="code ruby"><code class="ruby">-t mathjax -p templates
|
137
|
+
-
|
138
|
+
spec/*.md
|
139
|
+
</code></pre>
|
140
|
+
|
141
|
+
<p>としています.また,htmlのhead部分にmathjaxのscriptを埋め込んだlayoutを用意しています.</p>
|
142
|
+
|
143
|
+
<p>これをmathjax-yardで行うには,</p>
|
144
|
+
|
145
|
+
<pre class="code csh"><code class="csh"> mathjax-yard --init
|
146
|
+
</code></pre>
|
147
|
+
|
148
|
+
<p>とする必要があります.</p>
|
149
|
+
|
150
|
+
<pre class="code csh"><code class="csh">bob% mathjax-yard --help
|
151
|
+
Usage: yardmath [options] [DIRECTORY]
|
152
|
+
-v, --version show program Version.
|
153
|
+
-r, --revert revert mjx file to orig file.
|
154
|
+
-p, --post post operation.
|
155
|
+
-i, --init initiation for mathjax extension on yard layout.
|
156
|
+
</code></pre>
|
157
|
+
|
158
|
+
<h2>Development</h2>
|
159
|
+
|
160
|
+
<p>After checking out the repo, run <code>bin/setup</code> to install dependencies. Then, run <code>rake spec</code> to run the tests. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment. Run <code>bundle exec mathjax-yard</code> to use the gem in this directory, ignoring other installed copies of this gem.</p>
|
161
|
+
|
162
|
+
<p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and tags, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
|
163
|
+
|
164
|
+
<h2>Contributing</h2>
|
165
|
+
|
166
|
+
<p>Bug reports and pull requests are welcome on GitHub at [[<a href="https://github.com/%5BUSERNAME%5D/mathjax-yard%5D">https://github.com/[USERNAME]/mathjax-yard]</a>]. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="http://contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
|
167
|
+
|
168
|
+
<h2>License</h2>
|
169
|
+
|
170
|
+
<p>The gem is available as open source under the terms of the <a href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
|
77
171
|
</div></div>
|
78
172
|
|
79
173
|
<div id="footer">
|
80
|
-
Generated on
|
174
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
81
175
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
82
176
|
0.8.7.6 (ruby-2.2.2).
|
83
177
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -75,7 +75,13 @@
|
|
75
75
|
|
76
76
|
<div id="content"><div id='filecontents'><h1>MathJaxYard</h1>
|
77
77
|
|
78
|
-
<p>mathjax-yard
|
78
|
+
<p>mathjax-yardはyardによるmarkdown変換においてmathjaxを使えるようにする拡張機能です.</p>
|
79
|
+
|
80
|
+
<ul>
|
81
|
+
<li><a href="file.Why_mathjax-yard.mjx.html">なぜ開発したか</a></li>
|
82
|
+
<li><a href="file.atom.mjx.html">数式サンプル1</a></li>
|
83
|
+
<li><a href="file.potential.mjx.html">数式サンプル2</a></li>
|
84
|
+
</ul>
|
79
85
|
|
80
86
|
<h2>Installation</h2>
|
81
87
|
|
@@ -96,28 +102,58 @@
|
|
96
102
|
|
97
103
|
<h2>Usage</h2>
|
98
104
|
|
99
|
-
<p>mathjax-yard
|
105
|
+
<p>mathjax-yardはcommand line toolとしての使用を意図して作られています.例えば,Rakefileでの使用例は次の通りです.</p>
|
100
106
|
|
101
107
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make documents by yard</span><span class='tstring_end'>"</span></span>
|
102
108
|
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:yard</span> <span class='kw'>do</span>
|
103
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
104
109
|
<span class='const'>YARD</span><span class='op'>::</span><span class='const'>Rake</span><span class='op'>::</span><span class='const'>YardocTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
105
110
|
<span class='kw'>end</span>
|
106
111
|
|
107
|
-
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>
|
108
|
-
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:
|
112
|
+
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>arrange yard target by mathjax-yard</span><span class='tstring_end'>"</span></span>
|
113
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:pre_math</span> <span class='kw'>do</span>
|
114
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
115
|
+
<span class='kw'>end</span>
|
116
|
+
|
117
|
+
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make yard documents with yardmath</span><span class='tstring_end'>"</span></span>
|
118
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:myard</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='symbol'>:pre_math</span><span class='comma'>,</span><span class='symbol'>:yard</span><span class='rbracket'>]</span> <span class='kw'>do</span>
|
109
119
|
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard --post</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
110
120
|
<span class='kw'>end</span>
|
111
121
|
</code></pre>
|
112
122
|
|
113
|
-
<p>
|
123
|
+
<p>yardのデフォルトでの動作をなぞって,動作するように作られています.</p>
|
124
|
+
|
125
|
+
<ul>
|
126
|
+
<li>mathjax-yardは./<em>/</em>.mdを探索し,それらの中に'\$\$'あるいは'\$\$..\$\$'があると\$MATHJAX20\$などというタグに付け替え,</li>
|
127
|
+
<li><em>.mj.mdとしたファイルに元ファイルのバックアップを取り,</em>.mdにタグ付け替えした内容を保存します.</li>
|
128
|
+
<li>また,同時に, 'mathjax.yml'にそれらのhash関係をyaml形式で保存します.</li>
|
129
|
+
<li>通常のrake yardで変換したのち,</li>
|
130
|
+
<li>'mathjax-yard --post'によって,'doc/file.*.mjx.html'に残されたtagを元に戻します.</li>
|
131
|
+
<li>また同時に,mjx.mdファイルを消します.</li>
|
132
|
+
</ul>
|
133
|
+
|
134
|
+
<p>yardのoptionは,.yardoptsに</p>
|
114
135
|
|
115
136
|
<pre class="code ruby"><code class="ruby">-t mathjax -p templates
|
116
137
|
-
|
117
138
|
spec/*.md
|
118
139
|
</code></pre>
|
119
140
|
|
120
|
-
<p
|
141
|
+
<p>としています.また,htmlのhead部分にmathjaxのscriptを埋め込んだlayoutを用意しています.</p>
|
142
|
+
|
143
|
+
<p>これをmathjax-yardで行うには,</p>
|
144
|
+
|
145
|
+
<pre class="code csh"><code class="csh"> mathjax-yard --init
|
146
|
+
</code></pre>
|
147
|
+
|
148
|
+
<p>とする必要があります.</p>
|
149
|
+
|
150
|
+
<pre class="code csh"><code class="csh">bob% mathjax-yard --help
|
151
|
+
Usage: yardmath [options] [DIRECTORY]
|
152
|
+
-v, --version show program Version.
|
153
|
+
-r, --revert revert mjx file to orig file.
|
154
|
+
-p, --post post operation.
|
155
|
+
-i, --init initiation for mathjax extension on yard layout.
|
156
|
+
</code></pre>
|
121
157
|
|
122
158
|
<h2>Development</h2>
|
123
159
|
|
@@ -127,7 +163,7 @@ spec/*.md
|
|
127
163
|
|
128
164
|
<h2>Contributing</h2>
|
129
165
|
|
130
|
-
<p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/%5BUSERNAME%5D/mathjax-yard">https://github.com/[USERNAME]/mathjax-yard</a
|
166
|
+
<p>Bug reports and pull requests are welcome on GitHub at [[<a href="https://github.com/%5BUSERNAME%5D/mathjax-yard%5D">https://github.com/[USERNAME]/mathjax-yard]</a>]. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="http://contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
|
131
167
|
|
132
168
|
<h2>License</h2>
|
133
169
|
|
@@ -135,7 +171,7 @@ spec/*.md
|
|
135
171
|
</div></div>
|
136
172
|
|
137
173
|
<div id="footer">
|
138
|
-
Generated on
|
174
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
139
175
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
140
176
|
0.8.7.6 (ruby-2.2.2).
|
141
177
|
</div>
|
data/doc/file.README_ja.html
CHANGED
@@ -77,6 +77,12 @@
|
|
77
77
|
|
78
78
|
<p>mathjax-yardはyardによるmarkdown変換においてmathjaxを使えるようにする拡張機能です.</p>
|
79
79
|
|
80
|
+
<ul>
|
81
|
+
<li><a href="file.Why_mathjax-yard.mjx.html">なぜ開発したか</a></li>
|
82
|
+
<li><a href="file.atom.mjx.html">数式サンプル1</a></li>
|
83
|
+
<li><a href="file.potential.mjx.html">数式サンプル2</a></li>
|
84
|
+
</ul>
|
85
|
+
|
80
86
|
<h2>Installation</h2>
|
81
87
|
|
82
88
|
<p>Add this line to your application's Gemfile:</p>
|
@@ -100,12 +106,16 @@
|
|
100
106
|
|
101
107
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make documents by yard</span><span class='tstring_end'>"</span></span>
|
102
108
|
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:yard</span> <span class='kw'>do</span>
|
103
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
104
109
|
<span class='const'>YARD</span><span class='op'>::</span><span class='const'>Rake</span><span class='op'>::</span><span class='const'>YardocTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
105
110
|
<span class='kw'>end</span>
|
106
111
|
|
107
|
-
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>
|
108
|
-
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:
|
112
|
+
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>arrange yard target by mathjax-yard</span><span class='tstring_end'>"</span></span>
|
113
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:pre_math</span> <span class='kw'>do</span>
|
114
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
115
|
+
<span class='kw'>end</span>
|
116
|
+
|
117
|
+
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make yard documents with yardmath</span><span class='tstring_end'>"</span></span>
|
118
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:myard</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='symbol'>:pre_math</span><span class='comma'>,</span><span class='symbol'>:yard</span><span class='rbracket'>]</span> <span class='kw'>do</span>
|
109
119
|
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard --post</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
110
120
|
<span class='kw'>end</span>
|
111
121
|
</code></pre>
|
@@ -114,11 +124,11 @@
|
|
114
124
|
|
115
125
|
<ul>
|
116
126
|
<li>mathjax-yardは./<em>/</em>.mdを探索し,それらの中に'\$\$'あるいは'\$\$..\$\$'があると\$MATHJAX20\$などというタグに付け替え,</li>
|
117
|
-
<li><em>.md
|
118
|
-
|
127
|
+
<li><em>.mj.mdとしたファイルに元ファイルのバックアップを取り,</em>.mdにタグ付け替えした内容を保存します.</li>
|
128
|
+
<li>また,同時に, 'mathjax.yml'にそれらのhash関係をyaml形式で保存します.</li>
|
119
129
|
<li>通常のrake yardで変換したのち,</li>
|
120
|
-
<li>'mathjax-yard --post'によって,'doc/file.*.html'に残されたtagを元に戻します.</li>
|
121
|
-
<li>また同時に,
|
130
|
+
<li>'mathjax-yard --post'によって,'doc/file.*.mjx.html'に残されたtagを元に戻します.</li>
|
131
|
+
<li>また同時に,mjx.mdファイルを消します.</li>
|
122
132
|
</ul>
|
123
133
|
|
124
134
|
<p>yardのoptionは,.yardoptsに</p>
|
@@ -130,11 +140,19 @@ spec/*.md
|
|
130
140
|
|
131
141
|
<p>としています.また,htmlのhead部分にmathjaxのscriptを埋め込んだlayoutを用意しています.</p>
|
132
142
|
|
133
|
-
<
|
143
|
+
<p>これをmathjax-yardで行うには,</p>
|
144
|
+
|
145
|
+
<pre class="code csh"><code class="csh"> mathjax-yard --init
|
146
|
+
</code></pre>
|
147
|
+
|
148
|
+
<p>とする必要があります.</p>
|
149
|
+
|
150
|
+
<pre class="code csh"><code class="csh">bob% mathjax-yard --help
|
134
151
|
Usage: yardmath [options] [DIRECTORY]
|
135
152
|
-v, --version show program Version.
|
136
153
|
-r, --revert revert mjx file to orig file.
|
137
154
|
-p, --post post operation.
|
155
|
+
-i, --init initiation for mathjax extension on yard layout.
|
138
156
|
</code></pre>
|
139
157
|
|
140
158
|
<h2>Development</h2>
|
@@ -145,7 +163,7 @@ Usage: yardmath [options] [DIRECTORY]
|
|
145
163
|
|
146
164
|
<h2>Contributing</h2>
|
147
165
|
|
148
|
-
<p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/%5BUSERNAME%5D/mathjax-yard">https://github.com/[USERNAME]/mathjax-yard</a
|
166
|
+
<p>Bug reports and pull requests are welcome on GitHub at [[<a href="https://github.com/%5BUSERNAME%5D/mathjax-yard%5D">https://github.com/[USERNAME]/mathjax-yard]</a>]. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="http://contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
|
149
167
|
|
150
168
|
<h2>License</h2>
|
151
169
|
|
@@ -153,7 +171,7 @@ Usage: yardmath [options] [DIRECTORY]
|
|
153
171
|
</div></div>
|
154
172
|
|
155
173
|
<div id="footer">
|
156
|
-
Generated on
|
174
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
157
175
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
158
176
|
0.8.7.6 (ruby-2.2.2).
|
159
177
|
</div>
|
@@ -0,0 +1,176 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<script type="text/x-mathjax-config">
|
6
|
+
MathJax.Hub.Config({
|
7
|
+
tex2jax:{
|
8
|
+
inlineMath: [ ['$','$'], ["\(","\)"] ],
|
9
|
+
displayMath: [ ['$$','$$'], ["\[","\]"] ]
|
10
|
+
}
|
11
|
+
});
|
12
|
+
</script>
|
13
|
+
<script type="text/javascript"
|
14
|
+
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
15
|
+
</script>
|
16
|
+
<meta http-equiv="X-UA-Compatible" CONTENT="IE=EmulateIE7" />
|
17
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
18
|
+
<title>
|
19
|
+
File: Why_mathjax-yard
|
20
|
+
|
21
|
+
— Documentation by YARD 0.8.7.6
|
22
|
+
|
23
|
+
</title>
|
24
|
+
|
25
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
26
|
+
|
27
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
28
|
+
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
hasFrames = window.top.frames.main ? true : false;
|
31
|
+
relpath = '';
|
32
|
+
framesUrl = "frames.html#!file.Why_mathjax-yard.html";
|
33
|
+
</script>
|
34
|
+
|
35
|
+
|
36
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
37
|
+
|
38
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
39
|
+
|
40
|
+
|
41
|
+
</head>
|
42
|
+
<body>
|
43
|
+
<div id="header">
|
44
|
+
<div id="menu">
|
45
|
+
|
46
|
+
<a href="_index.html">Index</a> »
|
47
|
+
<span class="title">File: Why_mathjax-yard</span>
|
48
|
+
|
49
|
+
|
50
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="search">
|
54
|
+
|
55
|
+
<a class="full_list_link" id="class_list_link"
|
56
|
+
href="class_list.html">
|
57
|
+
Class List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
<a class="full_list_link" id="method_list_link"
|
61
|
+
href="method_list.html">
|
62
|
+
Method List
|
63
|
+
</a>
|
64
|
+
|
65
|
+
<a class="full_list_link" id="file_list_link"
|
66
|
+
href="file_list.html">
|
67
|
+
File List
|
68
|
+
</a>
|
69
|
+
|
70
|
+
</div>
|
71
|
+
<div class="clear"></div>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<iframe id="search_frame"></iframe>
|
75
|
+
|
76
|
+
<div id="content"><div id='filecontents'><h1>導入の経緯</h1>
|
77
|
+
|
78
|
+
<h2>概要</h2>
|
79
|
+
|
80
|
+
<p>mathjaxとmark downの周辺状況から,なぜmathjax-yardが必要になったかをまとめておきます.</p>
|
81
|
+
|
82
|
+
<h2>状況</h2>
|
83
|
+
|
84
|
+
<p>数値計算や物理シミュレーションにおいては,解説に数式が不可欠です.
|
85
|
+
記法としては$LaTeX$形式がありますが,これをhtmlで表示するには工夫が必要です.
|
86
|
+
gemなどを作るとき,yardでdocumentationを自動化することが可能です.
|
87
|
+
しかし,そこに数式を組み込んでも,うまく表示されません.</p>
|
88
|
+
|
89
|
+
<h3>MathML or mathjax</h3>
|
90
|
+
|
91
|
+
<table><thead>
|
92
|
+
<tr>
|
93
|
+
<th style="text-align: left">MathML</th>
|
94
|
+
<th style="text-align: left">mathjax</th>
|
95
|
+
</tr>
|
96
|
+
</thead><tbody>
|
97
|
+
<tr>
|
98
|
+
<td style="text-align: left">firefoxのみ</td>
|
99
|
+
<td style="text-align: left">なんでも</td>
|
100
|
+
</tr>
|
101
|
+
</tbody></table>
|
102
|
+
|
103
|
+
<h2>mark down with mathjax extension</h2>
|
104
|
+
|
105
|
+
<ul>
|
106
|
+
<li>Githubのwikiはmark down 記法を取っているが,math拡張が切られた.</li>
|
107
|
+
<li>Qiitaなどは独自拡張しているが,ない.</li>
|
108
|
+
<li>yard
|
109
|
+
|
110
|
+
<ul>
|
111
|
+
<li>mathjaxの拡張ができる</li>
|
112
|
+
<li>optionsに,組み込まれてはいない.</li>
|
113
|
+
</ul></li>
|
114
|
+
<li>atom
|
115
|
+
|
116
|
+
<ul>
|
117
|
+
<li>mathjax-wrapper とmarkdown_preview_plusでlive変換・表示できる.</li>
|
118
|
+
<li>htmlへの変換はあるが,あまりきれいでない.</li>
|
119
|
+
</ul></li>
|
120
|
+
<li>pandoc
|
121
|
+
|
122
|
+
<ul>
|
123
|
+
<li>mathjaxを組み込んでhtmlに変換できる</li>
|
124
|
+
<li>cssなどに汎用性がなく,体裁をいじるのは難しい.</li>
|
125
|
+
</ul></li>
|
126
|
+
</ul>
|
127
|
+
|
128
|
+
<h2>つまり</h2>
|
129
|
+
|
130
|
+
<p>個別にmathjaxの入ったmd文書をhtmlに変換することができたとしても,
|
131
|
+
yardで自動生成される体裁の整った文書としては得ることが難しいというのが現状です.</p>
|
132
|
+
|
133
|
+
<h2>解決法</h2>
|
134
|
+
|
135
|
+
<p>そこで,yardのpre, postコマンドとして動作するmathjax-yardを開発しました.</p>
|
136
|
+
|
137
|
+
<ul>
|
138
|
+
<li>yardで変換される,<em>/</em>.md中の数式をMATHJAXタグに付け替え.</li>
|
139
|
+
<li>yardでmd->html変換</li>
|
140
|
+
<li>できたdoc/file.*.htmlのMATHJAXタグを数式に戻す
|
141
|
+
という操作をしています.</li>
|
142
|
+
</ul>
|
143
|
+
|
144
|
+
<h2>やり残し</h2>
|
145
|
+
|
146
|
+
<ul>
|
147
|
+
<li>default動作以外のyard変換への対応
|
148
|
+
|
149
|
+
<ul>
|
150
|
+
<li>特に*.rbへの対応</li>
|
151
|
+
</ul></li>
|
152
|
+
<li>hikiへの対応</li>
|
153
|
+
<li>yardへのpull request</li>
|
154
|
+
<li>$を記述しようとしてもだめ.
|
155
|
+
|
156
|
+
<ul>
|
157
|
+
<li>\$で逃げている(16/6/23対応断念).</li>
|
158
|
+
</ul></li>
|
159
|
+
<li>最小一致を使った記述の単純化(16/6/23対応).</li>
|
160
|
+
<li>Rakefileでのコマンド一発での変換
|
161
|
+
|
162
|
+
<ul>
|
163
|
+
<li>一つ所に書くと,systemコマンドなどがmultitaskで走ってしまう.</li>
|
164
|
+
<li>taskを分割してそれぞれを終了させた(16/6/23対応).</li>
|
165
|
+
</ul></li>
|
166
|
+
</ul>
|
167
|
+
</div></div>
|
168
|
+
|
169
|
+
<div id="footer">
|
170
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
171
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
172
|
+
0.8.7.6 (ruby-2.2.2).
|
173
|
+
</div>
|
174
|
+
|
175
|
+
</body>
|
176
|
+
</html>
|