Automatic landscape figure rotation
Dear ConTeXters, I have a full-page, landscape figure in my double-sided document which I rotate 90° to fit the page. In all the books I've seen, such figures are rotated ‘outward’ -- i.e. with the top towards the binding, so 90° clockwise on verso pages and 90° anticlockwise on recto. Is there a simple way to do this automatically in ConTeXt? At the moment I just check where the figure ends up, then change it manually. (Apologies if there is a documented answer -- I've searched the wiki and docs, but it's the kind of question which is hard to reduce into keywords.) Thanks, POnt
On Tue, Jun 14, 2011 at 11:29 AM, Pontus Lurcock
Dear ConTeXters,
I have a full-page, landscape figure in my double-sided document which I rotate 90° to fit the page. In all the books I've seen, such figures are rotated ‘outward’ -- i.e. with the top towards the binding, so 90° clockwise on verso pages and 90° anticlockwise on recto. Is there a simple way to do this automatically in ConTeXt? At the moment I just check where the figure ends up, then change it manually. So the orientation depends if it's on an even or odd page, right ?
-- luigi
On Tue, Jun 14, 2011 at 11:29 AM, Pontus Lurcock
Dear ConTeXters,
I have a full-page, landscape figure in my double-sided document which I rotate 90° to fit the page. In all the books I've seen, such figures are rotated ‘outward’ -- i.e. with the top towards the binding, so 90° clockwise on verso pages and 90° anticlockwise on recto. Is there a simple way to do this automatically in ConTeXt? At the moment I just check where the figure ends up, then change it manually.
(Apologies if there is a documented answer -- I've searched the wiki and docs, but it's the kind of question which is hard to reduce into keywords.) Here is an idea
\starttext \dorecurse{100}{ \input knuth \ifodd\realpageno\relax \rotate[rotation=90]{\externalfigure[cow]} \else \rotate[rotation=270]{\externalfigure[cow]} \fi } \stoptext PS I've used an old minimals: \rotate seems be broken in latest minimals -- luigi
On Tue, Jun 14, 2011 at 12:41 PM, Wolfgang Schuster
Am 14.06.2011 um 12:15 schrieb luigi scarso:
\ifodd\realpageno\relax \rotate[rotation=90]{\externalfigure[cow]} \else \rotate[rotation=270]{\externalfigure[cow]} \fi
\rotate[rotation=\doifoddpageelse{90}{270}]{\externalfigure[cow]}
It depends on the dimensions of the picture \starttext \dorecurse{100}{ \input knuth \ifodd\realpageno\relax \hbox to\textwidth{\rotate[rotation=90]{\externalfigure[cow]}\hfill} \else \hbox to\textwidth{\hfill\rotate[rotation=270]{\externalfigure[cow]}} \fi } \stoptext -- luigi
Am 14.06.2011 um 12:54 schrieb luigi scarso:
\ifodd\realpageno\relax \hbox to\textwidth{\rotate[rotation=90]{\externalfigure[cow]}\hfill} \else \hbox to\textwidth{\hfill\rotate[rotation=270]{\externalfigure[cow]}} \fi }
ConTeXt has commands for all these things: \doifoddpageelse {\leftaligned {\rotate[rotation=90] {...}}} {\rightaligned{\rotate[rotation=270]{...}}} Wolfgang
On 14-6-2011 1:54, Wolfgang Schuster wrote:
Am 14.06.2011 um 12:54 schrieb luigi scarso:
\ifodd\realpageno\relax \hbox to\textwidth{\rotate[rotation=90]{\externalfigure[cow]}\hfill} \else \hbox to\textwidth{\hfill\rotate[rotation=270]{\externalfigure[cow]}} \fi }
ConTeXt has commands for all these things:
\doifoddpageelse {\leftaligned {\rotate[rotation=90] {...}}} {\rightaligned{\rotate[rotation=270]{...}}}
since a few days the beta also has rotation=left|right|inner|outer per request by taco (although no final word yet on if i need to swap 'm) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 06/14/2011 03:39 PM, Hans Hagen wrote:
since a few days the beta also has rotation=left|right|inner|outer per request by taco (although no final word yet on if i need to swap 'm)
Ah, I forgot. I am not sure what you meant to achieve with 'left' and 'right', but compared to the code you sent me, you indeed have to swap the rotations for 'inner' and 'outer'. Best wishes, Taco
On 14-6-2011 3:51, Taco Hoekwater wrote:
On 06/14/2011 03:39 PM, Hans Hagen wrote:
since a few days the beta also has rotation=left|right|inner|outer per request by taco (although no final word yet on if i need to swap 'm)
Ah, I forgot. I am not sure what you meant to achieve with 'left' and 'right', but compared to the code you sent me, you indeed have to swap the rotations for 'inner' and 'outer'.
left and right also rotate but don't use the (multipass) page state Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am Tue, 14 Jun 2011 21:29:44 +1200 schrieb Pontus Lurcock:
I have a full-page, landscape figure in my double-sided document which I rotate 90° to fit the page. In all the books I've seen, such figures are rotated ‘outward’ -- i.e. with the top towards the binding, so 90° clockwise on verso pages and 90° anticlockwise on recto.
I have seen this rotation too but I don't find them really good. If you have two such figures on a double page you will have to rotate the book by 180° to see them both. Also if you hold the book in your left hand and change the pages with the right hand it is more natural to turn the book clockwise to read something in landscape. So I would put everything with the top to the left side, and if you don't like this on left pages: Put landscape figures only on right pages. -- Ulrike Fischer
On 06/14/2011 04:26 PM, Ulrike Fischer wrote:
Am Tue, 14 Jun 2011 21:29:44 +1200 schrieb Pontus Lurcock:
I have a full-page, landscape figure in my double-sided document which I rotate 90° to fit the page. In all the books I've seen, such figures are rotated ‘outward’ -- i.e. with the top towards the binding, so 90° clockwise on verso pages and 90° anticlockwise on recto.
I have seen this rotation too but I don't find them really good. If you have two such figures on a double page you will have to rotate the book by 180° to see them both. Also if you hold the book in your left hand and change the pages with the right hand it is more natural to turn the book clockwise to read something in landscape.
So I would put everything with the top to the left side, and if you don't like this on left pages: Put landscape figures only on right pages.
So that is what 'left' and 'right' are for. Best wishes, Taco
Luigi, Wolfgang, Hans, Taco: thank you for the replies. I will update the wiki later today. Ulrike: I take your point about the inconvenience of such figures. Fortunately I don't have any adjacent ones so at least readers won't have to perform any 180° rotations. I'll play with the options and see what seems most convenient (or least inconvenient). Pont
participants (6)
-
Hans Hagen
-
luigi scarso
-
Pontus Lurcock
-
Taco Hoekwater
-
Ulrike Fischer
-
Wolfgang Schuster