ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bleeding pictures as floats?
@ 2015-05-04 10:53 Henning Hraban Ramm
  2015-05-04 11:10 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Henning Hraban Ramm @ 2015-05-04 10:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi, I hope BachoTeX was a success!

Is it possible to use the float placing mechanisms for pictures that go beyond the type area or even beyond the page?

In the book I’m typesetting, most pictures need to fill the whole width of the page (i.e. plus 3mm bleed), but not all cover a full page.

I don’t know how to tell \externalfigure or \placefloat a negative offset.
Or can I use layers with floats? Of course the text should flow around the pictures.

BTW, what does the „object“ key of \setupexternalfigures do?

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

* Re: Bleeding pictures as floats?
  2015-05-04 10:53 Bleeding pictures as floats? Henning Hraban Ramm
@ 2015-05-04 11:10 ` Wolfgang Schuster
  2015-05-04 11:54   ` Henning Hraban Ramm
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2015-05-04 11:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


> Am 04.05.2015 um 12:53 schrieb Henning Hraban Ramm <texml@fiee.net>:
> 
> Hi, I hope BachoTeX was a success!
> 
> Is it possible to use the float placing mechanisms for pictures that go beyond the type area or even beyond the page?
> 
> In the book I’m typesetting, most pictures need to fill the whole width of the page (i.e. plus 3mm bleed), but not all cover a full page.
> 
> I don’t know how to tell \externalfigure or \placefloat a negative offset.
> Or can I use layers with floats? Of course the text should flow around the pictures.

Does the details manual  [1] answer your questions?

[1] http://pragma-ade.com/show-man-27.htm <http://pragma-ade.com/show-man-27.htm>

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Bleeding pictures as floats?
  2015-05-04 11:10 ` Wolfgang Schuster
@ 2015-05-04 11:54   ` Henning Hraban Ramm
  2015-05-04 20:59     ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Henning Hraban Ramm @ 2015-05-04 11:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2015-05-04 um 17:10 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

>> Is it possible to use the float placing mechanisms for pictures that go beyond the type area or even beyond the page?
>> 
>> In the book I’m typesetting, most pictures need to fill the whole width of the page (i.e. plus 3mm bleed), but not all cover a full page.
>> 
>> I don’t know how to tell \externalfigure or \placefloat a negative offset.
>> Or can I use layers with floats? Of course the text should flow around the pictures.
> 
> Does the details manual  [1] answer your questions?
> 
> [1] http://pragma-ade.com/show-man-27.htm

Thank you, that helped, but not enough.

I have now:

\def\bleed{3mm}
\def\maxWidth{\dimexpr(\paperwidth+\bleed)}

\definefloat[bleedfigure][figure]
\setupfloat[bleedfigure]
[
outermargindistance=-\bleed, % does that exist?
leftmargindistance=-\bleed,
rightmargindistance=-\bleed,
default={cutspace,none},
maxwidth=\maxWidth
]

\def\topfig#1#2{\placebleedfigure[top]{#1}{\offset[topoffset=\dimexpr(-\topspace-\bleed)]{\externalfigure[#2][width=\maxWidth]}}}

With that my pictures start at 0,-3mm, but they should start at -3mm,-3mm on a left page. Their maximum width is only \paperwidth, without bleed.
Where’s my mistake?

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

