模板:Hanging indent

維基百科,自由的百科全書
{{{1}}}
文件圖示 模板文件[檢視] [編輯] [歷史] [清除快取]

This template creates a paragraph with a hanging indent英語hanging indent.

Usage[編輯]

This template has one parameter, which may be unnamed, numbered as |1=, or named as either |text= or |content=. It is always safest to use the number or a name, since if it is unnamed, any = (equals) character in the content will break the template.

Wiki-markup example:

{{Hanging indent |text={{Lorem ipsum}}}}

produces:

本文為測試文字。這段文字用於說明格式,請勿刪除。這段文字用於說明格式,請勿刪除。海納百川,有容乃大。維基百科,自由的百科全書。

Indentation within indentation[編輯]

The entire paragraph itself can be indented and still preserve this hanging-indent effect relevant to its own indentation:

With {{In5}}[編輯]

{{Hanging indent |text={{in5}}{{Lorem ipsum}}}}

produces a slight indentation of wrapped material:

     本文為測試文字。這段文字用於說明格式,請勿刪除。這段文字用於說明格式,請勿刪除。海納百川,有容乃大。維基百科,自由的百科全書。

(But note that this will not work:

{{in5}}{{Hanging indent |text={{Lorem ipsum}}}}

because it's trying to apply inline style to a block element.)

With {{Block indent}}[編輯]

{{block indent|1={{Hanging indent |text={{Lorem ipsum}}}} }}

produces full indentation of wrapped material:

本文為測試文字。這段文字用於說明格式,請勿刪除。這段文字用於說明格式,請勿刪除。海納百川,有容乃大。維基百科,自由的百科全書。

Note: Do not abuse {{Quote}}, {{Pull quote}}, <blockquote>, or any other block quotation markup for non-quotations; the {{block indent}} template exists for a reason.

See also[編輯]

Category:Inline spacing templates英語Category:Inline spacing templates Category:Semantic markup templates英語Category:Semantic markup templates