# Template:Textalign

From Wikisource

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[edit]

The 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]

The above documentation is transcluded from Template:Textalign/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |