# Problem of writing mod in congruence with brackets and fractions

I want to write this: a\pmod{\frac{a}{b}} -
But the size of the brackets don't fits the fraction:

What can I do to fix it?
I see the answer here Fraction in \pmod bracket but I'm using LyX so I don't know how to do it at Lyx (is there other way?)

(at inline mode it's fine, but I need it at display mode)
Thank you!

P.S. It's OK to do it without pmod but its need to look the same :)

• Can you add some code to your preamble with Lyx? – Bernard Dec 6 '18 at 23:34
• @Bernard - Yes... – heblyx Dec 6 '18 at 23:39
• You should use $a \pmod{\tfrac{1}{b}}$ instead (this requires the use of amsmath). – Werner Dec 6 '18 at 23:46

\usepackage{xpatch}