[Tex/LaTex] Center in ConTeXt

contexthorizontal alignment

What is the equivalent of \begin{center}...\end{center} in ConTeXt? I know \raggedcenter, but that not an environment. I could define one command, but surely there is anything like that predefined.

Best Answer

For one line use \midaligned{Some text}, or in newer versions:

\startlinealignment [middle]
  Some text
\stoplinealignment

for multiple lines use

\startalignment [middle]
  \input knuth
\stopalignment

See Wiki - alignment

Related Question