split/Tioga/lib/Utils.rb in tioga-1.6 vs split/Tioga/lib/Utils.rb in tioga-1.7
- old
+ new
@@ -52,11 +52,11 @@
"cm" => (72.0/2.54),
"mm" => (72.0/25.4),
}
# Returns the value of the given TeX dimension in postscript points.
- def tex_dimension_to_bp(dim)
+ def self.tex_dimension_to_bp(dim)
for unit, val in DIMENSION_CONVERSION
if dim =~ /^\s*([\d.]+)\s*#{unit}$/
return $1.to_f * val
end
end
@@ -65,9 +65,13 @@
warn "tex_dimension_to_bp: No dimension was specified, " +
"using centimeters"
return $1.to_f * DIMENSION_CONVERSION["cm"]
end
raise "'#{dim}' is not a valid TeX dimension"
+ end
+
+ def tex_dimension_to_bp(dim)
+ return Utils::tex_dimension_to_bp(dim)
end
end
end