* Re: Bleeding pictures as floats?
  2015-05-04 11:54   ` Henning Hraban Ramm
@ 2015-05-04 20:59     ` Wolfgang Schuster
  2015-05-06  5:06       ` Henning Hraban Ramm
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2015-05-04 20:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 04.05.2015 um 13:54 schrieb Henning Hraban Ramm <texml@fiee.net>:
> 
> Am 2015-05-04 um 17:10 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:
> 
>>> Is it possible to use the float placing mechanisms for pictures that go beyond the type area or even beyond the page?
>>> 
>>> In the book I’m typesetting, most pictures need to fill the whole width of the page (i.e. plus 3mm bleed), but not all cover a full page.
>>> 
>>> I don’t know how to tell \externalfigure or \placefloat a negative offset.
>>> Or can I use layers with floats? Of course the text should flow around the pictures.
>> 
>> Does the details manual  [1] answer your questions?
>> 
>> [1] http://pragma-ade.com/show-man-27.htm
> 
> Thank you, that helped, but not enough.
> 
> I have now:
> 
> \def\bleed{3mm}
> \def\maxWidth{\dimexpr(\paperwidth+\bleed)}

Use \definemeasure and \measure to set your own dimensions.

It is also bad style to redefine the \bleed command.

> \definefloat[bleedfigure][figure]
> \setupfloat[bleedfigure]
> [
> outermargindistance=-\bleed, % does that exist?
> leftmargindistance=-\bleed,
> rightmargindistance=-\bleed,
> default={cutspace,none},
> maxwidth=\maxWidth
> ]
> 
> \def\topfig#1#2{\placebleedfigure[top]{#1}{\offset[topoffset=\dimexpr(-\topspace-\bleed)]{\externalfigure[#2][width=\maxWidth]}}}
> 
> With that my pictures start at 0,-3mm, but they should start at -3mm,-3mm on a left page. Their maximum width is only \paperwidth, without bleed.
> Where’s my mistake?

Can you make a working minimal example.

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

* Re: Bleeding pictures as floats?
  2015-05-04 20:59     ` Wolfgang Schuster
@ 2015-05-06  5:06       ` Henning Hraban Ramm
  2015-05-11 11:53         ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Henning Hraban Ramm @ 2015-05-06  5:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2015-05-05 um 02:59 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

>> \def\bleed{3mm}
>> \def\maxWidth{\dimexpr(\paperwidth+\bleed)}
> 
> Use \definemeasure and \measure to set your own dimensions.
> It is also bad style to redefine the \bleed command.

Ok, forgot about that.

> Can you make a working minimal example.


\definepapersize[a6][width=105mm,height=148mm]
\definepapersize[a6o][width=115mm,height=158mm]
\setuppapersize[a6][a6o]
\setuplayout[
	location=middle,marking=on,
	grid=yes,
	backspace=12.5mm, width=80mm,
	topspace=12.5mm,
	header=0mm,footer=10mm,
]

\definemeasure[Bleed][3mm]
\definemeasure[maxWidth][\dimexpr \paperwidth + \measure{Bleed}\relax]
\definemeasure[maxHeight][\dimexpr \paperheight + 2\measure{Bleed}\relax]
\definemeasure[topOffset][\dimexpr \topspace + \measure{Bleed}\relax]

\setupexternalfigures[
	maxwidth=\measure{maxWidth},
	maxheight=\measure{maxHeight}
]
\setupcaptions[style=\ss\tfx,align=flushleft,number=no,width=\textwidth]

\definefloat[bleedfigure][figure]
\setupfloat[bleedfigure][
	outermargindistance=-2\measure{Bleed},
	%leftmargindistance=-2\measure{Bleed},
	%rightmargindistance=-2\measure{Bleed},
	maxwidth=\measure{maxWidth}
]

\def\topfig#1#2{%
	\placebleedfigure[top]{#1}{%
		\offset[topoffset=-\measure{topOffset}]%
		{\externalfigure[#2][width=\measure{maxWidth}]}%
	}%
}

\starttext

\chapter{Test}

\topfig{Caption}{koe}
\input tufte

\topfig{Caption}{koe}

\input knuth
\topfig{Caption}{koe}

\showlayout

\stoptext

————
So, one of my mistakes was, I had set \setupexternalfigures[maxwidth=\paperwidth], that overrides all other float definitions.

With this (perhaps not minimal) example I get nearly what I want, but the image starts with the paper and is centered (x/y -1,5mm/0mm) where I want it to start on -3mm/-3mm on a left page, 0mm/-3mm on a right page. I thought my definitions should do that...


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

* Re: Bleeding pictures as floats?
  2015-05-06  5:06       ` Henning Hraban Ramm
