# \qty problem with parentheses

Why are the parentheses not showing? (I don't want to remove packages,how can i fix this problem?)

\documentclass[a4paper]{article}
\usepackage{physics}

\makeatletter
\DeclareSymbolFont{cmexlargesymbols}{OMX}{cmex}{m}{n}
\SetSymbolFont{cmexlargesymbols}{bold}{OMX}{cmex}{b}{n}
\DeclareMathDelimiter{(}{\mathopen}{letters}{46}{cmexlargesymbols}{0}
\DeclareMathDelimiter{)}{\mathclose}{letters}{47}{cmexlargesymbols}{1}
\makeatother

\begin{document}

$e^{\qty(x)}$

\end{document}
• But the whole problem is that physics is a shitty package. Asking us to fix it without removing that package is like asking us to make water stop being wet. Oct 11 '21 at 13:16
• The problem persists even if I uninstall the physics package @Gaussler Oct 11 '21 at 13:18
• @suarez - What do you mean by "uninstall the physics package"? The physics package provides the macro called \qty. If you don't load the physics package, how is your sample code shown above supposed to compile?
– Mico
Oct 11 '21 at 13:48

You specified the () come from the font in positions 46 and 47 but if you look at the latex sources you will see they are the wrong numbers you get

from

\DeclareMathDelimiter{(}{\mathopen}{letters}{"28}{cmexlargesymbols}{0}
\DeclareMathDelimiter{)}{\mathclose}{letters}{"29}{cmexlargesymbols}{1}

or simpler, by deleting the entire block of code

makeatletter
\DeclareSymbolFont{cmexlargesymbols}{OMX}{cmex}{m}{n}
\SetSymbolFont{cmexlargesymbols}{bold}{OMX}{cmex}{b}{n}
\DeclareMathDelimiter{(}{\mathopen}{letters}{"28}{cmexlargesymbols}{0}
\DeclareMathDelimiter{)}{\mathclose}{letters}{"29}{cmexlargesymbols}{1}
\makeatother

You don't give any indication what you intended this to do, deleting it gives the presumably intended output.

Here is the general answer to all your questions. Normally this would probably be deleted, but I ask my fellow TeX.SE users to bear with me in this particular case.

• Don't use nonstandard packages like physics (or my own package, semantex, for that matter) unless you know what they are and what they do. They change fundamental things about the way we type LaTeX. If this is not what your want, simply use LaTeX the standard way without trying to change it too much. That way, most things will look nice by default.

• If you think that mathematical symbols such as the equality signs and parentheses do not have rounded enough corners, find a different font.

• If you load mathastext, note that this is about making the math font resemble the text font. Conversely, if you don't want the math font to resemble the text font, don't load mathastext.

• Read what packages do before you load them. In general, start from a clean document that only loads amsmathand add stuff when you need it.