Jump to content

Template:Centalign right/doc

From Wikisource

This template may be used to display centrally aligned equations with a label to their right.

Usage

[edit]
 {{centalign_right|left_part|right_part|label}}

The template has three unnamed mandatory arguments.

  • The first argument is the part of the equation left of the point of alignment.
  • The second argument is the part of the equation right of the point of alignment.
  • The third argument is the equation's label.

Effects

[edit]

The first two arguments are displayed centred at full width with an alignment point at 45% of full width. The alignment point is fixed, so the template is useful for multiple consecutive use. The third argument, the label, is displayed flushed-right at 90% width.

Example

[edit]
 {{centalign_right|2+2|<5|(''a'')}}{{centalign_right|5+5|<11|(''b'')}}

produces:

2+2 <5 (a)

5+5 <11 (b)


Caveats

[edit]
  • The point of alignment is fixed. This may produce ugly results if one part of the equation is much larger than the other.
  • When you manually restrict the text width, e.g. <div style="width:30em">...</div> without also specifying a position parameter, e.g. <div style="width:30em;position:relative">...</div>, the template may use a wrong width, leading to unexpected results.

Limitations

[edit]

If the total length of the arguments is too great, overlapping may occur.

See also

[edit]