7

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.

2 Answers 2

6

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

2
  • 2
    There seem to be some formatting issues. BTW, I cannot really see the a difference to the other answer, which also uses \vvvert without mathabx.
    – user194703
    Commented Sep 29, 2019 at 23:43
  • I guess @Schrödinger'scat was posting while I was trying various possibilities and I didn't check whether there already was an answer. However, I didn't copy the link! I think I'll update as soon as I've found the encoding of \Vvert in fdsymbol.
    – Bernard
    Commented Sep 29, 2019 at 23:54
3

This can be done with one of the very answers you link to.

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{etoolbox}
% Math symbol font matha
\DeclareFontFamily{U}{matha}{\hyphenchar\font45}
\DeclareFontShape{U}{matha}{m}{n}{
      <5> <6> <7> <8> <9> <10> gen * matha
      <10.95> matha10 <12> <14.4> <17.28> <20.74> <24.88> matha12
      }{}
\DeclareSymbolFont{matha}{U}{matha}{m}{n}
\DeclareFontSubstitution{U}{matha}{m}{n}

% Math symbol font mathb
\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
      <5> <6> <7> <8> <9> <10>
      <10.95> <12> <14.4> <17.28> <20.74> <24.88>
      mathx10
      }{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}

% Symbol definition
\DeclareMathDelimiter{\vvvert}{0}{matha}{"7E}{mathx}{"17}
\DeclarePairedDelimiterX{\normi}[1]
  {\vvvert}
  {\vvvert}
  {\ifblank{#1}{\:\cdot\:}{#1}}
\begin{document}
\(\normi{x}\)

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

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .