Calcpad icon indicating copy to clipboard operation
Calcpad copied to clipboard

Allow decimal comma (at least as substitute in output)

Open novamax opened this issue 1 year ago • 3 comments

For use in Europe, it would greatly appreciate if, instead of the decimal point, a decimal comma could be used as an option.

I can imagine this is a bit more of programming on the input side, but maybe it is easier to substitute it in the output side (which would already be great). Currently, I have to substitute one for the other in a text processor before printing. But that might also substitute full stops in comments, or other uses of the the point char. So this workaround is neither a comfortable nor reliable.

novamax avatar Jun 19 '24 08:06 novamax

Hi! It is not possible to do it for the input, but for the output - no problem. We can add this as an option, but until then, you can easily customize your Calcpad to do that. Download the file bellow and unzip "template.html" in your c:\Program Files\Calpcad\doc folder. Replace the old one. template.zip

Also, you can add the following lines in your "template.html" just after $(document).ready(function () {:

  $(".eq").each(function () {
      var s = $(this).html().replace(".", ",");
      $(this).html(s);
  });

This will replace all decimal points in equations with commas, but not in the other text.

Proektsoftbg avatar Jun 19 '24 11:06 Proektsoftbg

The fix does exactly what I needed: sparing me from parsing the output. So that solves the main problem. Also thanks for working on an easy customization option for all users.

I do understand that making the input side of the interpreter configurable is more challenging. And writing a point instead of a comma is something one can easily get used to.

novamax avatar Jun 20 '24 12:06 novamax

Great! I am glad I could help.

Proektsoftbg avatar Jun 20 '24 14:06 Proektsoftbg