模板:Multiref/doc

维基百科,自由的百科全书
跳转到导航 跳转到搜索

此模板用于为合并引用英语WP:CITEBUNDLE创建无项目符号列表。它兼容简短脚注英语Help:Shortened footnotes、完整引用模板和一般注释。标准的无项目符号列表模板{{unbulleted list}}会破坏参考文献内的换行格式,导致在第一个列表项前出现不必要的换行。比较示例如下:

使用{{Multiref}}的效果:[1]

  1. ^
    • For the sun's size, see Miller, Edward. The Sun. Academic Press. 2005: 1. 
    • For the moon's size, see Brown, Rebecca. Size of the Moon. Scientific American. 2007, 51 (78): 46. 
    • For the sun's heat, see Yamada, Hanako. Taiyō no netsu 太陽の熱 [The Sun's Heat]. Academic Press. 2005: 2. 

对比使用{{unbulleted list}}的效果:[1]

  1. ^
    • For the sun's size, see Miller, Edward. The Sun. Academic Press. 2005: 1. 
    • For the moon's size, see Brown, Rebecca. Size of the Moon. Scientific American. 2007, 51 (78): 46. 
    • For the sun's heat, see Yamada, Hanako. Taiyō no netsu 太陽の熱 [The Sun's Heat]. Academic Press. 2005: 2. 

用法[编辑]

基础语法:

{{Multiref
|第一个引用内容
|第二个引用内容
...
}}

如果任何匿名参数的内容中包含等号(=),必须将匿名参数写出,即{{Multiref|1=}}。例如: {{Multiref|[https://www.naxos.com/CatalogueDetail/?id=SWR19026CD "''Festliche Arien – Fritz Wunderlich''"], [[Naxos Records]] SWR19026CD}}将无输出。但{{Multiref|1=[https://www.naxos.com/CatalogueDetail/?id=SWR19026CD "''Festliche Arien – Fritz Wunderlich''"], [[Naxos Records]] SWR19026CD}}能正常显示:

示例[编辑]

“cite”系列模板[编辑]

代码 效果
Body text.<ref> {{Multiref | For the sun's size, see {{cite book | last=Miller | first=Edward | title=The Sun | publisher=Academic Press | year=2005 | page=1 | ref=none}}  | For the moon's size, see {{cite journal | last=Brown | first=Rebecca | title=Size of the Moon | journal=Scientific American | volume=51 | issue=78 | year=2007 | page=46 | ref=none}}  | For the sun's heat, see {{cite book | last=Yamada | first=Hanako | script-title=ja:太陽の熱 | title=Taiyō no netsu | trans-title=The Sun's Heat | publisher=Academic Press | year=2005 | page=2 | ref=none}} }}</ref> {{reflist}}

Body text.[1]

  1. ^
    • For the sun's size, see Miller, Edward. The Sun. Academic Press. 2005: 1. 
    • For the moon's size, see Brown, Rebecca. Size of the Moon. Scientific American. 2007, 51 (78): 46. 
    • For the sun's heat, see Yamada, Hanako. Taiyō no netsu 太陽の熱 [The Sun's Heat]. Academic Press. 2005: 2. 

简短脚注[编辑]

代码 效果
Text.<ref>{{multiref|Smith, p. 2|Jones, p. 105|Singh, p. 93|Lee ''et al.'', p. 22|Smith & Jones, p. 591}}</ref>{{reflist}}
Text.[1]
  1. ^
    • Smith, p. 2
    • Jones, p. 105
    • Singh, p. 93
    • Lee et al., p. 22
    • Smith & Jones, p. 591

或使用{{harvnb}}、{{harvtxt}}等模板:

代码 效果
Text.<ref> {{Multiref| {{harvnb|Yamada|2005|p=2}} | {{harvnb|Brown|2007|p=105}} | {{harvnb|Miller|2005|p=93}} }}</ref>{{reflist}}
Text.[1]
  1. ^

上方的脚注链接至完整引用:

  • Yamada, Hanako. Taiyō no netsu 太陽の熱 [The Sun's Heat]. Academic Press. 2005. 
  • Brown, Rebecca. Size of the Moon. Scientific American. 2007, 51 (78). 
  • Miller, Edward. The Sun. Academic Press. 2005. 

转引来源[编辑]

如果直接验证条目内容的原始文献无法获取或未能查阅到,而是引用另一份包含该原始文献引文的资料时。使用此模板可在参考文献中将这两项明确标示。

代码 效果
Text.<ref>{{multiref|Smith, p. 2 citing|Jones, p. 105}}</ref>{{reflist}}
Text.[1]
  1. ^
    • Smith, p. 2 citing
    • Jones, p. 105

说明性注释[编辑]

代码 效果
There are many breeds of cat found in Venezuela,<ref>{{multiref|For example,|Moggie, p. 2|Tom, p. 95}}</ref> particular in the cities.<ref>Smith, p. 32</ref>{{reflist}}
There are many breeds of cat found in Venezuela,[1] particular in the cities.[2]
  1. ^
    • For example,
    • Moggie, p. 2
    • Tom, p. 95
  2. ^ Smith, p. 32
代码 效果
There are many breeds of cat found in Venezuela,<ref>{{multiref|One example,|Moggie, p. 2}}</ref> particular in the cities.<ref>Smith, p. 32</ref>{{reflist}}
There are many breeds of cat found in Venezuela,[1] particular in the cities.[2]
  1. ^
    • One example,
    • Moggie, p. 2
  2. ^ Smith, p. 32

已知问题[编辑]

本模板通过抑制特定引用中的换行来实现部分功能。当页面过短导致参考文献与信息框或图片重叠时,此功能会失效。此时应改用{{clear}}等模板或{{multiref2}}。

模板数据[编辑]

<templatedata> { "description": "为合并引用创建无项目符号列表。", "params": { "1": { "label": "项目1", "type": "line", "required": true }, "2": { "label": "项目2", "type": "line", "suggested": true }, "3": { "label": "项目3", "type": "line" }, "4": { "label": "项目4", "type": "line" }, "5": { "label": "项目5", "type": "line" }, "6": { "label": "项目6", "type": "line" }, "7": { "label": "项目7", "type": "line" }, "8": { "label": "项目8", "type": "line" }, "9": { "label": "项目9", "type": "line" }, "class": {

"description": "为包裹列表的

...

标签添加自定义class",

"example": "plainlinks", "type": "string" }, "style": {

"description": "为包裹列表的

...

标签添加自定义CSS样式",

"example": "font-size: 90%;", "type": "string", "label": "样式" }, "list_style": {

"description": "为列表的

    ...

标签添加自定义CSS样式",

"label": "列表样式", "type": "string" }, "item_style": {

"description": "为所有列表项(

  • ...
  • 标签)添加统一CSS样式", "label": "项目样式", "type": "string" }, "item1_style": { "label": "项目1样式", "description": "为列表项1添加独立CSS样式", "type": "string" }, "item2_style": { "label": "项目2样式", "description": "为列表项2添加独立CSS样式", "type": "string" }, "item3_style": { "label": "项目3样式", "description": "为列表项3添加独立CSS样式", "type": "string" }, "item4_style": { "label": "项目4样式", "description": "为列表项4添加独立CSS样式", "type": "string" }, "item5_style": { "label": "项目5样式", "description": "为列表项5添加独立CSS样式", "type": "string" }, "item6_style": { "label": "项目6样式", "description": "为列表项6添加独立CSS样式", "type": "string" }, "item7_style": { "label": "项目7样式", "description": "为列表项7添加独立CSS样式", "type": "string" }, "item8_style": { "label": "项目8样式", "description": "为列表项8添加独立CSS样式", "type": "string" }, "item9_style": { "label": "项目9样式", "description": "为列表项9添加独立CSS样式", "type": "string" } }, "paramOrder": [ "class", "style", "list_style", "item_style", "1", "2", "3", "4", "5", "6", "7", "8", "9", "item1_style", "item2_style", "item3_style", "item4_style", "item5_style", "item6_style", "item7_style", "item8_style", "item9_style" ] } </templatedata>