Skip to content
New issue

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

Underscores not converted to subscripts #1584

Closed
m-weirich opened this issue Sep 17, 2021 · 9 comments
Closed

Underscores not converted to subscripts #1584

m-weirich opened this issue Sep 17, 2021 · 9 comments

Comments

@m-weirich
Copy link

m-weirich commented Sep 17, 2021

wxMaxima 21.x doesn't convert underscores to subscripts properly. In the below example t_ONmax and t_OFFmax should be displayed with subscript.
grafik
Couldn't detect a scheme so far, which underscores are converted to subscript and which ones not.
Older versions like 17.05.0 displays the same formula (and of course all others as well) correctly:
grafik

wxMaxima version: 21.02.0_MSW
using wxWidgets version: wxWidgets 3.1.4
Maxima version: 5.45.1
Maxima build date: 2021-06-21 17:43:28
Host type: x86_64-w64-mingw32
System type: Win32 6.2.9200 X86-64
Lisp implementation type: SBCL
Lisp implementation version: 2.0.0

@m-weirich m-weirich changed the title Underscores not convertes to subscripts Underscores not converted to subscripts Sep 17, 2021
@daute
Copy link
Member

daute commented Sep 18, 2021

Strange, can't reproduce it here - neither on Linux (21.02.0 and current development version) nor on Windows (21.02.0, included in the latest Maxima release).
There are options to prevent variables to be not/always be subscripted - these are not set (maybe automatically as startup commands. so not explicitly set in the current worksheet)?

@m-weirich
Copy link
Author

Definitely no options set. And I loaded exactly the same file into 21.x and 17.x, where it works as expected.
It becomes even more strange when you look at the example below:
grafik
If I change P_OUT to P_oUT, subscript works as it should:
grafik
Other changes work as well:
grafik
I tried many more. Seems there is something special about 'OUT'.
When you examine the XML output of Maxima (Raw XML Monitor) you'll find that P_OUT creates a different XML code than for example P_OUT1.

@gcem
Copy link
Contributor

gcem commented Sep 20, 2021

Does this happen if you write the command right at the beginning of a new session?

@daute
Copy link
Member

daute commented Sep 20, 2021

wxMaxima version: 21.02.0_MSW
using wxWidgets version: wxWidgets 3.1.4
Maxima version: 5.45.1
Maxima build date: 2021-06-21 17:43:28

Concerning the version number - in the precompiled installer, I made (and I am pretty sure, that one was used, the build date and time is exactly the same as in that installer), included is not wxMaxima 21.02.0 but 21.05.2:
wxMaxima version: 21.05.2_MSW
Maybe a typo? Am I right? Or did you use an older wxMaxima version, not the included one?

And - as gcem wrote (I assume the error is not reproducible too) - maybe you can construct a minimal (problematic) example and attach it to the bug report.
Best regards, Wolfgang

@gunterkoenigsmann
Copy link
Member

What is the value of the maxima variable wxsubscripts? And what does the XML monitor (double-click on the network symbol in the bottom right) show if somethin isn't auto-subscripted that should?

@m-weirich
Copy link
Author

Does this happen if you write the command right at the beginning of a new session?
No, it doesn't happen if it's the very first command.
grafik
I found that the issue occurs only and only affects varaiables that have been assigned before.
For example if P_OUT is defined as below and then used in a subsequent equation, there will be no subscript:
grafik
With the above example it should be possible to reproduce the issue.
And again, exactly the same sequence of expressions works absolutely fine in older version:
grafik
Finally: 21.02.0 is correct, maybe a relic of older Maxima version. I nevertheless confirmed the issue on two other computers with 21.05.2 as well.

@gunterkoenigsmann
Copy link
Member

Gaaah! That looks like we'll need a lisp wizard: The autosubscript code is part of wxmathml.lisp.

@robert-dodier
Copy link
Collaborator

Problem reported here is fixed by same patch as submitted for #1807 . I'll leave this open until someone can build a new version, then we should come back to this one and close it.

robert-dodier added a commit that referenced this issue Aug 31, 2024
…_subscripted in Maxima symbol properties.

Fixes bug report #1807: "The display of subscipts has been backsliding for long"
and bug report #1584: "Underscores not converted to subscripts"
@robert-dodier
Copy link
Collaborator

I pushed commit [ a22f5a3 ] which fixes the problem described here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants