Bookmark and Share

In Wolfram Language / Mathematica, there are the following escaped characters that end with Space:

$WhiteSpaceCharacters = {
"\[AutoSpace]",
"\[COMPATIBILITYKanjiSpace]",
"\[InvisibleSpace]",
"\[LetterSpace]",
"\[MediumSpace]",
"\[NegativeMediumSpace]",
"\[NegativeThickSpace]",
"\[NegativeThinSpace]",
"\[NegativeVeryThinSpace]",
"\[NonBreakingSpace]",
"\[RawSpace]",
"\[ThickSpace]",
"\[ThinSpace]",
"\[VeryThinSpace]"
}

These can be found by evaluating ?\[*Space] in a Mathematica notebook.

To actually obtain these in copiable text was not straightforward for me as I did not find a programmable way to generate the above list. Instead, I copied the cell expression out (by selecting the output cell, pressing Ctrl+Shift+E, and copying out the text), and then run ack to extract any strings that start is sandwiched with \[ and ]:

17:09:43 meng@meng2maclap:~/Temp$ ack -o "\\\\\\\\\[.*Space\]" cellexpr.txt | sort | uniq

AutoSpace
COMPATIBILITYKanjiSpace
InvisibleSpace
LetterSpace
MediumSpace
NegativeMediumSpace
NegativeThickSpace
NegativeThinSpace
NegativeVeryThinSpace
NonBreakingSpace
RawSpace
ThickSpace
ThinSpace
VeryThinSpace

Curiously, only \[AutoSpace], \[NonBreakingSpace], \[RawSpace] satisfy StringMatchQ[#, RegularExpression["[[:whitespace:]]"]]&.

See the CDF file for details.

Comments on this page are closed.
blog comments powered by Disqus