I major in mathematics and I have to deal with bibliographies with math equations in their titles. For convenience I would like to use variables in bibliography. The following simple way doesn’t work:
// in testbib.bib
@article{Test2025,
author = {Author},
title = {$Area(x^2+y^2<1)=pi$},
year = 2025,
}
// in testtyp.typ
#let Area = math.op("Area")
@Test2025 $ Area(x^2+y^2<1)=pi$
#bibliography("testbib.bib")
And the output looks like
Although I can manually set show rules or edit the entries of .bib file, there are lots of bibliographies to deal with and the same problem occurs to other custom math operators.