Template talk:Textalign

From Wikisource
Jump to: navigation, search

This template may be used to align several equations with left flushed text.


 {{textalign|text1|left_eq1|right_eq1 [ |text2|left_eq2|right_eq1 … ] [ |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%.


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.


 {{textalign|foo|<math>a</math>|<math>\leq b</math>|bar||<math>\leq c</math>}}


foo a \leq b
bar \leq c

 {{textalign|foo|<math>a</math>||3=<math>=b</math>|bar||<math>\leq c</math>}}


foo a =b
bar \leq c

 {{textalign|foo|<math>a</math>|<math>\leq b</math>|bar||<math>\leq c</math>|sizehint=100px}}


foo a \leq b
bar \leq c


  • With very large arguments, unintended line breaking may occur.
  • Parameters containing an equal sign must be named explicitly.


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