Skip to content

Commit 78a2b53

Browse files
committed
chore(packages): Bookmark position relative to pageAdvanceDirection
1 parent ce30d83 commit 78a2b53

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/pdf.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ SILE.registerCommand("pdf:destination", function (options, _)
99
outputYourself = function (_, typesetter, line)
1010
SILE.outputters.libtexpdf._init()
1111
local state = typesetter.frame.state
12-
local y = SILE.documentState.paperSize[2] - state.cursorY + line.height
13-
pdf.destination(name, state.cursorX:tonumber(), y:tonumber())
12+
typesetter.frame:advancePageDirection(-line.height)
13+
local x, y = state.cursorX, state.cursorY
14+
typesetter.frame:advancePageDirection(line.height)
15+
local _y = SILE.documentState.paperSize[2] - y
16+
pdf.destination(name, x:tonumber(), _y:tonumber())
1417
end
1518
})
1619
end)

0 commit comments

Comments
 (0)