gtg922r / obsidian-numerals

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

Numerals TeX rendering style outputs wrong results or no results at all #60

Closed Peterf1982 closed 11 months ago

Peterf1982 commented 1 year ago

There seems to be a bug within the TeX rendering of the Numerals plugin:

The following code outputs correct numbers:

```math
lambda=780.246021 nanometer
nu=speedOfLight/lambda
```

The same code in math-tex environment

```math-tex
lambda=780.246021 nanometer
nu=speedOfLight/lambda
```

outputs a wrong result for lambda (wrong order of magnitude) and no result for nu at all. See picture below Bug_Numerals_Tex_annotation

Numerals: 1.2.0 Obsidian: v1.4.5

gtg922r commented 1 year ago

Very odd. Can you please share your locale? (E.g. what country and language is your system set to?) Many of these types of issues have been due to bugs in the number format conversions based on locale.

On Mon, Sep 4, 2023 at 12:00 PM Peterf1982 @.***> wrote:

There seems to be a bug within the TeX rendering of the Numerals plugin:

The following code outputs correct numbers:

lambda=780.246021 nanometer
nu=speedOfLight/lambda

The same code in math-tex environment

lambda=780.246021 nanometer
nu=speedOfLight/lambda

outputs a wrong result for lambda (wrong order of magnitude) and no result for nu at all. See picture below [image: Bug_Numerals_Tex_annotation] https://user-images.githubusercontent.com/144056705/265527714-6c626a39-8fdc-4854-9db8-adad685873e2.png

Numerals: 1.2.0 Obsidian: v1.4.5

— Reply to this email directly, view it on GitHub https://github.com/gtg922r/obsidian-numerals/issues/60, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJDZJSUJPGDG445VY65TMTXYYQMNANCNFSM6AAAAAA4KYRCJQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Peterf1982 commented 1 year ago

Windows 10 language German(Germany), country Germany. I also attached the settings for decimal separator, etc. Locale

Thanks for having a look at it!

gtg922r commented 11 months ago

Finally found the bug! I think it should be fixed now. Its in the latest Numerals beta, 1.3.1. To install the beta, please see the beta instructions in the README to install via BRAT.

If you find this bug is still an issue with the beta, please re-open it!