Message Boards Message Boards

0
|
10910 Views
|
8 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Quick and clean units using [esc][shortcut][esc]

Posted 9 years ago

Does someone have a list of "[ecs][xx..][ecs]" shortcuts?

I prefer to make unit inputs like this (for example the unit "Farads"):

c = 1F 

...by typing [esc][qf][esc]

Instead of this "confusing" expresion:

c = Quantity[1, "Farads"]

But i cannot find a list of all the "shortcuts" to the different units.

Otherwise i'm open to alternatives

POSTED BY: Benny Bomstærk
8 Replies
POSTED BY: Richard Hennigan

Using the ESC key produces a named character, not a unit. You can see a full list of named characters and their keyboard shortcuts in the documentation under guide/ListingOfNamedCharacters.

The easiest way to write out quantities is to use natural language input. I often use "Ctrl + =".

Internally, all Quantities are written that way as "Quantity[number, unit]". This is the simplest possible representation of a Quantity and the most basic.

POSTED BY: Sean Clarke

Nice link, @Sean Clarke, thanks ! There is also nice palette for units developed specifically for easy input:

Palette for Inputting Typeset Units and Package with Input Aliases

You can also discover named characters by starting typing\[:

enter image description here

POSTED BY: Sam Carrettie

Actually that Unit palette - brilliant by the way - was the one that made me discover the "esc" solution because it shows up when you mouse over the different units. But doing a lot of electrical engineering I do miss some units.

POSTED BY: Benny Bomstærk

Thanks for the answer. I do not agree that the "esc"-solution cannot make units. When I mouse over the F in the above example it says farads. And when i calculate with different units, the output unit is correct.

For writing units you just need do start the expression with "q" for quantity i think. e.g. [esc]qkv[ecs] for kV (kilovolts).

POSTED BY: Benny Bomstærk

Oh. I see now. The shortcuts you see are part of that package. They aren't part of a regular Mathematica installation. Without knowing that, I didn't understand your question. Without that package, I'm pretty sure you can't create quantities with the [esc] key.

POSTED BY: Sean Clarke
POSTED BY: Benny Bomstærk

I do not think you can type units like that. Why do you think you can? I tried [esc][qf][esc] and nothing happened.

POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract