@@ -313,7 +313,8 @@ blockToLaTeX (Div (identifier,classes,_) bs) = do
313 ref <- toLabel identifier
313 ref <- toLabel identifier
314 let linkAnchor = if null identifier
314 let linkAnchor = if null identifier
315 then empty
315 then empty
316− else "\\hyperdef{}" <> braces (text ref) <> "{}"
316+ else "\\hyperdef{}" <> braces (text ref) <>
317+ braces ("\\label" <> braces (text ref))
317 contents <- blockListToLaTeX bs
318 contents <- blockListToLaTeX bs
318 if beamer && "notes" `elem` classes -- speaker notes
319 if beamer && "notes" `elem` classes -- speaker notes
319 then return $ "\\note" <> braces contents
320 then return $ "\\note" <> braces contents
@@ -718,7 +719,8 @@ inlineToLaTeX (Span (id',classes,_) ils) = do
718 ref <- toLabel id'
719 ref <- toLabel id'
719 let linkAnchor = if null id'
720 let linkAnchor = if null id'
720 then empty
721 then empty
721− else "\\hyperdef{}" <> braces (text ref) <> "{}"
722+ else "\\hyperdef{}" <> braces (text ref) <>
723+ braces ("\\label" <> braces (text ref))
722 fmap (linkAnchor <>)
724 fmap (linkAnchor <>)
723 ((if noEmph then inCmd "textup" else id) .
725 ((if noEmph then inCmd "textup" else id) .
724 (if noStrong then inCmd "textnormal" else id) .
726 (if noStrong then inCmd "textnormal" else id) .