ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Full-page Figure?
@ 2022-03-28 22:48 Michael Urban via ntg-context
  2022-03-29  1:37 ` śrīrāma via ntg-context
  2022-03-31  1:46 ` śrīrāma via ntg-context
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Urban via ntg-context @ 2022-03-28 22:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Michael Urban

I want to have a float (illustration for fiction, with caption) that takes up just one page, irrespective of the size of the image in the figure.   This can be done with a \startmakeup, but makeup pages do not float, as near as I can tell; they interrupt the text (leaving a partly blank page); and of course they will not include headers and footers.   And a float with [page] will start the figure on a new page as desired, but if the image is too small, other text will end up on the page, which is not the desired result.  I want to vertically (and horizontally) center the figure on the page, with no other content but glue, in the main text block.  Headers and footers should appear as normal.

Is there a simple way to accomplish this?

	Mike


___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Full-page Figure?
  2022-03-28 22:48 Full-page Figure? Michael Urban via ntg-context
@ 2022-03-29  1:37 ` śrīrāma via ntg-context
  2022-03-30 21:41   ` Michael Urban via ntg-context
  2022-03-31  1:46 ` śrīrāma via ntg-context
  1 sibling, 1 reply; 7+ messages in thread
From: śrīrāma via ntg-context @ 2022-03-29  1:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Michael Urban; +Cc: śrīrāma

On Tuesday, March 29, 2022 4:18 AM Michael Urban via ntg-context wrote:
> Is there a simple way to accomplish this?

I suppose you need 'postponing'. See
  https://wiki.contextgarden.net/Command/startpostponing
[One can specify a page explicitly, or, more conveniently, an offset]

First, we define a makeup and enable header, footer and page for it. Then we can put the float inside the makeup and wrap it with \start...\stoppostponing. Here is a MWE:

%%% start example
  \setupexternalfigures[location=default]
  \definemakeup
    [FloatPage]
  \setupmakeup
    [FloatPage]
    [headerstate=normal,
       pagestate=start,
           align=middle,
     footerstate=normal]

  \setupheadertexts[]
  \setupheadertexts[chapter][\date]
  \setupfootertexts[pagenumber]

  \starttext
  \startchapter [title={Chapter title}]
    \startpostponing[+1]
      \startFloatPagemakeup
      \placefigure{a floating cow}{\externalfigure[cow]}
      \stopFloatPagemakeup
    \stoppostponing
  \dorecurse{6}{\samplefile{knuth}}
  \blank

  \dorecurse{2}{\samplefile{tufte}}
  \stopchapter
  \stoptext
%%% stop example

Of course, I think some manual hand-tuning is required (in the final stages of the document) in deciding the right place to put the postponing block and in deciding what offset is best.

Sreeram


___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Full-page Figure?
  2022-03-29  1:37 ` śrīrāma via ntg-context
@ 2022-03-30 21:41   ` Michael Urban via ntg-context
  2022-03-31  1:13     ` śrīrāma via ntg-context
  2022-03-31  6:38     ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Urban via ntg-context @ 2022-03-30 21:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Michael Urban

Almost there.  But if I add \setuppagenumbering  [alternative=doublesided]
to the example, there is a blank page before the makeup page, and an unnumbered blank page after.  If I add doublesided=no to the
\setupmakeup options, the unnumbered blank page is not there, but there is still a blank page before.  It is seemingly forcing
a right-hand page for some reason I do not understand.

	Mike


> On Mar 28, 2022, at 6:37 PM, śrīrāma via ntg-context <ntg-context@ntg.nl> wrote:
> 
> On Tuesday, March 29, 2022 4:18 AM Michael Urban via ntg-context wrote:
>> Is there a simple way to accomplish this?
> 
> I suppose you need 'postponing'. See
>  https://wiki.contextgarden.net/Command/startpostponing
> [One can specify a page explicitly, or, more conveniently, an offset]
> 
> First, we define a makeup and enable header, footer and page for it. Then we can put the float inside the makeup and wrap it with \start...\stoppostponing. Here is a MWE:
> 
> %%% start example
>  \setupexternalfigures[location=default]
>  \definemakeup
>    [FloatPage]
>  \setupmakeup
>    [FloatPage]
>    [headerstate=normal,
>       pagestate=start,
>           align=middle,
>     footerstate=normal]
> 
>  \setupheadertexts[]
>  \setupheadertexts[chapter][\date]
>  \setupfootertexts[pagenumber]
> 
>  \starttext
>  \startchapter [title={Chapter title}]
>    \startpostponing[+1]
>      \startFloatPagemakeup
>      \placefigure{a floating cow}{\externalfigure[cow]}
>      \stopFloatPagemakeup
>    \stoppostponing
>  \dorecurse{6}{\samplefile{knuth}}
>  \blank
> 
>  \dorecurse{2}{\samplefile{tufte}}
>  \stopchapter
>  \stoptext
> %%% stop example
> 
> Of course, I think some manual hand-tuning is required (in the final stages of the document) in deciding the right place to put the postponing block and in deciding what offset is best.
> 
> Sreeram
> 
> 
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Full-page Figure?
  2022-03-30 21:41   ` Michael Urban via ntg-context
@ 2022-03-31  1:13     ` śrīrāma via ntg-context
  2022-03-31  6:38     ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 7+ messages in thread
