-
-
Notifications
You must be signed in to change notification settings - Fork 166
Make MathJax show errors for bad TeX. (alternate approach) #2838
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
Make MathJax show errors for bad TeX. (alternate approach) #2838
Conversation
somiaj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there is a specific reason to not show errors (and only the raw tex) to students, I think this method is preferable.
|
The original reason for the The TeX errors are really only useful for page authors, and the other PR at least tried to handle that by using the permissions to determine who sees them. It would be better if the PG editor could control the presentation of the messages, rather than trying to use the permission as a proxy for that, or always showing errors. I haven't looked at the editor code in decades, but I wonder if it could insert some javascript to set the needed value to prevent the
You probably used the v2-to-v3 configuration conversion tool to convert the old configuration to the new one. Since the v2 default has |
|
I also wondered if we could just disable |
I was thinking that maybe if the problem is being run from a URL that includes the But feel free to remove the |
|
There are certainly ways that the PG problem editor could set a flag to make this happen only for that page. It shouldn't be hard to make that work even when someone opens the problem in a new page from the PG problem editor. I don't think we need to be concerned with someone editing a problem from a text editor outside of the browser (like me). |
So that is basically what I told everyone at the developer meeting yesterday. But I do recall using the conversion tool. |
5222b8f to
62188c0
Compare
There have been requests to either remove this extension or at least make it so that those editing problems do not have it loaded, as it makes it easier to determine what is wrong with TeX in a problem. This pull request just removes the `noerrors` MathJax extension. So TeX errors are shown for all users. I am not sure why this package was added. It seems that I added it when I upgraded from MathJax version 2 to version 3, but I don't remember why. Perhaps it was just in the configuration that @dpvc recommended, or maybe I added it for some reason. Perhaps it was just about maintaining compatibility with version 2 of MathJax. For version 2 (as I understand it), the `noerrors` extension was included by default, but with MathJax version 3 it must be explicitly loaded. The change from the `webwork_url` to the `webwork_js_config` method in the `WeBWorK::ContentGenerator` module is not needed for this, but should be made anyway. There is also a `webwork_url` method in the `Mojolicious::WeBWorK` module that is already available for all controller modules (since it is a Mojolicious helper method), and having this other one overrides that one and it is confusing to have both that return almost the same value. The only difference is that `WeBWorK::ContentGenerator` method called the `location` helper which returns the empty string if the root URL is '/', and the `webwork_url` helper returns '/' in that case. I don't know what I was thinking creating the `WeBWorK::ContentGenerator` method which was really just an alies for the `location` helper method anyway.
62188c0 to
a7efac1
Compare
There have been requests to either remove this extension or at least make it so that those editing problems do not have it loaded, as it makes it easier to determine what is wrong with TeX in a problem.
This pull request just removes the
noerrorsMathJax extension. So TeX errors are shown for all users.I am not sure why this package was added. It seems that I added it when I upgraded from MathJax version 2 to version 3, but I don't remember why. Perhaps it was just in the configuration that @dpvc recommended, or maybe I added it for some reason. Perhaps it was just about maintaining compatibility with version 2 of MathJax. For version 2 (as I understand it), the
noerrorsextension was included by default, but with MathJax version 3 it must be explicitly loaded.The change from the
webwork_urlto thewebwork_js_configmethod in theWeBWorK::ContentGeneratormodule is not needed for this, but should be made anyway. There is also awebwork_urlmethod in theMojolicious::WeBWorKmodule that is already available for all controller modules (since it is a Mojolicious helper method), and having this other one overrides that one and it is confusing to have both that return almost the same value. The only difference is thatWeBWorK::ContentGeneratormethod called thelocationhelper which returns the empty string if the root URL is '/', and thewebwork_urlhelper returns '/' in that case. I don't know what I was thinking creating theWeBWorK::ContentGeneratormethod which was really just an alies for thelocationhelper method anyway.