跳转到内容

模板:Quote/e

维基文库,自由的图书馆
文档图示 模板文档[查看] [编辑] [历史] [清除缓存]


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.

CSS

[编辑]

Target the wst-quote class with CSS to apply styles to this template. You can also specify your own class name with the {{{class}}} parameter (e.g. if the work has multiple quote styles).

A common use case is to remove the default right margin inset:

.wst-quote {
    margin-right: 0;		
}

See also

[编辑]

插入引用文本方框

模板参数[编辑模板数据]

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

参数描述类型状态
11

被引用文本

内容必需
classclass

更多CSS类

示例值
_custom_class
单行文本可选
alignalign

文字对齐方式

推荐值
center right left justify
字符串可选
stylestyle

更多CSS样式

单行文本可选
22

Citation author (rarely used in actual works)

未知可选
33

The cited work (rarely used in actual works)

未知可选