polytexnic 1.5.12 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e6ec9fc92f6233685ff0d2cebe269fb593e7b771fc6e47eb941e11e31ed77f1
4
- data.tar.gz: 56cc737c25b427592d20225da877e5c8cdb944e766a56a10c03304ab598ecfaa
3
+ metadata.gz: 941f1eb78908726af53bd97f91cbcbfb528805328149e6d1b38e1b5cea42e0d1
4
+ data.tar.gz: bfdb4f07708016f5edf71bb4fce5438a513dfbf57a1d3de96a2aac91f445d1e0
5
5
  SHA512:
6
- metadata.gz: 48f59f7ef253b1734fd0810d2d461715db32ea5e35e9aa48a07569684e9dd0dc01842517dac5a32052bd79f15847c28bfb16663aba183c33899d3c697f6357c7
7
- data.tar.gz: 450de341388bd5028d2aebcf311eb03ca864e36f2e0cdb73b64da60c1b2e7f7dbf29253b0dea3a039815b57da399d8f227cd88b8544f5ecd4fe8b9c9a423e0a3
6
+ metadata.gz: d8eec9d8e3922e7950210938453e7f2a945c7afd225c20f83280003f62ffba4d1fcaa4a126e729135454d81dce11b1300e00e75b1a5039c5e4dc8b0e8947164a
7
+ data.tar.gz: a3e720691cdd208445f1e78e3050ca36030ec0421929f42d9cffd718752f237ae4f8ffae80ec3899c43f40eea29e6ced41bb5f2cc905a847124a0a63ed9fa42b
data/.gitignore CHANGED
@@ -3,7 +3,6 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
- Gemfile.lock
7
6
  InstalledFiles
8
7
  _yardoc
9
8
  coverage
@@ -35,4 +34,4 @@ log
35
34
  .DS_Store
36
35
  .api_token
37
36
  .project_id
38
- .ruby-*
37
+ .ruby-*
data/Gemfile CHANGED
@@ -24,4 +24,4 @@ end
24
24
  group :development do
25
25
  gem 'guard-rspec'
26
26
  gem 'rake'
27
- end
27
+ end
@@ -0,0 +1,110 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ polytexnic (1.6.0)
5
+ json (~> 2.3.0)
6
+ kramdown (>= 1.17, < 3.0)
7
+ msgpack (~> 1.2.0)
8
+ nokogiri (~> 1.10.8)
9
+ pygments.rb (~> 1.2.1)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ coderay (1.1.3)
15
+ columnize (0.9.0)
16
+ coveralls (0.7.2)
17
+ multi_json (~> 1.3)
18
+ rest-client (= 1.6.7)
19
+ simplecov (>= 0.7)
20
+ term-ansicolor (= 1.2.2)
21
+ thor (= 0.18.1)
22
+ debugger-linecache (1.2.0)
23
+ debugger2 (1.0.0.beta2)
24
+ columnize (>= 0.3.1)
25
+ debugger-linecache (~> 1.2.0)
26
+ diff-lcs (1.4.4)
27
+ docile (1.1.5)
28
+ ffi (1.13.1)
29
+ formatador (0.2.5)
30
+ growl (1.0.3)
31
+ guard (2.16.2)
32
+ formatador (>= 0.2.4)
33
+ listen (>= 2.7, < 4.0)
34
+ lumberjack (>= 1.0.12, < 2.0)
35
+ nenv (~> 0.1)
36
+ notiffany (~> 0.0)
37
+ pry (>= 0.9.12)
38
+ shellany (~> 0.0)
39
+ thor (>= 0.18.1)
40
+ guard-compat (1.2.1)
41
+ guard-rspec (4.7.3)
42
+ guard (~> 2.1)
43
+ guard-compat (~> 1.1)
44
+ rspec (>= 2.99.0, < 4.0)
45
+ json (2.3.1)
46
+ kramdown (2.3.0)
47
+ rexml
48
+ listen (3.2.1)
49
+ rb-fsevent (~> 0.10, >= 0.10.3)
50
+ rb-inotify (~> 0.9, >= 0.9.10)
51
+ lumberjack (1.2.7)
52
+ method_source (1.0.0)
53
+ mime-types (3.3.1)
54
+ mime-types-data (~> 3.2015)
55
+ mime-types-data (3.2020.0512)
56
+ mini_portile2 (2.4.0)
57
+ msgpack (1.2.10)
58
+ multi_json (1.15.0)
59
+ nenv (0.3.0)
60
+ nokogiri (1.10.10)
61
+ mini_portile2 (~> 2.4.0)
62
+ notiffany (0.1.3)
63
+ nenv (~> 0.1)
64
+ shellany (~> 0.0)
65
+ pry (0.13.1)
66
+ coderay (~> 1.1)
67
+ method_source (~> 1.0)
68
+ pygments.rb (1.2.1)
69
+ multi_json (>= 1.0.0)
70
+ rake (13.0.1)
71
+ rb-fsevent (0.10.4)
72
+ rb-inotify (0.10.1)
73
+ ffi (~> 1.0)
74
+ rest-client (1.6.7)
75
+ mime-types (>= 1.16)
76
+ rexml (3.2.4)
77
+ rspec (2.99.0)
78
+ rspec-core (~> 2.99.0)
79
+ rspec-expectations (~> 2.99.0)
80
+ rspec-mocks (~> 2.99.0)
81
+ rspec-core (2.99.2)
82
+ rspec-expectations (2.99.2)
83
+ diff-lcs (>= 1.1.3, < 2.0)
84
+ rspec-mocks (2.99.4)
85
+ shellany (0.0.1)
86
+ simplecov (0.15.1)
87
+ docile (~> 1.1.0)
88
+ json (>= 1.8, < 3)
89
+ simplecov-html (~> 0.10.0)
90
+ simplecov-html (0.10.2)
91
+ term-ansicolor (1.2.2)
92
+ tins (~> 0.8)
93
+ thor (0.18.1)
94
+ tins (0.13.2)
95
+
96
+ PLATFORMS
97
+ ruby
98
+
99
+ DEPENDENCIES
100
+ coveralls
101
+ debugger2
102
+ growl
103
+ guard-rspec
104
+ polytexnic!
105
+ rake
106
+ rspec (~> 2.14)
107
+ simplecov (~> 0.15.1)
108
+
109
+ BUNDLED WITH
110
+ 2.1.4
@@ -1,19 +1,62 @@
1
1
  #!/usr/bin/env ruby
2
2
  require "polytexnic"
3
+ require 'optparse'
4
+ require 'fileutils'
3
5
 
4
- def latex_to_html(latex)
5
- Polytexnic::Pipeline.new(latex, article: true).to_html
6
+ # polytexnic command-line script
7
+ # The polytexnic script converts Markdown to LaTeX
8
+ # using the PolyTeXnic HTML pipeline.
9
+
10
+ examples = %(Examples:
11
+ polytexnic example.md example.tex
12
+ polytexnic example.md > example.tex
13
+ polytexnic < example.md > example.tex
14
+ cat example.md | polytexnic > example.tex
15
+ polytexnic -f example.md > example.tex
16
+ polytexnic -f example.md -o example.tex)
17
+
18
+ options = {}
19
+ OptionParser.new do |opts|
20
+ opts.banner = "Usage: polytexnic [options]\n#{examples}\n\n"
21
+
22
+ opts.on("-i", "--input", "Use file input") do |infile|
23
+ options[:infile] = infile
24
+ end
25
+
26
+ opts.on("-o", "--output", "Use file output") do |outfile|
27
+ options[:outfile] = outfile
28
+ end
29
+
30
+ opts.on("-f", "--format", "Use output format [html, tex]") do |format|
31
+ options[:format] = format
32
+ end
33
+ end.parse!
34
+
35
+ # Returns the file format based on extension.
36
+ # Should be 'html' or 'tex'.
37
+ def format(filename)
38
+ filename.split('.').last
39
+ rescue
40
+ nil
6
41
  end
