ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Full page image and caption in another page?
@ 2020-09-22 17:42 José de Mattos Neto
  2020-09-23 13:08 ` Taco Hoekwater
  0 siblings, 1 reply; 2+ messages in thread
From: José de Mattos Neto @ 2020-09-22 17:42 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1923 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 3020 bytes --]

[-- Attachment #2: mwe.pdf --]
[-- Type: application/pdf, Size: 19297 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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] 2+ messages in thread

* Re: Full page image and caption in another page?
  2020-09-22 17:42 Full page image and caption in another page? José de Mattos Neto
@ 2020-09-23 13:08 ` Taco Hoekwater
  0 siblings, 0 replies; 2+ messages in thread
From: Taco Hoekwater @ 2020-09-23 13:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <josepmneto@gmail.com> 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
> <mwe.pdf>___________________________________________________________________________________
> 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
___________________________________________________________________________________

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

end of thread, other threads:[~2020-09-23 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 17:42 Full page image and caption in another page? José de Mattos Neto
2020-09-23 13:08 ` Taco Hoekwater

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