# How do I create "double-struck" square brackets in math mode? [duplicate]

I am writing some proofs using LaTeX, and following the standard procedure in the ConTeXt, I need to write something as follows:

However, I have no idea how to create the "double bracket", like the one includes x := y + z...

Could anyone give me some help on this?

• The fourier package provides \llbracket and \rrbracket
– user31729
Apr 30, 2017 at 20:32
• Also stmaryrd package has \llbracket and \rrbracket. I think this site could be useful for you: detexify.kirelabs.org/classify.html. Apr 30, 2017 at 20:37
• Also notice, that := should by typeset not as :=, but as \coloneq. May 1, 2017 at 8:53
• @Mico It is a duplicate, if one considers searching for bracket in the comprehensive list of symbols a solution. May 1, 2017 at 9:43
• For completeness in the links, I'll note that tex.stackexchange.com/q/81785/86 tex.stackexchange.com/q/252648/86 tex.stackexchange.com/q/139891/86 all deal with the same issue (though most are closed as duplicates of the more general "How to look up a symbol" question) May 1, 2017 at 11:46

Use \llbracket and \rrbracket from fourier package (for example) for those doubled bracket symbols.

\documentclass{article}

\usepackage{mathtools}
\usepackage{fourier}

\begin{document}
$f_{Z} \llbracket x \coloneqq y + z\rrbracket (\sigma) = [ x \mapsto Z ] (\sigma)$

\end{document}

If using the whole fourier package is too much, importing symbols might be an option: Import one symbol from fourier

Here's the version with import of the symbols (code copied from fourier.sty)

\documentclass{article}

\usepackage{mathtools}
\DeclareFontEncoding{FML}{}{}%
\DeclareFontSubstitution{FML}{futm}{m}{it}%
\DeclareFontEncoding{FMS}{}{}
\DeclareFontSubstitution{FMS}{futm}{m}{n}
\DeclareFontEncoding{FMX}{}{}
\DeclareFontSubstitution{FMX}{futm}{m}{n}
\DeclareSymbolFont{symbols}{FMS}{futm}{m}{n}%
\DeclareSymbolFont{largesymbols}{FMX}{futm}{m}{n}%

\DeclareMathDelimiter{\llbracket}{\mathopen}{symbols}{153}{largesymbols}{133}
\DeclareMathDelimiter{\rrbracket}{\mathclose}{symbols}{154}{largesymbols}{134}

\begin{document}
$f_{Z} \llbracket x \coloneqq y + z\rrbracket (\sigma) = [ x \mapsto Z ] (\sigma)$

\end{document}

Please note the difference between the regular symbols f, x etc. from the screen shots.

• You anticipated me for a few minutes and of course I voted positively for your answer. Apr 30, 2017 at 20:42
• @Sebastiano: As I have done vice versa
– user31729
Apr 30, 2017 at 20:47
• I imagined and for me it is also a sign of respect and esteem for your great talent. Apr 30, 2017 at 20:50

\documentclass[a4paper,12pt]{article}

\usepackage{stmaryrd}

\begin{document}

$$f_Z\llbracket x: y z t \rrbracket$$

\end{document}
• The downvote here is not justified!
– user31729
Apr 30, 2017 at 20:50
• @ChristianHupfer The downvote (not mine) it's probably because this answer is equal to my comment I posted one minute before... Apr 30, 2017 at 20:53
• @CarLaTeX: That's a coincidence then, I think. Sometimes I post an answer and see that somebody has posted a comment in between -- it's hard to recognize this.
– user31729
Apr 30, 2017 at 20:55
• @ChristianHupfer Yes, I think so, that's why I did not downvote... Apr 30, 2017 at 20:56
• This is the best answer in the lot: no complicated code for borrowing symbols from bigger families. I find the downvote completely unjustified. Apr 30, 2017 at 22:00

In addition to the fourier and stmaryd packages, the mathabx package also provides "double-struck" square brackets; the macro names are \ldbrack and \rdbrack, respectively.

\documentclass{article}
\usepackage{mathabx} % for \ldbrack and \rdbrack macros
\begin{document}
$f_{Z} \ldbrack x := y + z\rdbrack (\sigma) = [x\mapsto Z]\sigma$
\end{document}
• Mico, I have votated also your answer. But why does anyone always give me negative votes? :( Apr 30, 2017 at 20:51
• @Sebastiano - Wow, I have no idea why anyone would have downvoted your answer! That's just awful behavior. Do rest assured that I upvoted your answer.
– Mico
Apr 30, 2017 at 21:12
• I don't recommend loading mathabx: it changes all symbols and some of them become quite peculiar. Apr 30, 2017 at 22:01

If you do not want mathabx to replace the default symbol fonts, you can define commands only for the symbols, which are extensible, with this code:

\documentclass{article}
\usepackage{mathtools}

\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{\ldbrack} {4}{matha}{"76}{mathx}{"30}
\DeclareMathDelimiter{\rdbrack} {5}{matha}{"77}{mathx}{"38}

\begin{document}

$f_{Z} \bigl\ldbrack x \coloneqq y + z\bigr\rdbrack(\sigma) = [x\mapsto Z]\sigma$

\end{document}

Also, do not use :=: the colon is not centred on the math axis. With the standard fonts, mathtools defines a \coloneqq command, wich produces a correct version.