In math, the overline(U) is frequently used to denote closure, but the Typst-defined function ‘overline’ doesn’t have a good appearance for some fonts. Is there a way to specify the height, position, length, and thickness of that ‘bar’? One of my attempts is the following:
Just to be clear as to the question title and as you said, Typst does have overline() and macron() in math mode. Font issues usually stem from non-proper math fonts, though sometimes they can be the fault of Typst.
It would be good to know what fonts you had issues with or what those were specifically. There might have also been some bug fixes regarding accent placement that will arrive in 0.12. One alternative seems to be: $accent(U, \u{0305})$ which is called dash on main.
Thank you for the reply. I used the font ‘STIX Two Math’ with a size of 12pt (as indicated in the first line of the code). I also tried this option, but it seemed too short from my perspective. I would like to have more control over the ‘bar,’ especially since I also need to handle complex conjugates sometimes.
@xkevio 's solution solves this problem. However, it introduces a new problem when I use the entity as a subscript.
where zb is defined as @xkevio suggested