Templat:Hanging indent inherit/dok
Halaman ini belum selesai diterjemahkan. Anda dapat melihat terjemahannya dengan menggunakan Google Translate™. Hanya karya dan terjemahan dalam bahasa Indonesia yang diperbolehkan di Wikisumber. Bantulah untuk menerjemahkannya. |
Usage
suntingThis template applies a hanging indent as a division <div> (default) or as paragraph <p>, and it inherits any previously applied formatting (the margins are generally the most important in this context, as they will "accumulate"). It acts as a wrapper around text, rather than embedding the text into the template. Consequently the template needs to be closed with {{div end}} to function properly.
Note that this template functions differently from {{hanging indent}}
Parameters
sunting- {{{1}}}: indentation (in em) of first line relative to the other lines of the paragraph (i.e. CSS "text-indent")
- {{{2}}}: indentation (in em) of the whole paragraph (i.e. the CSS "margin-left")
Note: indentation is measured rightwards. To "reverse indent" (make a line stick out to the left), enter a negative value.
Examples
suntingDefaults: hanging indent
sunting- {{hii}} = {{hii|0|2}}
- First line 0em from relative position
- Remaining lines indented further 2em:
{{hanging indent inherit}}{{lorem ipsum}} {{div end}}
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.
Example2: two indented paragraphs
sunting- For each paragraph:
- First line 0em from relative position
- Remaining lines indented further 2em
{{hanging indent inherit}}{{lorem ipsum}} {{hanging indent inherit}}{{lorem ipsum}} {{div end}} {{div end}}
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.
Example 3: two differently indented paragraphs
sunting- First paragraph:
- Start 2em from relative, and remaining lines indented 2em
- Second paragraph
- Start 1em from relative, and remaining lines indented 1em
{{hanging indent inherit|2|2}}{{lorem ipsum}} {{hanging indent inherit|1|1}}{{lorem ipsum}} {{div end}}{{div end}}
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.
Example 4: traditionally indented paragraphs
suntingThis template can be used for traditional first line indent. However this is not recommended, as this is more efficiently done using a CSS style such as "text-indent:2em".
- first line 2em, paragraph -2 relative
- first line 1em, paragraph -1 relative
{{hanging indent inherit|2|-2}}{{lorem ipsum}} {{hanging indent inherit|1|-1}}{{lorem ipsum}} {{div end}}{{div end}}
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.
{{PUU-pasal|{{hii|2|0}}{{lorem ipsum}}{{div end}}|{{PUU-ayat|m=2|{{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.
|
{{PUU-pasal|{{hii|0|1.67}}1A. {{lorem ipsum}}{{div end}}|{{PUU-nomor|m=2|{{lorem ipsum}}}}}}
1A. 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
sunting- {{hanging indent}}
- {{left margin}}
- {{outdent}}