模板:Quote

維基文庫,自由的圖書館
跳到导航 跳到搜索
文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

Template:Div-based-template


Usage[编辑]

This template is for formatting a quotation. The second and third parameters are used for the cited author and work. They should not be used if the quotation has different formatting to the one provided.

The default style is an extra margin on the left and right sides, but this can be set on a per-work basis with Index CSS.

The split templates {{quote/s}} and {{quote/e}} are available for spanning page breaks. The citation parameters are not available in this case.

Parameters[编辑]

  • {{{1}}}: the quoted text
  • {{{2}}}: a citation author, which comes after the quote (not available for the /s, /e split version)
  • {{{3}}}: a citation work, which comes after the author (not available for the /s, /e split version)
  • {{{class}}}: extra CSS classes (wst-quote is always applied in addition). You can target these classes with Index CSS.
  • {{{align}}}: text alignment of the content (e.g. center).
  • {{{style}}}: extra CSS style to apply to the quoted text. Do not use quotes, the template supplies them.

Example[编辑]

{{lorem ipsum}}
{{quote|'''With citation''': {{lorem ipsum}}|Albert Einstein|Life and Works}}
{{lorem ipsum}}
{{quote|style=color:blue;|'''With CSS''': {{lorem ipsum}}}}
{{lorem ipsum}}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.

With citation: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.

With CSS: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.

See Also[编辑]

Insert a block of quoted text

模板参数

此模板首选参数行内格式。

参数描述类型状态
11

The quoted content

内容必填
classclass

Additional classes for targeting CSS

示例
_custom_class
单行文本可选
alignalign

Text alignment

建议值
centerrightleftjustify
字符串可选
stylestyle

Additional CSS styling

单行文本可选
22

Citation author (rarely used in actual works)

未知可选
33

The cited work (rarely used in actual works)

未知可选