Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Jump to content

Template talk:Spaced en dash

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

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)[reply]

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)[reply]

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

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)[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

[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)[reply]

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]

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 ◄ talk 22:36, 9 April 2011 (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 | Mclay1 03:03, 11 April 2011 (UTC)[reply]

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)[reply]



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)[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]
  • 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)[reply]
  • 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)[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. — SMcCandlish   Talk⇒ ɖ∘¿¤þ   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]
  • 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)[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. — SMcCandlish   Talk⇒ ɖ∘¿¤þ   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

[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)[reply]

so a space after the template is no longer the "recommended usage"? 65.88.89.32 (talk) 00:02, 3 April 2012 (UTC)[reply]
Documentation probably hasn't been updated yet. Also wait to see if {{ndash}} becomes a separate template. SD5 00: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. SD5 18: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]
I'd say, not until Special:WhatLinksHere/Template:Ndash is empty. ― A. di M.​  14:33, 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]
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)[reply]
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)[reply]


This diff is unacceptable. Refactoring other users comments isn't on. Fifelfoo (talk) 23:33, 18 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. SD5 03:07, 22 April 2012 (UTC)[reply]

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)[reply]

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)[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?

[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)[reply]

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:
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)[reply]
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 &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)[reply]
Why not simply set your macro to send "&nbsp;– "? Edokter (talk) — 20:30, 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..?

[edit]

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

[edit]
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.

The result of the move request was: moved by Anthony Appleyard (talk · contribs). Jenks24 (talk) 01:56, 6 July 2015 (UTC)[reply]



Template:Spaced ndashTemplate:Spaced en dash – Align with {{Em dash}} and {{En dash}}. – Alakzi (talk) 17:58, 29 June 2015 (UTC)[reply]

This is a contested technical request (permalink). 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.

COinS

[edit]

The HTML output of {{Spaced en dash}} is identical to the output given[1] when hardcoding the template’s contents (&nbsp;&ndash;&#32;). Is there another reason why this template is considered COinS‑unsafe? —LLarson (said & done) 23:56, 7 February 2016 (UTC)[reply]

References

  1. ^
    Markup Renders as
    {{cite book |author=Juice&nbsp;&ndash;&#32;Queen of Hearts |title=Title&nbsp;&ndash;&#32;Subtitle}}

    Juice – Queen of Hearts. Title – Subtitle.{{cite book}}: CS1 maint: multiple names: authors list (link) CS1 maint: numeric names: authors list (link)
    '"`UNIQ--templatestyles-00000020-QINU`"'<cite id="CITEREFJuice_–_Queen_of_Hearts" class="citation book cs1">Juice&nbsp;&ndash;&#32;Queen of Hearts. ''Title&nbsp;&ndash;&#32;Subtitle''.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Title+%26ndash%3B%26%2332%3BSubtitle&rft.au=Juice+%26ndash%3B%26%2332%3BQueen+of+Hearts&rfr_id=info%3Asid%2Fen.wikipedia.org%3ATemplate+talk%3ASpaced+en+dash" class="Z3988"></span><span class="cs1-maint citation-comment"><code class="cs1-code">{{[[Template:cite book|cite book]]}}</code>: CS1 maint: multiple names: authors list ([[:Category:CS1 maint: multiple names: authors list|link]]) CS1 maint: numeric names: authors list ([[:Category:CS1 maint: numeric names: authors list|link]])</span>

    {{cite book |author=Juice{{Spaced en dash}}Queen of Hearts             |title=Title{{Spaced en dash}}Subtitle}}

    Juice – Queen of Hearts. Title – Subtitle.{{cite book}}: CS1 maint: multiple names: authors list (link) CS1 maint: numeric names: authors list (link)
    '"`UNIQ--templatestyles-00000024-QINU`"'<cite id="CITEREFJuice_–_Queen_of_Hearts" class="citation book cs1">Juice&nbsp;&ndash;&#32;Queen of Hearts. ''Title&nbsp;&ndash;&#32;Subtitle''.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Title+%26ndash%3B%26%2332%3BSubtitle&rft.au=Juice+%26ndash%3B%26%2332%3BQueen+of+Hearts&rfr_id=info%3Asid%2Fen.wikipedia.org%3ATemplate+talk%3ASpaced+en+dash" class="Z3988"></span><span class="cs1-maint citation-comment"><code class="cs1-code">{{[[Template:cite book|cite book]]}}</code>: CS1 maint: multiple names: authors list ([[:Category:CS1 maint: multiple names: authors list|link]]) CS1 maint: numeric names: authors list ([[:Category:CS1 maint: numeric names: authors list|link]])</span>

I’ve updated Template:Spaced en dash/doc to reflect that the template appears COinS‑safe.[1]LLarson (said & done) 15:02, 23 February 2016 (UTC)[reply]
@Trappist the monk and LLarson: Trappist says this template is not COinS safe‍—‌pollutes dates. What about Template:En dash, Template:Em dash, and Template:nbsp? Ping me back. Cheers! {{u|Checkingfax}} {Talk} 10:58, 4 March 2016 (UTC)[reply]
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 &nbsp; html entities in css:
<span class="nowrap">&nbsp;</span>
Trappist the monk (talk) 11:21, 4 March 2016 (UTC)[reply]

Intended usage

[edit]

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

[edit]

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 &#8239;&ndash;&thinsp; instead of what's used now?

(31 February 2017 – 1 March 2017)

vs

(31 February 2017 – 1 March 2017)

Curly "JFC" Turkey 🍁 ¡gobble! 04:05, 19 July 2017 (UTC)[reply]

Template appears to render incorrectly on Firefox 94 on Mac

[edit]

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)

[edit]

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`"'<cite class="citation book cs1">''Title''. December 2020&nbsp;&ndash;&#32;January 2021.</cite><span title="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> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{[[Template:cite book|cite book]]}}</code>: </span><span class="cs1-visible-error citation-comment">Check date values in: <code class="cs1-code">&#124;date=</code> ([[Help:CS1 errors#bad_date|help]])</span>
against:
'"`UNIQ--templatestyles-00000036-QINU`"'<cite class="citation book cs1">''Title''. December 2020 – January 2021.</cite><span title="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 encoded ISO 8601 format).
Trappist the monk (talk) 18:28, 29 February 2024 (UTC)[reply]