Template talk:Mvar
Use CSS for italic instead of <var>
[edit]This stuff is unsatisfactory because an important distinction between MathJax_Main and MathJax_Math, as can be seen at User:Incnis Mrsi/common.css, becomes broken (without an easy fix). MathJax_Main is unsuitable for {{mvar}} if only because of problems with the prime symbol. Compare:
- (<math>; possibly MathJax)
- [ q′ ] (explicitly specified MathJax_Main)
On the other hand, one may not use MathJax_Math for class="texhtml" because it would imply corrupted notations such as sin, cos, log etc. Incnis Mrsi (talk) 18:02, 11 November 2013 (UTC)
- I opted for CSS because MathJax also uses the same inline CSS to render italisized variables. Any browser should render both methods the same way. — Edokter (talk) — 18:59, 11 November 2013 (UTC)
- The same inline CSS as which? And what means “the same”: literally with same words, or similar in some (unspecified) aspect? Did you actually look on my personal CSS? BTW there is no such word as “itlalisized”. Incnis Mrsi (talk) 20:52, 11 November 2013 (UTC) or “italisized”. Incnis Mrsi (talk) 07:26, 12 November 2013 (UTC)
- MathJax use
font-style: italic;
for italics and vars, just as {mvar} does now. There should be no difference in appearance between using CSS and<var>
. I don't understand what exactly is broken? — Edokter (talk) — 21:04, 11 November 2013 (UTC) - Oh, I see you have a different font for plain texhtml and
<var>
/<i>
. I can't see the effects as I don't have the MathJax fonts. — Edokter (talk) — 21:14, 11 November 2013 (UTC)- You can see the effects. You "have" the MathJax fonts whenever MathJax is activated. Incnis Mrsi (talk) 07:26, 12 November 2013 (UTC)
- Except I have the STIX fonts installed. — Edokter (talk) — 17:02, 12 November 2013 (UTC)
- You can see the effects. You "have" the MathJax fonts whenever MathJax is activated. Incnis Mrsi (talk) 07:26, 12 November 2013 (UTC)
- Getting back to your original comment; mvar should only contain variables and not any ohter symbols. Use {{math}} for those and you CSS will continue to work. — Edokter (talk) — 21:19, 11 November 2013 (UTC)
- When I say α + κ, it is rendered with two <i> elements. With “my” fonts it is equivalent to α + κ, i.e. these variables are in MathJax_Math. When I refer to variables separately with your version of {{mvar}}, it is nothing but a <span class="texhtml"> tag with additional style parameter, i.e. with “my” fonts it is equivalent to α, κ – italicized MathJax_Main. Where it is equivalent to MathJax_Math, such as for Latin letters, both instances render identically and you made a solution. But where it is not equivalent to MathJax_Math, such as for Greek letters, {{math|''…''}} and “your” {{mvar}} render differently and your solution produces a difference, sometimes a perceivable one, where it IMHO should not appear. Greek letters are extensively used for variables in math. Note that “mvar” reads for “mathematical variable”. Do you understand at last? Incnis Mrsi (talk) 07:56, 12 November 2013 (UTC)
- Yes, I understand. Are these perceivable differences detrimental? I also wonder if Greek letters should be italicized at all. — Edokter (talk) — 17:02, 12 November 2013 (UTC)
- When I say α + κ, it is rendered with two <i> elements. With “my” fonts it is equivalent to α + κ, i.e. these variables are in MathJax_Math. When I refer to variables separately with your version of {{mvar}}, it is nothing but a <span class="texhtml"> tag with additional style parameter, i.e. with “my” fonts it is equivalent to α, κ – italicized MathJax_Main. Where it is equivalent to MathJax_Math, such as for Latin letters, both instances render identically and you made a solution. But where it is not equivalent to MathJax_Math, such as for Greek letters, {{math|''…''}} and “your” {{mvar}} render differently and your solution produces a difference, sometimes a perceivable one, where it IMHO should not appear. Greek letters are extensively used for variables in math. Note that “mvar” reads for “mathematical variable”. Do you understand at last? Incnis Mrsi (talk) 07:56, 12 November 2013 (UTC)
- MathJax use
- The same inline CSS as which? And what means “the same”: literally with same words, or similar in some (unspecified) aspect? Did you actually look on my personal CSS? BTW there is no such word as “itlalisized”. Incnis Mrsi (talk) 20:52, 11 November 2013 (UTC) or “italisized”. Incnis Mrsi (talk) 07:26, 12 November 2013 (UTC)
<var> and common.css
[edit]If I understood correctly, initial objection against <var> was its unpredictable rendering in browsers. Why not to add
span.texhtml var { font-style:italic; }
to MediaWiki:common.css and undo Edokter’s change, indeed? It would not interfere with good CSS (at least it will be overrideable), but will provide a fix for those unhappy users who are not able no overcome design restrictions of this amateur site. Incnis Mrsi (talk) 08:50, 19 November 2013 (UTC)
- I never said that. The reason I changed it is to make rendering consistent between {{math}}, {{mvar}} and MathJax (who also use CSS instead of
<var>
). — Edokter (talk) — 20:25, 19 November 2013 (UTC)- MathJax uses correct fonts (see above), whereas {{math|''var''}} uses <i>. If you restore the CSS compatibility in any way, I’ll stop quarrelling. Did anybody ask you to “fix” {{mvar}}? Indeed, you fixed a working system and introduced a bug. I could simply undo it but I have an aversion to this way, and the common.css solution requires a sysop. Now you merely waste my time instead of helping to rectify the situation. Incnis Mrsi (talk) 08:18, 20 November 2013 (UTC)
- I added a classname. That should solve it (without having to use <var> in the template. — Edokter (talk) — 19:33, 20 November 2013 (UTC)
- MathJax uses correct fonts (see above), whereas {{math|''var''}} uses <i>. If you restore the CSS compatibility in any way, I’ll stop quarrelling. Did anybody ask you to “fix” {{mvar}}? Indeed, you fixed a working system and introduced a bug. I could simply undo it but I have an aversion to this way, and the common.css solution requires a sysop. Now you merely waste my time instead of helping to rectify the situation. Incnis Mrsi (talk) 08:18, 20 November 2013 (UTC)
Disclaimer
[edit]![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could someone add "The use of this template is controversial. Do not use the template unless establishing the consensus to do so at the talkpage."? Thanks. -- Taku (talk) 23:39, 21 April 2015 (UTC)
Not done: The documentation subpage is not protected, so you can do this yourself. Alakzi (talk) 23:51, 21 April 2015 (UTC)
- Why would its use be controversial? And who has decided so?
-- [[User:Edokter]] {{talk}}
07:31, 22 April 2015 (UTC)- Because it is? It is important to warn the users the template is experimental and its deployment would cause resistance. -- Taku (talk) 18:42, 23 April 2015 (UTC)
- @Taku: Where has its use been controversial? Alakzi (talk) 18:47, 23 April 2015 (UTC)
- Wikipedia:WikiProject Mathematics? Some editors (including myself) don't think it looks good to mix fonts for text and math formulae. It's subjective but at least it just doesn't look formulae in this temple on my screen. I get the argument for mixing but, well, that's one dispute. Another is to introduce an extra syntax that editors need to learn. It's easy enough to learn wiki markups like "double prime" means italics. But it is very important to keep this simple: one of the reasons cited for the barrier for becoming an editor is a need for learning syntaxes. We don't want math editors to learn to use an extra template like this. -- Taku (talk) 19:16, 23 April 2015 (UTC)
- Note that {{mvar}} is not for formulas, but for single variables. Also, any opinion about the aesthetics of both templates do not make them "controversial". The only thing that could potentially be regarded as controversial is mass-conversion form one format to the other. Small changes and normal use is definitely not controversial, and it is not your decision to mark them as such. {{Math}} takes regular HTML, so there is nothing extra to learn; if anything, it enables new editors who don't know Latex to use formulas.
-- [[User:Edokter]] {{talk}}
19:46, 23 April 2015 (UTC)
- Note that {{mvar}} is not for formulas, but for single variables. Also, any opinion about the aesthetics of both templates do not make them "controversial". The only thing that could potentially be regarded as controversial is mass-conversion form one format to the other. Small changes and normal use is definitely not controversial, and it is not your decision to mark them as such. {{Math}} takes regular HTML, so there is nothing extra to learn; if anything, it enables new editors who don't know Latex to use formulas.
- Wikipedia:WikiProject Mathematics? Some editors (including myself) don't think it looks good to mix fonts for text and math formulae. It's subjective but at least it just doesn't look formulae in this temple on my screen. I get the argument for mixing but, well, that's one dispute. Another is to introduce an extra syntax that editors need to learn. It's easy enough to learn wiki markups like "double prime" means italics. But it is very important to keep this simple: one of the reasons cited for the barrier for becoming an editor is a need for learning syntaxes. We don't want math editors to learn to use an extra template like this. -- Taku (talk) 19:16, 23 April 2015 (UTC)
- @Taku: Where has its use been controversial? Alakzi (talk) 18:47, 23 April 2015 (UTC)
- Because it is? It is important to warn the users the template is experimental and its deployment would cause resistance. -- Taku (talk) 18:42, 23 April 2015 (UTC)
It is one thing to argue the template is not problematic (I don't agree, but you're entitled to your opinion). It is another thing to argue that no one disagrees with you. No, actually I think it is a bad very idea to use template for just one single variable. It means you have to use some other templates for other purposes. Remember editors still need to know about <math>. It is so much simpler not use any template at all for the purpose of math formatting. In my view, you're underestimating the complexity caused by the use of templates. Templates are exactly what wikitexts look like program codes. In any case, what I don't understand is why I'm not even allowed to disagree. -- Taku (talk) 20:50, 23 April 2015 (UTC)
- You are allowed to disagree. You are not allowed to force you opinion though the use of documentation pages. I have reported you for edit warring.
-- [[User:Edokter]] {{talk}}
20:55, 23 April 2015 (UTC) - I want evidence that this is regarded controversial; provide links to any discussion with consensus to declare this controversial. "I don't like it" is NOT the same as controversial.
-- [[User:Edokter]] {{talk}}
08:12, 24 April 2015 (UTC)- Certainly. For instance, do the Google search with the keyword "site:https://wiki.riteme.site/wiki/Wikipedia_talk:WikiProject_Mathematics mvar". -- Taku (talk) 21:59, 24 April 2015 (UTC)
- See in particular https://wiki.riteme.site/wiki/Wikipedia_talk:WikiProject_Mathematics/Archive/2013/Jan#Using_.3Cblockquote.3E_to_delineate_theorems The long-term goal is to do away with the template like this. It is important to inform the users of the template about this. If you don't like the word "controversial", we can use some less provocative word. But not noting a problem is unhelpful to the users. -- Taku (talk) 22:04, 24 April 2015 (UTC)
- The long term goal is to switch to MathJax, but that is still far away, as most readers have no option to select renderes. Nothing in that discussion proposes "doing away" with math templates. The only consensus it produced is to discourage wholesale-changes from one format to another. There is nothing discouraging its use.
-- [[User:Edokter]] {{talk}}
22:55, 24 April 2015 (UTC)
- The long term goal is to switch to MathJax, but that is still far away, as most readers have no option to select renderes. Nothing in that discussion proposes "doing away" with math templates. The only consensus it produced is to discourage wholesale-changes from one format to another. There is nothing discouraging its use.
- Yes, to switch to MathJax and not use templates like this one. I also don't propose that we should discourage the use. It is however unhelpful not to inform the users of the template about the issue. For example, "mvar" puts a variable in a font different from the usual one. To many, including myself, this is viewed as a deficiency/bug. -- Taku (talk) 17:41, 25 April 2015 (UTC)
- That is this template's documented purpose ("formats as mathematics"). How can you regards that as a bug?
-- [[User:Edokter]] {{talk}}
23:24, 25 April 2015 (UTC)- Ok, so I wasn't as clear as I should have been at the beginning :) That's exactly my point: the template is broken and the use of it constitutes a vandalism in my view and apparent in the view of some other editors. It is helpful to warn the users about this issue. Right now, the template looks too innocent and unsuspected editors might accidentally use it. -- Taku (talk) 01:05, 26 April 2015 (UTC)
- Your opinion has been noted. We are still not going to put up a "warning" or any other message that reflect a specific editor viewpoint. Go establish a consensus at WT:MATH first to determine the status of this (and other) templates.
-- [[User:Edokter]] {{talk}}
08:39, 26 April 2015 (UTC) - If your intention is to inform editors about math templates, see Wikipedia:Rendering math.
-- [[User:Edokter]] {{talk}}
08:43, 26 April 2015 (UTC)
- Your opinion has been noted. We are still not going to put up a "warning" or any other message that reflect a specific editor viewpoint. Go establish a consensus at WT:MATH first to determine the status of this (and other) templates.
- Ok, so I wasn't as clear as I should have been at the beginning :) That's exactly my point: the template is broken and the use of it constitutes a vandalism in my view and apparent in the view of some other editors. It is helpful to warn the users about this issue. Right now, the template looks too innocent and unsuspected editors might accidentally use it. -- Taku (talk) 01:05, 26 April 2015 (UTC)
- That is this template's documented purpose ("formats as mathematics"). How can you regards that as a bug?
- Yes, to switch to MathJax and not use templates like this one. I also don't propose that we should discourage the use. It is however unhelpful not to inform the users of the template about the issue. For example, "mvar" puts a variable in a font different from the usual one. To many, including myself, this is viewed as a deficiency/bug. -- Taku (talk) 17:41, 25 April 2015 (UTC)
- I will do that (see what other editors' views are). Let me also try this: is there anyway on my end to stop mvar putting variables in a "wrong" font? (wrong in my view). Can you tell what change I need to make to, ah, some style sheet file that is tied to my user account? -- Taku (talk) 12:42, 26 April 2015 (UTC)
- Yes, you can reset the font in your personal CSS. Put this in your common.css:
span.texhtml {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
-- [[User:Edokter]] {{talk}}
13:11, 26 April 2015 (UTC)
- Thank you, it worked like a charm. Can we put an explanation on how to rest the font setting in the template document? I don't think I'm the only one who has the problem with mvar fonts. I get the intention on trying to use a "correct" font for math var. But it's just not working for me (has to do with my browser) and likely for some others. -- Taku (talk) 13:18, 26 April 2015 (UTC)
- That would be outside the scope of any template documentation. There is a real danger of information overload if we provide info on how to reset the effects of all templates; there is always going to be someone who's not happy with a template. Some general information is available at Help:Cascading Style Sheets.
-- [[User:Edokter]] {{talk}}
13:45, 26 April 2015 (UTC)- "It's dangerous" isn't really a good argument for not doing it (unless you're a banker that is). Actually I have a related question: is it possible to typeset
- i.e., bold in the mathbb sense, without <math> but with html or some template? -- Taku (talk) 13:19, 27 April 2015 (UTC)
- Making things too complicated is a real danger.
- If you have the CharInsert gadget enabled, you have a toolbox below the edit window where you can select special characters, Select the 'Math and logic' group and you can select characters like ℂ, ℍ, ℕ, ℙ, ℚ, ℝ and ℤ directly. No template required.
-- [[User:Edokter]] {{talk}}
16:06, 27 April 2015 (UTC)
- "It's dangerous" isn't really a good argument for not doing it (unless you're a banker that is). Actually I have a related question: is it possible to typeset
- That would be outside the scope of any template documentation. There is a real danger of information overload if we provide info on how to reset the effects of all templates; there is always going to be someone who's not happy with a template. Some general information is available at Help:Cascading Style Sheets.
font too large
[edit]The font is slightly too large compared to regular MathML rendering:
For example "Let " vs "Let x ∈ R". The first one (MahML looks better to me. Screenshot) --Physikerwelt (talk) 16:11, 21 November 2015 (UTC)
- The mvar template (or the .texhtml class) is designed to match the fontsize of the running text, which it does, even in your screenshot. MathML actually renders too small. Note that only Firefox supports MathML at this time.
-- [[User:Edokter]] {{talk}}
18:32, 21 November 2015 (UTC)
- For MathML disabled browsers there is a fallback rendering. However, I think it makes most sense to make it look good for MathML in the first place and adjust the fallback according to that reference thereafter. Independent of my subjective feeling the .texhtml class sets the font size to 118%. If there is consensus that the Math should be rendered 18% bigger it's simple to adjust the size of the MathML rendering. In that case this should be done at the same place where .texhtml is defined. One can either change the style of math or mwe-math-mathml-inline if one does not want to adjust the size of the displaystyle. What do you think? --Physikerwelt (talk) 14:26, 22 November 2015 (UTC)
- Sounds like a good idea. Firefox uses its own internal font stack for mathML, based on most common math-capable fonts available on client systems. I want to investigate a little to come up with the best value.
-- [[User:Edokter]] {{talk}}
19:18, 22 November 2015 (UTC)
- Sounds like a good idea. Firefox uses its own internal font stack for mathML, based on most common math-capable fonts available on client systems. I want to investigate a little to come up with the best value.
- @Edokter: Do you have a suggestion? --Physikerwelt (talk) 12:46, 10 December 2015 (UTC)
- Will look at it this weekend.
-- [[User:Edokter]] {{talk}}
17:36, 10 December 2015 (UTC)- Little later then promisedd, but MathML in Firefox should now have the same fontsize as running text (and comparable with the other rendering options).
-- [[User:Edokter]] {{talk}}
21:09, 17 December 2015 (UTC)
- Little later then promisedd, but MathML in Firefox should now have the same fontsize as running text (and comparable with the other rendering options).
- Will look at it this weekend.
- @Edokter: Do you have a suggestion? --Physikerwelt (talk) 12:46, 10 December 2015 (UTC)
Wrong font
[edit]It used to be the case that {{mvar|f}}
was rendered the same as {{math|''f''}}
. But, currently, {{math|''f''}}
results in f , an italic f with a curly tail descending below the baseline, whilst {{mvar|f}}
produces f , a slanted version of sans-serif f, indistinguishable from the output of ''f''
. I use the MonoBook skin and import User:Nageh/mathJax.js. --Lambiam 14:53, 23 December 2017 (UTC)
- Ditto. This font change should not have occurred without some discussion. It must have been a side effect of the last edit
and I'll revert until this is discussed properly.(I can't do that) --Bill Cherowitzo (talk) 00:38, 28 December 2017 (UTC) - Apparently, the problem has now been fixed. --Lambiam 08:59, 28 December 2017 (UTC)
- {{mvar|x}} is supposed to be a shortcut for, and produce exactly the same effect as, {{math|''x''}}. The two templates are intended to be used together in the same articles. The previous change by Izno made that stop working, so I reverted it once I found out what it had done. —David Eppstein (talk) 17:28, 28 December 2017 (UTC)
mvar template displaying variable name with odd line breaks in infobox on mobile
[edit]On my android mobile device, when the mvar template is used in the title of an infobox, there are unnecessary line breaks around the variable, which breaks formatting. See Golden ratio. Can anyone replicate this and figure out how to fix it? It displays perfectly on a computer browser... Willmskinner (talk) 20:04, 27 August 2024 (UTC)