polytexnic 1.0.beta2 → 1.0.beta3
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/lib/polytexnic/postprocessors/html.rb +6 -1
- data/lib/polytexnic/version.rb +1 -1
- data/spec/to_html/table_spec.rb +39 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 673231bbe5f9155e189f7260d998c86d82f97737
|
|
4
|
+
data.tar.gz: 906c18815f66d4f82892065795d63f9808ffe19e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2d0e7a95a6d8740cf1052b2b32903816894063249589f92ad8e25812e88d509018bfb66f6727d8cf20b47b9587e7bcaa3df2d659cdcc9d135d34055d12e418cf
|
|
7
|
+
data.tar.gz: ac81b31f5cf10c84cbc127e4fee1211a7782ee7acceb0c5eb2a868d85399418e21ecaab9f21a719245110771af93889f8fef1d2dc61de89c25f66b6da63e73c3
|
|
@@ -877,6 +877,7 @@ module Polytexnic
|
|
|
877
877
|
# counters.
|
|
878
878
|
@equation = 0
|
|
879
879
|
@figure = 0
|
|
880
|
+
@table = 0
|
|
880
881
|
@cha = node['id-text']
|
|
881
882
|
elsif node['class'] == 'section'
|
|
882
883
|
@sec = node['id-text']
|
|
@@ -899,7 +900,11 @@ module Polytexnic
|
|
|
899
900
|
elsif node['class'] == 'aside'
|
|
900
901
|
node['id-text']
|
|
901
902
|
elsif node.name == 'table' && node['id-text']
|
|
902
|
-
@
|
|
903
|
+
if @cha.nil?
|
|
904
|
+
@table = node['id-text']
|
|
905
|
+
else
|
|
906
|
+
@table += 1
|
|
907
|
+
end
|
|
903
908
|
label_number(@cha, @table)
|
|
904
909
|
elsif node.name == 'figure'
|
|
905
910
|
if @cha.nil?
|
data/lib/polytexnic/version.rb
CHANGED
data/spec/to_html/table_spec.rb
CHANGED
|
@@ -312,5 +312,44 @@ describe 'Polytexnic::Pipeline#to_html' do
|
|
|
312
312
|
it { should resemble 'id="table-RESTful_users"' }
|
|
313
313
|
end
|
|
314
314
|
end
|
|
315
|
+
|
|
316
|
+
context "numbering with two chapters" do
|
|
317
|
+
|
|
318
|
+
let(:polytex) do <<-'EOS'
|
|
319
|
+
\chapter{A chapter}
|
|
320
|
+
|
|
321
|
+
lorem
|
|
322
|
+
|
|
323
|
+
\begin{table}
|
|
324
|
+
\begin{tabular}{cc}
|
|
325
|
+
HTTP request & URL \\
|
|
326
|
+
GET & /users \\
|
|
327
|
+
GET & /users/1
|
|
328
|
+
\end{tabular}
|
|
329
|
+
\label{table:foo}
|
|
330
|
+
\end{table}
|
|
331
|
+
|
|
332
|
+
\chapter{Another}
|
|
333
|
+
|
|
334
|
+
ipsum
|
|
335
|
+
|
|
336
|
+
Table~\ref{table:foo}
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
\begin{table}
|
|
340
|
+
\begin{tabular}{cc}
|
|
341
|
+
HTTP request & URL \\
|
|
342
|
+
GET & /users \\
|
|
343
|
+
GET & /users/1
|
|
344
|
+
\end{tabular}
|
|
345
|
+
\label{table:bar}
|
|
346
|
+
\end{table}
|
|
347
|
+
EOS
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
it { should include 'Table 1.1' }
|
|
351
|
+
it { should include 'Table 2.1' }
|
|
352
|
+
|
|
353
|
+
end
|
|
315
354
|
end
|
|
316
355
|
end
|
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.0.
|
|
4
|
+
version: 1.0.beta3
|
|
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: 2014-
|
|
12
|
+
date: 2014-08-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nokogiri
|
|
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
290
290
|
version: 1.3.1
|
|
291
291
|
requirements: []
|
|
292
292
|
rubyforge_project:
|
|
293
|
-
rubygems_version: 2.0
|
|
293
|
+
rubygems_version: 2.3.0
|
|
294
294
|
signing_key:
|
|
295
295
|
specification_version: 4
|
|
296
296
|
summary: Convert from PolyTeX & Markdown to HTML & LaTeX
|