Is it possible to use special characters in variable names?
- May 23, 2025
- 3 replies
- 1515 views
For all of Mathcad's reputation as being a primary math software, it's always a little frustrating that it can't seem to replicate and utilize the math notation commonly used in textbooks, reference books, etc. Many, many references will use special characters of some type in their variable names, but this seems to be next to impossible to replicate in Mathcad worksheets, so I have to use alternate naming for those variables, and then add text noting that this variable is really the one everyone is familiar with that uses a symbol in the variable name. For instance, when referencing stresses parallel and perpendicular to the plane of interest, it's not unusual to use a term like f‖ and f┴ to denote those. (See the screenshot below for how these are were supposed to look. They looked exactly like they were supposed to when I typed them, but then I hit "post" and the editor removed the "invalid HTML" [subscripts]) Anyway, symbols like that in the variable subscripts are common, clear, recognizable because that's how it's shown in authoritative references that we are often basing our worksheets on, and also only 1 character so already-long formulas don't get unmanageably long.
PTC claims that "Identifiers can contain any valid Unicode character from the Base Multilingual Plane (BMP) with the exception of white space and control characters, and with the additional limitation that the first character cannot be a decimal digit (0-9). Unicode BMP characters are defined as having a code in the range 0-65535." PTC also says that characters in that range can be copied and pasted from the Windows Character Map. The double vertical line, U+2016, representing "parallel to" is a Unicode character from the BMP. However, I can NOT get Mathcad 10 Prime to accept that as a subscript (or anything else) in a math region, only as text in the worksheet. It will not paste from Character Map. Am I correctly reading the Mathcad help topic to basically say that PTC says they can do something that they actually can't? Does anyone have any suggestions for how to input special characters like those in the attached screenshot? Is it just my bad memory, or didn't we have more abilities for stuff like this in the old days of Mathcad? Much thanks for any help.