7
42
 
8
- if ARGV.empty?
9
- puts latex_to_html(STDIN.read)
43
+ if (infile = options[:infile] || ARGV.shift)
44
+ input = File.read(infile)
10
45
  else
11
- filename = ARGV.shift
12
- latex = File.read(filename)
13
- html = latex_to_html(latex)
14
- if (outfile = ARGV.shift)
15
- File.write(outfile, html)
16
- else
17
- puts html.strip
18
- end
46
+ input = STDIN.read
47
+ end
48
+ outfile = options[:outfile] || ARGV.shift
49
+ pipeline = Polytexnic::Pipeline.new(input, article: true)
50
+ format = options[:format] || format(outfile) || "html"
51
+ if format == "html"
52
+ output = pipeline.to_html
53
+ elsif format == "tex"
54
+ output = pipeline.to_polytex
55
+ else
56
+ raise ArgumentError, "Invalid format: #{format}"
57
+ end
58
+ if outfile
59
+ File.write(outfile, output)
60
+ else
61
+ puts output.strip
19
62
  end
@@ -55,7 +55,6 @@ module Polytexnic
55
55
  mainmatter(doc)
56
56
  footnotes(doc)
57
57
  table_of_contents(doc)
58
- add_noindent(doc)
59
58
  convert_to_html(doc)
60
59
  end
61
60
 
@@ -96,7 +95,7 @@ module Polytexnic
96
95
  def small_caps(doc)
97
96
  doc.xpath('//hi[@rend="sc"]').each do |node|
98
97
  node.name = 'span'
99
- node['class'] = 'sc'
98
+ node['class'] = 'smallcaps'
100
99
  node.remove_attribute('rend')
101
100
  end
102
101
  end
@@ -1399,27 +1398,34 @@ module Polytexnic
1399
1398
  html << open << link.to_xhtml << '</li>'
1400
1399
  end
1401
1400
 
1401
+
1402
+ # NOTE: The add_noindent method has been superseded by CSS rules as shown in the
1403
+ # softcover gem's epub.css files.
1404
+ # See div.chapter > p:first-of-type and related rules in
1405
+ # ./lib/softcover/article_template/epub/OEBPS/styles/epub.css
1406
+ # of the softcover gem's source.
1407
+
1402
1408
  # Adds a noindent class where appropriate.
1403
1409
  # The purpose is to give the designer the option to indent all paragraphs but the first
1404
1410
  # one after the beginning of a chapter or section. The method is to add a "noindent" class
1405
1411
  # in the first paragraph after each division (chapter, section, etc.).
1406
- def add_noindent(doc)
1407
- divisions = %w[chapter section subsection subsubsection]
1408
- divisions += divisions.map { |division| "#{division}-star"}
1409
- divisions.each do |type|
1410
- doc.css("div.#{type}").each do |node|
1411
- if (first_paragraph = node.at_css('p'))
1412
- if first_paragraph['class'] == 'noindent'
1413
- next
1414
- elsif first_paragraph['class'].nil?
1415
- first_paragraph['class'] = 'noindent'
1416
- else
1417
- first_paragraph['class'] += ' noindent'
1418
- end
1419
- end
1420
- end
1421
- end
1422
- end
1412
+ # def add_noindent(doc)
1413
+ # divisions = %w[chapter section subsection subsubsection]
1414
+ # divisions += divisions.map { |division| "#{division}-star"}
1415
+ # divisions.each do |type|
1416
+ # doc.css("div.#{type}").each do |node|
1417
+ # if (first_paragraph = node.at_css('p'))
1418
+ # if first_paragraph['class'] == 'noindent'
1419
+ # next
1420
+ # elsif first_paragraph['class'].nil?
1421
+ # first_paragraph['class'] = 'noindent'
1422
+ # else
1423
+ # first_paragraph['class'] += ' noindent'
1424
+ # end
1425
+ # end
1426
+ # end
1427
+ # end
1428
+ # end
1423
1429
 
1424
1430
  # Cleans a node by removing all the given attributes.
1425
1431
  def clean_node(node, attributes)
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.5.12"
2
+ VERSION = "1.6.0"
3
3
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
8
8
  gem.version = Polytexnic::VERSION
9
9
  gem.authors = ["Michael Hartl", "Nick Merwin"]
10
10
  gem.email = ["michael@softcover.io"]
11
- gem.description = %q{Core translation engine for the polytexnic gem}
11
+ gem.description = %q{Core translation engine for the softcover gem}
12
12
  gem.summary = %q{Convert from PolyTeX & Markdown to HTML & LaTeX}
13
13
  gem.homepage = "https://polytexnic.org/"
14
14
  gem.license = "MIT"
@@ -18,11 +18,11 @@ Gem::Specification.new do |gem|
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
20
 
21
- gem.add_dependency 'nokogiri', '~> 1.8.1'
21
+ gem.add_dependency 'nokogiri', '~> 1.10.8'
22
22
  gem.add_dependency 'pygments.rb', '~> 1.2.1'
23
23
  gem.add_dependency 'msgpack', '~> 1.2.0'
24
- gem.add_dependency 'kramdown', '~> 1.17'
25
- gem.add_dependency 'json', '~> 1.8.1'
24
+ gem.add_dependency 'kramdown', '>= 1.17', '< 3.0'
25
+ gem.add_dependency 'json', '~> 2.3.0'
26
26
 
27
27
  gem.add_development_dependency 'rspec', '~> 2.14'
28
28
  gem.add_development_dependency 'simplecov', '~> 0.15.1'
@@ -32,7 +32,7 @@ describe 'Polytexnic::Pipeline#to_html' do
32
32
  <span class="number">Box 1.1.</span>
33
33
  <span class="description">Lorem ipsum.</span>
34
34
  </div>
35
- <p class="noindent">lorem ipsum</p>
35
+ <p>lorem ipsum</p>
36
36
  <p>dolor sit amet</p>
37
37
  </div>
38
38
  <p><a href="#aside-lorem" class="hyperref">Box <span class="ref">1.1</span></a></p>
@@ -76,4 +76,4 @@ describe 'Polytexnic::Pipeline#to_html' do
76
76
  it { should include ">1<" }
77
77
  end
78
78
  end
79
- end
79
+ end
@@ -202,7 +202,7 @@ describe 'Polytexnic::Pipeline#to_html' do
202
202
  <h2><a href="#foo_baz" class="heading">Foo: baz</a></h2>
203
203
  <div class="subsection-star">
204
204
  <h3><a class="heading">Bar</a></h3>
205
- <p class="noindent">Lorem ipsum</p>
205
+ <p>Lorem ipsum</p>
206
206
  </div>
207
207
  </div>
208
208
  <div id="cid1" data-tralics-id="cid1" class="section" data-number="1">
@@ -233,7 +233,7 @@ describe 'Polytexnic::Pipeline#to_html' do
233
233
  should resemble <<-'EOS'
234
234
  <div id="cha-foo_bar" data-tralics-id="cid1" class="chapter" data-number="1">
235
235
  <h1><a href="#cha-foo_bar" class="heading"><span class="number">Chapter 1 </span>Foo</a></h1>
236
- <p class="noindent"><a href="#cha-foo_bar" class="hyperref">Chapter <span class="ref">1</span></a>
236
+ <p><a href="#cha-foo_bar" class="hyperref">Chapter <span class="ref">1</span></a>
237
237
  and
238
238
  <a href="#cha-foo_baz" class="hyperref">Chapter <span class="ref">2</span></a>
239
239
  </p>
