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

w3c test minus9 #4

Open
christianp opened this issue Apr 11, 2014 · 8 comments
Open

w3c test minus9 #4

christianp opened this issue Apr 11, 2014 · 8 comments

Comments

@christianp
Copy link
Contributor

http://www.w3.org/Math/testsuite/build/main/Content/ArithmeticAlgebraLogic/minus/minus9-form.xhtml

Choice - currently we collapse the + - into just a minus, but the sample rendering keeps it and puts brackets around the negative term.

@davidcarlisle
Copy link

On 11 April 2014 11:14, Christian Perfect [email protected] wrote:

http://www.w3.org/Math/testsuite/build/main/Content/ArithmeticAlgebraLogic/minus/minus9-form.xhtml

Choice - currently we collapse the + - into just a minus, but the sample
rendering keeps it and puts brackets around the negative term.

There will always be someone teaching negative numbers who wants to write 1

  • (-1) = 0

but generally I to write x -y + z I think the most natural way is

(plus x (minus y) z)

and rely on the render to use the infix -.

So I'd collapse the -+ The user could always "hide" the negative term (in
for example to avoid collapsing in cases where it is not
needed..

@pkra
Copy link

pkra commented Apr 17, 2014

I wonder where to expect the construction from the MML test. I can't think of a situation where someone/something would create that Content MML markup without expecting it to be rendered 7 + (-1). If it's e.g. part of a derivation, then I would expect that derivation to continue on to 7-1 and wouldn't want the renderer to skip that step. I'm sure I'm missing a use case here.

@davidcarlisle
Copy link

On 17 April 2014 22:37, Peter Krautzberger [email protected] wrote:

I wonder where to expect the construction from the MML test. I can't think
of a situation where someone/something would create that Content MML markup
without expecting it to be rendered 7 + (-1). If it's e.g. part of a
derivation, then I would expect that derivation to continue onto 7-1 and
wouldn't want the renderer to skip that step. I'm sure I'm missing a use
case here.

It's a test Neil set me right at the beginning:-) to make sure that infix
minus got used. Basically the use case is polynomials you want to express a
polynomial of to a list of monomials and that ends up

x^3 -3x +2 as being

(plus (power x 3) (times -3 x) 2)

and so ctop goes to some lengths not to render that as

x^3 + -3x + 2

@pkra
Copy link

pkra commented Apr 18, 2014

Thanks for the use case! I can see why one might prefer that. Personally, I'd still prefer to leave + (-x) (for me it corresponds better with the markup) but it's no big deal (and since ctop has been doing this forever, we should probably keep it).

@christianp
Copy link
Contributor Author

If you're concerned about getting a particular rendering for something that has the same meaning, you should be using Presentation MML anyway, right?

@pkra
Copy link

pkra commented Apr 25, 2014

Well, yes, but I think it's an example for #30 -- in a larger body of content, the author might want to change this behavior globally without having to generate a suitable Presentation for each equation. But I'm ok with leaving the default as it has been.

@christianp
Copy link
Contributor Author

I've added a setting CToP.settings.collapsePlusMinus which dictates whether the collapsing happens. The default is for it to happen.

@davidcarlisle
Copy link

On 2 May 2014 14:55, Christian Perfect [email protected] wrote:

I've added a setting CToP.settings.collapsePlusMinus which dictates
whether the collapsing happens. The default is for it to happen.

Excellent!

I always had in mind that a content mathml rendering system should be
configurable but just telling people "there is the xsl, edit it" doesn't
really count as a configuration option in a web-connected world.

David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants