Template:Bar/doc

From Wikisource
Jump to: navigation, search

Usage[edit]

The template gives an inline straight line, sometimes used to mark redactions, missing text or the continuation of a excerpt.

You should not use a sequence of em-dashes to produce this effect, as with some browsers or fonts this appears as a dashed line. This template is not suitable for a centred dividing line - the template {{rule}} is for that.

There is one parameter, the length of the line, in "ems", which default to "6" if left out.

Examples[edit]

{{bar}}{{lorem ipsum}}

——————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, sunt in culpa qui officia deserunt mollit anim id est laborum.

<poem>
{{bar|3}}continued line
whole line here, which is all very well until
half a line{{bar|3}}
</poem>

———continued line
whole line here, which is all very well until
half a line———

Technical[edit]

This template uses two "span" tags, one to give the strike-though and one inside that holding invisible em-dashes. This has the following benefits:

  • does not use the deprecated (in HTML 4.01) and redefined (in HTML 5) <s> tag
  • copy-pastes as em-dashes (—) instead of blank space
  • shows em-dashes if CSS is disabled or not available

See also[edit]