Spaced Ndash

 –

Spaced Ndash توضیحات الگو

This is the spaced ndash template; it looks like this " – ".

It works similarly to the HTML markup sequence " ". That is, a فاصله نشکن, a short dash (known as an en dash) and a normal space.

This template is used when you want something stronger than a bold middot "·" or a bullet "•", but shorter than an em dash "—". (An en dash is half the width of an em dash).

For horizontal lists use {{Flatlist}} or class="duhoc-fa hlist" instead (see WP:HLIST).

Shorter forms

{{snd}}, {{spnd}}, {{sndash}}, and {{spndash}} redirect to {{spaced ndash}}.

Normal usage

The recommended usage is to use no space before the template and one space after the template, like this:

[[نمک]]{{spaced ndash}} [[فلفل]] 

It will render one space on each side of the dash, like this:

A line break will come after one of the dashes, not before, when the spacing is used as suggested, like this:

Here's an example of how it is used
Template "Spaced ndash" is not really intended to be used in article text but for use in other templates, tables, lists, and other equivalent things in order to include a separator between items such as in infoboxes. It is also to be consistent so that the article editor can use their choice of {{bull}}, {{dot}}, {{middot}}, or {{spaced ndash}} and not have to insert the • ,  · ,  · , or symbol, they can use any of these as a simple macro. The idea being that if you have a table with a list of items, you can insert a spaced short dash (or the other symbols) between items that will appear correct, in that the items always have just one separator between them, and when a list crawls to the next line, the dash hangs onto the prior item instead of rolling over to the next line. Notice on the end of this box, the symbol hangs on the end of the last item that will fit on the line indicating that additional items follow on the next line as part of this list, but the item only stays on the line if the item and the dash will fit. See the column on the right. In code it is Item1{{spaced ndash}} Item2{{spaced ndash}} Item3{{spaced ndash}} Item4{{spaced ndash}} Item5{{spaced ndash}} etc. (with some smaller items squeezed in to show that the list does not have to be the same number of items per line) but in the box they all fold perfectly once it runs out of space on the line to fit the next item and the dash following.

Normally, in a real box these items would be links, but this is an example.

Item1ABItem2Item3Item4Item5extra itemE1234567item that won't attach to prior line unless it fits in the remaining space – QA slightly longer itemKKAn obviously really even longer item that the dash will hang at its endItem6CItem7Item8Item9Item10Item11Item12DItem13Item14Item15Item16Item17Item18

The space on the end makes sure the dash doesn't touch the edge of the box, either

Incorrect usage

If the template is used slightly wrong it will in some cases still behave well. For instance if there are no or several spaces after the template. Like these examples:

[[نمک]]{{spaced ndash}}[[فلفل]] [[نمک]]{{spaced ndash}}   [[فلفل]] 

Both of them will render exactly as before, with just one space on each side of the dash, like this:

And it will still only line break after a dash, like this:

But putting one or more spaces before the template will cause problems, like these examples:

[[نمک]] {{spaced ndash}}[[فلفل]] [[نمک]]   {{spaced ndash}}[[فلفل]] [[نمک]] {{spaced ndash}} [[فلفل]] [[نمک]]   {{spaced ndash}}   [[فلفل]] 

Then it will render with two spaces before the dash, and one after, like this:

And if it line breaks it might break before the dash, like this:

Also, this template should not routinely be used in regular article text and certainly not where an خط فاصله would be more appropriate. As a rule, this template should not be used between clauses of a sentence.

Because Wikipedia suppresses the contents of templates in tool tip preview when the user hovers the pointer over a Wikilink, one should avoid using the Spaced ndash and Ndash templates in an article's lead section. Using the template will cause a confusing blank space to appear in the tool tip preview instead of the expected en dash character. Instead, use or , and be sure to add the trailing space.

Technical details

The space before the dash is a فاصله نشکن. That means it will not line break and will not collapse together with normal spaces that come before the template.

The space after the dash is a normal space. That means it wraps (allows line breaks) and it will collapse together with normal spaces that come after the template to form one single space.

Dot sizes

· small middot
· {{middot}}
· small bold middot
· bold middot
small bullet
{{bullet}}
bold bullet
{{spaced ndash}}
{{emdash}}


See also

There are several other templates with similar functionality:

  • {{·}} – Bold middot "·"
  • {{•}} – Bullet "•"
  • {{\}} – Spaced slash "/"
  • {{-!}} – Spaced pipe "|"
  • − – Minus "−" is a mathematical symbol
  • {{Ndash}} – Ndash "–" is a plain en dash

Tags:

🔥 Trending searches on Wiki فارسی:

کاخ‌موزه سعدآبادزنازمانه (مجموعه تلویزیونی)بانک ملتاحسان طبریاسکیزوفرنیبازی ورقفهرست فینال‌های جام باشگاه‌های آسیا و لیگ قهرمانان آسیاپگینگفردینمعینهلندارلینگ هالندعایشهابن سینابازی تاج‌وتختامیدرضا روانخواهصادق خلخالیاسامه بن لادنژوزف استالینهمجنس‌گرایی زنانهمایکل جکسونجیران (مجموعه نمایش خانگی)چشم‌چران عمارتآلت نریمحمد مصدقآزاده صمدیجو بایدنفروع دینساعد سهیلیپانته‌آ بهرامپوست شیرعشق‌بازیاسکندر مقدونیفراماسونریکاناداکوچک‌آلتی در مردانخواهر و برادرانمبانک قرض‌الحسنه مهر ایرانهوشنگ ابتهاجآلپ ارسلانسحر دولتشاهیتخت جمشیدحلق‌کنیماکروپنیسخیس شدن واژنقاعدگیمیل جنسی به کودکانعربستان سعودیسیاه‌چالهاوکراینبورسآیت‌الکرسیژاله صامتیآمیزش جنسیعلی داییکاهش کلاهک کلیتورالعماننوشیدنی الکلیآنا د آرماسعلی‌اکبر شیرودیداریوش بزرگابیزبان انگلیسیآرنولد شوارتزنگرمسیح علی‌نژادشیرازلبنانسوندگذاری میزراهینشیمنگاهمهسا امینیگوکونکلاشینکفپرده بکارتامینمسعدیمرتضی مطهری🡆 More