gtg922r / obsidian-numerals

An obsidian plugin which turns a math code block into a full featured calculator
Other
391 stars 8 forks source link

Have $ without currency? #17

Closed jamie9090 closed 1 year ago

jamie9090 commented 1 year ago

Hey there - love this.

Would appreciate being able to disable the conversion from "$" to USD in calculations

Or to have support for a different default currency

From my end, I use AUD :)

gtg922r commented 1 year ago

Yeah this is definitely on the roadmap, I'll try to do this next.

Currently, the underlying library necessitates a conversion to something other than the $ symbol so my plan is simply to allow users to define what the currency associated with $ is.

jamie9090 commented 1 year ago

Awesome, thanks so much!

On Fri, Dec 09, 2022 at 16:15:29, Ryan C @.***> wrote:

Yeah this is definitely on the roadmap, I'll try to do this next.

Currently, the underlying library necessitates a conversion to something other than the $ symbol so my plan is simply to allow users to define what the currency associated with $ is.

— Reply to this email directly, view it on GitHub https://github.com/gtg922r/obsidian-numerals/issues/17#issuecomment-1343860988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQTI3XHDDAKG6UNNSBNHGTTWMK57DANCNFSM6AAAAAASY4DR2E . You are receiving this because you authored the thread.Message ID: @.***>

gtg922r commented 1 year ago

Initial support added and ready for testing. Should be able to release by end of week. Will be able to select all ISO currencies that use $, include USD, AUD, CAD, NZD, MXN, etc

Screenshot 2022-12-13 at 1 54 31 AM

Note, for technical reasons within the mathjs math engine that Numerals uses, I can't allow use of $<amount> without mapping it to a currency. I'm essentially creating a new physical unit, and the convention for units is they trail the number they apply to (e.g. 4km or 10 seconds).