Template talk:Nowrap
Purpose
[edit]The template prevents line wrap in the string provided as the parameter. It is useful e.g. where numbers or names could otherwise be split in confusing ways. Where line wrap is not needed, the template will not affect the article as seen by readers. Where line wrap is needed, the line will usually be split just before or just after the template (in some cases perhaps depending on browser). The template depends on CSS.
An example use is in National Parks of Finland#National parks, where some area figures are given:
... The largest, Lemmenjoki National Park, has an area of {{nowrap|2 860 km²}} and borders to the Norwegian Øvre Anárjohka nationalpark of {{nowrap|1 409 km².}}
The numbers, including unit and punctuation, should not be split.
There are other ways to prevent unwanted line wrap: using the CSS code (now in the template) or "hard" spaces and "hard" hyphens, either coded as HTML entities or the Unicode characters themselves. The CSS code and HTML entities are cumbersome and distracting in the edit view, the characters themselves hard to type for most editors and possibly invisible or seen as questions marks or similar. Where line wrap should be prevented, the template is probably the best solution.
Whether to use the template depends on how confusing the template is thought to be when viewing and editing the wikitext, versus importance of correct line wrap. —The preceding comment was added by LPfi (talk • contribs)
- Seems sensible. If there are no objections I'd support removing the "experimental" tag from this template and approving it for use across the site. -- Ryan • (talk) • 14:56, 30 May 2013 (UTC)
- No objections so far. I remove the template and suggest using it at Wikivoyage:Measurements. --LPfi (talk) 06:12, 10 October 2013 (UTC)
Missing CSS class
[edit]This is apparently broken right now, as there is no "nowrap" class in the default stylesheet. --Bigpeteb (talk) 22:57, 15 January 2021 (UTC)
- OK. I have wondered why the template seems to have no effect. I now restored the old version. The class construction was added by a user who imported several templates from en-wp, without being fully acquainted to Wikivoyage. –LPfi (talk) 20:00, 17 January 2021 (UTC)
- Sorry for my last change. I was probably made a mistake while I port the source code from here to other wikis. --Great Brightstar (talk) 15:35, 19 January 2021 (UTC)