A.2.1 Entering Characters
| • Enter it directly (e.g. +) | | • Enter it by full name (e.g. \[Alpha]) | • Enter it by alias (e.g. a ) (notebook front end only) | | • Enter it by choosing from a palette (notebook front end only) | | • Enter it by character code (e.g. \053) |
Typical ways to enter characters. All printable ASCII characters can be entered directly. Those that are not alphanumeric are assigned explicit names in Mathematica, allowing them to be entered even on keyboards where they do not explicitly appear.
| | \[RawSpace] | | ! | \[RawExclamation] | | " | \[RawDoubleQuote] | | # | \[RawNumberSign] | | $ | \[RawDollar] | | % | \[RawPercent] | | & | \[RawAmpersand] | | ' | \[RawQuote] | | ( | \[RawLeftParenthesis] | | ) | \[RawRightParenthesis] | | * | \[RawStar] | | + | \[RawPlus] | | , | \[RawComma] | | - | \[RawDash] | | . | \[RawDot] | | / | \[RawSlash] | | : | \[RawColon] |
| | ; | \[RawSemicolon] | | < | \[RawLess] | | = | \[RawEqual] | | > | \[RawGreater] | | ? | \[RawQuestion] | | @ | \[RawAt] | | [ | \[RawLeftBracket] | | \ | \[RawBackslash] | | ] | \[RawRightBracket] | | ^ | \[RawWedge] | | _ | \[RawUnderscore] | | ` | \[RawBackquote] | | { | \[RawLeftBrace] | | | | \[RawVerticalBar] | | } | \[RawRightBrace] | | ~ | \[RawTilde] |
|
Full names for non-alphanumeric printable ASCII characters. All characters which are entered into the Mathematica kernel are interpreted according to the setting for the CharacterEncoding option for the stream from which they came. In the Mathematica front end, characters entered on the keyboard are interpreted according to the current setting of the CharacterEncoding option for the current notebook.
| \[Name] | a character with the specified full name | | \nnn | a character with octal code nnn | | \.nn | a character with hexadecimal code nn | | \:nnnn | a character with hexadecimal code nnnn |
Ways to enter characters. Codes for characters can be generated using ToCharacterCode. The Unicode standard is followed, with various extensions. 8-bit characters have codes less than 256; 16-bit characters have codes between 256 and 65535. Approximately 750 characters are assigned explicit names in Mathematica. Other characters must be entered using their character codes.
| \\ | single backslash (decimal code 92) | | \b | backspace or Control-H (decimal code 8) | | \t | tab or Control-I (decimal code 9) | | \n | newline or Control-J (decimal code 10; full name \[NewLine]) | | \f | form feed or Control-L (decimal code 12) | | \r | carriage return or Control-M (decimal code 13) | | \000 | null byte (code 0) |
Some special 8-bit characters.
|