\DeclarePairedDelimiter
allows one to define extensible delimiters (for example using the \big
option). An example is provided below with double brackets. I need a similar delimiter with triple brackets. As I was unable to find one, I built it from the double bracket symbol found in stmaryd
. Unfortunately, I cannot use it with \DeclarePairedDelimiter
š So, my question is: How to define a macro for an extensible triple-bracket delimiter?
\documentclass{article}
\usepackage{mathtools,stmaryrd}
\DeclarePairedDelimiter{\dbr}{\llbracket}{\rrbracket}
\newcommand{\tbr}[1]{\llbracket\mkern-5mu\llbracket #1 \rrbracket\mkern-5mu\rrbracket}
\begin{document}
Double brackets:
\[
\dbr{x} \quad \dbr[\big]{T^T}
\]
Triple brackets:
\[
\tbr{x} \quad \tbr{T^T}
\]
\end{document}
Best Answer
Encouraged by David Carlisle, IĀ eventually resolved to post this answer. IĀ had begun to write a comprehensive one that explained how the solution works, but IĀ soon realized that itĀ would have largely exceeded the 30000 character limitāindeed, only the code amounts to a total of more than 26000 bytes! Maybe Iāll post the explanations as a separate answer, for now please refer to:
How to create a virtual font?;
this answer to How can I create a new extensible symbol?;
my answer to the question Design of new brackets;
my answer to the question Arbitrary \left \right delimiters.
Solution based on virtual fonts; it provides you with two new extensible symbols named
\lBbrack
and\rBbrack
, that you can use in exactly the same way (with\bigl
&Ā Co.,\left
,\right
,\genfrac
,\DeclarePairedDelimiter
,Ā ā¦) as any other delimiter. So, for instance, along the lines ofyou could similarly say
Instructions for testing the solution:
tripledelimiters10.vpl
:This will generate two files called
tripledelimiters10.tfm
andtripledelimiters10.vf
, always in the same directory.tridelim.sty
:test.tex
:test.tex
should produce the following output: