Percent Snippet

Percent Snippet - Messages

#1 Posted: 6/30/2013 12:16:01 PM
Davide Carpi

Davide Carpi

1415 likes in 2872 posts.

Group: Moderator

An old personal snippet, revisited.

snippet shortcut: percent


Best regards,

Davide
SMath Studio Desktop - [percent.sm].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
2 users liked this post
ioan92 6/30/2013 12:19:00 PM, Martin Kraska 6/30/2013 2:08:00 PM
#2 Posted: 6/30/2013 2:21:41 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Simply great! I tried that and did not find appropriate characters.

If you want to have these units built-in, then replace the file units.xml in subdirectory "entries" of your smath installation.

units1.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
ioan92 6/30/2013 4:27:00 PM, Davide Carpi 6/30/2013 5:41:00 PM
#3 Posted: 7/2/2013 7:43:06 AM
kilele

kilele

133 likes in 397 posts.

Group: User

@Davide
Some of the unicode symbols don't show up correctly in my installation (mkraska portable version). See picture.

@Martin
offtopic
I don't know if your proposal would give way to support US and UK unit systems, mentioned on this post:
http://en.smath.info/forum/yaf_postsm8896_units-definition-file.aspx#post8896could
The only problem is that there seems to be confusion between imperial and american customary measurements, the two share the names of measurements, etc. An easy solution could be supporting only US since they are more commonly used. I'm a fan of universal things but it'd be nice to see SMath dealing with different unit systems in a safe fay.
unitper.png
#4 Posted: 7/2/2013 8:10:15 AM
Davide Carpi

Davide Carpi

1415 likes in 2872 posts.

Group: Moderator

Seem that your "courier new" font is not updated...

Try looking here and here (with the same machine) if you have the same issue.


BTW I hope that hereafter the standard % sign will be unlocked by Andrey as an official unit. If this is not possible the alternative could be to have a "symbolical" function perc(1) for the LHS (like sum(), diff(), int(), etc..., where the function is converted as a drawn symbol with a placeholder - like in the picture attached below), and a new "percentual" item in the "fractions" context menu for the RHS (something auspicable also for the imaginary form: [MATH eng]e^{i*θ}[/MATH])


Best regards,

Davide
SMath Studio Desktop - [perc concept].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#5 Posted: 7/2/2013 9:33:23 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote


@Martin
offtopic
I don't know if your proposal would give way to support US and UK unit systems, mentioned on this post:
http://en.smath.info/forum/yaf_postsm8896_units-definition-file.aspx#post8896could
The only problem is that there seems to be confusion between imperial and american customary measurements, the two share the names of measurements, etc. An easy solution could be supporting only US since they are more commonly used. I'm a fan of universal things but it'd be nice to see SMath dealing with different unit systems in a safe fay.



This is how I understand the options of units.xml so far:
- units can have multiple representations per language, example is "deg" and "°" for degrees (angular units). If you use them in english unit language setting, then they are saved correctly.
- If you define alternative german representations like "°" and "Grad", then always the same english version is saved, such that upon loading the document, you have all one unit (the first definition for the current language setting in. Thus, whenever you want to save different versions of a unit, then they need to belong to different english versions.
- You can define units without providing english versions. Example: "Morgen". They are then saved in the german version or whatever is available.
- You cannot have different units with the same english name, but you can have different english names for the same unit. This is sort of advantage for english, as the use of different english versions of the same unit survives save/reload, whereas for other languages they do not.
- It might be possible to re-define the base units. I am not going to try that, because I am happy with the metric system and messing around without solid knowledge of the internal logic is a nightmare of trial and error.

In order to get more insight and make modifications more robust, as many as possible people should try the modified units.xml posted here
This shall become part of the inofficial distribution with the next release.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • New Posts New Posts
  • No New Posts No New Posts