diff options
| -rw-r--r-- | src/Text/Pandoc/Writers/Typst.hs | 2 | ||||
| -rw-r--r-- | test/command/10805.md | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs index d18b0fde3..d0c92c8ac 100644 --- a/src/Text/Pandoc/Writers/Typst.hs +++ b/src/Text/Pandoc/Writers/Typst.hs @@ -386,7 +386,7 @@ inlineToTypst inline = Right r -> (case extractLabel str of -- #10805 Nothing -> id - Just lab -> (<> ("<" <> literal lab <> ">"))) <$> + Just lab -> (<> (toLabel FreestandingLabel lab))) <$> case mathType of InlineMath -> return $ "$" <> literal r <> "$" DisplayMath -> return $ "$ " <> literal r <> " $" diff --git a/test/command/10805.md b/test/command/10805.md index e3d02bc51..a25f695ac 100644 --- a/test/command/10805.md +++ b/test/command/10805.md @@ -7,3 +7,13 @@ ^D $ U = A $<eq:U> ``` + +``` +% pandoc -t typst -f latex +\begin{equation} + \label{eq:U 2} + U = A +\end{equation} +^D +$ U = A $#label("eq:U 2") +``` |
