@@ -308,12 +308,11 @@ blockToLaTeX (Div (identifier,classes,_) bs) = do
308308 ref <- toLabel identifier
309309 let linkAnchor = if null identifier
310310 then empty
311− else "\\hyperdef{}" <> braces (text ref) <>
312− braces ("\\label" <> braces (text ref))
311+ else "\\hyperdef{}" <> braces (text ref)
313312 contents <- blockListToLaTeX bs
314313 if beamer && "notes" `elem` classes -- speaker notes
315314 then return $ "\\note" <> braces contents
316− else return (linkAnchor <> contents)
315+ else return (linkAnchor $$ contents)
317316blockToLaTeX (Plain lst) =
318317 inlineListToLaTeX $ dropWhile isLineBreakOrSpace lst
319318-- title beginning with fig: indicates that the image is a figure
@@ -670,11 +669,11 @@ inlineToLaTeX (Span (id',classes,_) ils) = do
670669 let noEmph = "csl-no-emph" `elem` classes
671670 let noStrong = "csl-no-strong" `elem` classes
672671 let noSmallCaps = "csl-no-smallcaps" `elem` classes
673− label' <- if null id'
674− then return empty
675− else toLabel id' >>= \x ->
676− return (text "\\label" <> braces (text x))
677− fmap (label' <>)
672+ ref <- toLabel id'
673+ let linkAnchor = if null id'
674+ then empty
675+ else "\\hyperdef{}" <> braces (text ref)
676+ fmap (linkAnchor <>)
678677 ((if noEmph then inCmd "textup" else id) .
679678 (if noStrong then inCmd "textnormal" else id) .
680679 (if noSmallCaps then inCmd "textnormal" else id) .