Thanks for this awesome website that helped me countless times!
I need to use double square brackets. I know about those in the stmaryrd and MnSymbol packages, and I heard about unicode-math—but for various reasons, I'd prefer to use a combination of characters.
I tried the most direct solution:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\ldb}{\mathopen{\lbrack\!\lbrack}}
\newcommand{\rdb}{\mathclose{\rbrack\!\rbrack}}
\begin{document}
$\ldb s \rdb = \ldb s \rdb$ $\ldb s \rdb$
\end{document}
However, spacing between the brackets is not constant throughout the document, as shown below:

OK, that's nitpicking, but it's even uglier when zooming out, and obvious when printed. (EDIT: I'm talking about the gap between the two "glued" brackets, not the spacing on each side of the double-bracket as a character. For example, the first closing double-bracket is a tiny bit thinner than the first opening one; the third opening one is even thinner.)
How to type NOT \delta and NOT \ll explains what's happening, but unfortunately does not provide a solution.
I tried a lot of ideas, notably building upon \subseteq + \circ as a single symbol ("open subset"); I tried this too: bracket with doubled delimiters
But to no avail. My latest attempt is the following:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\ldb}{\mathopen{\ooalign{\makebox[.4em][l]{$\lbrack$}\cr\makebox[.4em][r]{$\lbrack$}\cr}}}
\newcommand{\rdb}{\mathclose{\ooalign{\makebox[.4em][l]{$\rbrack$}\cr\makebox[.4em][r]{$\rbrack$}\cr}}}
\begin{document}
$\ldb s \rdb = \ldb s \rdb$ $\ldb s \rdb$
\end{document}
but it gives similar results. It seems that some stretchable spacing or kerning remains, and I don't know how to remove it. I'm no TeX specialist…
Any idea is much welcome!
(BTW, I tried using XeLaTeX and pdfTeX.)
stmaryrd, if I had to use them. But surely the second solution is overly complicated and does nothing better than the first one. – egreg Oct 07 '12 at 19:44stmaryrd's is nice, but TeX complains about "too many math alphabets"… – lxnv Oct 07 '12 at 19:57stmaryrd's andMnSymbol's versions work correctly even on low resolutions, I guess. Well, so the problem seems to have nothing to do with stretchable space or character combination tricks; the question should probably be closed. – lxnv Oct 07 '12 at 20:57