The english wikipedia uses 118% for math fonts.
https://en.wikipedia.org/w/index.php?title=MediaWiki:Common.css&diff=695686143&oldid=691110490
Also the german community voted for a bigger font size for math.
https://de.wikipedia.org/wiki/Wikipedia:Umfragen/Technische_W%C3%BCnsche_2015/Topw%C3%BCnsche#Schriftgr.C3.B6.C3.9Fe_mathematischer_Formeln_vereinheitlichen_.5BUmfrage_2015.5D
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Increase font size for MathML | mediawiki/extensions/Math | master | +2 -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T96152 Problems with Math in section titles | |||
Open | None | T28213 Strip marker (UNIQ / QINU) issues (tracking) | |||
Open | None | T94344 Section anchor depends on the rendering mode | |||
Declined | Physikerwelt | T109195 Install texlive-extra-utils on mw appservers | |||
Duplicate | None | T129107 Change png format for mathematical formulae to be more accessible | |||
Duplicate | None | T131190 Set MathML / SVG as the default rendering mode on de.wikibooks.org | |||
Resolved | • mobrovac | T131177 Enable MathML by default | |||
Resolved | Physikerwelt | T78046 Implement a single math rendering mode that works across all devices (MathML / SVG using mathoid) | |||
Resolved | • Lea_WMDE | T142493 Unify the font size of mathematic formulas (#4) | |||
Resolved | Physikerwelt | T132607 Increase font size for MathML |
Event Timeline
Change 283236 had a related patch set uploaded (by Physikerwelt):
Increase font size for MathML
Note that this should not be needed if the math font style is consistent
with the one of the text font (e.g. Latin Modern with Latin Modern
Math). The percent is a bit arbitrary and won't work for everybody.
Unfortunately very few standard fonts have a math companion and few math
fonts are available on OS at the moment...
@fredw You are certainly right. However, this default seems to look better for most peole. Can you suggest an alternative method, that has the same for lets's say "standard users", but does not disturb "advanced users" that have set up their fonts correctly.
+1 to what @fredw said. Perhaps a better solution would be for the font size to be configurable per-wiki, with the default being 100%. IMHO forcing a certain size on everybody can only lead to bike-shedding and disagreements.
I don't think this really blocks T78046 - I see the font size as an added value. Also, a corollary of the above paragraph is that determining the exact font size for each wiki by each community will take some time.
As of https://de.wikipedia.org/wiki/Wikipedia:Umfragen/Technische_W%C3%BCnsche_2015/Topw%C3%BCnsche#Schriftgr.C3.B6.C3.9Fe_mathematischer_Formeln_vereinheitlichen_.5BUmfrage_2015.5D
this was seen as subtask of T78046
Just now I updated the wikipage so that this does not cause confusion.
Ok. Maybe there should be a guide for people how have permission to edit the Common.css how to change the font size.
Change 283236 abandoned by Physikerwelt:
Increase font size for MathML
Reason:
Configure in Common.css on individual wikis
The wish the German community voted for was for having similar font-sizes for different rendering methods (HTML, PNG, SVG, MathML). Does someone have a suggestion how to get there using the Common.css?
On
https://de.wikipedia.org/wiki/MediaWiki_Diskussion:Common.css#Schriftgr.C3.B6.C3.9Fe_f.C3.BCr_MathML,
there is a reference to
https://dxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js
and to the x-math properties.
More explanations:
- The Firefox user agent stylesheet
https://dxr.mozilla.org/mozilla-central/source/layout/mathml/mathml.css
sets the math text to "serif" by default.
- font.name.serif.x-math indicates the default font to use for the
generic "serif" font-family on the math element, which is "Latin Modern
Math".
- font.name-list.serif.x-math|| indicates a list of fallback math fonts.
Note that you can configure these families from the font preference
menu. Go to edit -> preferences -> content -> fonts & colors -> advanced
-> fonts for "Mathematics". (there is also a "hidden" menu in about:config)
However, Mediwiki's stylesheet changes the font-family on the math
element to some list of math fonts. So maybe we should now keep the
default user agent stylesheet value instead. Firefox users could them
just configure their math font with the font menu.
@fredw, the current release version (45) still uses the internal font stack, which is why I find it odd we override it in the first place. But if the internal stack is removed, we may as well leave it.
I choose 118% for HTML math based on the most common fonts being used: Arial and Times New Roman. At 118%, their x-height matches. This in no way will guarantee matching sizes when different fonts are used, but it is the closest match for all. With MathML, different font come into play, and without know what fonts are actually being used, there is not much sense picking a size. For now (on enwiki), 118% seems to work well given the current fonts (Arial/Cambria) on Windows.
Le 24/04/2016 20:32, Edokter a écrit :
@fredw, the current release version (45) still uses the internal font stack, which is why I find it odd we override it in the first place. But if the internal stack is removed, we may as well leave it.
I think the rule was added in MediaWiki before
https://bugzilla.mozilla.org/show_bug.cgi?id=947654 was fixed. The
internal stack is unlikely to be removed soon (except if in the very
long term all text fonts get a math companion and then Gecko can switch
to math font "automatically").
So it seems at the moment that the only reason we override font-family
in MediaWiki is to provide the LatinModernWOFF fallback on Desktop.
OK. This should be resolved now. http://en.wikipedia.beta.wmflabs.org/wiki/Math displays now SVG by default.
I added a description how to enable MathML on Firefox and InternetExplorer to https://www.mediawiki.org/wiki/Extension:Math#Viewing_math
A follow up task could be to refine that description, but I think we can just modify the Wikipage and no not need to create phabricator tasks for that.