We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STACK 4.6 has a question-wide option "decimal separator", which can be set to "." or ",".
If it is set to , then the comma becomes the decimal separator and the semicolon ; becomes the argument separator in functions and lists.
,
;
The required modifications are:
names
The brute force option is to add a constant in the `[[JSXGraph]] block and set it manually to the value of the separator option in the question.
const decsep = ",";
This must be defined manually according to the question setting, unless there is a CAS variable in STACK which reflects that setting.
EDIT 2024-10-19: Actually there is such a variable: stackfltsep. It is a string.
stackfltsep
Adjustment of the output format is done in the Meclib function update().
update()
for (m of objects) { dfield.push(m.data()); if (names != "[") { names = names.concat(",") } names = names.concat(m.name()); } names = names.concat("]"); // adjust separators if (decsep == ",") { names = names.replace(/,/g, ';'); names = names.replace(/\./g, ',');}
This adjustment is required as long as STACK doesn't provide a forgiving mode, where both versions are accepted
The Infobox is customized using the function
board.highlightInfobox = function(x, y , el) { let ref = [0,0]; let scale = [xscale,yscale]; let dp = [dpx,dpy]; let lbl = ''; if (typeof (el.ref) == 'function') {ref = el.ref()} else if (typeof(el.ref) != 'undefined') {ref = el.ref} if (typeof (el.scale) != 'undefined') {scale = el.scale} if (typeof (el.dp) != 'undefined') {dp = el.dp} if (typeof (el.infoboxlabel) == 'string') {lbl = el.infoboxlabel} this.infobox.setText( lbl+'('+((parseFloat(x)-ref[0])*scale[0]).toFixed(dp[0]) + ', ' + ((parseFloat(y)-ref[1])*scale[1]).toFixed(dp[1])+ ')') };
The modification could probably be done using JS native localization methods.
The tick labels are also already customized in the [["grid"]] object.
this.xaxis = board.create('axis', [[0, 0], [1,0]], {name:toTEX(data[1]), withLabel: true, label: labelopt, layer:0, ticks: { label:{layer:3}, generateLabelValue:function(p1,p2) { return ((p1.usrCoords[1]-p2.usrCoords[1])*fx).toFixed(Math.max(...[0,dpx-1]))}} });}
The text was updated successfully, but these errors were encountered:
Formatting of the output is tested in TM2 03 T02 V2 Mohr's circle (stress) (Meclib, localized)
TM2 03 T02 V2 Mohr's circle (stress) (Meclib, localized)
Sorry, something went wrong.
Here https://jsfiddle.net/7k0a4jbv/3/ you can find a meclib version with german locale. Infobox and axes tick labels are adjusted.
No branches or pull requests
STACK 4.6 has a question-wide option "decimal separator", which can be set to "." or ",".
If it is set to
,
then the comma becomes the decimal separator and the semicolon;
becomes the argument separator in functions and lists.The required modifications are:
names
input field (unidirectional, JSXGraph to STACK only)Detect the separator setting in the question
The brute force option is to add a constant in the `[[JSXGraph]] block and set it manually to the value of the separator option in the question.
const decsep = ",";
This must be defined manually according to the question setting, unless there is a CAS variable in STACK which reflects that setting.
EDIT 2024-10-19: Actually there is such a variable:
stackfltsep
. It is a string.Format of the
names
input fieldAdjustment of the output format is done in the Meclib function
update()
.This adjustment is required as long as STACK doesn't provide a forgiving mode, where both versions are accepted
Format of the Infobox
The Infobox is customized using the function
The modification could probably be done using JS native localization methods.
Format of the tick labels
The tick labels are also already customized in the [["grid"]] object.
The modification could probably be done using JS native localization methods.
The text was updated successfully, but these errors were encountered: