Template talk:Spaced ndash

From Wikipedia, the free encyclopedia
Jump to: navigation, search

The code for this template[edit]

For discussions and motivations why we have the code we have for this template see Template talk:·, since it uses the same or similar code.

--David Göthberg 12:48, 15 August 2007 (UTC)

Rename to Template:Mdash? (or similar)[edit]

It seems like this code should be left alone but renamed to Template:Mdash as a spaced en dash should only be used as a stylistic variation on an em dash. Any spaced en dash should have a non-breaking space before it, and there should be no spaced em dashes. So it makes sense to make this the M dash template. (these rules are all described on WP:DASH) —TedPavlic | (talk) 01:30, 6 January 2009 (UTC)

Following the discussion at {{mdash}}, maybe it's best to rename {{ndash}} to something like {{spacedndash}}. —TedPavlic | (talk) 14:57, 6 January 2009 (UTC)

Wrong spacing[edit]

Where neither element has an internal space, this template makes the spacing wrong. It should generally be unspaced. Can someone fix it, or it will need to be discontinued? 1911–13, not 1911–13. Tony (talk) 06:31, 28 September 2009 (UTC)

In those cases, – (or –) would be used instead of {{ndash}}. The {{ndash}} is supposed to handle the spaced case. It's much shorter than  –. Spaced en dashes are used in ranges of spaced elements (e.g., January 4–December 2) or as a stylistic alternative to unspaced em dashes. —TedPavlic (talk/contrib/@) 17:40, 28 September 2009 (UTC)

Usage[edit]

"Also, this template should not routinely be used in regular article text and certainly not where an em-dash would be more appropriate. As a rule, this template should not be used between clauses of a sentence."

Why? I understand not using it instead of an emdash but why can't it be used in normal text to replace  –? McLerristarr | Mclay1 04:34, 18 November 2010 (UTC)

Just two reasons are that on many browsers it makes the spacing before and after different; and it is misused in many places where a space is proscribed; i.e., 2010–11. The template, in my view, should be deleted. Tony (talk) 07:48, 18 November 2010 (UTC)

MOS conflict[edit]

The examples given for the template contradict the guidance in the Wikipedia Manual of Style "dashes" section and should really be changed accordingly. ► Philg88 ◄ Star.pngtalk 22:36, 9 April 2011 (UTC)

The examples are not real examples; they're just to illustrate a point. However, this template is not for use in prose; it's for separating items in navboxes and the like in which case the examples are perfectly fine. McLerristarr | Mclay1 03:03, 11 April 2011 (UTC)

Requested move[edit]

The following discussion is an archived discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. No further edits should be made to this section.

The result of the move request was: page moved. I've also created template:spnd as a redirect. Someone make a bot fix the ~1000 articles fast! *grins* UtherSRG (talk) 21:51, 30 March 2012 (UTC)



