13

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

enter image description here

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?

CarLaTeX
  • 62,716
  • 4
    The fourier package provides \llbracket and \rrbracket –  Apr 30 '17 at 20:32
  • 6
    Also stmaryrd package has \llbracket and \rrbracket. I think this site could be useful for you: http://detexify.kirelabs.org/classify.html. – CarLaTeX Apr 30 '17 at 20:37
  • 1
    Also notice, that := should by typeset not as :=, but as \coloneq. – Michael Fraiman May 01 '17 at 08:53
  • 1
    @Mico It is a duplicate, if one considers searching for bracket in the comprehensive list of symbols a solution. – gernot May 01 '17 at 09:43
  • @gernot - I think it would be helpful, in marking this posting as a duplicate, if it were pointed out which one of the currently 19 [!] answers to the posting "How to look up a symbol or identify a math symbol or character" would actually be useful for the task at hand. The most-upvoted answer, which suggests using DeTeXify, doesn't do the job here. – Mico May 01 '17 at 09:53
  • @Mico The accepted and most-upvoted answer of the other thread offers three possibilities, with the first being to look the symbol up in the comprehensive list, so it is a duplicate. But I agree that detexify alone would not be a satisfactory answer as it misses many symbols. – gernot May 01 '17 at 10:06
  • 1
    For completeness in the links, I'll note that https://tex.stackexchange.com/q/81785/86 https://tex.stackexchange.com/q/252648/86 https://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) – Andrew Stacey May 01 '17 at 11:46
  • An interesting related question: https://tex.stackexchange.com/questions/100966/defining-scalable-white-curly-brackets-and-and – Steven B. Segletes May 01 '17 at 18:52
  • If you use unicode-math, you can just use the Unicode characters ⟦ (U+27E6) and ⟧ (U+27E7). They work nicely with \big and \left/\right and the like. (Sadly I cannot post this as an answer.) – Marian Apr 10 '19 at 15:52

4 Answers4

20

enter image description here

\documentclass[a4paper,12pt]{article}

\usepackage{stmaryrd}

\begin{document}

\begin{equation}
  f_Z\llbracket  x: y z t   \rrbracket      
\end{equation}

\end{document}
Sebastiano
  • 54,118
  • 3
    The downvote here is not justified! –  Apr 30 '17 at 20:50
  • I always hope I have done my best. There are much better than me users and faster me.A they always go my compliments. – Sebastiano Apr 30 '17 at 20:53
  • 1
    @ChristianHupfer The downvote (not mine) it's probably because this answer is equal to my comment I posted one minute before... – CarLaTeX Apr 30 '17 at 20:53
  • With so much Christian sincerity, it seems to me that someone is doing it for purpose. If you look at each answer I provide there is always a negative vote even if it is good or discreet. – Sebastiano Apr 30 '17 at 20:55
  • 1
    @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. –  Apr 30 '17 at 20:55
  • 2
    @ChristianHupfer Yes, I think so, that's why I did not downvote... – CarLaTeX Apr 30 '17 at 20:56
  • When I write a document in LaTeX with Papeeria I do not see any comment at all and focus exclusively on the question. With so much sincerity I answer only simple questions. That's why I have very little reputation. I have a slow connection and any update to the question or comments to me is delayed. – Sebastiano Apr 30 '17 at 20:57
  • @Dr.ManuelKuehner I thank you so much, but this is not the point. At this time, at least for an hour I'm in the car with my pc, with a very slow connection. Honestly, I have been reproached by all over the world for a few months. It's not that they are not right, but there seems to be little respect for me. – Sebastiano Apr 30 '17 at 21:03
  • 1
    @Sebastiano, you have my respect, sir :) – lllllllllllll Apr 30 '17 at 21:05
  • @computereasy Thanks a lot very very much for you and for my friends. – Sebastiano Apr 30 '17 at 21:06
  • 3
    This is the best answer in the lot: no complicated code for borrowing symbols from bigger families. I find the downvote completely unjustified. – egreg Apr 30 '17 at 22:00
19

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}

enter image description here

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}

enter image description here

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

14

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.

enter image description here

\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
  • 506,678
  • Mico, I have votated also your answer. But why does anyone always give me negative votes? :( – Sebastiano Apr 30 '17 at 20:51
  • 3
    @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 '17 at 21:12
  • 1
    I don't recommend loading mathabx: it changes all symbols and some of them become quite peculiar. – egreg Apr 30 '17 at 22:01
10

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.

enter image description here

Bernard
  • 271,350