编辑“︁
Template:Spaced en dash/doc
”︁
跳转到导航
跳转到搜索
这是
Spaced en dash
模板的
文档页面
。
File:AnonEditWarning.svg
您当前没有登录。
如果您保存任何编辑,您的
IP地址
将
公开记录
在
本页的修订历史
中。您如果
登录
或
注册一个帐号
,可以隐藏自己的IP地址并
使用更多功能
。您可以在
您的对话页
查看给您的留言。
任何侵权内容
将会删除 | 百科内容须附有来源,以
供查证
| 维基百科内容均容许他人编辑、使用和重制 | 参阅
繁简
和
地区词处理
指引。
反垃圾检查。
不要
加入这个!
{{Documentation subpage}} __NOTOC__ <!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE --> {{COinS safe|n}} {{Template shortcuts |snd|spnd|sndash|spndash}} {{Format TemplateData|JSON={ "params": {}, "description": "This is the '''spaced en dash''' template; it renders like this (without the quote marks): \" – \" \nIt works similarly to the HTML markup sequence <code>'''&nbsp;&ndash;''' </code> i.e. a [[non-breaking space]] (which will not line-break and will not collapse together with normal spaces that come before the template), a short dash (known as an [[Dash#En dash|en dash]]), and a normal space (which ''will'' line-break and ''will'' collapse together with normal spaces that come after the template).\nAmong other uses, this template may be used in lists to provide something stronger than a [[Template:•|bold middot]] \"'''·'''\" or a [[Template:\u2022|bullet]] \"•\", but shorter than an [[Dash#Em dash|em dash]] \"—\". For horizontal lists, use {{tl|flatlist}} or <code>class=\"hlist\"</code> instead (see [[WP:HLIST]]). Here, the recommended usage is to use ''no'' space before the template and one space after the template, like this:\n::<nowiki>[[Salt]]{{spaced en dash}} [[Pepper]]</nowiki>\n:This will render one space on each side of the dash, like this:\n::[[Salt]] – [[Black pepper|Pepper]]\n:A line break will come ''after'' one of the dashes, not before, when the spacing is used as suggested, like this:\n::[[Salt]] – [[Black pepper|Pepper]] –\n::[[Curry]] – [[Saffron]]" } }} {| class="wikitable" style="border: none; background: none;" |Colspan=2 |<center>Here's an example of use for lists</center> |- || One use of template "spaced en dash" is within other templates, tables, lists, and similar things to provide a separator between items. It is also to be consistent so that the article editor can use their choice of '''<nowiki>{{</nowiki>bull}}''', '''<nowiki>{{</nowiki>dot}}''', '''<nowiki>{{</nowiki>middot}}''', or '''<nowiki>{{</nowiki>spaced en dash}}''' and not have to insert the {{bull}}, {{dot}}, {{middot}}, or {{spaced en dash}} 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<nowiki>{{</nowiki>spaced en dash}} Item2<nowiki>{{</nowiki>spaced en dash}} Item3<nowiki>{{</nowiki>spaced en dash}} Item4<nowiki>{{</nowiki>spaced en dash}} Item5<nowiki>{{</nowiki>spaced en dash}}''' 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. | <p>Normally, in a real box these items would be links, but this is an example.</p> Item1{{spaced en dash}} A{{spaced en dash}} B{{spaced en dash}} Item2{{spaced en dash}} Item3{{spaced en dash}} Item4{{spaced en dash}} Item5{{spaced en dash}} extra item{{spaced en dash}} E{{spaced en dash}} 1{{spaced en dash}} 2{{spaced en dash}} 3{{spaced en dash}} 4{{spaced en dash}} 5{{spaced en dash}} 6{{spaced en dash}} 7{{spaced en dash}} {{nowrap|item that won't attach to prior line unless it fits in the remaining space{{spaced en dash}}}} Q{{spaced en dash}} A slightly longer item{{spaced en dash}} KK{{spaced en dash}} An obviously really even longer item that the dash will hang at its end{{spaced en dash}} Item6{{spaced en dash}} C{{spaced en dash}} Item7{{spaced en dash}} Item8{{spaced en dash}} Item9{{spaced en dash}} Item10{{spaced en dash}} Item11{{spaced en dash}} Item12{{spaced en dash}} D{{spaced en dash}} Item13{{spaced en dash}} Item14{{spaced en dash}} Item15{{spaced en dash}} Item16{{spaced en dash}} Item17{{spaced en dash}} Item18 <p>The space on the end makes sure the dash doesn't touch the edge of the box, either</p> |} == Dot sizes == {{Dot size}} == 参见 == * {{tn|·}}, which produces a spaced bold [[interpunct]] ("middot"): "{{·}}" * {{tn|•}}, which produces a spaced bullet-point: "{{•}}" * {{tn|\}}, which produces a spaced (forward-)slash: "{{\}}" * {{tl|en dash}}, which produces an (unspaced) [[en dash]]. * {{tl|em dash}}, which produces an (unspaced) [[em dash]]. <includeonly> [[Category:内联间距模板]] [[Category:輸入支援模板|En dash, spaced]] [[Category:字符替换模板]] </includeonly>
编辑摘要
(请简要描述您所作出的修改
,或选择:
新条目
修饰语句
修正笔误
内容扩充
排版
来源
内部链接
分类
消歧义
维基化
维护清理
)
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模板
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
分类索引
特色内容
新闻动态
随机条目
联络我们
关于维基百科
资助维基百科
贡献
帮助
维基社群
编辑入门
互助客栈
IRC即时聊天
最近更改
特殊页面
工具
链入页面
相关更改
特殊页面
页面信息