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
@@ -0,0 +1,97 @@
|
|
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: potential
|
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.potential.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: potential</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'><ol>
|
77
|
+
<li>lj_0</li>
|
78
|
+
</ol>
|
79
|
+
|
80
|
+
<p>神藤らが用いているLennard-Jonesポテンシャルの表式</p>
|
81
|
+
|
82
|
+
<p>$$
|
83
|
+
\beginalign*
|
84
|
+
dedr=-\frac{ n m d_0 \left(rh^n- rh^m\right) }{ \left(n-m \right) rr } \
|
85
|
+
E=\frac{ d_0 \left( r_0/rr^nm- r_0/rr^m n \right) }{ -n + m }
|
86
|
+
\endalign*
|
87
|
+
$$</p>
|
88
|
+
</div></div>
|
89
|
+
|
90
|
+
<div id="footer">
|
91
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
92
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
93
|
+
0.8.7.6 (ruby-2.2.2).
|
94
|
+
</div>
|
95
|
+
|
96
|
+
</body>
|
97
|
+
</html>
|
@@ -0,0 +1,96 @@
|
|
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: potential.mjx
|
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.potential.mjx.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: potential.mjx</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'><ol>
|
77
|
+
<li>lj_0</li>
|
78
|
+
</ol>
|
79
|
+
|
80
|
+
<p>神藤らが用いているLennard-Jonesポテンシャルの表式</p>
|
81
|
+
|
82
|
+
<p>$$\begin{align*}
|
83
|
+
dedr=-\frac{ n m d_0 \left(rh^{n}- rh^{m}\right) }{ \left(n-m \right) rr } \\
|
84
|
+
E=\frac{ d_0 \left( r_0/rr^{n}m- r_0/rr^{m} n \right) }{ -n + m }
|
85
|
+
\end{align*}
|
86
|
+
$$</p>
|
87
|
+
</div></div>
|
88
|
+
|
89
|
+
<div id="footer">
|
90
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
91
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
92
|
+
0.8.7.6 (ruby-2.2.2).
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</body>
|
96
|
+
</html>
|
data/doc/file_list.html
CHANGED
@@ -57,15 +57,27 @@
|
|
57
57
|
<li class="r2"><span class="object_link"><a href="file.atom.html" title="atom">atom</a></a></li>
|
58
58
|
|
59
59
|
|
60
|
-
<li class="r1"><span class="object_link"><a href="file.
|
60
|
+
<li class="r1"><span class="object_link"><a href="file.atom.mjx.html" title="atom.mjx">atom.mjx</a></a></li>
|
61
61
|
|
62
62
|
|
63
|
-
<li class="r2"><span class="object_link"><a href="file.
|
63
|
+
<li class="r2"><span class="object_link"><a href="file.Home.html" title="Home">Home</a></a></li>
|
64
|
+
|
65
|
+
|
66
|
+
<li class="r1"><span class="object_link"><a href="file.potential.html" title="potential">potential</a></a></li>
|
67
|
+
|
68
|
+
|
69
|
+
<li class="r2"><span class="object_link"><a href="file.potential.mjx.html" title="potential.mjx">potential.mjx</a></a></li>
|
64
70
|
|
65
71
|
|
66
72
|
<li class="r1"><span class="object_link"><a href="file.README_ja.html" title="README_ja">README_ja</a></a></li>
|
67
73
|
|
68
74
|
|
75
|
+
<li class="r2"><span class="object_link"><a href="file.Why_mathjax-yard.html" title="Why_mathjax-yard">Why_mathjax-yard</a></a></li>
|
76
|
+
|
77
|
+
|
78
|
+
<li class="r1"><span class="object_link"><a href="file.Why_mathjax-yard.mjx.html" title="Why_mathjax-yard.mjx">Why_mathjax-yard.mjx</a></a></li>
|
79
|
+
|
80
|
+
|
69
81
|
</ul>
|
70
82
|
</div>
|
71
83
|
</body>
|
data/doc/index.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/method_list.html
CHANGED
@@ -82,42 +82,48 @@
|
|
82
82
|
|
83
83
|
|
84
84
|
<li class="r2 ">
|
85
|
-
<span class='object_link'><a href="MathJaxYard/Command.html#
|
85
|
+
<span class='object_link'><a href="MathJaxYard/Command.html#mk_mjx_file_name-instance_method" title="MathJaxYard::Command#mk_mjx_file_name (method)">#mk_mjx_file_name</a></span>
|
86
86
|
<small>MathJaxYard::Command</small>
|
87
87
|
</li>
|
88
88
|
|
89
89
|
|
90
90
|
<li class="r1 ">
|
91
|
-
<span class='object_link'><a href="MathJaxYard/Command.html#
|
91
|
+
<span class='object_link'><a href="MathJaxYard/Command.html#mk_tags-instance_method" title="MathJaxYard::Command#mk_tags (method)">#mk_tags</a></span>
|
92
92
|
<small>MathJaxYard::Command</small>
|
93
93
|
</li>
|
94
94
|
|
95
95
|
|
96
96
|
<li class="r2 ">
|
97
|
-
<span class='object_link'><a href="MathJaxYard/Command.html#
|
97
|
+
<span class='object_link'><a href="MathJaxYard/Command.html#modify_layout-instance_method" title="MathJaxYard::Command#modify_layout (method)">#modify_layout</a></span>
|
98
98
|
<small>MathJaxYard::Command</small>
|
99
99
|
</li>
|
100
100
|
|
101
101
|
|
102
102
|
<li class="r1 ">
|
103
|
-
<span class='object_link'><a href="MathJaxYard/Command.html#
|
103
|
+
<span class='object_link'><a href="MathJaxYard/Command.html#post_operation-instance_method" title="MathJaxYard::Command#post_operation (method)">#post_operation</a></span>
|
104
104
|
<small>MathJaxYard::Command</small>
|
105
105
|
</li>
|
106
106
|
|
107
107
|
|
108
108
|
<li class="r2 ">
|
109
|
-
<span class='object_link'><a href="MathJaxYard/Command.html#
|
109
|
+
<span class='object_link'><a href="MathJaxYard/Command.html#revert-instance_method" title="MathJaxYard::Command#revert (method)">#revert</a></span>
|
110
110
|
<small>MathJaxYard::Command</small>
|
111
111
|
</li>
|
112
112
|
|
113
113
|
|
114
114
|
<li class="r1 ">
|
115
|
-
<span class='object_link'><a href="MathJaxYard/Command.html#
|
115
|
+
<span class='object_link'><a href="MathJaxYard/Command.html#run-class_method" title="MathJaxYard::Command.run (method)">run</a></span>
|
116
116
|
<small>MathJaxYard::Command</small>
|
117
117
|
</li>
|
118
118
|
|
119
119
|
|
120
120
|
<li class="r2 ">
|
121
|
+
<span class='object_link'><a href="MathJaxYard/Command.html#store_eq_data-instance_method" title="MathJaxYard::Command#store_eq_data (method)">#store_eq_data</a></span>
|
122
|
+
<small>MathJaxYard::Command</small>
|
123
|
+
</li>
|
124
|
+
|
125
|
+
|
126
|
+
<li class="r1 ">
|
121
127
|
<span class='object_link'><a href="MathJaxYard/Command.html#write_output_on_target-instance_method" title="MathJaxYard::Command#write_output_on_target (method)">#write_output_on_target</a></span>
|
122
128
|
<small>MathJaxYard::Command</small>
|
123
129
|
</li>
|
@@ -149,7 +149,7 @@ S_HTML">
|
|
149
149
|
</div>
|
150
150
|
|
151
151
|
<div id="footer">
|
152
|
-
Generated on
|
152
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
153
153
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
154
154
|
0.8.7.6 (ruby-2.2.2).
|
155
155
|
</div>
|
data/docs/README_ja.hiki
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
! MathJaxYard
|
2
|
+
|
3
|
+
mathjax-yardはyardによるmarkdown変換においてmathjaxを使えるようにする拡張機能です.
|
4
|
+
*[[なぜ開発したか|file.Why_mathjax-yard.mjx.html]]
|
5
|
+
*[[数式サンプル1|file.atom.mjx.html]]
|
6
|
+
*[[数式サンプル2|file.potential.mjx.html]]
|
7
|
+
|
8
|
+
!! Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
<<<ruby
|
13
|
+
gem 'mathjax-yard'
|
14
|
+
>>>
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install mathjax-yard
|
23
|
+
|
24
|
+
!! Usage
|
25
|
+
|
26
|
+
mathjax-yardはcommand line toolとしての使用を意図して作られています.例えば,Rakefileでの使用例は次の通りです.
|
27
|
+
|
28
|
+
<<< ruby
|
29
|
+
desc "make documents by yard"
|
30
|
+
task :yard do
|
31
|
+
YARD::Rake::YardocTask.new
|
32
|
+
end
|
33
|
+
|
34
|
+
desc "arrange yard target by mathjax-yard"
|
35
|
+
task :pre_math do
|
36
|
+
system('mathjax-yard')
|
37
|
+
end
|
38
|
+
|
39
|
+
desc "make yard documents with yardmath"
|
40
|
+
task :myard => [:pre_math,:yard] do
|
41
|
+
system('mathjax-yard --post')
|
42
|
+
end
|
43
|
+
>>>
|
44
|
+
|
45
|
+
yardのデフォルトでの動作をなぞって,動作するように作られています.
|
46
|
+
* mathjax-yardは./*/*.mdを探索し,それらの中に'\$\$'あるいは'\$\$..\$\$'があると\$MATHJAX20\$などというタグに付け替え,
|
47
|
+
* *.mj.mdとしたファイルに元ファイルのバックアップを取り,*.mdにタグ付け替えした内容を保存します.
|
48
|
+
*また,同時に, 'mathjax.yml'にそれらのhash関係をyaml形式で保存します.
|
49
|
+
* 通常のrake yardで変換したのち,
|
50
|
+
* 'mathjax-yard --post'によって,'doc/file.*.mjx.html'に残されたtagを元に戻します.
|
51
|
+
* また同時に,mjx.mdファイルを消します.
|
52
|
+
|
53
|
+
yardのoptionは,.yardoptsに
|
54
|
+
|
55
|
+
<<<
|
56
|
+
-t mathjax -p templates
|
57
|
+
-
|
58
|
+
spec/*.md
|
59
|
+
>>>
|
60
|
+
|
61
|
+
としています.また,htmlのhead部分にmathjaxのscriptを埋め込んだlayoutを用意しています.
|
62
|
+
|
63
|
+
これをmathjax-yardで行うには,
|
64
|
+
<<<csh
|
65
|
+
mathjax-yard --init
|
66
|
+
>>>
|
67
|
+
とする必要があります.
|
68
|
+
|
69
|
+
<<<csh
|
70
|
+
bob% mathjax-yard --help
|
71
|
+
Usage: yardmath [options] [DIRECTORY]
|
72
|
+
-v, --version show program Version.
|
73
|
+
-r, --revert revert mjx file to orig file.
|
74
|
+
-p, --post post operation.
|
75
|
+
-i, --init initiation for mathjax extension on yard layout.
|
76
|
+
>>>
|
77
|
+
|
78
|
+
!! Development
|
79
|
+
|
80
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. Run `bundle exec mathjax-yard` to use the gem in this directory, ignoring other installed copies of this gem.
|
81
|
+
|
82
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [[rubygems.org|https://rubygems.org]].
|
83
|
+
|
84
|
+
!! Contributing
|
85
|
+
|
86
|
+
Bug reports and pull requests are welcome on GitHub at [[https://github.com/[USERNAME]/mathjax-yard]]. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [[Contributor Covenant|http://contributor-covenant.org]] code of conduct.
|
87
|
+
|
88
|
+
|
89
|
+
!! License
|
90
|
+
|
91
|
+
The gem is available as open source under the terms of the [[MIT License|http://opensource.org/licenses/MIT]].
|