Absolute value symbol with spacing

math-modesymbols

Often in math textbooks when they define an absolute value (or a norm in general) they use the symbol with a dot (even nothing) with some space inside. It looks like this:

norm

Whatever method I use to define the absolute value symbol, normally I would only get a narrow spacing unless I define a new command for this special case. How do you do that?

Best Answer

You can do something like this.

\documentclass{article}
\usepackage{mathtools}
\newcommand*{\argordot}[1]{%
    \def\arg{#1}%
    \ifx\arg\empty
        \,\cdot\,%
    \else
        #1%
    \fi%
}
\DeclarePairedDelimiterX{\norm}[1]{\lVert}{\rVert}{\argordot{#1}}
\begin{document}
\(\norm{f}\) \(\norm{}\)
\end{document}