From: śrīrāma via ntg-context @ 2022-03-31  1:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Michael Urban; +Cc: śrīrāma

On Thursday, March 31, 2022 3:11 AM Michael Urban via ntg-context wrote:
> Almost there.  But if I add \setuppagenumbering  [alternative=doublesided]
> to the example, there is a blank page before the makeup page, and an unnumbered blank page after.  If I add doublesided=no to the
> \setupmakeup options, the unnumbered blank page is not there, but there is still a blank page before.  It is seemingly forcing
> a right-hand page for some reason I do not understand.

That is an easy fix: \setupmakeup, just like \setuphead, has a 'page' key which controls this. So, using the below setup for the 'FloatPage' makeup you can get rid of the unwanted page:

  \setupmakeup
    [FloatPage]
    [ headerstate=normal,
        pagestate=start,
            align=middle,
      footerstate=normal,
            page=no,
      doublesided=no]

  Sreeram


___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Full-page Figure?
  2022-03-28 22:48 Full-page Figure? Michael Urban via ntg-context
  2022-03-29  1:37 ` śrīrāma via ntg-context
@ 2022-03-31  1:46 ` śrīrāma via ntg-context
  1 sibling, 0 replies; 7+ messages in thread
From: śrīrāma via ntg-context @ 2022-03-31  1:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Michael Urban; +Cc: śrīrāma

On Tuesday, March 29, 2022 4:18 AM Michael Urban via ntg-context wrote:
> Is there a simple way to accomplish this?

Aside from the other solution using makeup, a simpler way might be to just use the 'page' option for positioning the float. The following MWE achieves the same result as that with the makeup:

  \setuppagenumbering[alternative=doublesided]
  \setupexternalfigures[location=default]

  \setupheadertexts[]
  \setupheadertexts[chapter][\date]
  \setupfootertexts[pagenumber]

  \starttext
  \startchapter [title={Chapter title}]
  \dorecurse{2}{\samplefile{knuth}}
  \placefigure[page]{a floating cow}{\externalfigure[cow]} 
  \dorecurse{4}{\samplefile{knuth}}
  \blank

  \dorecurse{2}{\samplefile{tufte}}
  \stopchapter
  \stoptext

  Sreeram


___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Full-page Figure?
  2022-03-30 21:41   ` Michael Urban via ntg-context
  2022-03-31  1:13     ` śrīrāma via ntg-context
@ 2022-03-31  6:38     ` Hans Hagen via ntg-context
  2022-03-31 23:40       ` Michael Urban via ntg-context
  1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen via ntg-context @ 2022-03-31  6:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen, Michael Urban

On 3/30/2022 11:41 PM, Michael Urban via ntg-context wrote:
> Almost there.  But if I add \setuppagenumbering  [alternative=doublesided]
> to the example, there is a blank page before the makeup page, and an unnumbered blank page after.  If I add doublesided=no to the
> \setupmakeup options, the unnumbered blank page is not there, but there is still a blank page before.  It is seemingly forcing
> a right-hand page for some reason I do not understand.
does adding page=no help?

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Full-page Figure?
  2022-03-31  6:38     ` Hans Hagen via ntg-context
@ 2022-03-31 23:40       ` Michael Urban via ntg-context
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Urban via ntg-context @ 2022-03-31 23:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Michael Urban



> On Mar 30, 2022, at 11:38 PM, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> does adding page=no help?
> 
Yes.  Once again, everyone’s help has been spot on.

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2022-03-31 23:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28 22:48 Full-page Figure? Michael Urban via ntg-context
2022-03-29  1:37 ` śrīrāma via ntg-context
2022-03-30 21:41   ` Michael Urban via ntg-context
2022-03-31  1:13     ` śrīrāma via ntg-context
2022-03-31  6:38     ` Hans Hagen via ntg-context
2022-03-31 23:40       ` Michael Urban via ntg-context
2022-03-31  1:46 ` śrīrāma via ntg-context

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).