ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Automatic landscape figure rotation
@ 2011-06-14  9:29 Pontus Lurcock
  2011-06-14  9:40 ` luigi scarso
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Pontus Lurcock @ 2011-06-14  9:29 UTC (permalink / raw)
  To: ConTeXt list

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14  9:29 Automatic landscape figure rotation Pontus Lurcock
@ 2011-06-14  9:40 ` luigi scarso
  2011-06-14 10:15 ` luigi scarso
  2011-06-14 14:26 ` Ulrike Fischer
  2 siblings, 0 replies; 12+ messages in thread
From: luigi scarso @ 2011-06-14  9:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Jun 14, 2011 at 11:29 AM, Pontus Lurcock <pont@talvi.net> wrote:
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14  9:29 Automatic landscape figure rotation Pontus Lurcock
  2011-06-14  9:40 ` luigi scarso
@ 2011-06-14 10:15 ` luigi scarso
  2011-06-14 10:41   ` Wolfgang Schuster
  2011-06-14 14:26 ` Ulrike Fischer
  2 siblings, 1 reply; 12+ messages in thread
From: luigi scarso @ 2011-06-14 10:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Jun 14, 2011 at 11:29 AM, Pontus Lurcock <pont@talvi.net> wrote:
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14 10:15 ` luigi scarso
@ 2011-06-14 10:41   ` Wolfgang Schuster
  2011-06-14 10:54     ` luigi scarso
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Schuster @ 2011-06-14 10:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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]}

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14 10:41   ` Wolfgang Schuster
@ 2011-06-14 10:54     ` luigi scarso
  2011-06-14 11:54       ` Wolfgang Schuster
  0 siblings, 1 reply; 12+ messages in thread
From: luigi scarso @ 2011-06-14 10:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Jun 14, 2011 at 12:41 PM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14 10:54     ` luigi scarso
@ 2011-06-14 11:54       ` Wolfgang Schuster
  2011-06-14 13:39         ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Schuster @ 2011-06-14 11:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14 11:54       ` Wolfgang Schuster
@ 2011-06-14 13:39         ` Hans Hagen
  2011-06-14 13:51           ` Taco Hoekwater
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2011-06-14 13:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14 13:39         ` Hans Hagen
@ 2011-06-14 13:51           ` Taco Hoekwater
  2011-06-14 14:05             ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Taco Hoekwater @ 2011-06-14 13:51 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14 13:51           ` Taco Hoekwater
@ 2011-06-14 14:05             ` Hans Hagen
  0 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2011-06-14 14:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14  9:29 Automatic landscape figure rotation Pontus Lurcock
  2011-06-14  9:40 ` luigi scarso
  2011-06-14 10:15 ` luigi scarso
@ 2011-06-14 14:26 ` Ulrike Fischer
  2011-06-14 15:16   ` Taco Hoekwater
  2 siblings, 1 reply; 12+ messages in thread
From: Ulrike Fischer @ 2011-06-14 14:26 UTC (permalink / raw)
  To: ntg-context

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 

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14 14:26 ` Ulrike Fischer
@ 2011-06-14 15:16   ` Taco Hoekwater
  2011-06-14 22:54     ` Pontus Lurcock
  0 siblings, 1 reply; 12+ messages in thread
From: Taco Hoekwater @ 2011-06-14 15:16 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Automatic landscape figure rotation
  2011-06-14 15:16   ` Taco Hoekwater
@ 2011-06-14 22:54     ` Pontus Lurcock
  0 siblings, 0 replies; 12+ messages in thread
From: Pontus Lurcock @ 2011-06-14 22:54 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-06-14 22:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-14  9:29 Automatic landscape figure rotation Pontus Lurcock
2011-06-14  9:40 ` luigi scarso
2011-06-14 10:15 ` luigi scarso
2011-06-14 10:41   ` Wolfgang Schuster
2011-06-14 10:54     ` luigi scarso
2011-06-14 11:54       ` Wolfgang Schuster
2011-06-14 13:39         ` Hans Hagen
2011-06-14 13:51           ` Taco Hoekwater
2011-06-14 14:05             ` Hans Hagen
2011-06-14 14:26 ` Ulrike Fischer
2011-06-14 15:16   ` Taco Hoekwater
2011-06-14 22:54     ` Pontus Lurcock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).