模板:Paragraph break/doc

来自决策链云智库
< 模板:Paragraph break
Zeroclanzhang讨论 | 贡献2024年1月20日 (六) 20:41的版本 (创建页面,内容为“{{Documentation subpage}} {{used in system}} {{Template shortcut|pb|parabr|paragraph}} == Usage == This template produces a "visual paragraph break" by inserting the following empty tag pair: {{tag|div|attribs=class="paragraphbreak"|content=}} Example: {{block indent|{{xt|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<nowiki>{{paragraph break}}</nowiki>Lorem ipsum dolor sit amet,…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

Usage

This template produces a "visual paragraph break" by inserting the following empty tag pair:

div class="paragraphbreak">></div>

Example:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{paragraph break}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

produces:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Purpose

In some instances, it is not possible to introduce paragraph breaks using newlines alone. For example, within a list item and within references. However, using <p> tags can cause problems for navigation with screen readers, which expect these tags to delimit paragraphs of prose (see e.g. MOS:INDENTGAP). This template is used mostly in footnotes, where a visual break is desired, without adding an additional paragraph navigation point.

Example 1

The following reference uses line breaks for multiple lines.[1] The following reference uses the paragraph break template for paragraph breaks.[2] The following reference uses <br /> tags for paragraph breaks.[3]

Notes

  1. Paragraph 1a Paragraph 1b
  2. Paragraph 2a
    Paragraph 2b
  3. Line 3a
    Line 3b


which was generated using:

1.<ref>Paragraph 1a
Paragraph 1b</ref>
2. <ref>Paragraph 2a{{paragraph break}}Paragraph 2b</ref>
3. <ref>Line 3a<br />Line 3b</ref>

Example 2

Consider the following list

  1. Paragraph 1a
    Paragraph 1b
  2. Paragraph 2

which was generated using

# Paragraph 1a {{paragraph break}} Paragraph 1b
# Paragraph 2


Produces a "visual paragraph break".

模板参数

参数描述类型状态
未指定参数