ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Full page image and caption in another page?
Date: Wed, 23 Sep 2020 15:08:59 +0200	[thread overview]
Message-ID: <7A5456E3-E13C-464E-AC49-0FB56A1D3C7D@elvenkind.com> (raw)
In-Reply-To: <CAF3vEt_r+EdyJAgsHU5F2uxSoEbX4RkbcHmZP6=-obvqtOTQKQ@mail.gmail.com>

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
___________________________________________________________________________________

      reply	other threads:[~2020-09-23 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22 17:42 José de Mattos Neto
2020-09-23 13:08 ` Taco Hoekwater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7A5456E3-E13C-464E-AC49-0FB56A1D3C7D@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).