# Character combination and horizontal spacing [closed]

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.)

## closed as too localized by egreg, Kurt, Stefan Kottwitz♦Oct 13 '12 at 15:38

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to TeX.SE. I made uploaded the image and made some minor tweak, hope you don't mind. – Peter Grill Oct 7 '12 at 19:38
• I don't quite see what is wrong with the spacing in the image though. Can you elaborate further? – Peter Grill Oct 7 '12 at 19:39
• Thanks for your edits. About the question… I'll try to be more specific. – Alex N. Oct 7 '12 at 19:42
• @AlexandreNiveau When zoomed in at maximum level, the first solution shows identical spacings. When zooming out (that is, reducing the size) you may see some displacements, due to the viewer and the fact that screens have a relatively low resolution. I'd go with 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 7 '12 at 19:44
• There is no solution at the tex level the only solution is to use a hinted font (and even then it isn't guaranteed) the font hints try to ensure that the vertical lines of the glyphs are the same widths so at rendering time the pdf renderer might them to pixel boundaries. That inevitably means that the white space between the lines is subject to variation depending on resolutions used. – David Carlisle Oct 7 '12 at 19:56