diff options
author | Karl Berry <karl@freefriends.org> | 2018-08-25 21:04:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-08-25 21:04:39 +0000 |
commit | 9be9d5c98bbc878a65fb0405b769f8413a429f02 (patch) | |
tree | efbb091ffe441f57aa98d2ca1d35d3381725fc12 /Master/texmf-dist/tex | |
parent | f27ed7b89bf0d6a819103d456c011972a55f39d4 (diff) |
returntogrid.lua in runtime
git-svn-id: svn://tug.org/texlive/trunk@48485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/returntogrid/returntogrid.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/returntogrid/returntogrid.lua b/Master/texmf-dist/tex/latex/returntogrid/returntogrid.lua new file mode 100644 index 00000000000..264aaec9e2f --- /dev/null +++ b/Master/texmf-dist/tex/latex/returntogrid/returntogrid.lua @@ -0,0 +1,17 @@ +-- Packageversion: 0.2 +-- Packagedate: 2018/08/21 +-- returntogrid.lua +-- Ulrike Fischer + +returntogrid = returntogrid or {} + +function returntogrid.ufgridvskip (diff,vskip,gridstep) + local error= ( diff % gridstep ) -- %=modulo + -- we need to add gridstep-error to the existing vskip + -- modulo gridstep + -- texio.write_nl("XXXXXXXXXXXXXXXXXXX") + vskip = ( vskip + gridstep - error ) %gridstep -- %=modulo! + -- texio.write_nl(" diff ".. diff .. " gridstep "..gridstep.." error "..error.." vskip "..vskip) + -- texio.write_nl("XXXXXXXXXXXXXXXXXXX") + tex.sprint ( vskip ) +end |