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

Add MathML tutorial #19467

Merged
merged 20 commits into from
Sep 5, 2022
Merged

Add MathML tutorial #19467

merged 20 commits into from
Sep 5, 2022

Conversation

fred-wang
Copy link
Contributor

Summary

An introduction to basic MathML constructions.
This only introduces the "first steps" module but
more advanced topics may be added in the future.

Motivation

Chromium is expected to ship MathML soon, and it is likely that
developers read the documentation as suggested in the
Intent-to-ship thread [1]. Although we've been updating existing
MDN documentation it may still be difficult for people new to MathML
to learn about it. This PR addresses that by following the same
structure as HTML, CSS and JavaScript tutorials.

Supporting details

[1] https://groups.google.com/a/chromium.org/g/blink-dev/c/n4zf_3FWmAA

Related issues

Metadata

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

An introduction to basic MathML constructions, using similar structure
as the lessons for HTML, CSS and JavaScript. This only introduces the
"first steps" module but more advanced topics may be added in the
future.
@fred-wang fred-wang requested a review from a team as a code owner August 12, 2022 14:47
@fred-wang fred-wang requested review from Rumyra and removed request for a team August 12, 2022 14:47
@github-actions github-actions bot added the Content:Learn Learning area docs label Aug 12, 2022
@fred-wang
Copy link
Contributor Author

I'll be off for one week but I wanted to make people aware of that. Probably more tweaks are needed (like copying some examples to https://github.com/mdn/learning-area).

cc @bkardell @teoli2003

@github-actions
Copy link
Contributor

github-actions bot commented Aug 12, 2022

Preview URLs

Flaws

None! 🎉

External URLs

URL: /en-US/docs/Learn/MathML
Title: Writing mathematics with MathML
on GitHub


URL: /en-US/docs/Learn/MathML/First_steps
Title: MathML first steps overview
on GitHub


URL: /en-US/docs/Learn/MathML/First_steps/Tables
Title: MathML tables
on GitHub


URL: /en-US/docs/Learn/MathML/First_steps/Getting_started
Title: Getting started with MathML
on GitHub

No new external URLs


URL: /en-US/docs/Learn/MathML/First_steps/Scripts
Title: MathML scripted elements
on GitHub

No new external URLs


URL: /en-US/docs/Learn/MathML/First_steps/Text_containers
Title: MathML Text Containers
on GitHub


URL: /en-US/docs/Learn/MathML/First_steps/Fractions_and_roots
Title: MathML fractions and roots
on GitHub


URL: /en-US/docs/Learn/MathML/First_steps/Three_famous_mathematical_formulas
Title: Three famous mathematical formulas
on GitHub

(this comment was updated 2022-09-03 05:35:19.799760)

@Josh-Cena
Copy link
Member

Josh-Cena commented Aug 13, 2022

@fred-wang Thank you so much for this PR! I'm excited. I've run the formatter on these files. Some general points:

  • _ for italic and - for bullet points
  • The style guide says no typography in headings—not even inline code (yeah...)
  • The prose should not be wrapped. Some may do a line break after every full stop—but we never break within a sentence.

The content is great. I learned a lot.

@fred-wang
Copy link
Contributor Author

Thanks @Josh-Cena ! One silly question: how I can run the formatter myself?

@Josh-Cena
Copy link
Member

Josh-Cena commented Aug 13, 2022

I don't think we have tooling in the repo itself yet. I'm using Prettier—you can run npm i -g prettier, and then prettier -w files/en-us/learn/mathml/. Or if you are using VS Code, you can also right click and select "format document". Prettier by default doesn't cancel prose wrapping, so if you want to collapse wrapped prose, you have to pass prettier -w files/en-us/learn/mathml/ --prose-wrap never. But don't worry about formatting too much in general.

… math typesetting, but not mentioned in MathML and confusing with MathML display attribute CSS block/inline. Intead just say whether the <math> has a display="block" attribute or not. Also add an initial note about CSS math-style.
@fred-wang
Copy link
Contributor Author

@bkardell mentioned that using "display mode" (which is a LaTeX term) is a bit confusing since in CSS you have a property called display and it has inline|block, and even MathML Core has the display attribute which is inline|block and not inline|display. So I tweaked the text to not use inline/display modes.

@fred-wang
Copy link
Contributor Author

An additional question / remark that is recurrent for MathML articles: the content does not seem to show up in the sidebar. Not sure what is missing to make that happen.

@Rumyra
Copy link
Collaborator

Rumyra commented Aug 16, 2022

Hi @fred-wang - the {{LearnSidebar}} which these pages use is here: https://github.com/mdn/yari/blob/main/kumascript/macros/LearnSidebar.ejs

It can be updated with these pages once they are merged. Maybe between Accessibility and Tools & Testing?

@bkardell
Copy link

bkardell commented Sep 2, 2022

I also left some review comments - most of them very minor and probably even debtable/opinionated. Other than that, lgtm!

@fred-wang fred-wang requested review from Rumyra and bkardell and removed request for Josh-Cena, Rumyra and bkardell September 3, 2022 05:39
@fred-wang
Copy link
Contributor Author

@bkardell @Rumyra Thanks for your feedback. I believe I've addressed all (most?) of them. Please take a look again, thanks!

@fred-wang
Copy link
Contributor Author

Thanks @teoli2003

It seems this is still blocked on @Rumyra's approval. I believe the only change not address is the question about the copyright, which I explained is not a concern.

@Rumyra Rumyra merged commit 84c6561 into mdn:main Sep 5, 2022
@fred-wang fred-wang deleted the learn-mathml branch September 5, 2022 11:29
fred-wang added a commit to fred-wang/yari that referenced this pull request Sep 6, 2022
fred-wang added a commit to fred-wang/yari that referenced this pull request Sep 6, 2022
fred-wang added a commit to fred-wang/yari that referenced this pull request Sep 6, 2022
@caugner
Copy link
Contributor

caugner commented Sep 6, 2022

@fred-wang FYI The MathML tutorial is not mentioned in the Topics covered section of the Learn web development page yet.

The Web performance guide, on the other hand, is listed there but not yet in the sidebar.

caugner pushed a commit to mdn/yari that referenced this pull request Sep 6, 2022
@fred-wang
Copy link
Contributor Author

@caugner Thanks, will check that.

@fred-wang
Copy link
Contributor Author

I opened #20349

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Learn Learning area docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants