Skip to content

arg attributes in MathML examples in open concept list #67

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

Merged
merged 75 commits into from
Jun 17, 2024

Conversation

davidcarlisle
Copy link
Collaborator

@davidcarlisle davidcarlisle commented Jun 13, 2024

This adds arg attributes to most MathML examples (and a single test intent attribute) and has some styling using @dginev 's version of the css for arg.

It's work in progress but I'd like to merge anyway to avoid getting too far ahead on a branch, and give time to bring the core list to the same format.

The html/css rendering of the arg attributes is visible by hovering over them at

https://davidcarlisle.github.io/mathml-docs/intent-open-concepts/

@davidcarlisle davidcarlisle self-assigned this Jun 13, 2024
@davidcarlisle davidcarlisle requested review from dginev and NSoiffer June 13, 2024 21:56
@@ -887,7 +910,7 @@ concepts:
property: mixfix
area: "set theory"
comments:
- "<mi>f:XY"
- "<mrow intent='bijection($a1,$a2,$a3)'>>f: arg='a2'>X arg='a3'>Y>>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For bijection the example with f was poorly chosen by me - predates properties. It would be f:bijection in a world where is-a property use was still available.

A better example would be an infix arrow, but those are non-standard, math SE discussion. Maybe X ↔ Y with the marked as intent="bijection", maybe not.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why you say infix arrows are non standard, all the arrows are infix binary by default. Oh you mean people on that SE thread don't agree on which arrows to use, not that arrows being infix are non standard, OK.

But yes, in general lots of the examples will need to be reviewed there are several I've spotted while doing this round that I plan to raise issues on after the merge.

But I'm trying to keep this PR just on the format so replacing notation: field with mathml hints to actual mathml. Current status is 1258 elements and 248 notation[a-z]: fields so it's getting there...

But if someone (hint) would approve the merge I could merge this bulk edit to w3c, and then individual issues and/or PR could be raised on problematic examples.

As it is, editing the w3c copy will lead to merge conflicts and only I have edit writes on my fork so I really would rather forks are short lived.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bijection change was made in this PR, hence I reviewed it here. If anything, I have been trying to keep my comments to a helpful minimum.

I will pass my review flag to Moritz @physikerwelt who - if interested - may help resolve the PR. I am not comfortable doing much more here.

Copy link
Collaborator Author

@davidcarlisle davidcarlisle Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as you wish, I wouldn't have said it's a change here Ijust added mathml if we decide to treat this as a property rather than a concept the whole row would presumably go, but that's fine: there will neeed to be several such edits whatever format the notation is shown. mathml with or without intent attributes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comments:

  • Can we have intent attributes on the mathml root element, that way we would not need to add an mrow?
  • I think the overall pattern a1-9 is good.
  • Can I check the result of this PR somewhere visually?

Copy link
Collaborator Author

@davidcarlisle davidcarlisle Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@physikerwelt we could have intent om math but I added the mrow as if you ever want to copy these fragments into a larger expression you would have to have mrows, so it seemed simpler to add them even though it does add one extra layer in these small examples. Yes the fork is rendering at https://davidcarlisle.github.io/mathml-docs/intent-open-concepts/ including the button to show mathml source. (Currently you need to refresh the page to get back to the initial state)

Copy link
Member

@physikerwelt physikerwelt Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. This looks good. Two minor issues:

  • Invalid markup: Incorrect number of children for tag.
  • “mathvariant='bold'” on MathML elements is deprecated and will be removed at a future date.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Moritz for the time reviewing the PR.

I would suggest to David to tag Moritz directly in future PRs as the outcomes appear more productive.

@dginev dginev requested a review from physikerwelt June 17, 2024 11:34
_data/open.yml Outdated
@@ -8019,7 +8216,8 @@ concepts:
en: multichoose
property: fenced-stacked
area: "combinatorics"
notation: "mrow ( mfrac $1 $2"
comments:
- "(nn)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could replace the n with 𝐧 (U+1D427 (119847))?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@physikerwelt I seemed to have two n there. I made one an m but would you really use bold upright not just normal math italic? but in general as I commented to Deyan I'd rather reviewing individual entries happens at w3c with more reasonable sized diffs as this PR was really asking about the change in format to add arg= attributes which is nearly completed now just 126 rows with !!F and no real mathml out of 1264 math elements. But diff for this PR is now nearly 5000 lines I want to merge as is, to allow individual entries to be reviewed/edited at w3c (where more people have write access)

_data/open.yml Outdated
@@ -8217,7 +8217,7 @@ concepts:
property: fenced-stacked
area: "combinatorics"
comments:
- "(nn)"
- "(mn)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that a lot of lines were changed. However this is the only line that causes a warning in Firefox. Thus I was thinking it would be good to come from 1 to 0 warning. I have no particular feeling about the unicode character.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@physikerwelt ah sorry yes the warning is the mathvariant bold which isn't actually valid i added it as unicode doesn't have bold brackets I;'ll replace bycss. Firefox also tells me Invalid markup: Incorrect number of children for tag.` update coming up....

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@physikerwelt thanks, fixed

Copy link
Member

@physikerwelt physikerwelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy if this is merged. However, I think it would be better if we could fix the warnings generated in the browser console.

@davidcarlisle
Copy link
Collaborator Author

I am happy if this is merged. However, I think it would be better if we could fix the warnings generated in the browser console.

yes sorry about that firefox console is now clean

@davidcarlisle davidcarlisle merged commit fe73b8d into w3c:main Jun 17, 2024
NSoiffer pushed a commit to NSoiffer/mathml-docs that referenced this pull request Oct 19, 2024
* arg attributes

* force inline display (subscript alignment) of hover tooltips

* highlight arg slots even on no hover

* some arity 3 fixes

* speech for therefore

* triangle number

* well formed mathml

* well formed mathml

* mismatched parens in ultrapower

* agr1 n cases

* missing quotes in yaml

* arity 2 matrix

* add intent attributes

* flag missing intent in red

* more intents

* more intents

* more intents arity 4

* more intents

* more intents

* mismatched brackets

* mismatched quote

* dihedral group

* direct-limit

* more mathml

* faber polynomial

* field of sets

* hypertorus

* hypertorus

* nth ...

* bijection arguments

* cap product

* spurious } in css #496

* arity 0 notations

* arity 3 notations

* arity 2 Work in Progress

* arity 1 Work in Progress

* no a2 in arity 1 stubs

* use star not n for n-ary to match core list

* more mathml

* double >>

* /mrow

* stalk

* stalk extra mrow

* surjection speech template

* derivation

* legendre poly

* col vector

* conditional-xxx

* mathml

* a9

* msup cases

* missing arg attributes

* missing arg attributes

* showmath

* preserve 

* mfrac cases

* yaml fixes

* wittaker 2 and 3

* wittaker W

* wittaker missing )

* wl mean

* wl mean

* avoid named entities

* typo

* msub cases

* more mathml

* more mathml

* more mathml

* yaml fixes

* pqr not prr

* rising/falling factorial

* mtable cases

* mtable cases

* m n not n n

* valid mathml
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