@ 2015-05-11 11:53         ` Wolfgang Schuster
  2015-07-30  9:49           ` Henning Hraban Ramm
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2015-05-11 11:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 06.05.2015 um 07:06 schrieb Henning Hraban Ramm <texml@fiee.net>:
> 
> […]
> 
> \definemeasure[Bleed][3mm]
> \definemeasure[maxWidth][\dimexpr \paperwidth + \measure{Bleed}\relax]
> \definemeasure[maxHeight][\dimexpr \paperheight + 2\measure{Bleed}\relax]
> \definemeasure[topOffset][\dimexpr \topspace + \measure{Bleed}\relax]

You don’t have to use \dimexpr because the measure macros already us it.

> […]
> 
> \definefloat[bleedfigure][figure]
> \setupfloat[bleedfigure][
> 	outermargindistance=-2\measure{Bleed},
> 	%leftmargindistance=-2\measure{Bleed},
> 	%rightmargindistance=-2\measure{Bleed},
> 	maxwidth=\measure{maxWidth}
> ]

There is only a “outermargin”  key but not “outermargindistance”.

> […]
> 
> With this (perhaps not minimal) example I get nearly what I want, but the image starts with the paper and is centered (x/y -1,5mm/0mm) where I want it to start on -3mm/-3mm on a left page, 0mm/-3mm on a right page. I thought my definitions should do that…

The space before the image isn’t fixed when you use \setuplayout[grid=yes] because ConTeXt has to change it to ensure the text after the floats stays on the page.

%\setuplayout[grid=yes] % uncomment to see how the space before the images changes

\showframe

\starttext

\chapter{Test}

\placefigure[top]{Dummy}{\externalfigure[dummy]}

\input tufte

\stoptext

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

* Re: Bleeding pictures as floats?
  2015-05-11 11:53         ` Wolfgang Schuster
@ 2015-07-30  9:49           ` Henning Hraban Ramm
  0 siblings, 0 replies; 7+ messages in thread
From: Henning Hraban Ramm @ 2015-07-30  9:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi, finally coming back to this project.

Am 2015-05-11 um 17:53 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

>> \definemeasure[Bleed][3mm]
>> \definemeasure[maxWidth][\dimexpr \paperwidth + \measure{Bleed}\relax]
> 
> You don’t have to use \dimexpr because the measure macros already us it.

Ok, thanks

>> \definefloat[bleedfigure][figure]
>> \setupfloat[bleedfigure][
>> 	outermargindistance=-2\measure{Bleed},
>> 	%leftmargindistance=-2\measure{Bleed},
>> 	%rightmargindistance=-2\measure{Bleed},
>> 	maxwidth=\measure{maxWidth}
>> ]
> 
> There is only a “outermargin”  key but not “outermargindistance”.

Ok, thanks

>> With this (perhaps not minimal) example I get nearly what I want, but the image starts with the paper and is centered (x/y -1,5mm/0mm) where I want it to start on -3mm/-3mm on a left page, 0mm/-3mm on a right page. I thought my definitions should do that…
> 
> The space before the image isn’t fixed when you use \setuplayout[grid=yes] because ConTeXt has to change it to ensure the text after the floats stays on the page.
> 
> %\setuplayout[grid=yes] % uncomment to see how the space before the images changes

Ah, never had thought of that, thanks for the pointer!

But I want my pictures starting at that fixed position AND my (body) text keeping the grid.

Is that possible?



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

end of thread, other threads:[~2015-07-30  9:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-04 10:53 Bleeding pictures as floats? Henning Hraban Ramm
2015-05-04 11:10 ` Wolfgang Schuster
2015-05-04 11:54   ` Henning Hraban Ramm
2015-05-04 20:59     ` Wolfgang Schuster
2015-05-06  5:06       ` Henning Hraban Ramm
2015-05-11 11:53         ` Wolfgang Schuster
2015-07-30  9:49           ` Henning Hraban Ramm

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