git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: Set identifiers on Spans used for \label.
commit9cc128b5790437bacbda839d8ea49bd7f74ee118 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 20 Aug 2017, 16:52 (9 years ago) parentf2fdd27
2 files changed+3−2
src/Text/Pandoc/Readers/LaTeX.hs+2−1 test/command/refs.md+1−1
src/Text/Pandoc/Readers/LaTeX.hs+2−1
@@ -1575,7 +1575,8 @@ treatAsInline = Set.fromList
15751575dolabel :: PandocMonad m => LP m Inlines
15761576dolabel = do
15771577 v <- braced
1578− return $ spanWith ("",[],[("label", toksToString v)])
1578+ let refstr = toksToString v
1579+ return $ spanWith (refstr,[],[("label", refstr)])
15791580 $ inBrackets $ str $ toksToString v
15801581
15811582doref :: PandocMonad m => String -> LP m Inlines
test/command/refs.md+1−1
@@ -50,5 +50,5 @@ Figure \ref{fig:Logo} illustrated the SVG logo
5050% pandoc -f latex -t native
5151\label{section} Section \ref{section}
5252^D
53−[Para [Span ("",[],[("label","section")]) [Str "[section]"],Space,Str "Section",Space,Link ("",[],[("reference-type","ref"),("reference","section")]) [Str "[section]"] ("#section","")]]
53+[Para [Span ("section",[],[("label","section")]) [Str "[section]"],Space,Str "Section",Space,Link ("",[],[("reference-type","ref"),("reference","section")]) [Str "[section]"] ("#section","")]]
5454```