ConTeXt - Unwanted empty page with doublesided document

When I use `alternative=doublesided` in `\setuppagenumbering` I get an extra white page if my document has an odd number of pages. How can I get rid of it?

Following I post a minimal example to get the extra page:

``````\setuppagenumbering[alternative=doublesided]

\starttext

test

\stoptext
``````

Add `page=no`.

``````\setuppagenumbering[alternative=doublesided,page=no]
\starttext
test
\stoptext
``````

How did you find that out?

It's not documented (at least not in any obvious place) so what I did was search the code

``````grep -r --include=*.mkiv setuppagenumbering "\$(kpsexpand '\$TEXMFCONTEXT')/tex/context"
``````

The result `strc-pag.mkiv` looked most promising, so I opened the file. There the macro `\strc_pagenumbers_flush_final_page` looks very much like flushing an empty page if the parameter `page` is set to `no`. So I tried adding the parameter `page=no` and it worked.

• There's also `\installpagebreakhandler{last}{}` – user31316 Jul 16 '18 at 19:09