[dev-context] small patch for grph-inc.lua

Peter Münster pmlists at free.fr
Fri Jan 4 00:15:23 CET 2013


Hi Hans,

Could you please add the following little patch (or something similar)
to grph-inc.lua:

--- grph-inc.lua~  2013-01-03 23:32:37.297732874 +0100
+++ grph-inc.lua   2013-01-03 23:42:18.237157620 +0100
@@ -571,6 +571,9 @@
                 if resolution and resolution ~= "" then -- the order might change
                     newbase = newbase .. "_" .. resolution
                 end
+                local width = figures.current().request.width or ""
+                local height = figures.current().request.height or ""
+                newbase = newbase .. "_" .. width .. "_" .. height
                 --
                 -- see *, we had:
                 --


The image-downsampling-module¹ would work much better then, because when
the name of the file includes the width and the height, there will be a
new conversion when the figure dimensions change.

¹ http://modules.contextgarden.net/grph-downsample

-- 
           Peter


More information about the dev-context mailing list