ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Keith J. Schultz" <keithjschultz@web.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: How to make floats extend into the outer margin
Date: Thu, 24 Jul 2014 15:41:08 +0200	[thread overview]
Message-ID: <0009FC90-F057-4C31-A769-B14F8FC44738@web.de> (raw)
In-Reply-To: <2FB7FAD6-68F3-4B92-BAB3-D608FCD3E4AB@gmail.com>


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

Hello,

I assume others might have need for this, so it might be a good idea to put this into the
core with a name of something like \widefigure or \ placewidefigure!

Just, a thought!

regards
	Keith. 

Am 24.07.2014 um 10:36 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

> 
> Am 23.07.2014 um 17:48 schrieb Joshua Krämer <joshua.kraemer@gmail.com>:
> 
>> Dear list,
>> 
>> I have some big-width floats, and want them to span the regular text
>> width plus the outer margin.  I can position them manually with \kern.
>> Is there a way to make them automatically extend into the outer
>> margin?  I have tried different options for location=... without
>> success.
> 
{snip, snip}
> 
> You can use the command key for \setupfloat to apply a macro to the finished content of the float.
> 
> The purpose of this macro is to save the content and compare the width to the width of the text are,
> when the figure is wider then the available space use the \leftaligned or \rightaligned commands
> to let the content protrude to the outer margins.
> 
> 
> \setuppagenumbering[alternative=doublesided]
> 
> \setuplayout[backspace=4cm,width=12cm]
> 
> \definemeasure[Widefigure][\textwidth+\rightmargindistance+\rightmarginwidth]
> 
> \setupfloat[figure][command=\FigureCommand]
> 
> \define\FigureCommand
>  {\dowithnextbox
>     {\signalrightpage
>      \ifdim\nextboxwd>\textwidth
>        \doifrightpageelse{\leftaligned{\flushnextbox}}{\rightaligned{\flushnextbox}}%
>      \else
>        \midaligned{\flushnextbox}%
>      \fi}
>     \hbox}
> 
> \showframe
> 
> \starttext
> 
> \startplacefigure
> \framed[width=.8\textwidth,framecolor=red]{Left margin}
> \stopplacefigure
> 
> \page
> 
> \startplacefigure
> \framed[width=\measure{Widefigure},framecolor=red]{Left margin}
> \stopplacefigure
> 
> \input knuth
> 
> \page
> 
> \startplacefigure
> \framed[width=\measure{Widefigure},framecolor=red]{Right margin}
> \stopplacefigure
> 
> \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
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 4119 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
___________________________________________________________________________________

  reply	other threads:[~2014-07-24 13:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 15:48 Joshua Krämer
2014-07-24  8:36 ` Wolfgang Schuster
2014-07-24 13:41   ` Keith J. Schultz [this message]
2014-07-25 11:10     ` Hans Hagen
2014-07-25 14:06       ` Rik Kabel
2014-07-25 14:18         ` Hans Hagen
2014-07-27 14:54           ` Joshua Krämer
2014-07-27 14:57             ` Wolfgang Schuster
2014-07-27 17:19               ` Joshua Krämer
2014-07-27 18:13                 ` Aditya Mahajan
2014-07-28 18:51                   ` Joshua Krämer
2014-07-24 16:37   ` Joshua Krämer

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=0009FC90-F057-4C31-A769-B14F8FC44738@web.de \
    --to=keithjschultz@web.de \
    --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).