[Tex/LaTex] Norm with triple vertical lines using `DeclarePairedDelimiter`

math-modemathtools

I would like to declare a paired delimiter for a "triple norm".
A answer to this question already exists (cf.
Spacing between triple vertical lines), however, as I'm already using mathtools' DeclarePairedDelimiter* macros a lot, I would like to stay consistent and use them.

I tried to declare "naively" my norm like that:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{etoolbox}

\DeclarePairedDelimiterX{\normi}[1]
  {|||}
  {|||}
  {\ifblank{#1}{\:\cdot\:}{#1}}

\begin{document}    
\(\normiii{x}\)

\(\normiii{}\)    
\[
    \normiii*{\sum_{k \geq 0} a_k}
\]    
\end{document}

However, only the first bar is stretched. Is there a way to group the 3 bars such that they all stretch?

PS: I would prefer not to use a custom font.

Best Answer

You can obtain it with \vvvert from mathabx. Here is a code to use it without loading the mathabx package:

Note: You also have the \vVert and \rVvert delimiters in fdsymbol. Another possibility, if you happen to use fourier, is that it provides a \VERT command for the same delimiter.

\documentclass{article}
\usepackage{mathtools}
\usepackage{etoolbox}

\DeclareFontFamily{U}{matha}{\hyphenchar\font45}
\DeclareFontShape{U}{matha}{m}{n}{
<-6> matha5 <6-7> matha6 <7-8> matha7
<8-9> matha8 <9-10> matha9
<10-12> matha10 <12-> matha12
}{}
\DeclareSymbolFont{matha}{U}{matha}{m}{n}

\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
<-6> mathx5 <6-7> mathx6 <7-8> mathx7
<8-9> mathx8 <9-10> mathx9
<10-12> mathx10 <12-> mathx12
}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}

\DeclareMathDelimiter{\vvvert} {0}{matha}{"7E}{mathx}{"17}%

\DeclarePairedDelimiterX{\normiii}[1]
{\vvvert}
{\vvvert}
{\ifblank{#1}{\:\cdot\:}{#1}}

\begin{document}

\[ \normiii[\Big]{x^k } \qquad \normiii{} \]

\[ \normiii*{\sum_{k \geq 0}^\infty a_k} \]

\end{document} 

enter code here

Related Question