跳至內容

模板: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)

不明非必填