TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using ConTeXt Mk IV, and I'd like the text in a two-page document to line up like so:

+        +        +
+ xxx    +    xx  +
+ xxxx   +   xxx  +
+ xx     +        +
+        +   xxx  +
+ xxx    +  xxxx  +
+ xx     +  xxxx  +
+        +        +

I tried

    page 1 (should align flush right)
    page 2 (should align flush left)

but that doesn't work. None of [flush]inner/outer/left/right does. This despite the fact that in setuphead[subject],


does do the expected & desired thing.

Is there a magic word I've missed?



share|improve this question
also, can you provide a minimal working example? – Mica Dec 1 '10 at 20:18
the command \setupalign works for the align environment, eg, \startalign ... \stopalign – Mica Dec 1 '10 at 21:25
Since there have been no replies here, perhaps you should consider asking on the context mailing list. – Aditya Dec 3 '10 at 18:05
up vote 4 down vote accepted

This is a minimal example that works. Note that \setuppagenumbering[alternative=doublesided] is required -- it is the canonical way to tell ConTeXt we want doublesided typesetting. (\setuplayout[location=doublesided] is about the positioning of the page if the paper is larger than the page.)


odd page \page[yes]
even page \page[yes]
odd page  \page[yes]


The patching instructions below are no longer needed; this has been fixed in recent MkIV builds. (This remark added 2012-06-12.)

  • As the code is currently (d.d. 2012-02-20), \startalignment[outer] must be called on an even-numbered (i.e. left-hand) page. If it is called on page 1, or page 3, it does not work. Putting \setupalign[outer] in the preamble does not work, either. This will probably be patched in the upcoming beta, or the impatient can patch tex/texmf-context/tex/context/base/spac-ali.mkiv as follows:

         % 0
         % 1 center
         % ----<some lines left out>----
         % 5 outer
    %%%%%% Faulty line:
    %%%%%% Replace with:
         % 6 oneliner
         % 7 centered last line

After patching this core file, run context --make en (in any directory) to remake the formats. Now \setupalign[outer] and \startalign[outer] both work.

share|improve this answer

According to the Context wiki, \setupalign recognises the following keywords:

width flushleft flushright middle inner outer wide broad height bottom line reset hanging nothanging hyphenated nothyphenated

So what you are trying to do does not seem to be supported. It might be easy to change this however, by extending the behaviour of \setupalign: following Aditya's advice to contact the Context mailing list would be a way to find out.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.