aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/texpdf_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/texpdf_format.rb')
-rw-r--r--lib/sisu/v2/texpdf_format.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb
index 8eff07b9..36366c9b 100644
--- a/lib/sisu/v2/texpdf_format.rb
+++ b/lib/sisu/v2/texpdf_format.rb
@@ -339,7 +339,7 @@ module SiSU_TeX_Pdf
image=z[/(\S+?\.(?:png|jpg|gif)\b)/m]
image.gsub!(/\\/,'')
width=if z =~ /\d+x\d*/
- w=(z[/(\d+)x\d*/,1]).to_i
+ w=(z[/\s(\d+)x\d*/,1]).to_i
w*0.8
else '100' #revisit, is bug for small images/icons
end
@@ -498,7 +498,7 @@ module SiSU_TeX_Pdf
and images_hash[ps]=~/\s+\d+x\d+(\s+|\s*#{Mx[:lnk_c]})/m
image,x,y=z.scan(/\S+/)
image.gsub!(/\\/,'')
- w=((z =~/(\d+)x\d*/) ? z[/(\d+)x\d*/,1] : 200)
+ w=((z =~/\s(\d+)x\d*/) ? z[/\s(\d+)x\d*/,1] : 200)
width={}
width['a4'] = ((w.to_i > @dm['a4']) ? @dm['a4'] : w)
width['letter'] = ((w.to_i > @dm['letter']) ? @dm['letter'] : w)