@@ -241,7 +241,7 @@ describe 'Polytexnic::Pipeline#to_html' do
241
241
 
242
242
  <div id="cha-foo_baz" data-tralics-id="cid2" class="chapter" data-number="2">
243
243
  <h1><a href="#cha-foo_baz" class="heading"><span class="number">Chapter 2 </span>Baz</a></h1>
244
- <p class="noindent"><a href="#cha-foo_baz" class="hyperref">Chapter <span class="ref">2</span></a>
244
+ <p><a href="#cha-foo_baz" class="hyperref">Chapter <span class="ref">2</span></a>
245
245
  and
246
246
  <a href="#cha-foo_bar" class="hyperref">Chapter <span class="ref">1</span></a>
247
247
  </p>
@@ -270,13 +270,13 @@ describe 'Polytexnic::Pipeline#to_html' do
270
270
  it do
271
271
  should resemble <<-'EOS'
272
272
  <div id="sec-foo" data-tralics-id="cid1" class="section" data-number="1"><h2><a href="#sec-foo" class="heading"><span class="number">1 </span>Foo</a></h2>
273
- <p class="noindent">
273
+ <p>
274
274
  <a href="#sec-bar" class="hyperref">Section <span class="ref">1.1</span></a>
275
275
  and
276
276
  <a href="#sec-baz" class="hyperref">Section <span class="ref">1.1.1</span></a>
277
277
  </p>
278
278
  <div id="sec-bar" data-tralics-id="uid1" class="subsection" data-number="1.1"><h3><a href="#sec-bar" class="heading"><span class="number">1.1 </span>Bar</a></h3>
279
- <p class="noindent"><a href="#sec-foo" class="hyperref">Section <span class="ref">1</span></a>
279
+ <p><a href="#sec-foo" class="hyperref">Section <span class="ref">1</span></a>
280
280
  </p>
281
281
  <div id="sec-baz" data-tralics-id="uid2" class="subsubsection" data-number="1.1.1">
282
282
  <h4><a href="#sec-baz" class="heading">Baz</a></h4>
@@ -298,7 +298,7 @@ describe 'Polytexnic::Pipeline#to_html' do
298
298
  should resemble <<-'EOS'
299
299
  <div id="cha-foo" data-tralics-id="cid1" class="chapter" data-number="1">
300
300
  <h1><a href="#cha-foo" class="heading"><span class="number">Chapter 1 </span>Foo</a></h1>
301
- <p class="noindent"><a href="#cha-bar" class="hyperref">Chapter <span class="undefined_ref">cha:bar</span></a>
301
+ <p><a href="#cha-bar" class="hyperref">Chapter <span class="undefined_ref">cha:bar</span></a>
302
302
  </p>
303
303
  </div>
304
304
  EOS
@@ -324,7 +324,7 @@ describe 'Polytexnic::Pipeline#to_html' do
324
324
  should resemble <<-'EOS'
325
325
  <div id="frontmatter" data-number="0">
326
326
  <div class="chapter-star" id="foo"><h1><a href="#foo" class="heading">Foo</a></h1>
327
- <p class="noindent">Lorem ipsum.<sup id="cha-0_footnote-ref-1" class="footnote"><a href="#cha-0_footnote-1">1</a></sup></p>
327
+ <p>Lorem ipsum.<sup id="cha-0_footnote-ref-1" class="footnote"><a href="#cha-0_footnote-1">1</a></sup></p>
328
328
  </div></div>
329
329
 
330
330
  <div id="cha-0_footnotes">
@@ -332,7 +332,7 @@ describe 'Polytexnic::Pipeline#to_html' do
332
332
  <div id="cha-0_footnote-1" class="footnote"><a class="footnote-link" href="#cha-0_footnote-ref-1">1.</a> Foo bar.</div>
333
333
  </div>
334
334
  </div><div id="cha-bar" data-tralics-id="cid1" class="chapter" data-number="1"><h1><a href="#cha-bar" class="heading"><span class="number">Chapter 1 </span>Bar</a></h1>
335
- <p class="noindent"><a href="#cha-bar" class="hyperref">Chapter <span class="ref">1</span></a>
335
+ <p><a href="#cha-bar" class="hyperref">Chapter <span class="ref">1</span></a>
336
336
  </p></div>
337
337
  EOS
338
338
  end
@@ -40,7 +40,7 @@ Listing~\ref{code:create_gemrc}
40
40
  </div>
41
41
  </div>
42
42
  </div>
43
- <p class="noindent"><a href="#code-create_gemrc" class="hyperref">Listing <span class="ref">1.1</span></a></p>
43
+ <p><a href="#code-create_gemrc" class="hyperref">Listing <span class="ref">1.1</span></a></p>
44
44
  </div>
45
45
  EOS
46
46
  end
@@ -121,4 +121,4 @@ Listing~\ref{code:create_gemrc}
121
121
  expect { processed_text }.not_to raise_error
122
122
  end
123
123
  end
124
- end
124
+ end
@@ -108,6 +108,25 @@ describe 'Polytexnic::Pipeline#to_html' do
108
108
  it { should_not resemble '<unknown>' }
109
109
  end
110
110
 
111
+ describe "explicit noindent" do
112
+ let(:polytex) { '\noindent lorem ipsum' }
113
+ it { should resemble '<p class="noindent">lorem ipsum</p>' }
114
+ end
115
+
116
+ describe "free span" do
117
+ let(:polytex) do <<-'EOS'
118
+ \chapter{Basics} % (fold)
119
+ \label{cha:basics}
120
+
121
+ %= <span class="free"></span>
122
+ EOS
123
+ end
124
+
125
+ it { should resemble('<span class="free"></span>') }
126
+ it { should_not resemble('<p><span class="free"></span></p>') }
127
+ end
128
+
129
+
111
130
  describe '\maketitle' do
112
131
 
113
132
  context "with all elements filled out explicitly" do
@@ -26,14 +26,14 @@ describe 'Polytexnic::Pipeline#to_html' do
26
26
  <div id="cha-foo" data-tralics-id="cid1" class="chapter" data-number="1"><h1><a href="#cha-foo" class="heading"><span class="number">Chapter 1 </span>Foo <em>bar</em></a></h1>
27
27
  </div>
28
28
  <div id="sec-foobar" data-tralics-id="cid2" class="section" data-number="1.1"><h2><a href="#sec-foobar" class="heading"><span class="number">1.1 </span>Foobar</a></h2>
29
- <p class="noindent">Lorem ipsum.<sup id="cha-1_footnote-ref-1" class="footnote"><a href="#cha-1_footnote-1">1</a></sup></p>
29
+ <p>Lorem ipsum.<sup id="cha-1_footnote-ref-1" class="footnote"><a href="#cha-1_footnote-1">1</a></sup></p>
30
30
  </div>
31
31
  <div id="cha-1_footnotes">
32
32
  <div class="footnotes">
33
33
  <div id="cha-1_footnote-1" class="footnote"><a class="footnote-link" href="#cha-1_footnote-ref-1">1.</a> Cicero</div>
34
34
  </div>
35
35
  </div><div id="cha-bar" data-tralics-id="cid3" class="chapter" data-number="2"><h1><a href="#cha-bar" class="heading"><span class="number">Chapter 2 </span>Bar</a></h1>
36
- <p class="noindent">Dolor sit amet.
36
+ <p>Dolor sit amet.
37
37
  </p></div>
38
38
  EOS
39
39
  end
@@ -66,14 +66,14 @@ describe 'Polytexnic::Pipeline#to_html' do
66
66
  <div id="cha-foo" data-tralics-id="cid1" class="chapter" data-number="1"><h1><a href="#cha-foo" class="heading"><span class="number">Chapter 1 </span>Foo <em>bar</em></a></h1>
67
67
  </div>
68
68
  <div id="sec-foobar" data-tralics-id="cid2" class="section" data-number="1.1"><h2><a href="#sec-foobar" class="heading"><span class="number">1.1 </span>Foobar</a></h2>
69
- <p class="noindent">Lorem ipsum.<sup id="cha-1_footnote-ref-1" class="footnote"><a href="#cha-1_footnote-1">1</a></sup></p>
69
+ <p>Lorem ipsum.<sup id="cha-1_footnote-ref-1" class="footnote"><a href="#cha-1_footnote-1">1</a></sup></p>
70
70
  </div>
71
71
  <div id="cha-1_footnotes">
72
72
  <div class="footnotes">
73
73
  <div id="cha-1_footnote-1" class="footnote"><a class="footnote-link" href="#cha-1_footnote-ref-1">1.</a> Cicero</div>
74
74
  </div>
75
75
  </div><div id="cha-bar" data-tralics-id="cid3" class="chapter" data-number="2"><h1><a href="#cha-bar" class="heading"><span class="number">Chapter 2 </span>Bar</a></h1>
76
- <p class="noindent">Dolor sit amet.<sup id="cha-2_footnote-ref-1" class="footnote"><a href="#cha-2_footnote-1">1</a></sup></p>
76
+ <p>Dolor sit amet.<sup id="cha-2_footnote-ref-1" class="footnote"><a href="#cha-2_footnote-1">1</a></sup></p>
77
77
  <p>Hey Jude.<sup id="cha-2_footnote-ref-2" class="footnote"><a href="#cha-2_footnote-2">2</a></sup>
78
78
  </p></div><div id="cha-2_footnotes">
79
79
  <div class="footnotes">
@@ -120,14 +120,14 @@ describe 'Polytexnic::Pipeline#to_html' do
120
120
  <div id="cha-foo" data-tralics-id="cid1" class="chapter" data-number="1"><h1><a href="#cha-foo" class="heading"><span class="number">Chapter 1 </span>Foo <em>bar</em></a></h1>
121
121
  </div>
122
122
  <div id="sec-foobar" data-tralics-id="cid2" class="section" data-number="1.1"><h2><a href="#sec-foobar" class="heading"><span class="number">1.1 </span>Foobar</a></h2>
123
- <p class="noindent">Lorem ipsum.<sup id="cha-1_footnote-ref-1" class="footnote"><a href="#cha-1_footnote-1">*</a></sup></p>
123
+ <p>Lorem ipsum.<sup id="cha-1_footnote-ref-1" class="footnote"><a href="#cha-1_footnote-1">*</a></sup></p>
124
124
  </div>
125
125
  <div id="cha-1_footnotes">
126
126
  <div class="footnotes nonumbers">
127
127
  <div id="cha-1_footnote-1" class="footnote"><sup><a class="footnote-link" href="#cha-1_footnote-ref-1">*</a></sup> Cicero</div>
128
128
  </div>
129
129
  </div><div id="cha-bar" data-tralics-id="cid3" class="chapter" data-number="2"><h1><a href="#cha-bar" class="heading"><span class="number">Chapter 2 </span>Bar</a></h1>
130
- <p class="noindent">Dolor sit amet.<sup id="cha-2_footnote-ref-1" class="footnote"><a href="#cha-2_footnote-1">*</a></sup></p>
130
+ <p>Dolor sit amet.<sup id="cha-2_footnote-ref-1" class="footnote"><a href="#cha-2_footnote-1">*</a></sup></p>
131
131
  <p>Hey Jude!<sup id="cha-2_footnote-ref-2" class="footnote intersentence"><a href="#cha-2_footnote-2">†</a></sup><span class="intersentencespace"></span> Be afraid.<span class="intersentencespace"></span> </p></div>
132
132
  <div id="cha-2_footnotes">
133
133
  <div class="footnotes nonumbers">
