diff options
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX/Inline.hs | 1 | ||||
-rw-r--r-- | test/command/refs.md | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Inline.hs b/src/Text/Pandoc/Readers/LaTeX/Inline.hs index 0fd14017b..0b49fd6c3 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Inline.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Inline.hs @@ -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) diff --git a/test/command/refs.md b/test/command/refs.md index fb362febe..34e51d219 100644 --- a/test/command/refs.md +++ b/test/command/refs.md @@ -60,6 +60,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. \begin{equation} |