-
-
Notifications
You must be signed in to change notification settings - Fork 76
-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Some PGbasicmacros.pl no longer work in WW 2.15 (moved from webwork2) #473
Comments
@Alex-Jordan suggested removing the
Note: since fallback uses |
I found this bug in testing an .ova version I'm putting together (Ubuntu 20.04 Server, WW 2.15, Apache2, Lighttpd, Rserver, cronjob for temp file removal, timing.log rotation, etc.). Hopefully this will work in a lot of setting. The original version (from VirtualBox) now on the web doesn't work well on other platforms. Hopefully the new one I'm testing (from VMware) will work. My point is I don't like to distribute things with known bugs so I think I'll distribute an edited version of PGbasicmacros.pl with the change: |
I'm with Alex in that in the long term I'd like to see all of the references to LaTeX2HTML and HTML_tth removed. We are no longer supporting them. (I don't think either of them has implementation code distributed with webwork anymore. I think we should also remove references to jsMath unless someone thinks that still works faster than MathJax in certain cases. It looks to me as if the assumption was that the tex codes for MathJax (HTML_MathJax) were assumed to be exactly the same as the tex codes for HTML_tth. Hence no specific references for HTML_MathJax were added. Is that not true? what are the correct codes for MathJax for these items? How does that compare to the codes for PTX? |
I guess I am not so concerned about removing these old display modes and it breaking a problem. Because |
Most (if not all) of the time it is part of a MODES command, so if the user is not using tth, it will not come up. |
To answer Nathan's question, this is an old bug. At least it appears in WW2.13 which is the only older version I tested. My "patch" is to use |
I think this is more complicated than we had hoped. @mgage wrote:
@apizer wrote:
Yes, most of the use of a Four of the macros @apizer had problems with ( However, the other two ( It seems that any real fix which handles all 8 macros properly will require adding a |
For some history, those markings (like "for math mode only") are comments I added when adding the PTX output. It did not make sense to me that someone would use something like There were similar issues with the others. It's possible that my declarations for these to be used "only in math mode" (or not) are incorrect. I'm grateful for any second opinions on those declarations. |
It has been a very long time since I thought about any of this, but I do not think any of these macros were intended to be used in math mode. In a math expression, people should use LaTeX. There is probably documentation on this somewhere. |
That is what I would have thought. But I was led to believe these for are for use inside math:
because of things like the And also |
I agree that there seems to be some confusion about these 4 macros ( A Google search also found It does seem that there may be some "legitimate" need for these macros in text mode, for use inside popup menus, which is one of the use cases found in the OPL. I found some 140 occurrences in the OPL using Wherever these macros are used in the OPL inside Math mode, they could be replaced by the TeX alternative. It seems to me that as long as they exist in the code-base - they should probably be designed to work outside math mode, where they are arguable needed, even if they will not behave as nicely in math mode or in PDF output, For If we do leave active patched definitions for these 4 macros, I recommend redefining the I ran into a site with a table of many math symbols from Unicode at https://www.toptal.com/designers/htmlarrows/math/ |
Found in the OPL (note that one hit also used
|
Just for the record and people who Google when they have issues, when coding in the "old" style (not using PGML, ex. using Using
causes the MathJax no to render and triggers the
|
I have looked into this thoroughly. First, there is no possible way to make PG work to output these correctly in both math mode and not in math mode in any reliable way. I have looked at the code closely and analyzed the possibilities, and it is clear that it simply can not be done. Now, there really is no doubt that none of Also, it seems clear that The only way to fix this is to fix the problems and stop authors from continuing to use the first set of variables in math mode and the rest at all. Fortunately there are less than 390 problems in the OPL and Contrib combined (and a few more in Pending) that even use any of these variables. I am not sure how many of those use the variables incorrectly in math mode. Most of the problems that I looked at seemed to be using these variables incorrectly. Now don't think that incorrect usage in the OPL is a sign that the correct think to do is to go the other direction and only allow the usage in math mode, because that is simply wrong. The only reason these are working in math mode now is because things are so broken that in fact the only output from the subroutines that define these variables are always (well except in PTX output and HTML output) outputting the TeX result. Note that the HTML (plainText) output mode is not seriously used by anyone directly. It is really just a fallback mode. The discussion about using So the point is that it is entirely pointless to use these in math mode. Furthermore, making it so these work in math mode additionally makes the existence of the variables in PGbasicmacros.pl pointless. |
On a side note, why do we define |
@apizer reported in openwebwork/webwork2#1110
The initial discussion was there...
The text was updated successfully, but these errors were encountered: