模板:Quote
本模板使用以下模板样式: |
This template uses block elements, e.g. See H:DIVSPAN for details. |
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
[编辑]- Template:Itquote
- Template:Cquote
- Template:Quotation
- {{qhtml}}, for semantically marked up quotations in running text
插入引用文本方框
参数 | 描述 | 类型 | 状态 | |
---|---|---|---|---|
1 | 1 | 被引用文本 | 内容 | 必需 |
class | class | 更多CSS类
| 单行文本 | 可选 |
align | align | 文字对齐方式
| 字符串 | 可选 |
style | style | 更多CSS样式 | 单行文本 | 可选 |
2 | 2 | Citation author (rarely used in actual works) | 未知 | 可选 |
3 | 3 | The cited work (rarely used in actual works) | 未知 | 可选 |
上述文档嵌入自Template:Quote/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。 本模板的子页面。 |