summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/lxml-css.lua
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2014-05-05 20:29:55 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2014-05-05 20:29:55 +0000
commitba9a57343987f1c2c72396e7c38f1fa30352c24c (patch)
tree66a8b12cdf67427ce96770fd0e9e581759aade1c /Master/texmf-dist/tex/context/base/lxml-css.lua
parent15242121b8ddf7d4a041fb3998d295dd8232e1eb (diff)
ConTeXt 2014.04.28 23:24
git-svn-id: svn://tug.org/texlive/trunk@33856 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lxml-css.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/lxml-css.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/lxml-css.lua b/Master/texmf-dist/tex/context/base/lxml-css.lua
index c5a85c2bd6f..0deaea4d391 100644
--- a/Master/texmf-dist/tex/context/base/lxml-css.lua
+++ b/Master/texmf-dist/tex/context/base/lxml-css.lua
@@ -30,8 +30,9 @@ if tex then
local exheights = fonts.hashes.exheights
local emwidths = fonts.hashes.emwidths
+ local texget = tex.get
- percentage = function(s,pcf) return tonumber(s) * (pcf or tex.hsize) end
+ percentage = function(s,pcf) return tonumber(s) * (pcf or texget("hsize")) end
exheight = function(s,exf) return tonumber(s) * (exf or exheights[true]) end
emwidth = function(s,emf) return tonumber(s) * (emf or emwidths[true]) end
pixels = function(s,pxf) return tonumber(s) * (pxf or emwidths[true]/300) end
@@ -109,17 +110,17 @@ css.padding = padding
-- print(padding("0",pixel,hsize,exheight,emwidth))
--- local currentfont = font.current
--- local texdimen = tex.dimen
--- local hashes = fonts.hashes
--- local quads = hashes.quads
--- local xheights = hashes.xheights
+-- local currentfont = font.current
+-- local texget = tex.get
+-- local hashes = fonts.hashes
+-- local quads = hashes.quads
+-- local xheights = hashes.xheights
--
-- local function padding(str)
-- local font = currentfont()
-- local exheight = xheights[font]
-- local emwidth = quads[font]
--- local hsize = texdimen.hsize/100
+-- local hsize = texget("hsize")/100
-- local pixel = emwidth/100
-- return padding(str,pixel,hsize,exheight,emwidth)
-- end