# Is it even possible to rotate the whole 'text' frame on a ConTeXt document?

This is 100% curiosity. Just came to mind if there's possible to rotate to some degree the whole text frame of a ConTeXt (Mark IV) document. I guess the \rotate command would do the trick, but I couldn't figure out how to apply it to the text frame (via \setupframed). I read on a question on this site that "all floats support rotation" (Rotate a placetable/placefigure plus caption in ConTeXt?) but I really don't know if the text frame (or any other frame) count as float.

Any clue is hugely appreciated!

• Not providing a minimal example (or see here) is a sure way to discourage answers; and since ConTeXt is not as widely used as it probably should be, you are probably better off not discouraging any potential answerers. – jon Apr 15 '16 at 1:20
• What do you mean by text frame? Everything between \starttext ... \stoptext? – Aditya Apr 15 '16 at 4:14
• @jon: It's no use, and in this case it has no sense, to give a minimal example. It could be anything written in ConTeXt. – acidrums4 Apr 15 '16 at 10:35
• @Aditya: Yes, as the text typeset area defined on the wiki. Not including pagenumbers, headers, footers and such. – acidrums4 Apr 15 '16 at 10:35

To rotate the typeset area, you need to define a new output routine. In the example below, I define a new routine that rotates each shipout box by 10 degrees. The \showframe is only for visualization purposes.

\unprotect
\unexpanded\def\page_shipout_rotatepage#1%
{\writestatus{rotatepage}{rotating \the\realpageno}%
\page_shipouts_normal{\rotate[rotation=10]{#1}}}

\installshipoutmethod{rotatepage}\page_shipout_rotatepage

\setuppaper
[\c!method=rotatepage]

\protect

\showframe
\starttext
\dorecurse{10}{\input knuth\endgraf}
\stoptext


This is what the first page looks like:

Thanks to @Metafox, you can also implement this without using protected mode by using \invokepagehandler{normal} instead of \page_shipouts_normal.

\unexpanded\def\PageShipoutRotatePage#1%
{\writestatus{rotatepage}{rotating \the\realpageno}%
\invokepagehandler{normal}{\rotate[rotation=10]{#1}}}

\installshipoutmethod{rotatepage}\PageShipoutRotatePage

\setuppaper
[method=rotatepage]

\showframe
\starttext
\dorecurse{10}{\input knuth\endgraf}
\stoptext

• Kind of what I was imaging. Thank you so much! – acidrums4 Apr 16 '16 at 16:39
• @Aditya You can replace \page_shipouts_normal{...} with \invokepagehandler{normal}{...} to avoid the use of internal commands. – Wolfgang Schuster Apr 16 '16 at 16:48

Perhaps

\framed{\rotate[rotation=-34]{\framedtext{\input knuth\relax}}}


?