Don't miss the new release, Prime 8!
Check out more here.
Putting a line over a character
If you for example want a variable name that looks like this:
It's an a with a horizontal line on top of it. Then the easiest way is to use the Character Map tool that is installed on every Windows machine. Search for Character in the search box in Windows or type charmap in a run box.
You can then double click on the lower case a and will see this:
Then mark the box at 'Advanced view' and set 'Group by' to 'Unicode Subrange':
You should then be able to scroll down and select 'Combining Diacritical Marks':
You can now make a choice of what you want combined with your a. In this case I've used the sixth character called 'U+0305: Combining Overline'. And when I double-click on that or click on Select it can seen in the box 'Character to copy'. If you're satisfied with the character you can click on 'Copy' and go to Mathcad.
I am here using Mathcad Prime 6.0 and you can see the steps in the picture below:
Then it's probably best to just copy and paste that one whenever you need to use that name.
And most users can stop reading here. But if you're nerdy and what some more information and an alternative way of creating characters like this you can continue reading.
Creating the characters with Mathcad
When using ASCII we can represent all characters with a number between 0 and 127. But with Unicode characters we need much larger numbers. There's at the moment more than 150000 characters in the list according to their web page: https://home.unicode.org/
So in this case we need the code for lower case a which is 97 and the code for that 'U+0305: Combining Overline' which is 773 (you just need to convert the hexadecimal number 305 to decimal).
You can then create a small vector in Mathcad with those numbers:
If you then use the string function 'vec2str' with that vector as the argument you will get the same character as above:
And then just copy and paste that string and delete the quotes to use it as a name.
With this technique you can automate the process of creating characters. Let's say you want to see the letter a combined with all the 18 characters in the top row in the CharMap picture above (starting with hex=300). You can then use a range in Mathcad and do it like this:
As you can see, two of the characters isn't present in the font we're using (Mathcad UniMath Prime), but if I change the font to Times New Roman you can see them all:
And you don't have to stop there. You can combine even more characters if you want: