Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/Text/TeXMath/Writers/Typst.hs
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,13 @@ tshow :: Show a => a -> Text
tshow = T.pack . show

typstSymbolMap :: M.Map Text Text
typstSymbolMap = M.fromList $
("\776", "dot.double") -- see #231
: [(s,name) | (name, _, s) <- typstSymbols]
typstSymbolMap =
-- prefer inter names for typst-symbols (sect is deprecated)
M.insert "\x22C2" "inter.big" $
M.insert "\x2229" "inter" $
M.fromList $
("\776", "dot.double") -- see #231
: [(s,name) | (name, _, s) <- typstSymbols]

getAccentCommand :: Text -> Maybe Text
getAccentCommand ac = do
Expand Down
2 changes: 1 addition & 1 deletion test/writer/typst/deMorgans_law.test
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
(ESymbol TOver "\175")
]
>>> typst
not (p and q) arrow.l.r.double (not p) or (not q) overline(union.big_(i = 1)^n A_i) = sect.big_(i = 1)^n overline(A_i)
not (p and q) arrow.l.r.double (not p) or (not q) overline(union.big_(i = 1)^n A_i) = inter.big_(i = 1)^n overline(A_i)
4 changes: 4 additions & 0 deletions test/writer/typst/intersection_operators.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<<< native
[ ESymbol Bin "\8745" , ESymbol Op "\8898" ]
>>> typst
inter inter.big
12 changes: 6 additions & 6 deletions test/writer/typst/largeop1.test
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
]
]
>>> typst
upright("displaystyle: false largeop: false") & and.big or.big integral sum product union.big sect.big\
upright("displaystyle: false largeop: true") & and.big or.big integral sum product union.big sect.big\
upright("displaystyle: true largeop: false") & and.big or.big integral sum product union.big sect.big\
upright("displaystyle: true largeop: true") & and.big or.big integral sum product union.big sect.big\
upright("displaystyle: false largeop: default") & and.big or.big integral sum product union.big sect.big\
upright("displaystyle: true largeop: default") & and.big or.big integral sum product union.big sect.big
upright("displaystyle: false largeop: false") & and.big or.big integral sum product union.big inter.big\
upright("displaystyle: false largeop: true") & and.big or.big integral sum product union.big inter.big\
upright("displaystyle: true largeop: false") & and.big or.big integral sum product union.big inter.big\
upright("displaystyle: true largeop: true") & and.big or.big integral sum product union.big inter.big\
upright("displaystyle: false largeop: default") & and.big or.big integral sum product union.big inter.big\
upright("displaystyle: true largeop: default") & and.big or.big integral sum product union.big inter.big
2 changes: 1 addition & 1 deletion test/writer/typst/largeopPos3.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
[ EIdentifier "A" , ESymbol Bin "\8745" , EIdentifier "B" ]
]
>>> typst
sect.big_(i = 0)^oo A sect B
inter.big_(i = 0)^oo A inter B
Loading