mathjax-yard 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6101dd93fbfe71488c229d3fb4cd7cb97cc1c08
|
4
|
+
data.tar.gz: 956835b94bf83c6895400c33d24096576b57220f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a18384e1748bcda083ccd74da46b5f895ed4ebeaee600bacd35845393eb46c5acbe79ca3bafa7aecf04b64f0c4b2ea17fdd3af50e51206941b6da62b029b4fbf
|
7
|
+
data.tar.gz: ce74cfb473f485c9e6e0b0d6cfaeabdf093eb5f07369523ac7be5f1dfe6c1d163368442e003969fb268f7f7b651a61c798f893b11c31de1e89053bfdfbe19eb6
|
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# MathJaxYard
|
2
2
|
|
3
|
-
mathjax-yard
|
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)
|
4
7
|
|
5
8
|
## Installation
|
6
9
|
|
@@ -12,29 +15,46 @@ gem 'mathjax-yard'
|
|
12
15
|
|
13
16
|
And then execute:
|
14
17
|
|
15
|
-
|
18
|
+
```
|
19
|
+
$ bundle
|
20
|
+
```
|
16
21
|
|
17
22
|
Or install it yourself as:
|
18
23
|
|
19
|
-
|
24
|
+
```
|
25
|
+
$ gem install mathjax-yard
|
26
|
+
```
|
20
27
|
|
21
28
|
## Usage
|
22
29
|
|
23
|
-
mathjax-yard
|
30
|
+
mathjax-yardはcommand line toolとしての使用を意図して作られています.例えば,Rakefileでの使用例は次の通りです.
|
24
31
|
|
25
|
-
```
|
32
|
+
```ruby
|
26
33
|
desc "make documents by yard"
|
27
34
|
task :yard do
|
28
|
-
system('mathjax-yard')
|
29
35
|
YARD::Rake::YardocTask.new
|
30
36
|
end
|
31
37
|
|
32
|
-
desc "
|
33
|
-
task :
|
38
|
+
desc "arrange yard target by mathjax-yard"
|
39
|
+
task :pre_math do
|
40
|
+
system('mathjax-yard')
|
41
|
+
end
|
42
|
+
|
43
|
+
desc "make yard documents with yardmath"
|
44
|
+
task :myard => [:pre_math,:yard] do
|
34
45
|
system('mathjax-yard --post')
|
35
46
|
end
|
36
47
|
```
|
37
|
-
|
48
|
+
|
49
|
+
yardのデフォルトでの動作をなぞって,動作するように作られています.
|
50
|
+
- mathjax-yardは./*/*.mdを探索し,それらの中に'\$\$'あるいは'\$\$..\$\$'があると\$MATHJAX20\$などというタグに付け替え,
|
51
|
+
- *.mj.mdとしたファイルに元ファイルのバックアップを取り,*.mdにタグ付け替えした内容を保存します.
|
52
|
+
- また,同時に, 'mathjax.yml'にそれらのhash関係をyaml形式で保存します.
|
53
|
+
- 通常のrake yardで変換したのち,
|
54
|
+
- 'mathjax-yard --post'によって,'doc/file.*.mjx.html'に残されたtagを元に戻します.
|
55
|
+
- また同時に,mjx.mdファイルを消します.
|
56
|
+
|
57
|
+
yardのoptionは,.yardoptsに
|
38
58
|
|
39
59
|
```
|
40
60
|
-t mathjax -p templates
|
@@ -42,8 +62,22 @@ mathjax-yard search ./*/*.md and replace '$...$' or '$$...$$' to $MATHJAX**$ tag
|
|
42
62
|
spec/*.md
|
43
63
|
```
|
44
64
|
|
45
|
-
|
65
|
+
としています.また,htmlのhead部分にmathjaxのscriptを埋め込んだlayoutを用意しています.
|
46
66
|
|
67
|
+
これをmathjax-yardで行うには,
|
68
|
+
```csh
|
69
|
+
mathjax-yard --init
|
70
|
+
```
|
71
|
+
とする必要があります.
|
72
|
+
|
73
|
+
```csh
|
74
|
+
bob% mathjax-yard --help
|
75
|
+
Usage: yardmath [options] [DIRECTORY]
|
76
|
+
-v, --version show program Version.
|
77
|
+
-r, --revert revert mjx file to orig file.
|
78
|
+
-p, --post post operation.
|
79
|
+
-i, --init initiation for mathjax extension on yard layout.
|
80
|
+
```
|
47
81
|
|
48
82
|
## Development
|
49
83
|
|
@@ -53,7 +87,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
53
87
|
|
54
88
|
## Contributing
|
55
89
|
|
56
|
-
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.
|
90
|
+
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.
|
57
91
|
|
58
92
|
|
59
93
|
## License
|
data/Rakefile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rspec/core/rake_task"
|
3
3
|
require 'yard'
|
4
|
+
p base_path = File.expand_path('..', __FILE__)
|
5
|
+
p basename = File.basename(base_path)
|
4
6
|
|
5
7
|
RSpec::Core::RakeTask.new(:spec)
|
6
8
|
|
@@ -8,12 +10,33 @@ task :default => :spec
|
|
8
10
|
|
9
11
|
desc "make documents by yard"
|
10
12
|
task :yard do
|
11
|
-
system('mathjax-yard')
|
12
13
|
YARD::Rake::YardocTask.new
|
14
|
+
end
|
13
15
|
|
16
|
+
desc "make md documents from hiki"
|
17
|
+
task :hiki do
|
18
|
+
files = Dir.entries('docs')
|
19
|
+
files.each{|file|
|
20
|
+
name=file.split('.')
|
21
|
+
if name[1]=='hiki' then
|
22
|
+
p command="hiki2md docs/#{name[0]}.hiki > #{basename}.wiki/#{name[0]}.md"
|
23
|
+
system command
|
24
|
+
end
|
25
|
+
}
|
26
|
+
system "cp #{basename}.wiki/README_ja.md README.md"
|
27
|
+
system "cp #{basename}.wiki/README_ja.md #{basename}.wiki/Home.md"
|
28
|
+
system "cp docs/*.gif #{basename}.wiki"
|
29
|
+
system "cp docs/*.gif doc"
|
30
|
+
system "cp docs/*.png #{basename}.wiki"
|
31
|
+
system "cp docs/*.png doc"
|
32
|
+
end
|
33
|
+
|
34
|
+
desc "arrange yard target by mathjax-yard"
|
35
|
+
task :pre_math do
|
36
|
+
system('mathjax-yard')
|
14
37
|
end
|
15
38
|
|
16
|
-
desc "make documents with yardmath"
|
17
|
-
task :
|
39
|
+
desc "make yard documents with yardmath"
|
40
|
+
task :myard => [:hiki, :pre_math,:yard] do
|
18
41
|
system('mathjax-yard --post')
|
19
42
|
end
|
data/doc/MathJaxYard.html
CHANGED
@@ -92,7 +92,7 @@
|
|
92
92
|
|
93
93
|
<dt class="r1 last">Defined in:</dt>
|
94
94
|
<dd class="r1 last">lib/mathjax-yard.rb<span class="defines">,<br />
|
95
|
-
lib/mathjax-yard/version.rb</span>
|
95
|
+
lib/mathjax-yard/init.rb,<br /> lib/mathjax-yard/version.rb</span>
|
96
96
|
</dd>
|
97
97
|
|
98
98
|
</dl>
|
@@ -116,7 +116,7 @@
|
|
116
116
|
<dt id="VERSION-constant" class="">VERSION =
|
117
117
|
|
118
118
|
</dt>
|
119
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.
|
119
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>1.0.2</span><span class='tstring_end'>"</span></span></pre></dd>
|
120
120
|
|
121
121
|
</dl>
|
122
122
|
|
@@ -132,7 +132,7 @@
|
|
132
132
|
</div>
|
133
133
|
|
134
134
|
<div id="footer">
|
135
|
-
Generated on
|
135
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
136
136
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
137
137
|
0.8.7.6 (ruby-2.2.2).
|
138
138
|
</div>
|
@@ -106,12 +106,26 @@
|
|
106
106
|
|
107
107
|
|
108
108
|
<dt class="r2 last">Defined in:</dt>
|
109
|
-
<dd class="r2 last">lib/mathjax-yard.rb
|
109
|
+
<dd class="r2 last">lib/mathjax-yard.rb<span class="defines">,<br />
|
110
|
+
lib/mathjax-yard/init.rb</span>
|
111
|
+
</dd>
|
110
112
|
|
111
113
|
</dl>
|
112
114
|
<div class="clear"></div>
|
113
115
|
|
114
116
|
|
117
|
+
<h2>Constant Summary</h2>
|
118
|
+
|
119
|
+
<dl class="constants">
|
120
|
+
|
121
|
+
<dt id="MJX_FILE_EXT-constant" class="">MJX_FILE_EXT =
|
122
|
+
|
123
|
+
</dt>
|
124
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*.mjx.md</span><span class='tstring_end'>'</span></span></pre></dd>
|
125
|
+
|
126
|
+
</dl>
|
127
|
+
|
128
|
+
|
115
129
|
|
116
130
|
|
117
131
|
|
@@ -268,6 +282,28 @@
|
|
268
282
|
<p>A new instance of Command.</p>
|
269
283
|
</div></span>
|
270
284
|
|
285
|
+
</li>
|
286
|
+
|
287
|
+
|
288
|
+
<li class="public ">
|
289
|
+
<span class="summary_signature">
|
290
|
+
|
291
|
+
<a href="#mk_mjx_file_name-instance_method" title="#mk_mjx_file_name (instance method)">- (Object) <strong>mk_mjx_file_name</strong>(file) </a>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
</span>
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
306
|
+
|
271
307
|
</li>
|
272
308
|
|
273
309
|
|
@@ -435,7 +471,6 @@
|
|
435
471
|
<pre class="lines">
|
436
472
|
|
437
473
|
|
438
|
-
14
|
439
474
|
15
|
440
475
|
16
|
441
476
|
17
|
@@ -443,13 +478,12 @@
|
|
443
478
|
19</pre>
|
444
479
|
</td>
|
445
480
|
<td>
|
446
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
481
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 15</span>
|
447
482
|
|
448
483
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_argv'>argv</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
449
484
|
<span class='ivar'>@argv</span> <span class='op'>=</span> <span class='id identifier rubyid_argv'>argv</span>
|
450
485
|
<span class='ivar'>@eq_data</span><span class='op'>=</span><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
451
486
|
<span class='ivar'>@eq_number</span> <span class='op'>=</span><span class='int'>0</span>
|
452
|
-
<span class='ivar'>@revert</span> <span class='op'>=</span> <span class='kw'>false</span>
|
453
487
|
<span class='kw'>end</span></pre>
|
454
488
|
</td>
|
455
489
|
</tr>
|
@@ -478,12 +512,12 @@
|
|
478
512
|
<pre class="lines">
|
479
513
|
|
480
514
|
|
481
|
-
10
|
482
515
|
11
|
483
|
-
12
|
516
|
+
12
|
517
|
+
13</pre>
|
484
518
|
</td>
|
485
519
|
<td>
|
486
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
520
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 11</span>
|
487
521
|
|
488
522
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_argv'>argv</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
489
523
|
<span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_argv'>argv</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span>
|
@@ -514,34 +548,36 @@
|
|
514
548
|
<pre class="lines">
|
515
549
|
|
516
550
|
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
551
|
+
83
|
552
|
+
84
|
553
|
+
85
|
554
|
+
86
|
555
|
+
87
|
556
|
+
88
|
557
|
+
89
|
558
|
+
90
|
559
|
+
91
|
560
|
+
92
|
561
|
+
93
|
562
|
+
94
|
563
|
+
95
|
564
|
+
96
|
565
|
+
97</pre>
|
531
566
|
</td>
|
532
567
|
<td>
|
533
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
568
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 83</span>
|
534
569
|
|
535
570
|
<span class='kw'>def</span> <span class='id identifier rubyid_convert'>convert</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span>
|
536
|
-
<span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span>
|
537
|
-
<span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier
|
538
|
-
<span class='
|
539
|
-
<span class='
|
540
|
-
<span class='id identifier
|
541
|
-
<span class='
|
542
|
-
|
571
|
+
<span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*.md</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
572
|
+
<span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_base_file'>base_file</span><span class='op'>|</span>
|
573
|
+
<span class='id identifier rubyid_m_file'>m_file</span> <span class='op'>=</span> <span class='id identifier rubyid_mk_mjx_file_name'>mk_mjx_file_name</span><span class='lparen'>(</span><span class='id identifier rubyid_base_file'>base_file</span><span class='rparen'>)</span>
|
574
|
+
<span class='ivar'>@eq_data</span><span class='lbracket'>[</span><span class='id identifier rubyid_m_file'>m_file</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
575
|
+
<span class='id identifier rubyid_lines'>lines</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_readlines'>readlines</span><span class='lparen'>(</span><span class='id identifier rubyid_base_file'>base_file</span><span class='rparen'>)</span>
|
576
|
+
<span class='id identifier rubyid_output'>output</span> <span class='op'>=</span> <span class='id identifier rubyid_mk_tags'>mk_tags</span><span class='lparen'>(</span><span class='id identifier rubyid_lines'>lines</span><span class='comma'>,</span><span class='id identifier rubyid_m_file'>m_file</span><span class='rparen'>)</span>
|
577
|
+
<span class='kw'>if</span> <span class='ivar'>@eq_data</span><span class='lbracket'>[</span><span class='id identifier rubyid_m_file'>m_file</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span><span class='int'>0</span>
|
578
|
+
<span class='ivar'>@eq_data</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_m_file'>m_file</span><span class='rparen'>)</span>
|
543
579
|
<span class='kw'>else</span>
|
544
|
-
<span class='id identifier rubyid_write_output_on_target'>write_output_on_target</span><span class='lparen'>(</span><span class='id identifier
|
580
|
+
<span class='id identifier rubyid_write_output_on_target'>write_output_on_target</span><span class='lparen'>(</span><span class='id identifier rubyid_base_file'>base_file</span><span class='comma'>,</span><span class='id identifier rubyid_output'>output</span><span class='rparen'>)</span>
|
545
581
|
<span class='kw'>end</span>
|
546
582
|
<span class='rbrace'>}</span>
|
547
583
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mathjax.yml</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='lparen'>(</span><span class='ivar'>@eq_data</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
@@ -594,7 +630,16 @@
|
|
594
630
|
46
|
595
631
|
47
|
596
632
|
48
|
597
|
-
49
|
633
|
+
49
|
634
|
+
50
|
635
|
+
51
|
636
|
+
52
|
637
|
+
53
|
638
|
+
54
|
639
|
+
55
|
640
|
+
56
|
641
|
+
57
|
642
|
+
58</pre>
|
598
643
|
</td>
|
599
644
|
<td>
|
600
645
|
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 21</span>
|
@@ -607,24 +652,33 @@
|
|
607
652
|
<span class='id identifier rubyid_exit'>exit</span>
|
608
653
|
<span class='rbrace'>}</span>
|
609
654
|
<span class='id identifier rubyid_opt'>opt</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-r</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--revert</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>revert mjx file to orig file.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span>
|
610
|
-
<span class='id identifier rubyid_directory'>directory</span> <span class='op'>=</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='op'>==</span><span class='kw'>nil</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>lib
|
655
|
+
<span class='id identifier rubyid_directory'>directory</span> <span class='op'>=</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='op'>==</span><span class='kw'>nil</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>lib/../*</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
611
656
|
<span class='id identifier rubyid_revert'>revert</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span>
|
612
657
|
<span class='id identifier rubyid_exit'>exit</span>
|
613
658
|
<span class='rbrace'>}</span>
|
614
|
-
<span class='id identifier rubyid_opt'>opt</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-p</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--
|
659
|
+
<span class='id identifier rubyid_opt'>opt</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-p</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--pre</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>pre operation.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span>
|
660
|
+
<span class='id identifier rubyid_directory'>directory</span> <span class='op'>=</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='op'>==</span><span class='kw'>nil</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>lib/../*</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
661
|
+
<span class='id identifier rubyid_convert'>convert</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span>
|
662
|
+
<span class='id identifier rubyid_exit'>exit</span>
|
663
|
+
<span class='rbrace'>}</span>
|
664
|
+
<span class='id identifier rubyid_opt'>opt</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--post</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>post operation.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span>
|
615
665
|
<span class='id identifier rubyid_post_operation'>post_operation</span>
|
616
|
-
<span class='id identifier rubyid_directory'>directory</span> <span class='op'>=</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='op'>==</span><span class='kw'>nil</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>lib
|
666
|
+
<span class='id identifier rubyid_directory'>directory</span> <span class='op'>=</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='op'>==</span><span class='kw'>nil</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>lib/../*</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
617
667
|
<span class='id identifier rubyid_revert'>revert</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span>
|
618
668
|
<span class='id identifier rubyid_exit'>exit</span>
|
619
669
|
<span class='rbrace'>}</span>
|
620
|
-
<span class='id identifier rubyid_opt'>opt</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-i</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--init</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>
|
670
|
+
<span class='id identifier rubyid_opt'>opt</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-i</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--init</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>init for mathjax on yard layout.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span>
|
621
671
|
<span class='id identifier rubyid_init_yard'>init_yard</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
622
672
|
<span class='id identifier rubyid_exit'>exit</span>
|
623
673
|
<span class='rbrace'>}</span>
|
624
674
|
<span class='kw'>end</span>
|
625
|
-
<span class='id identifier rubyid_command_parser'>command_parser</span><span class='period'>.</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='
|
626
|
-
|
627
|
-
|
675
|
+
<span class='id identifier rubyid_command_parser'>command_parser</span><span class='period'>.</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='heredoc_beg'><<EOF</span>
|
676
|
+
<span class='tstring_content'>Usage: mathjax-yard [options] [DIRECTORY]
|
677
|
+
with no extention: mathjax-yard -p lib/../*/*.md
|
678
|
+
|
679
|
+
</span><span class='heredoc_end'>EOF
|
680
|
+
</span> <span class='id identifier rubyid_command_parser'>command_parser</span><span class='period'>.</span><span class='id identifier rubyid_parse!'>parse!</span><span class='lparen'>(</span><span class='ivar'>@argv</span><span class='rparen'>)</span>
|
681
|
+
<span class='id identifier rubyid_directory'>directory</span> <span class='op'>=</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='op'>==</span><span class='kw'>nil</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>lib/../*</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='ivar'>@argv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
628
682
|
<span class='id identifier rubyid_convert'>convert</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span>
|
629
683
|
<span class='id identifier rubyid_exit'>exit</span>
|
630
684
|
<span class='kw'>end</span></pre>
|
@@ -648,17 +702,17 @@
|
|
648
702
|
<pre class="lines">
|
649
703
|
|
650
704
|
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
705
|
+
13
|
706
|
+
14
|
707
|
+
15
|
708
|
+
16
|
709
|
+
17
|
710
|
+
18
|
711
|
+
19
|
712
|
+
20</pre>
|
659
713
|
</td>
|
660
714
|
<td>
|
661
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
715
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard/init.rb', line 13</span>
|
662
716
|
|
663
717
|
<span class='kw'>def</span> <span class='id identifier rubyid_get_yard_layout_dir'>get_yard_layout_dir</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
664
718
|
<span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_stdout'>stdout</span><span class='comma'>,</span> <span class='id identifier rubyid_stderr'>stderr</span> <span class='op'>=</span> <span class='id identifier rubyid_systemu'>systemu</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>gem env | grep INSTALLATION </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
@@ -688,18 +742,18 @@
|
|
688
742
|
<pre class="lines">
|
689
743
|
|
690
744
|
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
745
|
+
3
|
746
|
+
4
|
747
|
+
5
|
748
|
+
6
|
749
|
+
7
|
750
|
+
8
|
751
|
+
9
|
752
|
+
10
|
753
|
+
11</pre>
|
700
754
|
</td>
|
701
755
|
<td>
|
702
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
756
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard/init.rb', line 3</span>
|
703
757
|
|
704
758
|
<span class='kw'>def</span> <span class='id identifier rubyid_init_yard'>init_yard</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
705
759
|
<span class='id identifier rubyid_target_dir'>target_dir</span><span class='op'>=</span><span class='id identifier rubyid_get_yard_layout_dir'>get_yard_layout_dir</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
@@ -713,6 +767,42 @@
|
|
713
767
|
</td>
|
714
768
|
</tr>
|
715
769
|
</table>
|
770
|
+
</div>
|
771
|
+
|
772
|
+
<div class="method_details ">
|
773
|
+
<h3 class="signature " id="mk_mjx_file_name-instance_method">
|
774
|
+
|
775
|
+
- (<tt>Object</tt>) <strong>mk_mjx_file_name</strong>(file)
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
</h3><table class="source_code">
|
782
|
+
<tr>
|
783
|
+
<td>
|
784
|
+
<pre class="lines">
|
785
|
+
|
786
|
+
|
787
|
+
99
|
788
|
+
100
|
789
|
+
101
|
790
|
+
102
|
791
|
+
103
|
792
|
+
104</pre>
|
793
|
+
</td>
|
794
|
+
<td>
|
795
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 99</span>
|
796
|
+
|
797
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_mk_mjx_file_name'>mk_mjx_file_name</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
|
798
|
+
<span class='id identifier rubyid_dir'>dir</span><span class='op'>=</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
|
799
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(.*).md</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
|
800
|
+
<span class='id identifier rubyid_basename'>basename</span><span class='op'>=</span><span class='backref'>$1</span>
|
801
|
+
<span class='kw'>return</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_basename'>basename</span><span class='embexpr_end'>}</span><span class='tstring_content'>.mjx.md</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
802
|
+
<span class='kw'>end</span></pre>
|
803
|
+
</td>
|
804
|
+
</tr>
|
805
|
+
</table>
|
716
806
|
</div>
|
717
807
|
|
718
808
|
<div class="method_details ">
|
@@ -730,6 +820,18 @@
|
|
730
820
|
<pre class="lines">
|
731
821
|
|
732
822
|
|
823
|
+
111
|
824
|
+
112
|
825
|
+
113
|
826
|
+
114
|
827
|
+
115
|
828
|
+
116
|
829
|
+
117
|
830
|
+
118
|
831
|
+
119
|
832
|
+
120
|
833
|
+
121
|
834
|
+
122
|
733
835
|
123
|
734
836
|
124
|
735
837
|
125
|
@@ -751,20 +853,10 @@
|
|
751
853
|
141
|
752
854
|
142
|
753
855
|
143
|
754
|
-
144
|
755
|
-
145
|
756
|
-
146
|
757
|
-
147
|
758
|
-
148
|
759
|
-
149
|
760
|
-
150
|
761
|
-
151
|
762
|
-
152
|
763
|
-
153
|
764
|
-
154</pre>
|
856
|
+
144</pre>
|
765
857
|
</td>
|
766
858
|
<td>
|
767
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
859
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 111</span>
|
768
860
|
|
769
861
|
<span class='kw'>def</span> <span class='id identifier rubyid_mk_tags'>mk_tags</span><span class='lparen'>(</span><span class='id identifier rubyid_lines'>lines</span><span class='comma'>,</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span>
|
770
862
|
<span class='ivar'>@in_eq_block</span> <span class='op'>=</span> <span class='kw'>false</span>
|
@@ -782,8 +874,10 @@
|
|
782
874
|
<span class='kw'>else</span> <span class='comment'>#outside eq block
|
783
875
|
</span> <span class='kw'>case</span> <span class='id identifier rubyid_line'>line</span>
|
784
876
|
<span class='kw'>when</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\\\$(.*?)\\\$</span><span class='regexp_end'>/</span></span>
|
877
|
+
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_line'>line</span>
|
785
878
|
<span class='id identifier rubyid_output'>output</span> <span class='op'><<</span> <span class='id identifier rubyid_line'>line</span> <span class='comment'># tryed to change $$ but failed.
|
786
879
|
</span> <span class='kw'>when</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\$(.+?)\$</span><span class='regexp_end'>/</span></span>
|
880
|
+
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_line'>line</span>
|
787
881
|
<span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\$(.+?)\$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_equation'>equation</span><span class='op'>|</span>
|
788
882
|
<span class='id identifier rubyid_store_eq_data'>store_eq_data</span><span class='lparen'>(</span><span class='id identifier rubyid_equation'>equation</span><span class='comma'>,</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span>
|
789
883
|
<span class='rbrace'>}</span>
|
@@ -818,19 +912,19 @@
|
|
818
912
|
<pre class="lines">
|
819
913
|
|
820
914
|
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
915
|
+
22
|
916
|
+
23
|
917
|
+
24
|
918
|
+
25
|
919
|
+
26
|
920
|
+
27</pre>
|
827
921
|
</td>
|
828
922
|
<td>
|
829
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
923
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard/init.rb', line 22</span>
|
830
924
|
|
831
925
|
<span class='kw'>def</span> <span class='id identifier rubyid_modify_layout'>modify_layout</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span>
|
832
926
|
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_file_name'>file_name</span>
|
833
|
-
<span class='id identifier rubyid_src'>src</span><span class='op'>=</span><span class='const'>
|
927
|
+
<span class='id identifier rubyid_src'>src</span><span class='op'>=</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span>
|
834
928
|
<span class='id identifier rubyid_src'>src</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='const'>ORIGINAL</span><span class='comma'>,</span><span class='const'>MATH_SCRIPT</span><span class='op'>+</span><span class='const'>ORIGINAL</span><span class='rparen'>)</span>
|
835
929
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span><span class='id identifier rubyid_src'>src</span><span class='rparen'>)</span>
|
836
930
|
<span class='kw'>end</span></pre>
|
@@ -854,26 +948,26 @@
|
|
854
948
|
<pre class="lines">
|
855
949
|
|
856
950
|
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
951
|
+
60
|
952
|
+
61
|
953
|
+
62
|
954
|
+
63
|
955
|
+
64
|
956
|
+
65
|
957
|
+
66
|
958
|
+
67
|
959
|
+
68
|
960
|
+
69
|
961
|
+
70
|
962
|
+
71
|
963
|
+
72
|
964
|
+
73</pre>
|
871
965
|
</td>
|
872
966
|
<td>
|
873
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
967
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 60</span>
|
874
968
|
|
875
969
|
<span class='kw'>def</span> <span class='id identifier rubyid_post_operation'>post_operation</span>
|
876
|
-
<span class='id identifier rubyid_src'>src</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>./mathjax.yml</span><span class='tstring_end'>"</span></span><span class='
|
970
|
+
<span class='id identifier rubyid_src'>src</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>./mathjax.yml</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
877
971
|
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='rparen'>)</span>
|
878
972
|
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_tags'>tags</span><span class='op'>|</span>
|
879
973
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(.+)\.md</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
|
@@ -881,8 +975,8 @@
|
|
881
975
|
<span class='id identifier rubyid_target'>target</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>./doc/file.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_basename'>basename</span><span class='embexpr_end'>}</span><span class='tstring_content'>.html</span><span class='tstring_end'>"</span></span>
|
882
976
|
<span class='id identifier rubyid_src'>src</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
|
883
977
|
<span class='id identifier rubyid_tags'>tags</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span><span class='id identifier rubyid_eq'>eq</span><span class='op'>|</span>
|
884
|
-
<span class='id identifier rubyid_src'>src</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='
|
885
|
-
<span class='rbrace'>}</span>
|
978
|
+
<span class='id identifier rubyid_src'>src</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='id identifier rubyid_eq'>eq</span><span class='rbrace'>}</span> <span class='comment'># fail (tag,eq) at '/////n'
|
979
|
+
</span> <span class='rbrace'>}</span>
|
886
980
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='comma'>,</span><span class='id identifier rubyid_src'>src</span><span class='rparen'>)</span>
|
887
981
|
<span class='rbrace'>}</span>
|
888
982
|
<span class='kw'>end</span></pre>
|
@@ -906,26 +1000,20 @@
|
|
906
1000
|
<pre class="lines">
|
907
1001
|
|
908
1002
|
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
98
|
916
|
-
99
|
917
|
-
100</pre>
|
1003
|
+
76
|
1004
|
+
77
|
1005
|
+
78
|
1006
|
+
79
|
1007
|
+
80
|
1008
|
+
81</pre>
|
918
1009
|
</td>
|
919
1010
|
<td>
|
920
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
1011
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 76</span>
|
921
1012
|
|
922
1013
|
<span class='kw'>def</span> <span class='id identifier rubyid_revert'>revert</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span>
|
923
|
-
<span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span>
|
924
|
-
<span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier
|
925
|
-
<span class='
|
926
|
-
<span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(.+).back$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
|
927
|
-
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_t_file'>t_file</span> <span class='op'>=</span> <span class='backref'>$1</span>
|
928
|
-
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mv'>mv</span><span class='lparen'>(</span><span class='id identifier rubyid_b_file'>b_file</span><span class='comma'>,</span><span class='id identifier rubyid_t_file'>t_file</span><span class='rparen'>)</span>
|
1014
|
+
<span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span><span class='const'>MJX_FILE_EXT</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1015
|
+
<span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_m_file'>m_file</span><span class='op'>|</span>
|
1016
|
+
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_rm'>rm</span><span class='lparen'>(</span><span class='id identifier rubyid_m_file'>m_file</span><span class='rparen'>)</span>
|
929
1017
|
<span class='rbrace'>}</span>
|
930
1018
|
<span class='kw'>end</span></pre>
|
931
1019
|
</td>
|
@@ -948,15 +1036,15 @@
|
|
948
1036
|
<pre class="lines">
|
949
1037
|
|
950
1038
|
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
1039
|
+
146
|
1040
|
+
147
|
1041
|
+
148
|
1042
|
+
149
|
1043
|
+
150
|
1044
|
+
151</pre>
|
957
1045
|
</td>
|
958
1046
|
<td>
|
959
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
1047
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 146</span>
|
960
1048
|
|
961
1049
|
<span class='kw'>def</span> <span class='id identifier rubyid_store_eq_data'>store_eq_data</span><span class='lparen'>(</span><span class='id identifier rubyid_equation'>equation</span><span class='comma'>,</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span>
|
962
1050
|
<span class='ivar'>@eq_number</span><span class='op'>+=</span><span class='int'>1</span>
|
@@ -984,19 +1072,17 @@
|
|
984
1072
|
<pre class="lines">
|
985
1073
|
|
986
1074
|
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
121</pre>
|
1075
|
+
106
|
1076
|
+
107
|
1077
|
+
108
|
1078
|
+
109</pre>
|
992
1079
|
</td>
|
993
1080
|
<td>
|
994
|
-
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line
|
1081
|
+
<pre class="code"><span class="info file"># File 'lib/mathjax-yard.rb', line 106</span>
|
995
1082
|
|
996
1083
|
<span class='kw'>def</span> <span class='id identifier rubyid_write_output_on_target'>write_output_on_target</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span><span class='id identifier rubyid_output'>output</span><span class='rparen'>)</span>
|
997
|
-
<span class='id identifier
|
998
|
-
<span class='const'>
|
999
|
-
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span><span class='id identifier rubyid_output'>output</span><span class='rparen'>)</span>
|
1084
|
+
<span class='id identifier rubyid_m_file'>m_file</span> <span class='op'>=</span> <span class='id identifier rubyid_mk_mjx_file_name'>mk_mjx_file_name</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
|
1085
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_m_file'>m_file</span><span class='comma'>,</span><span class='id identifier rubyid_output'>output</span><span class='rparen'>)</span>
|
1000
1086
|
<span class='kw'>end</span></pre>
|
1001
1087
|
</td>
|
1002
1088
|
</tr>
|
@@ -1008,7 +1094,7 @@
|
|
1008
1094
|
</div>
|
1009
1095
|
|
1010
1096
|
<div id="footer">
|
1011
|
-
Generated on
|
1097
|
+
Generated on Fri Jun 24 11:52:33 2016 by
|
1012
1098
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1013
1099
|
0.8.7.6 (ruby-2.2.2).
|
1014
1100
|
</div>
|