Template talk:Radic
looks bad in MSIE7
[edit]It does not look good in Microsoft Internet Explorer (7). The radical is too big and the overbar is lower than the top of the radical. It would be better if it used CLASS instead of STYLE, making it fully customizable. And NOWRAP is not needed here; it is a property of the entire formula, not just the radical. --Yecril (talk) 08:42, 7 October 2008 (UTC)
- I added
class
as well asstyle
, so that people can customize it but there is still a fall-back style for people who don't (which will likely constitute more than 99.9% of readers). As for nowrap, there might be situations in which it makes sense that the whole formula isn't nowrapped but each radical is, such as √a somewhat long expression + √another long expression = 3√some really extremely long expression + n√another somewhat long expression; and, even when the whole formula is nowrapped, also nowrapping the individual radicals does no harm, either. -- Army1987 (t — c) 12:30, 7 October 2008 (UTC)
Why 130% size on radical character?
[edit]Why does this part of the code exist:
<span class="radic_sign" style="font-size: 130%">
I don't understand why the font size is increased to 130%. It seems to me that this causes the radical symbol to overshoot the bar across the top. When I set it to 100%, it looks much better to me. I would imagine there is some reason for this, if anybody knows and could explain.
Ben Boldt (talk) 16:41, 26 January 2009 (UTC)
- On my browser, at 100% the radical sign would be too small and not connect with the bar. I'll try to take a look at the template with several different browsers to attempt a compromise; for now I'm just going to remove the
font-size: 130%
per the KISS principle. -- Army1987 – Deeds, not words. 10:20, 27 January 2009 (UTC)
- Thanks, the current revision looks great in Safari and FireFox in Mac OS X. Ben Boldt (talk) 23:24, 27 January 2009 (UTC)
Test
[edit]A) Using border-top:thin solid
:
4√1 + x2
B) Using text-decoration:overline
(through {{overline}}):
4√1 + x2
My observation: A looks slightly better in Firefox and Chrome, and much better in MSIE 8 (overline is broken in B). GregorB (talk) 13:01, 4 April 2009 (UTC)
About the lack of a consensus in using the {{math}}
template for all HTML+CSS inline math formulae
[edit]I had updated the /doc
template to incite people to consistently use the {{math}}
template for HTML+CSS inline math formulae. It was reverted with the comment "Needs consensus." With the {{math}}
template, the mathematical formulae render in a more appropriate font. Is there an issue (e.g. is it taxing the server?) in using the {{math}}
template for all HTML+CSS inline math formulae? — TentaclesTalk or ✉ mailto:Tentacles 23:00, 23 March 2016 (UTC)
If I only had added sections "With {{math}}
" and "Without {{math}}
" for the examples, while abstaining from any recommendation, would you have approved the edit? — TentaclesTalk or ✉ mailto:Tentacles 00:03, 24 March 2016 (UTC)
- Within the math wikiproject, there is no consensus on how to display inline math, so the use of {{math}} (as much as I would love to) cannot be 'recommended' as such. It depends on article editors on wether to use it or not.
-- [[User:Edokter]] {{talk}}
12:03, 24 March 2016 (UTC)
- I started a discussion about the lack of consensus on how to display inline math on Wikipedia talk:WikiProject Mathematics/Typography#Consequences of a lack of consensus concerning inline text style mathematical formulae. — TentaclesTalk or ✉ mailto:Tentacles 19:15, 26 March 2016 (UTC)
Appearance again
[edit]I'm a CSS novice, but:
- This is √3 from the current template.
- This is √3 from an improved version, I hope.
I recognize the fractional pixels aren't significant at normal res, but some might magnify their screens (use Ctrl-+ in most browsers to see the effect). Also, I'd like to be able to reduce the padding on both sides by about a pixel each to make it appear more consistent with the text around it, if someone can suggest how.
Thoughts? (backlink to this section:) —[AlanM1(talk)]— 20:01, 29 September 2019 (UTC)
- Unfortunately, your suggested version looks fairly unreadable for me. The surd part is too large, and the horizontal bar winds up below the top of it and crossing through it. I don't know this stuff very well, but I have noticed that it doesn't render as well on my tablet (running Chrome, even though I'm reading WP in desktop mode), so my first guess is that maybe you're trying to over-correct for that, and it's winding up looking worse on regular desktop displays. –Deacon Vorbis (carbon • videos) 23:12, 3 October 2019 (UTC)
- By the way, here's a screenshot of a highly zoomed in version for me (using Chrome on Windows). –Deacon Vorbis (carbon • videos) 23:29, 3 October 2019 (UTC)
- I see roughly the same thing as your screenshot (on Chrome, under OS X, using the Monobook skin). The "improved" version is unreadable and bad. —David Eppstein (talk) 23:32, 3 October 2019 (UTC) PS it looks the same (equally bad) on Safari not-logged-in. —David Eppstein (talk) 06:20, 4 October 2019 (UTC)
- By the way, here's a screenshot of a highly zoomed in version for me (using Chrome on Windows). –Deacon Vorbis (carbon • videos) 23:29, 3 October 2019 (UTC)
- The radic version looks OK, if not pretty. The "improved" version has a large surd cutting through the 3 and is unreadable. --
{{u|Mark viking}} {Talk}
23:17, 3 October 2019 (UTC) - For me, the current template shows a slight gap between √ and ¯. (It would be perfect if √ continued a little higher.) The improved version has ¯ about 0.5 mm below the top of √. (It would be perfect if the top of √ were truncated.) I see the same in the default view when logged out. I run Firefox 69.0.1 on Ubuntu 16.04; it seems from other comments above that other browsers differ. Certes (talk) 23:19, 3 October 2019 (UTC)
- Thanks for all the input – I'm glad I looked further for comment. Apparently the size of the √ varies among fonts. This is a snap of how it looks on my Firefox browser on Windows desktop, using Microsoft NeoGothic 17pt as my default sans font (for reasons I don't remember). I was trying to get the top line to meet the √ (which others have commented on). I wonder if there's a solution in forcing a particular font, though I'm guessing that's less than desirable. Any other ideas? —[AlanM1(talk)]— 19:03, 4 October 2019 (UTC)
- The size and shape of a radical sign will change with the font and formula. People have tried using CSS to implement such. For instance, this stackoverflow question may have some good ideas, but is perhaps more elaborate than you want. --
{{u|Mark viking}} {Talk}
19:27, 4 October 2019 (UTC)- (ec) This is √3 using font-family:Courier; font-size:150%; and some positioning tweaks. Is it reasonable to assume Courier is available? It seems I might need to factor in the size of the font used to render the "3", though, too. I'll look at the stackoverflow link – thanks. —[AlanM1(talk)]— 19:50, 4 October 2019 (UTC)
- The size and shape of a radical sign will change with the font and formula. People have tried using CSS to implement such. For instance, this stackoverflow question may have some good ideas, but is perhaps more elaborate than you want. --
- Thanks for all the input – I'm glad I looked further for comment. Apparently the size of the √ varies among fonts. This is a snap of how it looks on my Firefox browser on Windows desktop, using Microsoft NeoGothic 17pt as my default sans font (for reasons I don't remember). I was trying to get the top line to meet the √ (which others have commented on). I wonder if there's a solution in forcing a particular font, though I'm guessing that's less than desirable. Any other ideas? —[AlanM1(talk)]— 19:03, 4 October 2019 (UTC)
- @AlanM1: I don't think it is sufficiently cross-browser compatible. See the image – this is what it looks like on laptop in MSIE11 in Monobook skin. --CiaPan (talk) 17:09, 13 October 2019 (UTC)
For nested radicals / tall radicands
[edit]I just wanted to note that I made a version of this Template at {{Radic2}} which accepts a size parameter for tall radicals. For example:
{{radic2|size=6|{{radic2|size=3|5+3{{radic2|4|3}}|3}}+{{radic2|size=3|2+3{{radic2|4|3}}|3}}}}
becomes
{{radic2|size=6|{{radic2|size=3|5+3{{radic2|4|3}}|3}}+{{radic2|size=3|2+3{{radic2|4|3}}|3}}}}.
{{radic2|size=3|{{radic2|size=2|5+3{{radic2|4}}}}+{{radic2|size=2|2+3{{radic2|4}}}}}}
becomes {{radic2|size=2|{{radic2|size=1|5+3{{radic2|4}}}}+{{radic2|size=1|2+3{{radic2|4}}}}}}.
Cheers, Ovinus (talk) 03:56, 5 September 2020 (UTC)
Improving appearance
[edit]Every time I see this template used in articles, it looks awful; the diagonal and horizontal lines just don't quite connect. I don't think there's a good way to get this pixel-perfect across all browsers using CSS. The math rendering engine solves exactly this problem; it doesn't seem like "overkill" compared to a solution that doesn't work or has to do extreme CSS gymnastics. I think we should just swap out the contents for a call using <math>...</math>
.
- Existing: √7, 4√3
- Proposed: ,
-- Beland (talk) 02:31, 21 September 2020 (UTC)
- No, of course not. Switching styles in the middle of a formula is rather jarring. It's also not going to work for most things inside the radical. For example:
- With
{{math}}
: a + = 5 - Without: a + = 5
- With
- –Deacon Vorbis (carbon • videos) 03:10, 21 September 2020 (UTC)
- I agree; formulas should either use
<math>...</math>
end-to-end or not at all. If this template is being used inside larger formulas, they'd have to be converted to use<math>...</math>
manually. It looks like (without the italics markup) works fine, so we'd have to convert instances of things like manually. Manual conversion is certainly feasible, as there are only about 1300 uses of this template. (And I'd be happy to do it.) -- Beland (talk) 14:06, 21 September 2020 (UTC)- @Beland: This template is a reasonable compromise with how we write up formulas here. A mass change of all 1300 uses would be inappropriate, and would at the very least need a pretty strong consensus – from more than the few people that are watching this template. Also, please just delete the draft you proposed; there's no way it can possibly be made to work correctly. –Deacon Vorbis (carbon • videos) 14:35, 21 September 2020 (UTC)
- Given the failure of the template to render the notation without holes that look broken or at least unprofessional, I can't say it's a compromise I support. I'll ask for more opinions. I'd rather not delete the proposed replacement, since other editors might prefer it, and in fairness should have the opportunity to examine it. It could work; it's just a question of what cases it covers, and it's intended only to handle the simplest. If we get consensus to convert these uses to
<math>...</math>
rendering, would you prefer to simply delete this template and put the<math>...</math>
syntax in articles directly? -- Beland (talk) 20:08, 21 September 2020 (UTC)- There's no way what you're trying to do could be made to work as a drop-in replacement for what we have now. Please either just delete it or at least move it to your userspace to save everyone the hassle of a TfD. At the very least, the current version needs to be kept for image captions because the Media Viewer doesn't display stuff inside
<math>...</math>
, and it's best to avoid using it there whenever it's reasonable to do so. But more than that, as long as we've got a somewhat mixed bag of math formatting, this is a reasonable thing to have and use. Going after this for slight aesthetic shortcomings is just a waste of time. –Deacon Vorbis (carbon • videos) 21:01, 21 September 2020 (UTC)- Right, which is why I'm no longer proposing it for use as a drop-in replacement. Is there a Mediawiki bug filed on the Media Viewer-Math Extension conflict? Until that's fixed, it seems like the easiest way to fix the broken overbar in as many places as possible is to manually replace non-caption uses of this template (and raw √ + {{overline}}, of which I see about 100 in the latest database dump) with
<math>...</math>
markup (of which I see over 67,000 uses with sqrt in the latest dump). -- Beland (talk) 01:40, 22 September 2020 (UTC)- It's not broken and it doesn't need to be fixed. I don't know how many different ways I can say this. Please just let it go already. (On a side note, I attempted to fix the plain use of the surd character; I must have missed some, but I'll take another look to clear those out). –Deacon Vorbis (carbon • videos) 02:15, 22 September 2020 (UTC)
- While I respect the opinion that it doesn't need to be fixed, it's literally broken in the sense that there's a hole in the line. As you rightly say, few people are watching this page, so to get a better sense of consensus on this question I started a thread at Wikipedia_talk:WikiProject_Mathematics#Improving_rendering_of_radical_symbol. -- Beland (talk) 17:17, 22 September 2020 (UTC)
- It's not broken and it doesn't need to be fixed. I don't know how many different ways I can say this. Please just let it go already. (On a side note, I attempted to fix the plain use of the surd character; I must have missed some, but I'll take another look to clear those out). –Deacon Vorbis (carbon • videos) 02:15, 22 September 2020 (UTC)
- Right, which is why I'm no longer proposing it for use as a drop-in replacement. Is there a Mediawiki bug filed on the Media Viewer-Math Extension conflict? Until that's fixed, it seems like the easiest way to fix the broken overbar in as many places as possible is to manually replace non-caption uses of this template (and raw √ + {{overline}}, of which I see about 100 in the latest database dump) with
- There's no way what you're trying to do could be made to work as a drop-in replacement for what we have now. Please either just delete it or at least move it to your userspace to save everyone the hassle of a TfD. At the very least, the current version needs to be kept for image captions because the Media Viewer doesn't display stuff inside
- Given the failure of the template to render the notation without holes that look broken or at least unprofessional, I can't say it's a compromise I support. I'll ask for more opinions. I'd rather not delete the proposed replacement, since other editors might prefer it, and in fairness should have the opportunity to examine it. It could work; it's just a question of what cases it covers, and it's intended only to handle the simplest. If we get consensus to convert these uses to
- @Beland: This template is a reasonable compromise with how we write up formulas here. A mass change of all 1300 uses would be inappropriate, and would at the very least need a pretty strong consensus – from more than the few people that are watching this template. Also, please just delete the draft you proposed; there's no way it can possibly be made to work correctly. –Deacon Vorbis (carbon • videos) 14:35, 21 September 2020 (UTC)
- I agree; formulas should either use
FTR, I just reported the incompatibility between <math>...</math>
and Media Viewer at [1]. -- Beland (talk) 17:52, 22 September 2020 (UTC)
Request for comments
[edit]A Wikipedia:Requests for comment has been opened relating to this template. You can find the discussion at Wikipedia talk:WikiProject Mathematics#Radical RFC comments.--Salix alba (talk): 08:07, 24 September 2020 (UTC)
- The result was MOS:RADICAL, which deprecates this template. -- Beland (talk) 01:15, 21 November 2020 (UTC)