How can I write |||A||| with three bars in equal distances that scale? I read through the exiting entries and none of the solutions worked for me, the closest one was with "vertiii" but this put out bars in different sizes.
2 Answers
Using barbara's approach at Extensible double angle, etc, which essentially uses triple nested \left|
and likewise \right|
, with kerning added.
\documentclass{article}
\usepackage{mathtools}
\makeatletter
\def\@tvsp{\mathchoice{{}\mkern-4.5mu}{{}\mkern-4.5mu}{{}\mkern-2.5mu}{}}
\def\ltrivert{\left|\@tvsp\left|\@tvsp\left|}
\def\rtrivert{\right|\@tvsp\right|\@tvsp\right|}
\makeatother
\newcommand\tnorm[1]{\ltrivert#1\rtrivert}
\begin{document}
\[
\tnorm{x} \tnorm{ \frac{A}{B} }
\]
\end{document}
-
Thank you for your answer. Sadly the same problem occurcs. All three lines are in different sizes... May 30, 2021 at 13:46
-
@milenteor You haven't provided enough information in your question to even attempt to explain why. May 30, 2021 at 15:36
-
Hello. What additional information do you wish for? It does not work in overleaf, I do get 3 bars but they cascade in size. Jun 2, 2021 at 9:05
-
@milenteor So that I understand, you say that my MWE, run in overleaf, exhibits this behavior you describe? (FYI, I am not a user of Overleaf) Jun 2, 2021 at 9:10
-
The mathabx
package defines a \vvvert
delimiter. Here is a code to use it without loading the package, based on \DeclarePairedDelimiterX
from mathtools
:
\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}{\: · \:}{#1}}
\begin{document}
\[ \normiii[\Big]{A^k } \qquad \normiii{} \]
\[ \normiii*{∑_{k \geq 0}^∞ A_k} \]
\end{document}