How to keep parentheses small?

I usually write stuff like $f(hat(beta))$ but would like to keep the parentheses as in $f(beta)$:

image

A workaround is $f"("hat(beta))$ but I noticed that it introduces undesirable spacing where math.ops are involved:

image

How can I get normal height parenthesis while avoiding the extra spacing, and perhaps in a more elegant way?

Thanks!

I think you can use paren.l and paren.r for that, as in $cos paren.l accent(beta, hat) paren.r cos(beta)$, which looks normal to me

You can also probably set size on lr to a contextual 0% + text.size if you want to override all lr delimiters not to scale in some places.

You should escape opening or both parentheses:

$f(hat(beta)) f\(hat(beta)) f(beta)$

$cos(hat(beta)) cos\(hat(beta)) cos(beta)$

image

2 Likes

That seems like a good option too, that you can apply to an equation or part of it if you don’t want to write escapes. I think size 0% works without context?

#let nolr(it) = {
  set math.lr(size: 0%)
  it
}

Hi @Carlos, don’t forget to tick :ballot_box_with_check: one of the responses if you got a satisfying answer. The answer you choose should usually be the response that you found most correct/helpful/comprehensive for the question you asked. Thanks!

1 Like

Done, thank you all, many good solutions here, but escaping seems to be the cleanest one.

1 Like