aozora4reader 1.2.0 → 1.2.1
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.
- data/lib/aozora4reader.rb +11 -2
- data/lib/aozora4reader/version.rb +1 -1
- metadata +3 -3
data/lib/aozora4reader.rb
CHANGED
@@ -27,6 +27,7 @@ class Aozora4Reader
|
|
27
27
|
@line_num=0
|
28
28
|
@gaiji = {}
|
29
29
|
@gaiji2 = {}
|
30
|
+
@sayuuchuuou = false
|
30
31
|
end
|
31
32
|
|
32
33
|
# UTF-8で出力
|
@@ -467,9 +468,17 @@ END_OF_POST
|
|
467
468
|
line = line.sub(/(.+?)[#(「\1」は横?[1|一]文字[^]]*?)]/){"\\ajLig{"+to_single_byte($1)+"}"}
|
468
469
|
end
|
469
470
|
if line =~ /[#改丁.*?]/
|
471
|
+
if @sayuuchuuou
|
472
|
+
line = "\\vspace*{\\stretch{1}}" + line
|
473
|
+
@sayuuchuuou = false
|
474
|
+
end
|
470
475
|
line.sub!(/[#改丁.*?]/, "\\cleardoublepage")
|
471
476
|
end
|
472
477
|
if line =~ /[#改[頁|ページ].*?]/
|
478
|
+
if @sayuuchuuou
|
479
|
+
line = "\\vspace*{\\stretch{1}}" + line
|
480
|
+
@sayuuchuuou = false
|
481
|
+
end
|
473
482
|
line.sub!(/[#改[頁|ページ].*?]/, "\\clearpage")
|
474
483
|
end
|
475
484
|
|
@@ -611,8 +620,8 @@ END_OF_POST
|
|
611
620
|
end
|
612
621
|
|
613
622
|
if line =~ /[#ページの左右中央]/
|
614
|
-
|
615
|
-
|
623
|
+
line.gsub!(/[#ページの左右中央]/, "\\vspace*{\\stretch{1}}")
|
624
|
+
@sayuuchuuou = true
|
616
625
|
end
|
617
626
|
|
618
627
|
## XXX 字詰めは1行の文字数が少ないので無視
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aozora4reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -85,7 +85,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: '0'
|
86
86
|
segments:
|
87
87
|
- 0
|
88
|
-
hash:
|
88
|
+
hash: 4598459345339432912
|
89
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
90
|
none: false
|
91
91
|
requirements:
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
segments:
|
96
96
|
- 0
|
97
|
-
hash:
|
97
|
+
hash: 4598459345339432912
|
98
98
|
requirements: []
|
99
99
|
rubyforge_project:
|
100
100
|
rubygems_version: 1.8.25
|