-
Notifications
You must be signed in to change notification settings - Fork 99
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
Superfluous quote marks in text copied by "Copy as MathML" #1946
Comments
Hm. I did a |
Hmm, I don't know what happened with the git bisect -- it doesn't make sense to me either. I wonder if there is any way to debug the call to TextCell::ToMathML to see what's the effect of calling TextCell::ToString. I don't have a development environment set up, so I can't try it myself. |
Also, superfluous quote marks also observed after copying via "Copy" (first item on right button menu) and then pasting into MS Word. The copied text becomes an equation containing |
The question is if those quotes are superfluous: Maxima tells us that the text actually is a string so |
Gunter, I don't have a wxMaxima development environment, so I can't try the new function. Can you call it from TextCell::ToMathML (i.e., replacing the call to TextCell::ToString with TextCell::GetDisplayedString) and verify that it has the desired effect? |
…extCell::ToString. This is intended to fix issue #1946: Superfluous quote marks in text copied by "Copy as MathML"
I've pushed commit 3046c6d which changes the call to ToString to GetDisplayedString as we were saying. @idealkindom Can you try your notebook again and see if "Copy as MathML" work as you expect? |
I will check it for sure, however before the pull request being merged and nightly built wxMaxima being released, I realy lack the knowledge and skill to do. So, should I copy the TextCell.cpp file or create a file with the name and content then replace the same named file in some route of wxMaxima on windows? If you could tell me a simple way to check.
At 2024-09-15 07:45:26, "Robert Dodier" ***@***.***> wrote:
I've pushed commit 3046c6d which changes the call to ToString to GetDisplayedString as we were saying. @idealkindom Can you try your notebook again and see if "Copy as MathML" work as you expect?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I tested with the latest nightly built Maxima portable version including a wxMaxima, but the results are unsatifactory, which may not merged your pull request. |
Thanks for following up. The log files for the development server show that the new version wasn't built successfully because a test failed. We're trying to figure out what the error is. I think we'll have an answer in a few days -- I'll keep you posted. |
Yes , I also saw the failure report.I will keep an eye on email inbox to see the progress.
在 2024-09-16 04:52:30,"Robert Dodier" ***@***.***> 写道:
Thanks for following up. The log files for the development server show that the new version wasn't built successfully because a test failed. We're trying to figure out what the error is. I think we'll have an answer in a few days -- I'll keep you posted.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@idealkindom It appears that the daily build succeeded today (https://wolfgang.dautermann.at/maxima/nightlybuild/). Can you try the new version and see how it works for you? Thanks a lot for your help. |
Hey,Thanks a lot Robert. Thanks to your persverance, the annoying trivial double quotes are gone, only the asterisc instead of center-dot muplipication operator is left to be done. Here I attached the screenshot, which is a big step forward to regain the desent function of former version. |
OK, great. I will close this ticket, and we will keep working on the asterisk problem. |
Yeah, I saw that too. I will try to figure out why the centered dot becomes an asterisk in the copied equations. |
Hey,Daute, you could just try to copy it as MathML to winword to see the effects. You will see:
|
The thing with the asterisks is that the centered dot actually is an asterisk that is replaced by a centered dot, if it is used as an operator, but not, if it is part of a lisp variable name or a comment sign. The new command extracty the text maxima has sent to wxMaxima. Perhaps we need yet another new command that contains part of the conditional-find-and-replace logic, but not other parts of it. |
This should hopefully fix the asterisk/centered dot part of issue #1946.
Hi everybody, I've opened a new ticket specifically for the asterisk/centered dot problem. See #1956. I'll go ahead and close this ticket since the issue which it addresses (superfluous quote marks) appears to be fixed now. In the interest of staying focused, let's just have one topic per ticket. |
Working with wxMaxima 24.08.0 + Linux.
Copying output text as MathML introduces superfluous quote marks. E.g.
print("foo") $
in a cell produces outputfoo
as expected. If I highlightfoo
and right click and select "Copy as MathML", the resulting MathML contains<mo>"foo"</mo>
, so it will be displayed with quote marks if pasted into a document. Here is the MathML I get:An example of a wxmx document containing text like that is shown in #1942.
There is a user report that wxMaxima 19.05.7 does not have the superfluous quotes in copied MathML. On looking at the commit log, I think it's possible the quotes were introduced in commit 1db4c41, which says:
The part that's relevant is
i.e.,
TextCell::ToString
is being called whereas before it was not; from what I can tell,TextCell::ToString
is where the quotes get pasted onto the string.The text was updated successfully, but these errors were encountered: