asciidoctor-texnical 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a148ca7bec668b2c33d5acb1e5bed167f1cfeefe
4
- data.tar.gz: 9d01676555554965858f2d91bff15aaa03c2275e
3
+ metadata.gz: 48343d9c5d61f503b79beb9542c4bb4a774e3826
4
+ data.tar.gz: 79ecbc6f2d13b5bc6a3b26d47d426ca71148dec5
5
5
  SHA512:
6
- metadata.gz: 18b2341245d86864dc0c9bd3703d89335498e3890db70b6c46c186a02fe1348c5761631437f1c7d495ec639dbc6531ba64df6005554b154abaa35ae2e1db9f9c
7
- data.tar.gz: e86b2573ed3b692099321538a12771ed8b59fbf5cbd0bba250516d55917f57bbf5d070b216ce6028f37b80af56bb5078e16d8a0f149d0c0406bd70724e5c71c8
6
+ metadata.gz: 11d137fa3ad4bbbdf70126c6048d9f821b10cdaffc8aa6947a96cb0288db5ed003eb6f41a7d9d9f1cebfd1836cddf4a90f926823349c4692bcbe5f591f56fc33
7
+ data.tar.gz: 7ca5b8ee6f9d52346ca64f48126b9e620236bd144fc767c331d6e5a82af204660ed5d1525680d2ea95e088b242da43af3adcad7d05025cb03fd5386d811868e7
@@ -11,6 +11,7 @@ class Mathematical
11
11
 
12
12
  def initialize(ppi, image_target_dir)
13
13
  @ppi = ppi
14
+ @scale = 96.0 / ppi
14
15
  @image_target_dir = image_target_dir
15
16
  end
16
17
 
@@ -37,8 +38,8 @@ class Mathematical
37
38
  attrs = { 'target' => result.filename,
38
39
  'alt' => alt_text,
39
40
  'align' => 'center',
40
- 'width' => (result.width * 0.5).to_s,
41
- 'height' => (result.height * 0.5).to_s }
41
+ 'width' => (result.width * @scale).to_s,
42
+ 'height' => (result.height * @scale).to_s }
42
43
 
43
44
  stem_image = processor.create_image_block stem.parent, attrs
44
45
  stem_image.id = stem.id if stem.id
@@ -56,7 +57,7 @@ class Mathematical
56
57
  eq_data = Regexp.last_match[2]
57
58
  source_modified = true
58
59
  img = Image.generate_inline eq_data, eq_id, self
59
- "image:#{img.filename}[width=#{img.width * 0.5},height=#{img.height * 0.5}]"
60
+ "image:#{img.filename}[width=#{img.width * @scale},height=#{img.height * @scale}]"
60
61
  end
61
62
  end
62
63
  text if source_modified
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module Texnical
5
- VERSION = '0.0.1'
5
+ VERSION = '0.0.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-texnical
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Holger Peters