LaTeX reader: Set identifiers on Spans used for \label.
This commit is contained in:
parent
f2fdd275fd
commit
9cc128b579
2 changed files with 3 additions and 2 deletions
|
@ -1575,7 +1575,8 @@ treatAsInline = Set.fromList
|
||||||
dolabel :: PandocMonad m => LP m Inlines
|
dolabel :: PandocMonad m => LP m Inlines
|
||||||
dolabel = do
|
dolabel = do
|
||||||
v <- braced
|
v <- braced
|
||||||
return $ spanWith ("",[],[("label", toksToString v)])
|
let refstr = toksToString v
|
||||||
|
return $ spanWith (refstr,[],[("label", refstr)])
|
||||||
$ inBrackets $ str $ toksToString v
|
$ inBrackets $ str $ toksToString v
|
||||||
|
|
||||||
doref :: PandocMonad m => String -> LP m Inlines
|
doref :: PandocMonad m => String -> LP m Inlines
|
||||||
|
|
|
@ -50,5 +50,5 @@ Figure \ref{fig:Logo} illustrated the SVG logo
|
||||||
% pandoc -f latex -t native
|
% pandoc -f latex -t native
|
||||||
\label{section} Section \ref{section}
|
\label{section} Section \ref{section}
|
||||||
^D
|
^D
|
||||||
[Para [Span ("",[],[("label","section")]) [Str "[section]"],Space,Str "Section",Space,Link ("",[],[("reference-type","ref"),("reference","section")]) [Str "[section]"] ("#section","")]]
|
[Para [Span ("section",[],[("label","section")]) [Str "[section]"],Space,Str "Section",Space,Link ("",[],[("reference-type","ref"),("reference","section")]) [Str "[section]"] ("#section","")]]
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue