మూస:Dotted summary row no image
|
Description
మార్చుA template to obtain a dotted row to be used into summaries. Note that the dots and other border styles may appear differently from browser to browser.
Usage
మార్చుYou MUST enclose a series of one or more calls to this template with an HTML table tag, as below.
Code:
<table width="500px" align="center" style="background-color:transparent;">{{Dotted summary row no image|Title of chapter 1|14}} {{Dotted summary row no image|{{x-larger|Title of chapter 2}}|{{x-larger|15}}|border-width=3px}} {{Dotted summary row no image|{{smaller|Title of chapter 3}}|{{smaller|16}}|border-width=1px}} {{Dotted summary row no image|Title of chapter 4|17|border-style=dashed}} {{Dotted summary row no image|Title of chapter 5|18|border-style=solid}}</table>
Result:
| |||
| |||
| |||
| |||
|
Line breaking
మార్చుThe way the HTML code works, line breaking cannot be handled automatically. By default, the template will force everything onto one line.
If you have a line that is long enough to wrap, you must manually insert the line break into the final line. (The preceding lines can be wrapped automatically.)
Code:
<table width="500px" align="center" style="background-color:transparent;">{{Dotted summary row no image/sandbox|ftplines=Title of chapter 5, Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,|finalline=sunt in culpa qui officia deserunt mollit anim id est laborum|pagenum=18}}</table>
Result:
|
You pass the first few lines as the parameter {{{ftplines}}} (first to penultimate lines) and then the last line as parameter {{{finalline}}}. You must then explicitly pass the page number as parameter {{{pagenum}}} - i.e. you have to say pagenum=n, you can't just leave it as an unnamed parameter.
Note that, unfortunately, the line will probably wrap at a different point on different browsers and on different computers, so you'll probably need to compare and choose a point somewhere in the middle of all those variants. Or of course you could just use {{Dotted summary row}} instead, which is able to wrap automatically.
Hanging indent
మార్చుWhen breaking across multiple lines there is a {{{hanging indent}}} parameter available.
Code:
<table width="500px" align="center" style="background-color:transparent;">
{{Dotted summary row no image|ftplines=Title of the chapter 5, Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat|finalline=non proident, sunt in culpa qui officia deserunt mollit anim id est laborum|pagenum=18|hanging-indent=2em}}</table>
Result:
|
Parameters
మార్చు- {{{1}}} or text - The text or section title to appear on the left hand side
- {{{2}}} or pagenum - The page number to appear on the right hand side
- border-width - Controls the size of the dots or other border. Value may be any valid CSS value. Defaults to "2px".
- border-style - Controls the style of the line (CSS border) used. Value may be any valid CSS border-style value: none, hidden, dotted, dashed, solid, double, dot-dash, dot-dot-dash, wave, groove, ridge, inset, or outset as of 2010, though not all values may work in all browsers. Defaults to "dotted".
- finalline - See Line breaking above. No value by default.
- ftplines - See Line breaking above. No value by default.
- hanging-indent - See Hanging indent above. No value by default.
Disadvantages
మార్చు- The necessary HTML code requires any line wraps to be manually inserted as demonstrated above.
- Uses nested HTML tables, stylistically a no-no, to ensure cross-browser compatibility.
- Because the semantics and implementation of dotted and dashed borders are not fully specified as of CSS 3, output may appear different between different browsers.
See also
మార్చు- {{Dotted summary row}} - a similar template with simpler HTML, using an image for the dots and permitting the summary text to wrap automatically.