I'm wondering whether there is a standard, canonical way to typeset programs in Dijkstra's GCL (EWD 472). In particular, I'm interested in a command producing a symbol for the box [] in

enter image description here

Ideally, the box should be also visible as some meaningful Unicode symbol (or symbols) in the text layer of the resulting PDF file, rather than the usual gibberish you get from NFSS symbols.

Currently, I simply draw the box with \fbox around appropriate white \rules, which is kinda extremely ad hoc. Detexify gives zero usable results, and shapecatcher gives way too many equally-looking white rectangular boxes, none of which has a description anywhere near Dijkstra's symbol.



Try 2AFF.

This is not an easy one to find; when the math (and other technical symbols) were presented to Unicode, they resisted any attempt to include shapes that were very similar to shapes already present, and the meaning of this symbol wasn't known at the time by the people involved in compiling the submission. They did finally relax their guidelines, and accepted this on the grounds that it's in use in contexts where other similar shapes are unacceptable.

The canonical name in Unicode is "n-ary white vertical bar", which, while descriptive, doesn't say anything about what it's used for. A later addition gives a more useful meaning: "n-ary dijkstra choice". I hope that's close enough to what you've looking for.

the symbol should be present in the stix fonts with the name \bigtalloblong. that's not a particularly good name either, and i've suggested to the maintainer of the unicode-math package that maybe something better can be devised as an alternative.

A comment by @MdAyq suggests that 2AFF is too large in displays, and that 2AFE may be more appropriate. This is plausible, but beyond my personal subject knowledge. This symbol is present in the STIX fonts with the name \talloblong, and by the same name in unicode-math.

  • 1
    i can't reach @ColbyViner by this method. i accepted the edit that has capitalized a number of words because the addition of the url for the relevant code page is useful and welcome. however, my use of capitalization is explained in my profile -- it is intended to discriminate between official information from my employer (which this is not) and personal responses (which this is). – barbara beeton Jun 11 '18 at 16:07
  • 2
    pings to people who have edited do work (even if tab completion doesn't) Probably you should have rolled the edit back. – David Carlisle Jun 11 '18 at 16:25
  • @MdAyquassar stix package will have it under the same name as unicode-math – David Carlisle Jun 11 '18 at 16:33
  • Could it be that Barbara's answer is incorrect due to ⫿ (U+2AFF) being too large in \displaystyle ? See latex.org/forum/viewtopic.php?t=32939. The right symbol might be ⫾ (Dijkstra choice, U+2AFE). – user198876 Oct 18 '19 at 9:30
  • My guess is that U+2AFF is to Y+2AFE what \sum is to +: one is an infix binary operator, the other one is an n-ary version which is larger, prefix, and typically takes a subscript (and possibly a superscript) indicating the range over which the operation is carried out. This matches U+2AFF corresponding to \bigtalloblongop and U+2AFE to \talloblong. (Brought by cs.stackexchange.com/q/115967) – Gilles 'SO- stop being evil' Oct 18 '19 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy