Template talk:Nowrap

message: This template is a replacement for the unsupported nonstandard <nobr> tag. cesarb 19:50, 20 Mar 2005 (UTC)
thread_title:  Replaces &lt;nobr&gt; 

message: Hi everyone. I got tired of handling word wrapping in long link lists, for instance in navigation boxes. So I have made a new template similar to , but that only prevents word wraps in links. That is, it allows wraps between links and in normal text. Thus one single  tag can surround the whole link list instead of having one  tag around each link or using lots of  .
I would like if some expert template editors (preferably with some CSS experience) take a loot at it to see that I didn't miss anything. I think this template might be used a lot once we deploy it.
Oh, I probably should mention that this template will need the addition of one line of CSS code to common.css. So I think this needs to be thoroughly checked and discussed before we deploy it. (And I am not an admin so I can not add that line of code myself.)
--David Göthberg 04:59, 10 August 2007 (UTC)
replies: text: The necessary code was added to common.css some days ago so  is now fully functional. --David Göthberg 14:18, 23 August 2007 (UTC)
thread_title:  Template nowraplinks 

message: 
I suggest the code between the noinclude tags be changed. (Mostly to make the page look better really.) The changes I suggest is using the new small padlock, the new  and the category comment, as recommended in Wikipedia:Template documentation. Here is how the full page code looks with my suggested changes:

