![]() | This is a documentation subpage for Template:Textalign. It contains usage information, categories and other content that is not part of the original template page. |
This template may be used to align several equations with left flushed text.
Usage
edit{{textalign|text1|left_eq1|right_eq1 [ |text2|left_eq2|right_eq2 … ] [ |sizehint=numeric ]}}
The template takes arguments in groups of three:
- The first argument of each group produces left flushed text.
- The second argument of each group produces the part of the equation left of the alignment point.
- The third argument of each group produces the part of the equation right of the alignment point.
Optionally, the named parameter sizehint
may be used to control the width of the left part of the equations. Any numeric CSS value is allowed. The default is 40%
.
Effects
editThe text arguments are displayed flushed-left. The equation arguments are aligned right and left, respectively, about the alignment point. The alignment point is usually centred on page but will move when a template argument would not otherwise fit properly. Furthermore, the location of the alignment point can be influenced with the sizehint
parameter.
Examples
edit{{textalign|foo|<math>a</math>|<math>\leq b</math>|bar||<math>\leq c</math>}}
produces:
foo | ||
bar |
{{textalign|foo|<math>a</math>|<math>\leq b</math>|bar||<math>\leq c</math>|sizehint=100px}}
produces:
foo | ||
bar |
Caveats
edit- With very large arguments, unintended line breaking may occur.
- Parameters containing an equal sign must be named explicitly.
Limitations
edit- Currently, only up to four equations (twelve parameters) are supported, but more may be added easily.
- Due to bugzilla:10800, some equations may not appear properly aligned.
See also
edit