Re: [NTG-context] Full page image and caption in another page?

2020-09-23 Thread Taco Hoekwater
Hi,

This sounds quite complicated, really. 

I am not at all sure how this page rotation should work but I assume you plan a 
pdf-only document then?  Otherwise, I would expect rotating the figure instead 
of the whole page. Also, rotating the paper does not rotate the layout, at 
least not if you use a fixed height and width. You would need something like 
this for auto-resizing \textheight and \textwidth:

\definelayout[default][topspace=0.6cm, topdistance=0cm, header=1cm, 
headerdistance=0cm,
   height=fit, footer=0cm,
   backspace=4.2cm, width=fit]

Another problem is that setting the width and height of a float does not affect 
any externafigure side. You need to do a \setupexternalfigure for that.

And there is (afaik) no support for having a “two-page” float. The “opposite” 
key is used to put the float (including caption) on the opposite side of the 
current page.

But at least there is a command to typeset a caption standalone, so perhaps 
that will help? You would then *not* use the \startplacebigfigure, but place 
the caption and the image manually:

\page
\placefloatcaption[bigfigure][title={A cow}]
\page
\externalfigure[cow]
\page

Best wishes,
Taco


> On 22 Sep 2020, at 19:42, José de Mattos Neto  wrote:
> 
> Hi, it's my first message on this list.
> I've searched in ConTeXt manuals, TeX.SX and here, but couldn't find a way to 
> achieve these 4 requirements altogether:
> 
>   • Place a figure as full-page figure
>   • Change orientation accordingly (if it's a landscape PDF, for instance)
>   • Make that using \setupfloat (or other setup), not directly in 
> \placefloat
>   • Place captions in another page (ideally on opposite page)
> Problems:
>   • I can't get # 1 and # 3 at same time
>   • \setupfloat doesn't have before option, which I could use to change 
> orientation
>   • I have no idea how to accomplish # 4
> A minimal working example (PDF in attachment):
> 
> %%%
> \definepapersize[default][A4, portrait]
> \definelayout[default][topspace=0.6cm, topdistance=0cm, header=1cm, 
> headerdistance=0cm,
>height=27.3cm, footer=0cm,
>backspace=4.2cm, width=13.6cm]
> \setuppapersize[default]
> \setuplayout[default]
> \setuppagenumbering[alternative=doublesided, location={header}]
> \setupexternalfigures[location={default}]
> 
> \definepapersize[rotate][A4, landscape]
> \definefloat[bigfigure][bigfigures][figure]
> \setupfloat[bigfigure][default={page},
>width=1\textwidth, height=1\textheight,
>before={\setuppapersize[rotate]}] % there's no before 
> in setupfloat
> \setupcaption[bigfigure][location={opposite}] % there's no opposite location 
> in setupcaption
> 
> \starttext
> \showframe
> \dorecurse{2}{\input{knuth}}
> 
> \setuppapersize[rotate] % this doesn't work because is in same page
> \startplacebigfigure[title={A cow}]{\externalfigure[cow]}\stopplacebigfigure
> \setuppapersize[default]
> 
> \dorecurse{2}{\input{knuth}}
> \stoptext
> %%%
> 
> Thanks in advance!
> José Neto
> ___
> 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
> ___

Taco Hoekwater
Elvenkind BV




___
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
___


[NTG-context] Full page image and caption in another page?

2020-09-22 Thread José de Mattos Neto
Hi, it's my first message on this list.

I've searched in ConTeXt manuals, TeX.SX and here, but couldn't find a way
to achieve these 4 requirements altogether:

   1. Place a figure as full-page figure
   2. Change orientation accordingly (if it's a landscape PDF, for instance)
   3. Make that using \setupfloat (or other setup), not directly in
   \placefloat
   4. Place captions in another page (ideally on opposite page)

Problems:

   - I can't get # 1 and # 3 at same time
   - \setupfloat doesn't have before option, which I could use to change
   orientation
   - I have no idea how to accomplish # 4

A minimal working example (PDF in attachment):

%%%
\definepapersize[default][A4, portrait]
\definelayout[default][topspace=0.6cm, topdistance=0cm, header=1cm,
headerdistance=0cm,
   height=27.3cm, footer=0cm,
   backspace=4.2cm, width=13.6cm]
\setuppapersize[default]
\setuplayout[default]
\setuppagenumbering[alternative=doublesided, location={header}]
\setupexternalfigures[location={default}]

\definepapersize[rotate][A4, landscape]
\definefloat[bigfigure][bigfigures][figure]
\setupfloat[bigfigure][default={page},
   width=1\textwidth, height=1\textheight,
   before={\setuppapersize[rotate]}] % there's no
before in setupfloat
\setupcaption[bigfigure][location={opposite}] % there's no opposite
location in setupcaption

\starttext
\showframe
\dorecurse{2}{\input{knuth}}

\setuppapersize[rotate] % this doesn't work because is in same page
\startplacebigfigure[title={A cow}]{\externalfigure[cow]}\stopplacebigfigure
\setuppapersize[default]

\dorecurse{2}{\input{knuth}}
\stoptext
%%%

Thanks in advance!
José Neto


mwe.pdf
Description: Adobe PDF document
___
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
___