LaTeX reader: add rudimentary support for \autoref
(#7693)
This commit is contained in:
parent
946b959751
commit
ea268fd8a7
2 changed files with 19 additions and 0 deletions
|
@ -339,6 +339,7 @@ refCommands = M.fromList
|
|||
, ("cref", rawInlineOr "cref" $ doref "ref") -- from cleveref.sty
|
||||
, ("vref", rawInlineOr "vref" $ doref "ref+page") -- from varioref.sty
|
||||
, ("eqref", rawInlineOr "eqref" $ doref "eqref") -- from amsmath.sty
|
||||
, ("autoref", rawInlineOr "autoref" $ doref "autoref") -- from hyperref.sty
|
||||
]
|
||||
|
||||
acronymCommands :: PandocMonad m => M.Map Text (LP m Inlines)
|
||||
|
|
|
@ -58,6 +58,24 @@ Figure \vref{fig:1}
|
|||
]
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc -f latex -t native
|
||||
\autoref{fig:flowchart}
|
||||
^D
|
||||
[ Para
|
||||
[ Link
|
||||
( ""
|
||||
, []
|
||||
, [ ( "reference-type" , "autoref" )
|
||||
, ( "reference" , "fig:flowchart" )
|
||||
]
|
||||
)
|
||||
[ Str "[fig:flowchart]" ]
|
||||
( "#fig:flowchart" , "" )
|
||||
]
|
||||
]
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc -f latex -t native
|
||||
Accuracy~\eqref{eq:Accuracy} is the proportion, measuring true results among all results.
|
||||
|
|
Loading…
Add table
Reference in a new issue