polytexnic 1.6.5 → 1.6.6
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/Gemfile.lock +4 -9
- data/lib/polytexnic/literal.rb +2 -1
- data/lib/polytexnic/version.rb +1 -1
- data/lib/polytexnic.rb +2 -2
- data/spec/to_latex_spec.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e758ae9c4c23afe6aa06e9a916d9c41d207b8ded3da0c6e405e3e4b979c1864
|
|
4
|
+
data.tar.gz: 2e44dbade1df1aa4e573c87c10e5adf34c2939e8cfe3690234fa5404c9ebc679
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3908f4a3795694c34c7c9443f475ca62662e9b6e3d8b0593641e8c42a5b99237fcc45e293704400eac7b243a813e814a898a560d4c9b6d51d08b0885afd77cc4
|
|
7
|
+
data.tar.gz: 7517c3f0636b7472568dbb0252c1ac1090c8554907868977a943b96b0ee5d689d81febbbefa4e6dba79536ce8c985bc406d47ddf5360f82b409e2dd80b20f33a
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
polytexnic (1.6.
|
|
4
|
+
polytexnic (1.6.6)
|
|
5
5
|
json (~> 2.3.0)
|
|
6
6
|
kramdown (>= 2.0, < 3.0)
|
|
7
7
|
msgpack (~> 1.2.0)
|
|
@@ -53,14 +53,10 @@ GEM
|
|
|
53
53
|
mime-types (3.3.1)
|
|
54
54
|
mime-types-data (~> 3.2015)
|
|
55
55
|
mime-types-data (3.2021.0704)
|
|
56
|
-
mini_portile2 (2.6.1)
|
|
57
56
|
msgpack (1.2.10)
|
|
58
57
|
multi_json (1.15.0)
|
|
59
58
|
nenv (0.3.0)
|
|
60
|
-
nokogiri (1.12.
|
|
61
|
-
mini_portile2 (~> 2.6.1)
|
|
62
|
-
racc (~> 1.4)
|
|
63
|
-
nokogiri (1.12.3-x86_64-darwin)
|
|
59
|
+
nokogiri (1.12.4-x86_64-darwin)
|
|
64
60
|
racc (~> 1.4)
|
|
65
61
|
notiffany (0.1.3)
|
|
66
62
|
nenv (~> 0.1)
|
|
@@ -97,8 +93,7 @@ GEM
|
|
|
97
93
|
tins (0.13.2)
|
|
98
94
|
|
|
99
95
|
PLATFORMS
|
|
100
|
-
|
|
101
|
-
x86_64-darwin-19
|
|
96
|
+
x86_64-darwin-20
|
|
102
97
|
|
|
103
98
|
DEPENDENCIES
|
|
104
99
|
coveralls
|
|
@@ -111,4 +106,4 @@ DEPENDENCIES
|
|
|
111
106
|
simplecov (~> 0.15.1)
|
|
112
107
|
|
|
113
108
|
BUNDLED WITH
|
|
114
|
-
2.2.
|
|
109
|
+
2.2.17
|
data/lib/polytexnic/literal.rb
CHANGED
|
@@ -212,6 +212,7 @@ module Polytexnic
|
|
|
212
212
|
part = language_labels["part"]
|
|
213
213
|
chapter = language_labels["chapter"]["word"]
|
|
214
214
|
section = language_labels["section"]
|
|
215
|
+
appendix = language_labels["appendix"]
|
|
215
216
|
table = language_labels["table"]
|
|
216
217
|
box = language_labels["aside"]
|
|
217
218
|
figure = language_labels["figure"]
|
|
@@ -219,7 +220,7 @@ module Polytexnic
|
|
|
219
220
|
listing = language_labels["listing"]
|
|
220
221
|
equation = language_labels["equation"]
|
|
221
222
|
eq = language_labels["eq"]
|
|
222
|
-
linked_item = "(#{part}|#{chapter}|#{section}|#{table}|#{box}|#{figure}" +
|
|
223
|
+
linked_item = "(#{part}|#{chapter}|#{section}|#{appendix}|#{table}|#{box}|#{figure}" +
|
|
223
224
|
"|#{fig}\.|#{listing}|#{equation}|#{eq}\.)"
|
|
224
225
|
ref = /(?:#{linked_item}(~| ))*(\\(?:eq)*ref){(.*?)}/i
|
|
225
226
|
string.gsub!(ref) do
|
data/lib/polytexnic/version.rb
CHANGED
data/lib/polytexnic.rb
CHANGED
|
@@ -110,8 +110,8 @@ module Polytexnic
|
|
|
110
110
|
# Returns the default labels for 'Chapter', 'Figure', etc.
|
|
111
111
|
def default_language_labels
|
|
112
112
|
{"part"=>"Part","chapter"=>{"word"=>"Chapter", "order"=>"standard"},
|
|
113
|
-
"section"=>"Section", "
|
|
114
|
-
"fig"=>"Fig", "aside"=>"Box", "listing"=>"Listing",
|
|
113
|
+
"section"=>"Section", "appendix"=>"Appendix", "table"=>"Table",
|
|
114
|
+
"figure"=>"Figure", "fig"=>"Fig", "aside"=>"Box", "listing"=>"Listing",
|
|
115
115
|
"equation"=>"Equation", "eq"=>"Eq", "frontmatter"=>"Frontmatter",
|
|
116
116
|
"contents"=>"Contents"}
|
|
117
117
|
end
|
data/spec/to_latex_spec.rb
CHANGED
|
@@ -152,14 +152,17 @@ end
|
|
|
152
152
|
Part~\ref{prt:foo}
|
|
153
153
|
Chapter~\ref{cha:bar}
|
|
154
154
|
Section~\ref{sec:baz}
|
|
155
|
+
Appendix~\ref{cha:quux}
|
|
155
156
|
EOS
|
|
156
157
|
end
|
|
157
|
-
let(:part_ref)
|
|
158
|
-
let(:chapter_ref)
|
|
159
|
-
let(:section_ref)
|
|
158
|
+
let(:part_ref) { '\hyperref[prt:foo]{Part~\ref{prt:foo}' }
|
|
159
|
+
let(:chapter_ref) { '\hyperref[cha:bar]{Chapter~\ref{cha:bar}' }
|
|
160
|
+
let(:section_ref) { '\hyperref[sec:baz]{Section~\ref{sec:baz}' }
|
|
161
|
+
let(:appendix_ref) { '\hyperref[cha:quux]{Appendix~\ref{cha:quux}' }
|
|
160
162
|
it { should resemble part_ref }
|
|
161
163
|
it { should resemble chapter_ref }
|
|
162
164
|
it { should resemble section_ref }
|
|
165
|
+
it { should resemble appendix_ref }
|
|
163
166
|
end
|
|
164
167
|
|
|
165
168
|
describe "asides" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: polytexnic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Hartl
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2021-
|
|
12
|
+
date: 2021-09-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nokogiri
|