diff options
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 |