<includeonly><span style="white-space:nowrap">{{{1}}}</span></includeonly><noinclude>
{{pp-template|small=yes}}
{{template doc}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>

--David Göthberg 14:31, 23 August 2007 (UTC)
replies: text: Done. --- RockMFR 20:30, 23 August 2007 (UTC)
thread_title:  Change of page code / looks 

message: 17-Dec-2007: The coding currently uses "<includeonly>" which I don't think is needed in a highly size-critical template: the includeonly-tag adds 27 characters, and when the includeonly-tag is omitted, the result just shows "" above the documentation, which is harmless and emphasizes that parameter-1 is required. Also, I recommend using a shorter comment, to reduce Template:Nowrap by 21%, from 185 bytes to 146 bytes:

<span style="white-space:nowrap">{{{1}}}</span><noinclude>
{{documentation}}<!--put categories & interwikis in /doc subpage, only!-->
</noinclude>

I am concerned about the template size, in conjunction with other templates used on a page, because I've hit template-buffer limits when repeated sub-templates contained only 500 characters.  However, I really recommend using " " instead of a template, because " " (used once per wikilink) adds only 6 characters, not 185, and not even 146 characters to each non-wrapped wikilink. Remember, the MediaWiki language version 1.6 treats pages as template-expansion buffers, repeating all template contents as inline text. -Wikid77 (talk) 11:14, 17 December 2007 (UTC)
replies: text: .—Random832 17:23, 17 December 2007 (UTC)
thread_title: Even shorter coding

message: Even if the behaviour of the template is altered as suggested above, there is a difficulty with the way browsers treat this code:
In recent versions of Firefox and IE at least, this code allows breaks to occur between x and TEXT, and between TEXT and y. Since this behaviour is itself unruly, I request that the coding of the template be altered so that a   is substituted for each ordinary space in the enclosed text. This would ensure the desired result. It has the added advantage that multiple ordinary spaces would yield multiple instances of  . Whether or not these are deprecated, they are sometimes convenient and sometimes intended.
These concerns arose out of investigations regarding markup for the hard space. See our draft proposal, which I have just amended in light of the anomalies raised above:
See a full draft of the proposal
 
----
There is active discussion of the proposal at WT:MOS. Template editors will be very welcome there.
– Noetica♬♩ Talk 23:53, 22 January 2008 (UTC)
thread_title:  Problem 2 

message: As a webmaster and Wikipedia editor I have worked a lot with line breaking issues. In the end I created  and  and their helper templates to solve/handle the problems with . I took a look at the suggestion above to use the wikimarkup 34,,kg to mean 34 kg and it seems to me it is a good suggestion.
Of course what really is needed is that the World Wide Web Consortium (W3C) finally accept and standardise the old well working and easy to use HTML markup <nobr> +  + </nobr>. 
--David Göthberg (talk) 09:40, 26 February 2008 (UTC)
thread_title:  <nowiki>{{nowrap}}, {{nowraplinks}} and {{nowrap begin}}</nowiki> 

message: I first rough version of Wikipedia:Line break handling is done. Its a how-to guide about how to handle word wraps (line breaks) at Wikipedia. Take a look and discuss it on its talk page.
--David Göthberg (talk) 21:40, 11 March 2008 (UTC)
thread_title:  Nowrap how-to guide 

message: Hi, this template doesn't seem to be working here: Nitrogen dioxide#Monomer-dimer equilibrium. It simply shows up as . Not sure why the template parameter isn't being substituted; can anybody help?—Tetracube (talk) 19:10, 19 October 2009 (UTC)
replies: text: It's the equal sign, which is not allowed in a parameter. Can be solved by using "1=" before the parameter. This is stated in the templates documentation. −Woodstone (talk) 20:27, 19 October 2009 (UTC)
thread_title:  Template broken? 

message: Hello, ist there a reason to have a space after the j in the dokumentation? 
We saw  but .
May render like this:
:We saw  but800 zebras.
Or like this:
:We saw but 800 zebras.
But not render like this:
:We saw 1 blackrhino but 800 zebras.
--Diwas (talk) 21:07, 25 September 2011 (UTC)
thread_title:  Space in Documentation after j 

message: I see that the following were removed from Template:Nowrap/doc#See also with the edit note "removed links to obsolete methods":
*  – Prevents wraps inside links and only allows wraps between the links and in normal text. Very useful for link lists and easy to use.
*  – Prevents wraps in both text and links. For the trickier wrapping cases when you need full control, for instance in very complex link lists.
Are these really obsolete? The latter is recommended in Wikipedia:Line break handling. Both seem likely to be useful. — Quondumtc 06:03, 7 January 2012 (UTC)
thread_title:  Removed links 

message: Brackets within the Nowrap template, it has been suggested, might be a problem which can be solved by escaping or representing with the HTML character entities & # 91; (minus spaces) for the opening bracket and & # 93; (minus spaces) for the closing bracket. Is that so and, if it is so, should we add it to the template documentation? Nick Levinson (talk) 16:19, 7 August 2012 (UTC)
thread_title:  brackets and escaping 

message: Is there a version of this template that will permit wraps but limit it to a certain number? Like if you want to limit a string of text to being wrapped into only two lines, when window resizing might otherwise force it into three or more lines, and it isn't feasible to manually insert a line break or to use . postdlf (talk) 16:55, 4 April 2015 (UTC)
thread_title:  Wraponce? 

message: This template needs an update to commented text near the bottom.  Please modify it as follows:
* from this:




* to this:




Thank you in advance!  Paine  18:15, 27 November 2015 (UTC)
replies: text: Not done: The only change is to a hidden comment, so it's not critical. Doing this would put 430572 pages in the job queue for nil gain. --Redrose64 (talk) 00:00, 28 November 2015 (UTC)
replies: text: I understand your concern for the queue and servers, Redrose64; however, this is an editor communication that confuses those who read it and then go to the /doc page to find very different interwiki instructions.  It is not 2 or 4 million transclusions, only less than a half-million.  It has to be updated at some point, so why not now?  Paine  01:52, 28 November 2015 (UTC)
replies: text: When was somebody last confused? The last time that anybody added an interlanguage link to the doc page was in , which was a perfectly valid edit made some three months before Wikidata became available. You could update the template sandbox, so that next time an actual change to the template is proposed, they can go through together. --Redrose64 (talk) 09:50, 28 November 2015 (UTC)

text: I made the edit. As the change occurs inside a noinclude block, the job queue should not be affected. Still monitoring though. -- User:Edokter  10:16, 28 November 2015 (UTC)
replies: text: Ah, but it will - when transclusions are processed, the whole template is expanded, and the noinclude block is stripped out after expansion processing is complete. --Redrose64 (talk) 10:23, 28 November 2015 (UTC)
replies: text: That sounds broken... Anyway, the job queue didn't break a sweat. -- User:Edokter  16:22, 28 November 2015 (UTC)
thread_title:  Edit request on 27 November 2015 

message: Not sure what needs tweaking but, on several occasions,  used around an open parenthesis and the subsequent text has been leaving the parenthesis on the first line and only keeping the following text together. Obviously, the parenthesis needs to move with the rest of the text. — LlywelynII 06:20, 19 May 2016 (UTC)
replies: text: I would need an example where this happens. Chrome has a bug where it allows a break before a nested element. -- User:Edokter  07:04, 19 May 2016 (UTC)
thread_title: Hinky

message: In the very first paragraph of Natural logarithm one finds loge x within the nowrap template, and one sees (if one's window geometry is so adjusted) this:
: 
: loge
: x
: 
Obviously that should not happen. Michael Hardy (talk) 17:36, 4 August 2017 (UTC)
replies: text: I don't think there is anything which could be done with this template. It apples the appropriate CSS nowrap style. Browsers are free to interpret that as they see fit. I think in this case having a picture of the rhs make it hard for the browser to format things properly, so the browser takes the least worse option and splits on a space.--Salix alba (talk): 20:03, 4 August 2017 (UTC)

text: which browser?  I don't see this in FF on Linux (as far as I can tell). Frietjes (talk) 20:41, 4 August 2017 (UTC)
replies: text:  As I tried and, frustratingly, failed to explain in the previous section, it fails on mobile and ONLY on mobile - I have confirmed with Chrome and Firefox on Android, and both Firefox and Chromium on Linux, that it happens with the mobile stylesheet and not with the desktop one (Monobook). I believe the class in question doesn't have the proper styles applied to it on the mobile stylesheet. Inspecting the element in desktop Firefox using the mobile stylesheet shows its word-wrap property provided by the content class and set to break-word, and no value for white-space (the computed value is normal). Hairy Dude (talk) 15:23, 12 September 2017 (UTC)
thread_title:  This template fails in [[Natural logarithm]] 

message: I'd like to request that  be added to the template page under <noinclude> tags. There is easy confusion over the intended formatting of the template title, which is, according to the documentation, intended to be  instead of . I had initially confused this as well, myself, simply looking at the title of the template with the first letter capitalised. I had to have a fellow editor () tell me that this is not the actual title of the template. Confusion can easily be prevented by adding a  to force a lowercase first letter in the template's name. – PhilipTerryGraham (talk · contribs · count) 18:11, 11 November 2017 (UTC)
replies: text: Not done: Like article names, template names (without exception) are case-insensitive on the first letter (see H:T#General description, paragraph beginning "How to do it"). It makes no difference at all whether you use  or . --Redrose64 🌹 (talk) 21:36, 11 November 2017 (UTC)
replies: text:  I get that, but people do care about the explicit use of the template’s original name. – PhilipTerryGraham (talk · contribs · count) 23:56, 11 November 2017 (UTC)

text: I've chosen to update the template's documentation page instead, making it clear that both versions of the name can be used. – PhilipTerryGraham (talk · contribs · count) 01:24, 12 November 2017 (UTC)
replies: text:  People shouldn't care about such capitalisation. It makes no difference at all to what is seen when viewing the page. A few years ago, there was a highly-prolific administrator who persistently uppercased the first letter of all template names wherever used in articles; they were frequently asked not to do it but continued to do so. They were eventually taken to the arbitration committee, the outcome of which was that they lost their administrator rights (which have still not been reinstated) and were blocked for a year. Whoever is insisting upon one particular capitalisation should be asked to cease making such changes; if they won't, bring them here. --Redrose64 🌹 (talk) 08:01, 12 November 2017 (UTC)
thread_title:  Edit request on 11 November 2017 

message: Is there a template that has the same function as this one but uses  tags instead of  tags? I ask because editors sometimes use  around list templates like  and its siblings, which causes a Linter error, since div tags are not allowed to be wrapped by span tags. – Jonesey95 (talk) 17:58, 4 December 2018 (UTC)
replies: text: Jonesey95, you _should_ be able to add  or  to the , but that will nowrap the entire thing.  if you just want to nowrap the list items,  should work. it would be good to have , but I don't think that is supported. Frietjes (talk) 21:19, 4 December 2018 (UTC)
replies: text: I've been replacing the  template with (content, including hlist or similar template) (example edit), but a template that does the same thing would be more elegant and probably less prone to error. – Jonesey95 (talk) 21:58, 4 December 2018 (UTC)
replies: text: Jonesey95 I think this is better. Frietjes (talk) 22:52, 4 December 2018 (UTC)
replies: text: It does indeed. I will make a note for future fixes. Thanks. – Jonesey95 (talk) 22:57, 4 December 2018 (UTC)
thread_title:  Is there an equivalent template that uses div tags? 

message: The current wikicode seems to be producing a linter error. The solution, according to mw:Help:Extension:Linter/pwrap-bug-workaround is to add a newline above the initial  tag. Wugapodes [thɑk] [ˈkan.ˌʧɹɪbz] 01:50, 4 May 2019 (UTC)
replies: text: Not done for now: This is an inline template; adding a newline will break that. Please give examples of pages where this linter problem occurs, and a description of how it is manifested. Or at the very least, per WP:TESTCASES, provide sandbox and testcases, and in the latter show that existing uses will not be broken. --Redrose64 🌹 (talk) 20:08, 4 May 2019 (UTC)
replies: text:  See the above section. Use of this template to wrap a  element, and using it in other ways that are incompatible with the wikicode contained in the template, will cause Linter errors. If you provide examples, we can usually recommend a better way to resolve the issue. There are currently no pages listed at Special:LintErrors/pwrap-bug-workaround. – Jonesey95 (talk) 21:31, 5 May 2019 (UTC)
replies: text: Well that's strange, I had seen one in there yesterday but looking now you're right that it's empty. I'm not sure how but regardless it seems resolved. Thanks for the help. Wugapodes [thɑk] [ˈkan.ˌʧɹɪbz] 21:39, 5 May 2019 (UTC)
replies: text: I replace a line break with a space inside a nowrap template. – Jonesey95 (talk) 21:59, 5 May 2019 (UTC)
thread_title:  Edit request 4 May 2019 

message: What is this template for? It creates a fixed width element inside of something that needs to be at the very least editable with break tags to limit width. When images or other graphical elements are too wide, the body text is pinched and unreadable. -ApexUnderground (talk) 19:53, 26 June 2019 (UTC)
replies: text: Presumably by "template topicboxes" you mean infoboxes. Where does it say that  is only intended for use in those? --Redrose64 🌹 (talk) 20:29, 26 June 2019 (UTC)
replies: text: Because it is used for those, and because it doesn't allow for reaking, it presents a problem.-ApexUnderground (talk) 06:42, 27 June 2019 (UTC)
replies: text: Can you point to the article(s) where it is causing a problem? Nardog (talk) 18:03, 27 June 2019 (UTC)
replies: text:  Yes, his issue is with the width of the infobox on Syrian Civil War. – wbm1058 (talk) 03:07, 7 July 2019 (UTC)
replies: text: OP has been blocked as a sock; this thread can just be closed. postdlf (talk) 12:31, 7 July 2019 (UTC)
replies: text: The problem at Syrian Civil War is that the infobox has four columns. Nowrap is involved, but is not the primary cause. --Redrose64 🌹 (talk) 18:25, 7 July 2019 (UTC)
thread_title:  Nowrap makes template topicboxes too wide 

message: I just want to put some nbsp in a div and nowrap is added automatically. This makes the template expansions too big. 217.162.112.133 (talk) 03:52, 24 September 2019 (UTC)
replies: text: Which page is this on? --Redrose64 🌹 (talk) 19:25, 24 September 2019 (UTC)
thread_title:  Nowrap inserted automatically 

message: See Wikipedia:Templates for discussion/Log/2020 April 26 for a proposal to merge  and , which appear to be essentially the same. – Jonesey95 (talk) 04:26, 27 April 2020 (UTC)
thread_title:  Proposed merge of Template:Wrap and Template:Allow wrap 

message: This documentation says to use this template sparingly, but offers no definition of 'sparingly", and no suggestions to regulate usage. What dose it really mean? When should or should not this template be used? -- Mikeblas (talk) 21:33, 21 October 2020 (UTC)
replies: text: For example, it one uses it just to keep long phrases together, lines will be extremely uneven.  Additionally, it may require text in narrow columns to be scrolled on order to be read, which is a great nuisance to readers.  I would suggest that one should only use it when line-breaking within the argument makes the text very hard to read.  For example, "a great nuisance" is easier to read if the three words are on the same line, but  would be excessive use of the template. --RichardW57 (talk) 02:27, 22 October 2020 (UTC)
thread_title:  Sparingly? 

message: I can only speak for Chrome on Android:
 works as described in WP:NOWRAP, but not inside infoboxes, where it's ignored entirely, while   and  prevent wrapping fine. Why? 70.163.208.142 (talk) 09:53, 23 August 2022 (UTC)
thread_title:  Nowrap inside infoboxes doesn't work on mobile