diff options
| author | John MacFarlane <[email protected]> | 2024-10-23 21:52:03 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-10-23 21:52:03 -0700 |
| commit | fc8f4534cfe96d366bacdd73901d880c5907f8f5 (patch) | |
| tree | fbac6fbd10be142c8d3c5b0427b49f7e8472cb80 | |
| parent | 233301bacb054da25f0cf744e36f302d7ae8f924 (diff) | |
Typst reader: support underparen, overparen.
| -rw-r--r-- | src/Text/Pandoc/Readers/Typst/Math.hs | 14 |
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 |
