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

Update v3-lab for 3.2 #45

Open
wants to merge 7 commits into
base: v3-tools
Choose a base branch
from
Open

Update v3-lab for 3.2 #45

wants to merge 7 commits into from

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Jun 14, 2021

This PR adds a number of features to the v3 lab, and fixes several interface bugs.

  • There are now checkboxes for the MathML extension (mml3) and the textmacros extensions.

  • The checkboxes are now in collapsible blocks so that you can hide/reveal any of the sections.

  • There are now settings for the main options for the input and output jax (reveal them by clicking on their headers).

  • The MathML output now has a scroll bar if it is too long

  • There is a "Hide Semantic Attributes" option to remove the data-semantic attributes from the output for ease of reading the MathML when enriched.

  • The bugs with reloading the page when enrichment or explorer are checked are now resolved.

  • The bug with MathML input not being typeset when the page is reloaded is now resolved.

  • The package lists is now in two columns to take up less vertical space.

There are white-space changes, so it may be best to view this with spacing changes being ignored.

…ns, and chtml/svg output options. Make all checkbox areas collapsible. Better handling or keep. Fix a number of interface bugs.
@dpvc dpvc requested a review from zorkow June 14, 2021 13:40
@zorkow
Copy link
Member

zorkow commented Jun 14, 2021

Great. Thanks for the work on this.
A couple of observations:

  • TeX vs Text works fine.
  • mhchemparser is now expected to be in node_modules/mhchemparser no longer on the top-level. I assume you run the lab directly in the -src directory, hence the difference.
  • On mml3 extension I always get an error of the form:
    Error: MathML must consist of a single element
    Am I doing something wrong?

@dpvc
Copy link
Member Author

dpvc commented Jun 14, 2021

mhchemparser is now expected to be in node_modules/mhchemparser no longer on the top-level. I assume you run the lab directly in the -src directory, hence the difference.

I ran it in the MathJax-dev directory, but you do have to do npm install mhchemparser as described in the README.md file. We should probably have an actual package.json file for this. Neither mhchemparser nor mj-context-menu has to be at the top level (both are mapped to node_modules by a System.config() call in the v3-lib.html file.

On mml3 extension I always get an error of the form: Error: MathML must consist of a single element

It works for me. For example

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack><mn>123</mn></mstack>
</math>

processes successfully when mml3 is checked, but produces an error when not. Check that there isn't anything before the or after the (or that there aren't two <math> elements accidentally).

@dpvc
Copy link
Member Author

dpvc commented Jun 14, 2021

mhchemparser is now expected to be in node_modules/mhchemparser

I suppose I could map these to the mathjax3/node-modules in the lab, but that won't help the test framework, which would still want them to be in node_modules.

@zorkow
Copy link
Member

zorkow commented Jun 14, 2021

mhchemparser is now expected to be in node_modules/mhchemparser no longer on the top-level. I assume you run the lab directly in the -src directory, hence the difference.

I ran it in the MathJax-dev directory, but you do have to do npm install mhchemparser as described in the README.md file. We should probably have an actual package.json file for this. Neither mhchemparser nor mj-context-menu has to be at the top level (both are mapped to node_modules by a System.config() call in the v3-lib.html file.

Of course, I did not read the README... and I did not have a node_modules directory in -dev.
No problems. Might also be useful for other packages in the future.

On mml3 extension I always get an error of the form: Error: MathML must consist of a single element

It works for me. For example

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack><mn>123</mn></mstack>
</math>

processes successfully when mml3 is checked, but produces an error when not. Check that there isn't anything before the or after the (or that there aren't two <math> elements accidentally).

No, still does not work for me, even after recompile.
There should be no whitespace problem. I've added input.trim() a long time ago, because that error always annoyed me!

@zorkow
Copy link
Member

zorkow commented Jun 14, 2021

I did not have a node_modules directory in -dev.

That was a lie. I did have a node_modules directory with a symbolic link to mj-context-menu.
But previously I had a symbolic link to mhchemparser on the top level.
Anyway, just leave as is!

@dpvc
Copy link
Member Author

dpvc commented Jun 14, 2021

No, still does not work for me, even after recompile.

Did you build the mml3 component? I'm sure you did, as I don't think it would run at all without it. Hmmm.

I have made an adjustment to the mml3 extension in the MathJax-src develop branch, and a corresponding fix to this branch. Try pulling both, and see if that helps.

@dpvc
Copy link
Member Author

dpvc commented Jun 14, 2021

Just noticed that my push to develop didn't go through, so I've done it again.

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 this pull request may close these issues.

2 participants