aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2024-10-23 21:52:03 -0700
committerJohn MacFarlane <[email protected]>2024-10-23 21:52:03 -0700
commitfc8f4534cfe96d366bacdd73901d880c5907f8f5 (patch)
treefbac6fbd10be142c8d3c5b0427b49f7e8472cb80
parent233301bacb054da25f0cf744e36f302d7ae8f924 (diff)
Typst reader: support underparen, overparen.
-rw-r--r--src/Text/Pandoc/Readers/Typst/Math.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Typst/Math.hs b/src/Text/Pandoc/Readers/Typst/Math.hs
index 7d61d893c..7c59b2c0e 100644
--- a/src/Text/Pandoc/Readers/Typst/Math.hs
+++ b/src/Text/Pandoc/Readers/Typst/Math.hs
@@ -207,6 +207,20 @@ handleMath tok =
case mbAnn of
Nothing -> pure x
Just ann -> EOver False x <$> pMathGrouped ann
+ Elt "math.underparen" _ fields -> do
+ mbAnn <- getField "annotation" fields
+ body <- getField "body" fields >>= pMathGrouped
+ let x = EUnder False body (ESymbol TUnder "\9181")
+ case mbAnn of
+ Nothing -> pure x
+ Just ann -> EUnder False x <$> pMathGrouped ann
+ Elt "math.overparen" _ fields -> do
+ mbAnn <- getField "annotation" fields
+ body <- getField "body" fields >>= pMathGrouped
+ let x = EOver False body (ESymbol TOver "\9180")
+ case mbAnn of
+ Nothing -> pure x
+ Just ann -> EOver False x <$> pMathGrouped ann
Elt "math.scripts" _ fields -> getField "body" fields >>= pMathGrouped
Elt "math.limits" _ fields -> getField "body" fields >>= pMathGrouped
Elt "math.root" _ fields -> do