Template:NdashTemplate:Spaced ndash – Twice this template has gone to TfD because it is often used incorrectly. The consensus is that it's a useful template and that we should correct misuse, not delete the template entirely. My proposal is to move this template to {{spaced ndash}}, then have a bot go and change all instances of {{ndash}} to {{spaced ndash}}. Once that is done, {{ndash}} could become what it says on the box, and what many editors expect it be, which is just an en dash. I know that this could cause a little confusion just after the changeover period, but I would be prepared to monitor the usage of the template and let people know that the template has changed if they are still expecting the spaced version. I think in the long run this will reduce confusion and end calls for the template to be deleted. Jenks24 (talk) 03:24, 20 March 2012 (UTC)

  • Oppose - To me, it does exactly what it says on the box (namely the documentation). There is also absolutely no need for an {{ndash}} template without the spacing, because that is already covered with – and the character toolbar. Edokter (talk) — 18:51, 20 March 2012 (UTC)
  • Support. This template is wrongly used in many places where the en dash is not spaced (e.g. 1918–26). There is an urgent need to warn users, in the name of the template, that it should not be used thus. Except in full dates (9 September 1981 – 12 October 1999) and of course as a separator in navbox lists, etc, there are very few instances where a space is required. I believe it should be called Template:Spaced en dash, by the way, to be consistent with WP's manuals of style. Tony (talk) 02:16, 21 March 2012 (UTC)
      • I agree with what Tony has said. Most editors do not read the documentation of every template they use and most would reasonably expect that {{ndash}} produces an en dash, not an en dash and two spaces. Tony, I would be equally happy with {{Spaced en dash}} as the title. Jenks24 (talk) 03:11, 21 March 2012 (UTC)
  • Support this template's existence and its name lends itself too easily to misuse, and in violation of WP:MOSDASH. I would prefer it to be deleted as a first option, or renamed as a second preference. --Ohconfucius ¡digame! 03:27, 21 March 2012 (UTC)
  • Comment if this is renamed, a short form redirect should exist, like {{spndash}} or {{nbspndash}} or something. 70.24.248.7 (talk) 04:46, 21 March 2012 (UTC)
    • I agree and I'd be happy to create them. Jenks24 (talk) 04:49, 21 March 2012 (UTC)
  • I'm just going to link MoS talk to this RM, in case a wider group of editors wants to have input. Tony (talk) 05:10, 21 March 2012 (UTC)
  • Support I've never encountered this template before, but I would have assumed that it generated an en dash, in line with other templates for characters which may be awkward to enter. Thus {{hybrid}} generates the hybrid symbol "×" not the sequence " × ". The name should reflect precisely what it does. Peter coxhead (talk) 11:51, 21 March 2012 (UTC)
  • I agree that {{ndash}} is a bad title, but {{spaced ndash}} is way too long – {{spaced ndash}} is more keystrokes than  –, defeating the purpose. How about {{_ndash_}}, or even {{_--_}}? ― A. di M.​  15:51, 21 March 2012 (UTC) Nope, MediaWiki would treat them as alternate spellings of {{ndash}} and {{--}} respectively. How about {{~-- }} (the way you'd input that in TeX)? ― A. di M.​  15:53, 21 March 2012 (UTC)
    • If length is an issue, why not something like {{spndash}}? I prefer templates that use full words (and template naming has been trending that way in the last few years), but I can see your point in this case. Jenks24 (talk) 02:02, 22 March 2012 (UTC)
  • Support: The name is too misleading. We all know that people don't read template documentation unless they have to. Re: "if this is renamed, a short form redirect should exist" and "how about...{{~--}}", and "why not something like {{spndash}}", that's what the edit button is for; you can create whatever redirects you want, though of course creating one from Template:Ndash would be very WP:POINTy. >;-) Templates, especially those for editorial use in articles (vs. geeky WP-internal things) should generally be at plain-English names regardless what shortcuts they may have. — SMcCandlish   Talk⇒ ɖ∘¿¤þ   Contrib. 16:29, 22 March 2012 (UTC)
    Aside, what a wonderful thing it would be if the Foundation techs and communities agreed to (1) conduct an audit of the short templates (one and two characters long) that were nabbed in the early days, often for arcane or little-used purposes, and (2) free up some of this "space" for desperately needed template syntaxes. We certainly need one for the unspaced en dash ({{nd}} comes to mind), spaced en dash ({{snd}}, the hard-space ({{hs}}), the minus sign ({{ms}}, and the soft hyphen ({{sh}}). It would make things a lot easier for editors. Tony (talk) 11:13, 23 March 2012 (UTC)
    Template:snd is not taken! Awesome! (BTW, I'd like MediaWiki to replace (except in URLs, <code> tags, etc.) -- to an en dash, --- to an em dash (the way TeX does), and maybe _ to a non-breaking space (TeX uses ~, but that's somewhat commonly used for ‘approximately’ so all of those would need escaping, whereas _ is hardly ever used on Wikipedia outside URLs, code examples, and similar; plus, MediaWiki already treats it as equivalent to a space in URLs.) ― A. di M.​  12:56, 23 March 2012 (UTC)
  • Weak Support I personally could go either way, but I do like the idea of Template:snd as it's nice and compact. CanuckMy page89 (talk), 18:47, 23 March 2012 (UTC)
    • Comment template:spnd seems more reasonable, since "snd" is a common abbreviation for "sound", and also a file extension for a sound file format. 65.92.180.188 (talk) 23:41, 23 March 2012 (UTC)
  • Comment: What short redirects to create for this (i.e., what most people are talking about here) doesn't have much to do with what its actual name should be, which should be in plain English. — SMcCandlish   Talk⇒ ɖ∘¿¤þ   Contrib. 23:47, 24 March 2012 (UTC)
    • Plain English is desirable, but when a template needs to be used very frequently, brevity is a greater consideration. Tony (talk) 08:24, 25 March 2012 (UTC)
The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.


Template replacement[edit]

Replacements of most {{ndash}} templates have been completed by SD5bot. 11895 pages were edited. Replacement criteria was:

  • "Lorem{{ndash}}Ipsum" would be replaced with "Lorem{{spaced ndash}}Ipsum"
  • "Lorem{{ndash}} Ipsum" would be replaced with "Lorem{{spaced ndash}}Ipsum"
  • All other instances of {{ndash}} were left alone. ({{ndash}} should probably now become a separate template that is without spaces)

On pages where {{ndash}} was misused (resulting in a replacement by the bot), editors will still need to change {{spaced ndash}} to the appropriate html equivalent (or back to {{ndash}} if it becomes a separate template). Regards, SD5 23:36, 2 April 2012 (UTC)

so a space after the template is no longer the "recommended usage"? 65.88.89.32 (talk) 00:02, 3 April 2012 (UTC)
Documentation probably hasn't been updated yet. Also wait to see if {{ndash}} becomes a separate template. SD5 00:11, 3 April 2012 (UTC)
Thanks for doing this, SD5, I really appreciate it. Regarding the trailing spaces (or lack thereof), take a look at the "Incorrect usage" section of the documentation – it doesn't matter whether there are trailing spaces after this template or not, the same result is produced. I've also had a crack at updating the documentation a little. {{ndash}} is indeed going to become a separate template, producing just and en dash, but are we really sure it's ready to change yet? Looking at Special:WhatLinksHere/Template:Ndash I still see it is used on maybe 2000 pages. I picked one article at random, H. V. Evatt, and I'm struggling to see why the bot didn't replace {{ndash}} with {{spaced ndash}} there? Jenks24 (talk) 04:21, 3 April 2012 (UTC)
No idea why it wasn't replaced. The bot simply scanned pages shown on "What links here" for ndash, so if the page wasn't scanned it presumably didn't show up on the list for whatever reason. Most of those 2000 probably contain things like total {{ndash}} were. I was told not to replace the ndash template where there were spaces both sides so that when ndash becomes it's own template nothing needs changing back. SD5 18:59, 3 April 2012 (UTC)
OK. Did you also change over the redirects, such as {{endash}} and {{}}? What I'm really trying to figure out is when it will be OK to switch over the {{ndash}} template. Jenks24 (talk) 05:05, 4 April 2012 (UTC)
I'd say, not until Special:WhatLinksHere/Template:Ndash is empty. ― A. di M.​  14:33, 4 April 2012 (UTC)
But what about articles where that template is currently used incorrectly, but changing the ndash template would be a correction? Jenks24 (talk) 15:35, 4 April 2012 (UTC)
OK, so let's say, not until Special:WhatLinksHere/Template:Ndash is short enough that someone could check each of them. ― A. di M.​  17:56, 12 April 2012 (UTC)
As of this timestamp, the 46 remaining transclusions are used as ndashes (without the need for a non-breaking space). DrKiernan (talk) 19:33, 18 April 2012 (UTC)
  • Nice work, SD5. Thank you. Tony (talk) 02:01, 13 April 2012 (UTC)


This diff is unacceptable. Refactoring other users comments isn't on. Fifelfoo (talk) 23:33, 18 April 2012 (UTC)

In the diff you provide, DrKiernan changed {{ndash}} to {{spaced ndash}} in another users comment. However, the whole point of this is that {{ndash}} used to "act" like {{spaced ndash}}, so I'm not seeing the problem with that edit. SD5 03:07, 22 April 2012 (UTC)

incorrect redirect[edit]

{{dash}} redirects to this template. this is incorrect, it should redirect to {{ndash}}. spaced ndash is a templated application of a MOS guideline and does not represent an actual dash. 65.88.88.127 (talk) 20:12, 13 May 2012 (UTC)

Why extra trailing space?[edit]

The recommended usage is:
     xxx{{snd}} yyy
but:
     xxx{{snd}}yyy
makes more sense. The template already includes a trailing space – why should we add another? —[AlanM1 (talk)]— 11:25, 7 August 2012 (UTC)

I dunno – perhaps to allow the WikiText in the edit box to wrap after each item of a long list? As you can see in the WikiText for the previous sentence, I usually omit it, too. — A. di M.  11:28, 8 August 2012 (UTC)

Why use HTML characters instead of the actual characters?[edit]

Why are the HTML characters &ndash; and &#32; used instead of the "–" and " " characters themselves? When substituting this template, it would make for more readable text in edit mode with the actual characters, e.g.:

lorem&nbsp;– ipsum

instead of

lorem&nbsp;&ndash;&#32;ipsum

—[AlanM1 (talk)]— 21:29, 22 August 2012 (UTC)

Entities are used to ensure they survive ohter templates they may transclude through. If regular spaces were used and used in another template, the parser might see them as extranious and remove them. Edokter (talk) — 07:47, 23 August 2012 (UTC)
In general, I understand there can be an issue with multiple trailing spaces being compressed to one space, though this should not present a problem in this case, since the one space would remain, and the MOS says to use a single space between the endash and the word that follows (in the case of a spaced endash).

I created my own User:AlanM1/Template/Snd, using the actual endash and space characters, and then created templates that both substitute and transclude it, and used the various combinations here:

Trans Subst
A – C A – C
A – C A – C
A – C A – C
A – C A – C
A – C A – C
A – C A – C
I cannot get it to fail in any of these situations. —[AlanM1 (talk)]— 05:04, 24 August 2012 (UTC)
Parser function may be a different story; they are notorious with spaces (even single ones!). However, this template is not ment to be substituted, and with the nbsp also being there, I do not see an issue. Edokter (talk) — 07:31, 24 August 2012 (UTC)
Perhaps I am missing something, but all I'm trying to do is have an easy way to insert a spaced endash (without having to type &nbsp;, scroll down to the list below the edit window, move my hand to the mouse to click on the endash, etc.). I do this with a keyboard macro that sends "{{subst:snd}}". Now, I suppose I could just as easily set the macro to send "&nbsp;{{subst:ndash}} ", but its doc page says it's deprecated, so... I guess I'll just set it to use my own version when I know that it won't be used in anything that could break. —[AlanM1(talk)]— 20:25, 24 August 2012 (UTC)
Why not simply set your macro to send "&nbsp;– "? Edokter (talk) — 20:30, 24 August 2012 (UTC)
Hmmm. I didn't think it was possible to compose that character on Windows PC keyboard, since it is U+2013, but apparently Alt-0-1-5-0 will produce it, at least in the WP editor. Cool. Thanks. —[AlanM1(talk)]— 20:50, 24 August 2012 (UTC)