🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #11363

Double brackets

#11363
From: Tony Li
Date: Wed, 28 Feb 1990 18:57
27 lines
1365 bytes
I have a need for double brackets (e.g., [[ X^3 ]] ) as delimiters in
some of the math that I've been doing.  As noted in the TeXbook, [\![
does fine in the text sizes.  However, when you start putting larger
equations inside and using \left and \right, things don't look so
good.  To remedy this, I've been using the following macro, which I'm
posting in case anyone else needs it.  Improvements and comments are
most welcome.

\newbox\Dbrackbox
\newbox\mathstrutbox
\setbox\mathstrutbox\hbox{$\mathstrut$}
\def\Dbrack#1{\mathopen{}
	\left\lbrack
	\setbox\Dbrackbox\hbox{$\left\lbrack #1\right\rbrack$}
	\ifnum\ht\Dbrackbox>\ht\mathstrutbox
	    \mskip-4mu\box\Dbrackbox\mskip-4mu
	\else
	    \!\box\Dbrackbox\!
	\fi
	\right\rbrack
	\mathclose{}}

Tony Li - USC Computer Science Department
Internet: tli@usc.edu Uucp: usc!tli
Thus spake the master programmer: "A well written program is its own
heaven; a poorly-written program its own hell."
Technical Details
Message-ID: <8386@chaph.usc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!chaph.usc.edu!koh-sun2.usc.edu!tli

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!chaph.usc.edu!koh-sun2.usc.edu!tli
From: tli@koh-sun2.usc.edu (Tony Li)
Newsgroups: comp.text.tex
Subject: Double brackets
Message-ID: <8386@chaph.usc.edu>
Date: 28 Feb 90 18:57:20 GMT
Sender: news@chaph.usc.edu
Reply-To: tli@koh-sun2.usc.edu ()
Organization: University of Southern California, Los Angeles, CA
Lines: 27