Skip to content

Commit ce30d83

Browse files
committed
fix(packages): Place PDF bookmarks at top of current line
1 parent 1d69acc commit ce30d83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/pdf.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ local pdf = require("justenoughlibtexpdf")
66
SILE.registerCommand("pdf:destination", function (options, _)
77
local name = SU.required(options, "name", "pdf:bookmark")
88
SILE.typesetter:pushHbox({
9-
outputYourself = function (_, typesetter, _)
9+
outputYourself = function (_, typesetter, line)
1010
SILE.outputters.libtexpdf._init()
1111
local state = typesetter.frame.state
12-
local y = SILE.documentState.paperSize[2] - state.cursorY
12+
local y = SILE.documentState.paperSize[2] - state.cursorY + line.height
1313
pdf.destination(name, state.cursorX:tonumber(), y:tonumber())
1414
end
1515
})

0 commit comments

Comments
 (0)