@@ -313,7 +313,8 @@ blockToLaTeX (Div (identifier,classes,_) bs) = do
313313 ref <- toLabel identifier
314314 let linkAnchor = if null identifier
315315 then empty
316− else "\\hyperdef{}" <> braces (text ref) <> "{}"
316+ else "\\hyperdef{}" <> braces (text ref) <>
317+ braces ("\\label" <> braces (text ref))
317318 contents <- blockListToLaTeX bs
318319 if beamer && "notes" `elem` classes -- speaker notes
319320 then return $ "\\note" <> braces contents
@@ -718,7 +719,8 @@ inlineToLaTeX (Span (id',classes,_) ils) = do
718719 ref <- toLabel id'
719720 let linkAnchor = if null id'
720721 then empty
721− else "\\hyperdef{}" <> braces (text ref) <> "{}"
722+ else "\\hyperdef{}" <> braces (text ref) <>
723+ braces ("\\label" <> braces (text ref))
722724 fmap (linkAnchor <>)
723725 ((if noEmph then inCmd "textup" else id) .
724726 (if noStrong then inCmd "textnormal" else id) .