\startcomponent ma-cb-en-alignments

\enablemode[**en-us]

\project ma-cb

\startchapter[title=Alignment]

\index{alignment}

\Command{\tex{setupalign}}
\Command{\tex{setup tolerance}}
\Command{\tex{rightaligned}}
\Command{\tex{leftlines}}
\Command{\tex{midaligned}}

Horizontal and vertical alignment can be set up with:

\shortsetup{setupalign}

Single lines can be aligned with:

\starttyping
\rightaligned{}
\leftaligned{}
\midaligned{}
\stoptyping

An example can illustrate the alignment behavior:

\startbuffer
\leftaligned  {Hasselt was built on a sandhill.}
\midaligned   {Hasselt was built on the crossing of two rivers.}
\rightaligned {Hasselt's name stems from hazelwood.}
\stopbuffer

\typebuffer

After processing this would look like:

\getbuffer

Alignment of a paragraph is done with:

\shortsetup{startalignment}

\startbuffer
\startalignment[flushright,nothyphenated]
  For Hasselt the 15th and 16th century were relatively unstable times.
  There were uprises and disputes with neighbouring cities. To be
  able to defend themselves the city council ordered a number of
  arquebuses (very primitive firearms). Fourteen of these have survived
  and now form one of the greatest arquebus collections in Europe.
\stopalignment
\stopbuffer

\typebuffer

This will become a rightaligned paragraph without hyphenations:

\getbuffer

In case of alignment you can specify a tolerance and the direction (vertical or
horizontal). Normally the tolerance is \type{verystrict}. In colums you could
specify \type{verytolerant}. The tolerance in this manual is:

\starttyping
\setuptolerance[horizontal,verystrict]
\stoptyping

\stopchapter

\stopcomponent
