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

Avoid MathML for Symbols and Integers #98

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

rocky
Copy link
Member

@rocky rocky commented Jul 1, 2021

For your consideration. Reducing the use of MathML where it isn't needed reduces the need for it to want to reformat it on loading.

The output changes slightly, and there may be additional styling, or not.

I am curious to know what you think and what your opinion is.

(Also, down the line we need to come up with a better story and design for Format. Or just hide a lot of the ugliness into its own routine somewhere).

@TiagoCavalcante
Copy link
Collaborator

For your consideration. Reducing the use of MathML where it isn't needed reduces the need for it to want to reformat it on loading.

The output changes slightly, and there may be additional styling, or not.

I am curious to know what you think and what your opinion is.

I want to remove MathML from everywhere it's possible, but the style changes here are too big (they're rendered like strings). It's hard to do the additional format as we need to check the value, we can think something was True but it was "True".

Also, the re-renderings would stop with KaTex.

So I guess it's better to keep this surrounded by MathML by now.

@rocky
Copy link
Member Author

rocky commented Jul 1, 2021

For your consideration. Reducing the use of MathML where it isn't needed reduces the need for it to want to reformat it on loading.
The output changes slightly, and there may be additional styling, or not.
I am curious to know what you think and what your opinion is.

I want to remove MathML from everywhere it's possible, but the style changes here are too big (they're rendered like strings). It's hard to do the additional format as we need to check the value, we can think something was True but it was "True".

A couple things here. Inside format.py we know what the type is, so why is it so hard to let HTML know about this?

And for strings are surrounded by quotes. So the question there is why is the string style so different than MathML?

Also, the re-renderings would stop with KaTex.

But wrong is still wrong and complicated is still complicated. If the cell has nothing to do with formula typesetting why are we trying to fit it into a formula?

So I guess it's better to keep this surrounded by MathML by now.

The conclusion I don't really care about as much as the reasoning behind it.

@TiagoCavalcante
Copy link
Collaborator

TiagoCavalcante commented Jul 1, 2021

A couple things here. Inside format.py we know what the type is, so why is it so hard to let HTML know about this?

@rocky the results part of the JSON is a string in the form of an XML element or text (thinking now the user shouldn't try to print a XML). We would or add a new field to the JSON or create a FormulaWithoutMathMLForm.

And for strings are surrounded by quotes. So the question there is why is the string style so different than MathML?

image

@rocky
Copy link
Member Author

rocky commented Jul 1, 2021

A couple things here. Inside format.py we know what the type is, so why is it so hard to let HTML know about this?

@rocky the results part of the JSON is a string in the form of an XML element or text (thinking now the user shouldn't try to print a XML).

Right -- ditch the XML. The structure there could be equally (if not more uniformly and simply) be encoded and accessed in JSON.

We would or add a new field to the JSON

I think putting all in JSON the best thing.

or create a FormulaWithoutMathMLForm.

And for strings are surrounded by quotes. So the question there is why is the string style so different than MathML?

image

@TiagoCavalcante
Copy link
Collaborator

TiagoCavalcante commented Jul 1, 2021

@rocky transform everything in JSON isn't the right thing, have you already tried to write a HTML page in JSON?

When I said XML I was referring to MathML (which can be a form of XML).

I was thinking about this and let MathML where it isn't necessary is wrong, I guess the best is wrap the booleans and integers in a HTML tag, I just don't know if it should be hardcoded or be in a Form.

@rocky
Copy link
Member Author

rocky commented Jul 1, 2021

@rocky transform everything in JSON isn't the right thing, have you already tried to write a HTML page in JSON?

When I said XML I was referring to MathML (which can be a form of XML).

I was thinking about this and let MathML where it isn't necessary is wrong, I guess the best is wrap the booleans and integers in a HTML tag,

Ok - use this as starting point and continue.

I just don't know if it should be hardcoded or be in a Form.

I don't recall ever suggesting anything like this.

@rocky rocky marked this pull request as draft July 1, 2021 22:01
@rocky rocky force-pushed the master branch 4 times, most recently from 0963d16 to 400465e Compare August 1, 2021 07:25
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.

3 participants