asciidoctor-texnical 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor-texnical/mathematical.rb +4 -3
- data/lib/asciidoctor-texnical/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48343d9c5d61f503b79beb9542c4bb4a774e3826
|
4
|
+
data.tar.gz: 79ecbc6f2d13b5bc6a3b26d47d426ca71148dec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 *
|
41
|
-
'height' => (result.height *
|
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 *
|
60
|
+
"image:#{img.filename}[width=#{img.width * @scale},height=#{img.height * @scale}]"
|
60
61
|
end
|
61
62
|
end
|
62
63
|
text if source_modified
|