Re: [off-topic] LaTex for [[ ... ]]

Sorry for the off-topic post, but I figured someone here would know...
can anyone please tell me how to do the double-square-bracket symbols
that are often used in denotational semantics in LaTex? It's like
"[[" but a single symbol without the space between the two brackets.
(I checked the Latex companion, but it's not listed there AFAICT.)
--
Fergus Henderson

On Fri, 1 Jun 2001, Fergus Henderson wrote:
Sorry for the off-topic post, but I figured someone here would know... can anyone please tell me how to do the double-square-bracket symbols that are often used in denotational semantics in LaTex? It's like "[[" but a single symbol without the space between the two brackets. (I checked the Latex companion, but it's not listed there AFAICT.)
It's either $[\
Fergus Henderson wrote:
Sorry for the off-topic post, but I figured someone here would know... can anyone please tell me how to do the double-square-bracket symbols that are often used in denotational semantics in LaTex? It's like "[[" but a single symbol without the space between the two brackets.
It's often done by squishing together two ordinary square brackets with a negative thin space (\!): \newcommand{\sembrack}[1]{[\![#1]\!} This looks good with Computer Modern; with other fonts YMMV. --Joe English jenglish@flightlab.com

Joe English wrote:
Fergus Henderson wrote:
Sorry for the off-topic post, but I figured someone here would know... can anyone please tell me how to do the double-square-bracket symbols that are often used in denotational semantics in LaTex? It's like "[[" but a single symbol without the space between the two brackets.
It's often done by squishing together two ordinary square brackets with a negative thin space (\!):
\newcommand{\sembrack}[1]{[\![#1]\!}
This looks good with Computer Modern; with other fonts YMMV.
There's also \llbracket and \rrbracket, from stmaryrd. They look better than the negative space hack, IMHO (now all I need is for Alan Jeffrey to write in and say that \{ll,rr}bracket are implemented with the negative space hack :-) Cheers, Andy -- Andy Moran Ph. (503) 526 3472 Galois Connections, Inc. Fax. (503) 350 0833 3875 SW Hall Blvd. http://www.galconn.com Beaverton, OR 97005 moran@galconn.com

On 2001-06-01T08:41:34-0700, Andrew Moran wrote:
There's also \llbracket and \rrbracket, from stmaryrd. They look better than the negative space hack, IMHO (now all I need is for Alan Jeffrey to write in and say that \{ll,rr}bracket are implemented with the negative space hack :-)
Heh. Actually they're not (and cannot, because they are extensible delimiters -- useful for typesetting the denotation of multiple-line programs!). I found the Comprehensive LaTeX Symbols List very useful: http://www.ctan.org/tex-archive/info/symbols/comprehensive/ -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig Street Preacher: "You must accept Jesus Christ." Me: "Sorry, I only accept Master Card and Visa."

On Fri, Jun 01, 2001 at 12:41:05PM -0400, Ken Shan wrote:
On 2001-06-01T08:41:34-0700, Andrew Moran wrote:
There's also \llbracket and \rrbracket, from stmaryrd. They look better than the negative space hack, IMHO (now all I need is for Alan Jeffrey to write in and say that \{ll,rr}bracket are implemented with the negative space hack :-)
Heh. Actually they're not (and cannot, because they are extensible delimiters -- useful for typesetting the denotation of multiple-line programs!).
Here's a negative space hack that gives extensible brackets: write \Sem{expr} to wrap an expression. (Doubtless someone who knows TeX could do better.) \newsavebox{\sembox} \newlength{\semwidth} \newlength{\boxwidth} \newcommand{\Sem}[1]{% \sbox{\sembox}{\ensuremath{#1}}% \settowidth{\semwidth}{\usebox{\sembox}}% \sbox{\sembox}{\ensuremath{\left[\usebox{\sembox}\right]}}% \settowidth{\boxwidth}{\usebox{\sembox}}% \addtolength{\boxwidth}{-\semwidth}% \left[\hspace{-0.3\boxwidth}% \usebox{\sembox}% \hspace{-0.3\boxwidth}\right]% }

On 2001-06-01T17:59:25+0100, Ross Paterson wrote:
Here's a negative space hack that gives extensible brackets: write \Sem{expr} to wrap an expression. (Doubtless someone who knows TeX could do better.)
Ah! Neat. [One wishes that TeX could consider arbitrary code to be delimiter definitions, in the sense of \left, \right, \biggl, etc., though.] While we are on the subject of doubling up delimiters, what are good ways to typeset double angle brackets "<< ... >>"? Perhaps the amount of backing up would depend somehow on the size of the brackets? -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig Street Preacher: "You must accept Jesus Christ." Me: "Sorry, I only accept Master Card and Visa."
participants (6)
-
Andrew Moran
-
D. Tweed
-
Fergus Henderson
-
Joe English
-
Ken Shan
-
Ross Paterson