[Tex/LaTex] Spacing between triple vertical lines

delimitersmath-operatorsspacingsymbols

I would like to create a norm-like operator with 3 verticals bars instead of two. It has to look like $|||\cdot|||$. I would like to know how to decrease the spacing between the vertical bars such that it has the same spacing as the $\lVert .. \rVert$ command.

There is a command available in the stmaryrd package called \biginterleave, but this command has to much spacing between the vertical bars, especially in display math mode.

Is there some work-around to adjust the spacing between to vertical bars?

Best Answer

Here's a solution that doesn't require the use of additional packages. The new command, \vertiii, takes one argument; the triple vertical bars resize automatically depending on the size of the argument. For the MWE below, I've actually set the spacing between the vertical bars to be slightly less than what's generated by \[l,r]Vert -- you can adjust the spacing to suit your taste by changing the value of the argument of the four \kern commands.

Addendum: I've modified the code -- by inserting curly braces around the entire command -- to allow for the use of the command \vertiii in subscripts and superscripts as well.

\documentclass{article}
\usepackage{amsmath,amssymb}
\newcommand{\vertiii}[1]{{\left\vert\kern-0.25ex\left\vert\kern-0.25ex\left\vert #1 
    \right\vert\kern-0.25ex\right\vert\kern-0.25ex\right\vert}}
\begin{document}
$\vertiii{a}$, 
$\vertiii{\int_0^1 a(x)\,\mathrm{d}x}$,
$\displaystyle \vertiii{\int_0^1 a(x)\,\mathrm{d}x}_\vertiii{b}$

$\lVert a \rVert$ (for comparison)

$c_\vertiii{d}$, $f^\vertiii{g}$
\end{document}

enter image description here

Related Question