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)reply
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)reply
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)reply
Usage
"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."
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)reply
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 |
Mclay103:03, 11 April 2011 (UTC)reply
Requested move
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.
Template:Ndash →
Template: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)reply
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)reply
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)reply
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)reply
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)reply
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)reply
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)reply
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)reply
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. — SMcCandlishTalk⇒ ɖ∘¿¤þ Contrib.16:29, 22 March 2012 (UTC)reply
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 icon}}, and the soft hyphen ({{sh}}). It would make things a lot easier for editors. Tony(talk)11:13, 23 March 2012 (UTC)reply
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)reply
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. — SMcCandlishTalk⇒ ɖ∘¿¤þ Contrib.23:47, 24 March 2012 (UTC)reply
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
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,
SD523:36, 2 April 2012 (UTC)reply
Documentation probably hasn't been updated yet. Also wait to see if {{ndash}} becomes a separate template.
SD500:11, 3 April 2012 (UTC)reply
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)reply
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.
SD518:59, 3 April 2012 (UTC)reply
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)reply
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)reply
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.
SD503:07, 22 April 2012 (UTC)reply
incorrect redirect
{{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)reply
Why extra trailing space?
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)reply
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)reply
Why use HTML characters instead of the actual characters?
Why are the HTML characters – and   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.:
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)reply
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:
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)reply
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 , 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 " {{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)reply
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)reply
"Incorrect" use..?
According to the current documentation, [[Salt]]{{spaced ndash}}[[Pepper]] (i.e. no space between the template's closing braces and subsequent word) is an incorrect use of the template (that "still behave[s] well"). Why is this incorrect..?
Sardanaphalus (
talk)
12:33, 9 August 2014 (UTC)reply PS Just realized
this thread above asks the same – if, therefore, there's no objection, I'm inclined to remove this description from the documentation.
Sardanaphalus (
talk)
12:37, 9 August 2014 (UTC)reply
Requested move 29 June 2015
The following is a closed discussion of a
requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a
move review. No further edits should be made to this section.
Comment: I tried to do this move once already, as a technical move, but had to undo it. Be aware that some pages which use this template through redirects will break unless all the double redirects are fixed. See
User talk:EdJohnston#Template Error. Some other admin more thorough than me may be able to do it successfully.
EdJohnston (
talk)
00:11, 30 June 2015 (UTC)reply
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 or in a
move review. No further edits should be made to this section.
Both {{
em dash}} and {{
en dash}} are safe for COinS because they contain no html or css. {{
nbsp}} is not safe for COinS because that template wraps one or more html entities in css:
Is it still intended for this template not to be used in regular paragraphs? I ask because the spaces flanking a dash in regular text should not be non-breaking. Thanks in advance for the clarification!
Q·L·1968☿21:25, 19 October 2016 (UTC)reply
I wouldn't worry much about that. Editors who use the keystroke (or the en-dash button below the edit box) rarely insert the nbsp thing.
Tony(talk) 06:51, 21 October 2016 (UTC)reply
Date ranges & justification
A date range with this template looks terrible when the page is justified—the spaces around the dash can get pretty wide.
What objections are there to something like  –  instead of what's used now?
Template appears to render incorrectly on Firefox 94 on Mac
When using this template if I have spaces surrounding the template, it appears as having two spaces on one side and one space on the other. For example Foo {{ndash}} Bar renders as Foo – Bar with two spaces on the first side and one space on the other side. Rendered example: "Foo – Bar"
Ergzay (
talk)
19:03, 6 November 2021 (UTC)reply
COinS (2)
The documentation claims this template pollutes COinS. But that doesn't make sense: it's just text, even if in the form of HTML entities. I don't think that's problematic, is it?
Hairy Dude (
talk)
17:53, 29 February 2024 (UTC)reply
{{cite book|title=Title |date=December 2020{{Spaced en dash}}January 2021}} → Title. December 2020 – January 2021. {{
cite book}}: Check date values in: |date= (
help)
{{cite book|title=Title |date=December 2020 – January 2021}} → Title. December 2020 – January 2021.
The metadata for the first example is incomplete (corrupt) because the value assigned to |date= is omitted. Compare:
'"`UNIQ--templatestyles-00000034-QINU`"'<citeclass="citation book cs1">''Title''. December 2020 – January 2021.</cite><spantitle="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Title&rfr_id=info%3Asid%2Fen.wikipedia.org%3ATemplate+talk%3ASpaced+en+dash"class="Z3988"></span><spanclass="cs1-visible-error citation-comment"><codeclass="cs1-code">{{[[Template:cite book|cite book]]}}</code>: </span><spanclass="cs1-visible-error citation-comment">Check date values in: <codeclass="cs1-code">|date=</code> ([[Help:CS1 errors#bad_date|help]])</span>
against:
'"`UNIQ--templatestyles-00000036-QINU`"'<citeclass="citation book cs1">''Title''. December 2020 – January 2021.</cite><spantitle="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Title&rft.date=2020-12%2F2021-01&rfr_id=info%3Asid%2Fen.wikipedia.org%3ATemplate+talk%3ASpaced+en+dash"class="Z3988"></span>
The keyword that you are looking for is &rft.date= (value is rendered in
percent encodedISO 8601 format).