@@ -250,7 +250,7 @@ describe 'Polytexnic::Pipeline#to_html' do
250
250
  <span class="description">This is another caption.</span>
251
251
  </div>
252
252
  </div>
253
- <p class="noindent">
253
+ <p>
254
254
  <a href="#fig-baz" class="hyperref">Figure <span class="ref">2.1</span></a>
255
255
  </p>
256
256
  </div>
@@ -268,7 +268,7 @@ describe 'Polytexnic::Pipeline#to_html' do
268
268
  <span class="description">Yet another.</span>
269
269
  </div>
270
270
  </div>
271
- <p class="noindent">
271
+ <p>
272
272
  <a href="#fig-foo" class="hyperref">Figure <span class="ref">1.1</span></a>
273
273
  and
274
274
  <a href="#fig-bar" class="hyperref">Figure <span class="ref">1.2</span></a>
@@ -378,4 +378,4 @@ describe 'Polytexnic::Pipeline#to_html' do
378
378
  end
379
379
  end
380
380
  end
381
- end
381
+ end
@@ -29,7 +29,7 @@ describe 'Polytexnic::Pipeline#to_html' do
29
29
 
30
30
  describe "small caps" do
31
31
  let(:polytex) { '\textsc{small caps}' }
32
- it { should resemble '<span class="sc">small caps</span>' }
32
+ it { should resemble '<span class="smallcaps">small caps</span>' }
33
33
  end
34
34
 
35
35
  describe "small text" 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.5.12
4
+ version: 1.6.0
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: 2019-08-06 00:00:00.000000000 Z
12
+ date: 2020-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 1.8.1
20
+ version: 1.10.8
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 1.8.1
27
+ version: 1.10.8
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: pygments.rb
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -57,30 +57,36 @@ dependencies:
57
57
  name: kramdown
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.17'
63
+ - - "<"
64
+ - !ruby/object:Gem::Version
65
+ version: '3.0'
63
66
  type: :runtime
64
67
  prerelease: false
65
68
  version_requirements: !ruby/object:Gem::Requirement
66
69
  requirements:
67
- - - "~>"
70
+ - - ">="
68
71
  - !ruby/object:Gem::Version
69
72
  version: '1.17'
73
+ - - "<"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
70
76
  - !ruby/object:Gem::Dependency
71
77
  name: json
72
78
  requirement: !ruby/object:Gem::Requirement
73
79
  requirements:
74
80
  - - "~>"
75
81
  - !ruby/object:Gem::Version
76
- version: 1.8.1
82
+ version: 2.3.0
77
83
  type: :runtime
78
84
  prerelease: false
79
85
  version_requirements: !ruby/object:Gem::Requirement
80
86
  requirements:
81
87
  - - "~>"
82
88
  - !ruby/object:Gem::Version
83
- version: 1.8.1
89
+ version: 2.3.0
84
90
  - !ruby/object:Gem::Dependency
85
91
  name: rspec
86
92
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +115,7 @@ dependencies:
109
115
  - - "~>"
110
116
  - !ruby/object:Gem::Version
111
117
  version: 0.15.1
112
- description: Core translation engine for the polytexnic gem
118
+ description: Core translation engine for the softcover gem
113
119
  email:
114
120
  - michael@softcover.io
115
121
  executables:
@@ -209,6 +215,7 @@ files:
209
215
  - ".pull_requests/1403381407"
210
216
  - ".rspec"
211
217
  - Gemfile
218
+ - Gemfile.lock
212
219
  - Guardfile
213
220
  - LICENSE.md
214
221
  - README.md
@@ -295,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
295
302
  - !ruby/object:Gem::Version
296
303
  version: '0'
297
304
  requirements: []
298
- rubygems_version: 3.0.3
305
+ rubygems_version: 3.1.2
299
306
  signing_key:
300
307
  specification_version: 4
301
308
  summary: Convert from PolyTeX & Markdown to HTML & LaTeX