[NTG-context] Re: Why don't footnotes appear in floats or figures?

2024-04-23 Thread Joel via ntg-context
 Okay, I've been trying many things with this \startpostponing code--if I 
understand what's happening, its moving the figures to a later page. I'm not 
sure that's quite ideal, its not fully working with my actual documents, and 
leaves lots of empty white space, when I'm already in a situation where I need 
to reduce page count.
So I thought an alternative route:
(1) have a code that checks "what is current footnote number?" that sets that 
as a variable
\def\currentfoodnote{\somevariableincontextthatgetsfoodnotenumber}
(2) adjust my placefigure macro such that the footnote is outside the 
placefigure, but color it white so its invisible:
\define\showafigure{

\cite[author2019]<--somehow hide this invisible
 
\placefigure{Caption\superscript{\currentfootnote}}}{\externalfigure[cow][width=\textwidth]}
 <--this places a superscript number inside the caption, but it isn't the true 
marker(3) in the caption, place a superscript number with value to 
\currentfootnoteIts basically a fake footnote, just a superscript number of the 
same value as the real footnote.


Shouldn't this result work? Any idea how I can get current footnote value?
--Joel

   On Monday, April 22, 2024 at 07:22:24 AM MDT, vm via ntg-context 
 wrote:  
 
 

On 22/04/2024 14:38, Joel via ntg-context wrote:
> Is this the correct way to be using the \startpostponing code (see 
> example below)?
> 
> \starttext
>      \input knuth
> \startpostponing
>      \placefigure{Caption\footnote{message 
> A}}{\externalfigure[cow][width=\textwidth]}
> \stoppostponing
> \stoppostponing



double stop ?

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki    : https://wiki.contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why don't footnotes appear in floats or figures?

2024-04-22 Thread vm via ntg-context



On 22/04/2024 14:38, Joel via ntg-context wrote:
Is this the correct way to be using the \startpostponing code (see 
example below)?


\starttext
     \input knuth
\startpostponing
     \placefigure{Caption\footnote{message 
A}}{\externalfigure[cow][width=\textwidth]}

\stoppostponing
\stoppostponing




double stop ?

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why don't footnotes appear in floats or figures?

2024-04-22 Thread Joel via ntg-context
 I've managed to get a minimum working example. If you check, you'll see the 
5th footnote inside a placefigure doesn't render anywhere:
\starttext

    \input knuth
    \placefigure{Caption\footnote{message 
A}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
B}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
C}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
D}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
E}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
F}}{\externalfigure[cow][width=\textwidth]}

\stoptext


Is this the correct way to be using the \startpostponing code (see example 
below)?
\starttext
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
A}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
B}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
C}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
D}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
E}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
F}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
\stoptext




On Monday, April 22, 2024 at 02:31:30 AM MDT, Hans Hagen via ntg-context 
 wrote:  
 
 On 4/22/2024 2:45 AM, Joel via ntg-context wrote:
> I'm three days out from sending my work to an editor, and found some 
> serious problem: many footnotes just aren't rendering.
> 
> I have a history text that uses ConTeXt-SBL for the citations, as such, 
> it has lots of footnotes. Sometimes the footnotes are just in the main 
> text, but sometimes also in figure captions, inside floats, inside 
> tables that are inside floats, inside tabulations inside floats, etc.
> 
> What I find alarming is it is frequently not rendering all of the 
> footnote messages at the bottom of the page. The actual footnote number 
> within the body is rendered, but no number is listed in at the bottom of 
> the page. So I might see a list of footnotes, for instance, on page 1, I 
> only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped.
> 
> 
> ---
> 1 message
> 2 message
> 3 message
> 5 message
> 6 message
> 
> After a lot of trial-and-error and checking logs and checking my BibTeX 
> files for errors, running everything through BibTex Tidy, etc., and 
> failures to make a minimum working example, I found a single pattern:
> 
> If the footnote marker appears on the SAME page as the footnote text, it 
> has no problem rendering the footnote. But, if ConTeXt decides to move a 
> float a page or two later on--as it frequently seems to do---such that 
> the footnote marker and footnote text at bottom of page should be on 
> DIFFERENT pages, the footnote message at the bottom of the page won't 
> render.
> 
> I've seen some 2+ year old mailing list posts suggesting ConTeXt might 
> have issues with footnotes; they appear to be similar to my issue--is 
> that still a problem? Is there a fix or workaround? Old fixes I could 
> finding in the mailing list don't seem to work with current versions of 
> ConTeXt anymore.
you need to consider the complications of such notes ...

- tex needs to take the notes into account when determining a page break
- it does so by the insert mechanism
- when floats can't be placed they also become inserts (top and bottom)
- when there are inserts in inserts th eproblem becomes more complex (so 
notes inside floats)
- in traditional tex deeply burried inserts disappearm less so in lmtx

There are things that are hard to get right. This works:

\startpostponing
    \startplacefigure[location=here,title={test \footnote{oeps 1}}]
        \blackrule[width=1tw]
        here
        \footnote{hello 1} and
        \footnote{hello 2} and
        \footnote{hello 3} done
    \stopplacefigure
\stoppostponing

\dorecurse{10}{\samplefile{tufte}\par}

Because here the inserts (notes) will migrate but even then one can get 
them out of order (unless we renumber, which then is sensitiev for 
oscillation).

I occasionally wonder if top floats could be done more directly but 
bottom notes still would have an out-of-sync problem




-
                                          Hans Hagen | PRAGMA ADE
              Ridd

[NTG-context] Re: Why don't footnotes appear in floats or figures?

2024-04-22 Thread Hans Hagen via ntg-context

On 4/22/2024 2:45 AM, Joel via ntg-context wrote:
I'm three days out from sending my work to an editor, and found some 
serious problem: many footnotes just aren't rendering.


I have a history text that uses ConTeXt-SBL for the citations, as such, 
it has lots of footnotes. Sometimes the footnotes are just in the main 
text, but sometimes also in figure captions, inside floats, inside 
tables that are inside floats, inside tabulations inside floats, etc.


What I find alarming is it is frequently not rendering all of the 
footnote messages at the bottom of the page. The actual footnote number 
within the body is rendered, but no number is listed in at the bottom of 
the page. So I might see a list of footnotes, for instance, on page 1, I 
only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped.



---
1 message
2 message
3 message
5 message
6 message

After a lot of trial-and-error and checking logs and checking my BibTeX 
files for errors, running everything through BibTex Tidy, etc., and 
failures to make a minimum working example, I found a single pattern:


If the footnote marker appears on the SAME page as the footnote text, it 
has no problem rendering the footnote. But, if ConTeXt decides to move a 
float a page or two later on--as it frequently seems to do---such that 
the footnote marker and footnote text at bottom of page should be on 
DIFFERENT pages, the footnote message at the bottom of the page won't 
render.


I've seen some 2+ year old mailing list posts suggesting ConTeXt might 
have issues with footnotes; they appear to be similar to my issue--is 
that still a problem? Is there a fix or workaround? Old fixes I could 
finding in the mailing list don't seem to work with current versions of 
ConTeXt anymore.

you need to consider the complications of such notes ...

- tex needs to take the notes into account when determining a page break
- it does so by the insert mechanism
- when floats can't be placed they also become inserts (top and bottom)
- when there are inserts in inserts th eproblem becomes more complex (so 
notes inside floats)

- in traditional tex deeply burried inserts disappearm less so in lmtx

There are things that are hard to get right. This works:

\startpostponing
\startplacefigure[location=here,title={test \footnote{oeps 1}}]
\blackrule[width=1tw]
here
\footnote{hello 1} and
\footnote{hello 2} and
\footnote{hello 3} done
\stopplacefigure
\stoppostponing

\dorecurse{10}{\samplefile{tufte}\par}

Because here the inserts (notes) will migrate but even then one can get 
them out of order (unless we renumber, which then is sensitiev for 
oscillation).


I occasionally wonder if top floats could be done more directly but 
bottom notes still would have an out-of-sync problem





-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


Re: [NTG-context] Full-page Figure?

2022-03-30 Thread Michael Urban via ntg-context
Almost there.  But if I add \setuppagenumbering  [alternative=doublesided]
to the example, there is a blank page before the makeup page, and an unnumbered 
blank page after.  If I add doublesided=no to the
\setupmakeup options, the unnumbered blank page is not there, but there is 
still a blank page before.  It is seemingly forcing
a right-hand page for some reason I do not understand.

Mike


> On Mar 28, 2022, at 6:37 PM, śrīrāma via ntg-context  
> wrote:
> 
> On Tuesday, March 29, 2022 4:18 AM Michael Urban via ntg-context wrote:
>> Is there a simple way to accomplish this?
> 
> I suppose you need 'postponing'. See
>  https://wiki.contextgarden.net/Command/startpostponing
> [One can specify a page explicitly, or, more conveniently, an offset]
> 
> First, we define a makeup and enable header, footer and page for it. Then we 
> can put the float inside the makeup and wrap it with 
> \start...\stoppostponing. Here is a MWE:
> 
> %%% start example
>  \setupexternalfigures[location=default]
>  \definemakeup
>[FloatPage]
>  \setupmakeup
>[FloatPage]
>[headerstate=normal,
>   pagestate=start,
>   align=middle,
> footerstate=normal]
> 
>  \setupheadertexts[]
>  \setupheadertexts[chapter][\date]
>  \setupfootertexts[pagenumber]
> 
>  \starttext
>  \startchapter [title={Chapter title}]
>\startpostponing[+1]
>  \startFloatPagemakeup
>  \placefigure{a floating cow}{\externalfigure[cow]}
>  \stopFloatPagemakeup
>\stoppostponing
>  \dorecurse{6}{\samplefile{knuth}}
>  \blank
> 
>  \dorecurse{2}{\samplefile{tufte}}
>  \stopchapter
>  \stoptext
> %%% stop example
> 
> Of course, I think some manual hand-tuning is required (in the final stages 
> of the document) in deciding the right place to put the postponing block and 
> in deciding what offset is best.
> 
> Sreeram
> 
> 
> ___
> 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
> ___

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


Re: [NTG-context] Full-page Figure?

2022-03-28 Thread śrīrāma via ntg-context
On Tuesday, March 29, 2022 4:18 AM Michael Urban via ntg-context wrote:
> Is there a simple way to accomplish this?

I suppose you need 'postponing'. See
  https://wiki.contextgarden.net/Command/startpostponing
[One can specify a page explicitly, or, more conveniently, an offset]

First, we define a makeup and enable header, footer and page for it. Then we 
can put the float inside the makeup and wrap it with \start...\stoppostponing. 
Here is a MWE:

%%% start example
  \setupexternalfigures[location=default]
  \definemakeup
[FloatPage]
  \setupmakeup
[FloatPage]
[headerstate=normal,
   pagestate=start,
   align=middle,
 footerstate=normal]

  \setupheadertexts[]
  \setupheadertexts[chapter][\date]
  \setupfootertexts[pagenumber]

  \starttext
  \startchapter [title={Chapter title}]
    \startpostponing[+1]
  \startFloatPagemakeup
  \placefigure{a floating cow}{\externalfigure[cow]}
  \stopFloatPagemakeup
\stoppostponing
  \dorecurse{6}{\samplefile{knuth}}
  \blank

  \dorecurse{2}{\samplefile{tufte}}
  \stopchapter
  \stoptext
%%% stop example

Of course, I think some manual hand-tuning is required (in the final stages of 
the document) in deciding the right place to put the postponing block and in 
deciding what offset is best.

Sreeram


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


Re: [NTG-context] long caption in 2-page spread

2020-05-07 Thread jbf
After trying Hraban's two suggestions to resolve the problem of a 
caption ('title=') for an image across a two-page spread (and I have 
tried a variety of adaptations of those two possible solutions), I still 
have not resolved the issue.


To repeat what Hans gave me, to resolve the 2-page spread in the first 
instance:


\startpostponing
    \setuppagenumbering[state=stop]
    \startspread
    \startplacefigure[location=here,title={This is a cow!}]
    \externalfigure[cow.pdf][height=\textheight]%
    \stopplacefigure
    \stopspread
    \setuppagenumbering[state=start]
\stoppostponing

The problem I have is that the figure has a title/caption much longer 
than 'This is a cow', and the end result is that it commences on the 
verso page but then runs across (repeats, part of it) on the recto page. 
Hraban suggests, first of all:


title={\hbox to \textwidth{\vbox{Your lengthy caption}}}

but this results in the first part of the caption properly located 
left-flushed on the verso page, and the other part right-flushed (and to 
the right of the figure, so running off the page) on the recto page.


The second solution is

title={\framedtext[width=\textwidth,frame=off,align=right]{Your lengthy 
caption}}

and this almost works, but this time part of the caption repeats on the 
left  of the recto page more or less within the inner margin, so I can 
live with that, knowing that it will not be visible ultimately at the 
binding stage.


Of course, what I really want to achieve is that the caption (aka 
'title') appears either on the verso or the recto page, but not both. Is 
that achievable? The actual coding for all this as I have it at the 
moment is as follows:


\startpostponing
    \setuppagenumbering[state=stop]
    \startspread
    \startplacefigure[location=here,title={{\sc Plates 12/13.} 
\switchtobodyfont[9.5pt] My very, very,_very long\\ caption for this_ 
figure}]

    \externalfigure[plate12-13.jpg][height=.8\textheight]%
    \stopplacefigure
    \stopspread
    \setuppagenumbering[state=start]
\stoppostponing

but

..._very long caption_
_for this _...

is repeated on the recto page. This is what I want to avoid.
Julian

On 5/5/20 4:18 pm, Henning Hraban Ramm wrote:

Am 05.05.2020 um 03:31 schrieb jbf :

The following excellent solution (see below) to a 2-page spread of an image was 
given me by Hans (I had been completely unaware of the command \startspread. It 
appears to be recent and undocumented, but it certainly simplifies matters).

But in my case the title is a lengthy sentence, rather than the 4-word 'This is 
a cow'. And even though I have been able to split the line, e.g. title={this is 
my very, very, very,\\ very etc. etc. long title}, what happens is that part of 
the caption still appears on the right-hand page of the spread.

Is there a way that I can limit the appearance of the caption to just one (the 
left-hand) page? In other words, so the figure is spread but not the caption? 
Or alternatively, have the caption neatly split across the two pages with 
appropriate space inbetween? I tried various combinations, including an \hfill 
halfway through the title, but to no avail. Perhaps this is asking too much, 
but there may be a workaround.

I guess you need something like

title={\hbox to \textwidth{\vbox{Your lengthy caption}}}

or

title={\framedtext[width=\textwidth,frame=off,align=right]{Your lengthy 
caption}}


HTH
Hraban
___
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
___
___
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] long caption in 2-page spread

2020-05-04 Thread jbf
The following excellent solution (see below) to a 2-page spread of an 
image was given me by Hans (I had been completely unaware of the command 
\startspread. It appears to be recent and undocumented, but it certainly 
simplifies matters).


But in my case the title is a lengthy sentence, rather than the 4-word 
'This is a cow'. And even though I have been able to split the line, 
e.g. title={this is my very, very, very,\\ very etc. etc. long title}, 
what happens is that part of the caption still appears on the right-hand 
page of the spread.


Is there a way that I can limit the appearance of the caption to just 
one (the left-hand) page? In other words, so the figure is spread but 
not the caption? Or alternatively, have the caption neatly split across 
the two pages with appropriate space inbetween? I tried various 
combinations, including an \hfill halfway through the title, but to no 
avail. Perhaps this is asking too much, but there may be a workaround.


Julian


\startpostponing
    \setuppagenumbering[state=stop]
    \startspread
    \startplacefigure[location=here,title={This is a cow!}]
    \externalfigure[cow.pdf][height=\textheight]%
    \stopplacefigure
    \stopspread
    \setuppagenumbering[state=start]
\stoppostponing


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


Re: [NTG-context] image across 2 page spread

2020-04-30 Thread Hans Hagen

On 4/30/2020 2:05 AM, jbf wrote:

Hi list,

With 99% of work complete on a book, including single page images, I now 
find myself confronted with a final problem: how to run one image across 
facing pages or in other words, one image (plus its caption) across a 
two-page spread, such that there is no gap.


I have tried a number of fairly crass attempts (obviously too simple) to 
see if I could get somewhere near what I want, e.g.


\externalfigure[plate12.jpg][width=\paperwidth, height=.7\paperheight, 
frame=none] {\tfx \sc Plates 12, 13. \tfx Twenty trucks from the 
Netherlands setting off}


\externalfigure[plate13.jpg][width=\paperwidth, height=.7\paperheight, 
frame=none] {\tfx for their first mission amongst the German diaspora.}


My thinking here was that \paperwidth might help extend the image to the 
inner edge on the left-hand page, but it doesn't work that way for the 
right-hand page, since there it extends to the outer edge, not the inner 
edge! The .7\paperheight was to provide room for the caption. But all in 
all, this is no solution!


If it is any help, the setup dimensions for the book are US Digest:

\definepapersize
   [ACN][width=5.5in,height=8.5in] %  w140mm x h216mm

I then looked up how one might do it in LaTeX, and found the following 
link: 
https://tex.stackexchange.com/questions/23860/how-to-include-a-picture-over-two-pages-left-part-on-left-side-right-on-right


How much of that would be transferable to ConTeXt? (I am thinking 
particularly of the |\newcommand*{\twopagepicture}[4]| bit.


There are explanations for how to do this in InDesign, and since it is 
something someone might often want to do (e.g. in magazines), I also 
thought it might be easier to find reference to it on Contextgarden, yet 
haven't found anything there. But I am sure ConTeXt has a way to do this.


Could someone point me in the right direction with this please?

\setuppagenumbering
  [alternative=doublesided]

\starttext

\dorecurse{3}{\input tufte \par}

\startpostponing
\setuppagenumbering[state=stop]
\startspread
\startplacefigure[location=here,title={This is a cow!}]
\externalfigure[cow.pdf][height=\textheight]%
\stopplacefigure
\stopspread
\setuppagenumbering[state=start]
\stoppostponing

\dorecurse{10}{\input tufte \par}

\stoptext

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] image across 2 page spread

2020-04-30 Thread Henning Hraban Ramm


> Am 30.04.2020 um 02:05 schrieb jbf :
> 
> Hi list,
> 
> With 99% of work complete on a book, including single page images, I now find 
> myself confronted with a final problem: how to run one image across facing 
> pages or in other words, one image (plus its caption) across a two-page 
> spread, such that there is no gap.

You need to use \clip and calculate the sections.
Thangalin already gave you an example. Here’s a convoluted one that I use:

% full double page image
% usage:
% \startpostponing[pagenumber]
% \doublepagefig[reference][left/right/width/height*]{caption}{filename}
% \stoppostponing
% * lw,lh,rw,rh - place as left/right page, adapt image to width/height
% default is lw
% postponing is important, otherwise the page numbering gets wrong

\newdimen\Bleed
\newdimen\maxWidth
\newdimen\maxHeight
\newdimen\doubleWidth
\newdimen\topOffset
\newdimen\bottomOffset

\Bleed=3mm
\setupbleeding[offset=\Bleed]
\maxWidth=\dimexpr\paperwidth + \Bleed\relax
\maxHeight=\dimexpr\paperheight + 2\Bleed\relax
\doubleWidth=\dimexpr2\maxWidth\relax
\topOffset=\dimexpr\topspace + \headerheight + \Bleed\relax
\bottomOffset=\dimexpr\bottomheight + \footerheight + \Bleed\relax

\definelayer[bgpicleft][x=-\Bleed,y=-\Bleed,width=\maxWidth,height=\maxHeight] 
% inkl. Beschnitt
\definelayer[bgpicright][x=0mm,y=-\Bleed,width=\maxWidth,height=\maxHeight] % 
inkl. Beschnitt

\definemakeup[fullpage][
  page=no,
  doublesided=no,
  headerstate=empty,
  footerstate=empty,
  pagestate=start,
]

\def\doublepagefig{\dodoubleempty\doDoublePagefig}
\def\doDoublePagefig[#1][#2]#3#4{
\startfullpagemakeup
\setlayer[bgpicleft]{\textreference[#1]{}%
\clip[
hoffset=0mm, voffset=0mm,
width=\maxWidth,
height=\maxHeight,
]{%
\doifinstringelse{h}{#2}{%
\externalfigure[#4][height=\maxHeight]%
}{%
\externalfigure[#4][width=\doubleWidth]%
}%
}%
}
% set caption into footer (left page)
  \doiftext{#3}{\doifinstring{l}{#2}{%
\setlayer[bgpicleft][
  x=\backspace,
  y=\dimexpr\makeupheight + \footerheight\relax,
]{%
  \doifmodeelse{blackcaption}{%
\tfx\vbox{#3}%
  }{%
\inframed[
frame=off,background=shadow,
foregroundcolor=captioncolor,]{%
  \bfx{#3}%\vbox{#3}%
}%
  }%
}%
}}
% debugging information
\setlayer[bgpicleft][x=0mm,y=-\Bleed]{%
\color[debugcolor]{~\tt\bfx #1 / #2 / #4}
}
\stopfullpagemakeup
\startfullpagemakeup
\setlayer[bgpicright]{%
\clip[
hoffset=\maxWidth,
voffset=0mm,
width=\maxWidth,
height=\maxHeight,
]{%
\doifinstringelse{h}{#2}{%
\externalfigure[#4][height=\maxHeight]%
}{%
\externalfigure[#4][width=\doubleWidth]%
}%
}%
}
% set caption into footer (right page)
  \doiftext{#3}{\doifinstring{r}{#2}{%
\setlayer[bgpicright][
  x=\backspace,
  y=\dimexpr\makeupheight + \footerheight\relax,
]{%
  \doifmodeelse{blackcaption}{%
\tfx\vbox{#3}%
  }{%
\inframed[
  frame=off,background=shadow,foregroundcolor=captioncolor]{%
  \bfx{#3}%\vbox{#3}%
}%
  }%
}%
}}%
% debugging information
\setlayer[bgpicright][x=0mm,y=-\Bleed]{%
\color[captioncolor]{~\tt\bfx #1 / #2 / #4}
}
\stopfullpagemakeup
} % doublepagefig


You can see the outcome here:
https://www.dreiviertelhaus.de/architekturfuehrer/hicog/


Have fun,
Hraban

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


Re: [NTG-context] Questions on columnsetspan (and grids and backgrounds)

2019-05-18 Thread Mikael P. Sundqvist
On Wed, May 15, 2019 at 9:28 AM Hans Hagen  wrote:

> On 5/14/2019 11:36 AM, Mikael P. Sundqvist wrote:
> > On Tue, May 14, 2019 at 10:39 AM Hans Hagen  wrote:
> >>
> >> On 5/13/2019 5:59 PM, Mikael P. Sundqvist wrote:
> >>> Den lör 11 maj 2019 10:28Mikael P. Sundqvist  >>> <mailto:mic...@gmail.com>> skrev:
> >>>
> >>>  Hi,
> >>>
> >>>  I have for some hours tried to understand how to work with
> >>>  columnsetspans (I'm trying with an updated lmtx), and have some
> >>>  questions.
> >>>
> >>>  1) Is it only the floats that has the long list of placement
> options
> >>>  (given on p. 18 in the columnsets manual), or should they also
> apply
> >>>  to columnsetspans and columnsetareas? (I cannot get it to work
> with
> >>>  "default=fxtb:2*10" and similar options for other elements than
> >>>  floats). It would be useful to have it for other type of elements
> as
> >>>  well.
> >>>
> >>>  2) What is the current correct way to get back on grid after
> formulas?
> >>>  The only key that had lead me to something that seems to work in
> >>>  \setupformulas is "option=depth". Is that the way to go?
> >>>
> >>>  3) This is a bit unrelated, but is it possible to set page
> backgrounds
> >>>  on specific page. Something like \setupbackgrounds[page][page=3,
> ...]
> >>>  (I cannot find any keys for this in setup-en.pdf). Right now I
> can set
> >>>  it for an odd and an even page, but then if I want a background
> on the
> >>>  page after that, I have to put that code at the place where it
> will be
> >>>  used. (I got an error with \startpostponing[+1] ...
> \stoppostponing)
> >>>
> >>>  4) To be a bit more concrete on the first issue: In the example
> below,
> >>>  how can I place the columnsetspan at the bottom right? Second and
> >>>  third column, 10 lines down? I attach the result of running this
> file.
> >>>
> >>>  /Mikael
> >>>
> >>>  \setuplayout[grid=yes]
> >>>  \showgrid
> >>>  \definecolumnset[three][n=3]
> >>>
> >>>  \definecolumnsetspan[two][
> >>>  n=2,
> >>>  background=color,
> >>>  backgroundcolor=lightgray,
> >>>  ]
> >>>
> >>>  \starttext
> >>>  \startcolumnset[three]
> >>>  \samplefile{knuth}
> >>>
> >>>  \startcolumnsetspan[two][default=btrl]
> >>>  \samplefile{ward}
> >>>  \stopcolumnsetspan
> >>>
> >>>  \dorecurse{5}{\samplefile{knuth}\par}
> >>>  \stopcolumnset
> >>>  \stoptext
> >>>
> >>>
> >>> Hi!
> >>>
> >>> I have looked more carefully at the columnsets manual, and it looks
> like
> >>> (parts of) the columnsets mechanism is somehow broken at the moment,
> >>> since some of the examples there are not showing what they are
> supposed to.
> >>
> >> the mkii mechanism has been replaced by a new one but it's not
> >> completely compatible (these placements are actually for floats and
> >> spans were just a special kind abusing that mechanism)
> >>
> >>> Can this be confirmed? Is there a plan to get it to work soon again?
> >> i'll put it on the todo list
> >>
> >> -
> >> Hans Hagen | PRAGMA ADE
> >> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> >>  tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> >> -
> >
> > Hi!
> >
> > Many thanks for your reply! Then I stop my playing with it now
> > (several things work and it looks quite nice!).
> >
> > I really appreciate any effort in this direction, since I think this
> > grid+column functionality is a very nice feature to have!!
> this will work in a next upload (watch out: columnsets operate on a spread)
>
> \setuppagenumbering[alternative={doublesided}]
>
> \showgrid
>
> \setupalign[verytolerant] \dontcomplain
>
> \definecolumnset[three][n=3]
>
> \definecolumnsetsp

Re: [NTG-context] Questions on columnsetspan (and grids and backgrounds)

2019-05-15 Thread Hans Hagen

On 5/14/2019 11:36 AM, Mikael P. Sundqvist wrote:

On Tue, May 14, 2019 at 10:39 AM Hans Hagen  wrote:


On 5/13/2019 5:59 PM, Mikael P. Sundqvist wrote:

Den lör 11 maj 2019 10:28Mikael P. Sundqvist mailto:mic...@gmail.com>> skrev:

 Hi,

 I have for some hours tried to understand how to work with
 columnsetspans (I'm trying with an updated lmtx), and have some
 questions.

 1) Is it only the floats that has the long list of placement options
 (given on p. 18 in the columnsets manual), or should they also apply
 to columnsetspans and columnsetareas? (I cannot get it to work with
 "default=fxtb:2*10" and similar options for other elements than
 floats). It would be useful to have it for other type of elements as
 well.

 2) What is the current correct way to get back on grid after formulas?
 The only key that had lead me to something that seems to work in
 \setupformulas is "option=depth". Is that the way to go?

 3) This is a bit unrelated, but is it possible to set page backgrounds
 on specific page. Something like \setupbackgrounds[page][page=3, ...]
 (I cannot find any keys for this in setup-en.pdf). Right now I can set
 it for an odd and an even page, but then if I want a background on the
 page after that, I have to put that code at the place where it will be
 used. (I got an error with \startpostponing[+1] ... \stoppostponing)

 4) To be a bit more concrete on the first issue: In the example below,
 how can I place the columnsetspan at the bottom right? Second and
 third column, 10 lines down? I attach the result of running this file.

 /Mikael

 \setuplayout[grid=yes]
 \showgrid
 \definecolumnset[three][n=3]

 \definecolumnsetspan[two][
 n=2,
 background=color,
 backgroundcolor=lightgray,
 ]

 \starttext
 \startcolumnset[three]
 \samplefile{knuth}

 \startcolumnsetspan[two][default=btrl]
 \samplefile{ward}
 \stopcolumnsetspan

 \dorecurse{5}{\samplefile{knuth}\par}
 \stopcolumnset
 \stoptext


Hi!

I have looked more carefully at the columnsets manual, and it looks like
(parts of) the columnsets mechanism is somehow broken at the moment,
since some of the examples there are not showing what they are supposed to.


the mkii mechanism has been replaced by a new one but it's not
completely compatible (these placements are actually for floats and
spans were just a special kind abusing that mechanism)


Can this be confirmed? Is there a plan to get it to work soon again?

i'll put it on the todo list

-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-


Hi!

Many thanks for your reply! Then I stop my playing with it now
(several things work and it looks quite nice!).

I really appreciate any effort in this direction, since I think this
grid+column functionality is a very nice feature to have!!

this will work in a next upload (watch out: columnsets operate on a spread)

\setuppagenumbering[alternative={doublesided}]

\showgrid

\setupalign[verytolerant] \dontcomplain

\definecolumnset[three][n=3]

\definecolumnsetspan[two]
  [n=2,
   background=color,
   backgroundcolor=lightgray]

\starttext

\page[left]

\startcolumnset[three]

\startcolumnsetspan[two][c=1,r=5]
\samplefile{ward}
\stopcolumnsetspan

\startcolumnsetspan[two][method=btlr,c=2,r=3]
\samplefile{ward}
\stopcolumnsetspan

\dorecurse{6}{\samplefile{knuth}\par}

\stopcolumnset

\stoptext

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] Questions on columnsetspan (and grids and backgrounds)

2019-05-14 Thread Mikael P. Sundqvist
On Tue, May 14, 2019 at 10:39 AM Hans Hagen  wrote:
>
> On 5/13/2019 5:59 PM, Mikael P. Sundqvist wrote:
> > Den lör 11 maj 2019 10:28Mikael P. Sundqvist  > <mailto:mic...@gmail.com>> skrev:
> >
> > Hi,
> >
> > I have for some hours tried to understand how to work with
> > columnsetspans (I'm trying with an updated lmtx), and have some
> > questions.
> >
> > 1) Is it only the floats that has the long list of placement options
> > (given on p. 18 in the columnsets manual), or should they also apply
> > to columnsetspans and columnsetareas? (I cannot get it to work with
> > "default=fxtb:2*10" and similar options for other elements than
> > floats). It would be useful to have it for other type of elements as
> > well.
> >
> > 2) What is the current correct way to get back on grid after formulas?
> > The only key that had lead me to something that seems to work in
> > \setupformulas is "option=depth". Is that the way to go?
> >
> > 3) This is a bit unrelated, but is it possible to set page backgrounds
> > on specific page. Something like \setupbackgrounds[page][page=3, ...]
> > (I cannot find any keys for this in setup-en.pdf). Right now I can set
> > it for an odd and an even page, but then if I want a background on the
> > page after that, I have to put that code at the place where it will be
> > used. (I got an error with \startpostponing[+1] ... \stoppostponing)
> >
> > 4) To be a bit more concrete on the first issue: In the example below,
> > how can I place the columnsetspan at the bottom right? Second and
> > third column, 10 lines down? I attach the result of running this file.
> >
> > /Mikael
> >
> > \setuplayout[grid=yes]
> > \showgrid
> > \definecolumnset[three][n=3]
> >
> > \definecolumnsetspan[two][
> > n=2,
> > background=color,
> > backgroundcolor=lightgray,
> > ]
> >
> > \starttext
> > \startcolumnset[three]
> > \samplefile{knuth}
> >
> > \startcolumnsetspan[two][default=btrl]
> > \samplefile{ward}
> > \stopcolumnsetspan
> >
> > \dorecurse{5}{\samplefile{knuth}\par}
> > \stopcolumnset
> > \stoptext
> >
> >
> > Hi!
> >
> > I have looked more carefully at the columnsets manual, and it looks like
> > (parts of) the columnsets mechanism is somehow broken at the moment,
> > since some of the examples there are not showing what they are supposed to.
>
> the mkii mechanism has been replaced by a new one but it's not
> completely compatible (these placements are actually for floats and
> spans were just a special kind abusing that mechanism)
>
> > Can this be confirmed? Is there a plan to get it to work soon again?
> i'll put it on the todo list
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

Hi!

Many thanks for your reply! Then I stop my playing with it now
(several things work and it looks quite nice!).

I really appreciate any effort in this direction, since I think this
grid+column functionality is a very nice feature to have!!

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


Re: [NTG-context] Questions on columnsetspan (and grids and backgrounds)

2019-05-14 Thread Hans Hagen

On 5/13/2019 5:59 PM, Mikael P. Sundqvist wrote:
Den lör 11 maj 2019 10:28Mikael P. Sundqvist <mailto:mic...@gmail.com>> skrev:


Hi,

I have for some hours tried to understand how to work with
columnsetspans (I'm trying with an updated lmtx), and have some
questions.

1) Is it only the floats that has the long list of placement options
(given on p. 18 in the columnsets manual), or should they also apply
to columnsetspans and columnsetareas? (I cannot get it to work with
"default=fxtb:2*10" and similar options for other elements than
floats). It would be useful to have it for other type of elements as
well.

2) What is the current correct way to get back on grid after formulas?
The only key that had lead me to something that seems to work in
\setupformulas is "option=depth". Is that the way to go?

3) This is a bit unrelated, but is it possible to set page backgrounds
on specific page. Something like \setupbackgrounds[page][page=3, ...]
(I cannot find any keys for this in setup-en.pdf). Right now I can set
it for an odd and an even page, but then if I want a background on the
page after that, I have to put that code at the place where it will be
    used. (I got an error with \startpostponing[+1] ... \stoppostponing)

4) To be a bit more concrete on the first issue: In the example below,
how can I place the columnsetspan at the bottom right? Second and
third column, 10 lines down? I attach the result of running this file.

/Mikael

\setuplayout[grid=yes]
\showgrid
\definecolumnset[three][n=3]

\definecolumnsetspan[two][
n=2,
background=color,
backgroundcolor=lightgray,
]

\starttext
\startcolumnset[three]
\samplefile{knuth}

\startcolumnsetspan[two][default=btrl]
\samplefile{ward}
\stopcolumnsetspan

\dorecurse{5}{\samplefile{knuth}\par}
\stopcolumnset
\stoptext


Hi!

I have looked more carefully at the columnsets manual, and it looks like 
(parts of) the columnsets mechanism is somehow broken at the moment, 
since some of the examples there are not showing what they are supposed to.


the mkii mechanism has been replaced by a new one but it's not 
completely compatible (these placements are actually for floats and 
spans were just a special kind abusing that mechanism)



Can this be confirmed? Is there a plan to get it to work soon again?

i'll put it on the todo list

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] Questions on columnsetspan (and grids and backgrounds)

2019-05-13 Thread Mikael P. Sundqvist
Den lör 11 maj 2019 10:28Mikael P. Sundqvist  skrev:

> Hi,
>
> I have for some hours tried to understand how to work with
> columnsetspans (I'm trying with an updated lmtx), and have some
> questions.
>
> 1) Is it only the floats that has the long list of placement options
> (given on p. 18 in the columnsets manual), or should they also apply
> to columnsetspans and columnsetareas? (I cannot get it to work with
> "default=fxtb:2*10" and similar options for other elements than
> floats). It would be useful to have it for other type of elements as
> well.
>
> 2) What is the current correct way to get back on grid after formulas?
> The only key that had lead me to something that seems to work in
> \setupformulas is "option=depth". Is that the way to go?
>
> 3) This is a bit unrelated, but is it possible to set page backgrounds
> on specific page. Something like \setupbackgrounds[page][page=3, ...]
> (I cannot find any keys for this in setup-en.pdf). Right now I can set
> it for an odd and an even page, but then if I want a background on the
> page after that, I have to put that code at the place where it will be
> used. (I got an error with \startpostponing[+1] ... \stoppostponing)
>
> 4) To be a bit more concrete on the first issue: In the example below,
> how can I place the columnsetspan at the bottom right? Second and
> third column, 10 lines down? I attach the result of running this file.
>
> /Mikael
>
> \setuplayout[grid=yes]
> \showgrid
> \definecolumnset[three][n=3]
>
> \definecolumnsetspan[two][
> n=2,
> background=color,
> backgroundcolor=lightgray,
> ]
>
> \starttext
> \startcolumnset[three]
> \samplefile{knuth}
>
> \startcolumnsetspan[two][default=btrl]
> \samplefile{ward}
> \stopcolumnsetspan
>
> \dorecurse{5}{\samplefile{knuth}\par}
> \stopcolumnset
> \stoptext
>

Hi!

I have looked more carefully at the columnsets manual, and it looks like
(parts of) the columnsets mechanism is somehow broken at the moment, since
some of the examples there are not showing what they are supposed to.

Can this be confirmed? Is there a plan to get it to work soon again?

Best regards, Mikael

>
___
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] Questions on columnsetspan (and grids and backgrounds)

2019-05-11 Thread Mikael P. Sundqvist
Hi,

I have for some hours tried to understand how to work with
columnsetspans (I'm trying with an updated lmtx), and have some
questions.

1) Is it only the floats that has the long list of placement options
(given on p. 18 in the columnsets manual), or should they also apply
to columnsetspans and columnsetareas? (I cannot get it to work with
"default=fxtb:2*10" and similar options for other elements than
floats). It would be useful to have it for other type of elements as
well.

2) What is the current correct way to get back on grid after formulas?
The only key that had lead me to something that seems to work in
\setupformulas is "option=depth". Is that the way to go?

3) This is a bit unrelated, but is it possible to set page backgrounds
on specific page. Something like \setupbackgrounds[page][page=3, ...]
(I cannot find any keys for this in setup-en.pdf). Right now I can set
it for an odd and an even page, but then if I want a background on the
page after that, I have to put that code at the place where it will be
used. (I got an error with \startpostponing[+1] ... \stoppostponing)

4) To be a bit more concrete on the first issue: In the example below,
how can I place the columnsetspan at the bottom right? Second and
third column, 10 lines down? I attach the result of running this file.

/Mikael

\setuplayout[grid=yes]
\showgrid
\definecolumnset[three][n=3]

\definecolumnsetspan[two][
n=2,
background=color,
backgroundcolor=lightgray,
]

\starttext
\startcolumnset[three]
\samplefile{knuth}

\startcolumnsetspan[two][default=btrl]
\samplefile{ward}
\stopcolumnsetspan

\dorecurse{5}{\samplefile{knuth}\par}
\stopcolumnset
\stoptext


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


Re: [NTG-context] column-spanning floats

2018-08-01 Thread Dr. Thomas Möbius
On Tue, 31 Jul 2018 14:06:43 +0200
Taco Hoekwater  wrote:

> 
> 
> > On 31 Jul 2018, at 13:57, Taco Hoekwater  wrote:
> > 
> > Hi all,
> > 
> > It used to be that in an example like the one attached where you
> > were using \startcolumns and used an \externalfigure that was wider
> > than the column width, the figure would automatically be moved to
> > the top of _both_ columns on the next page. 
> > 
> > That was a bit tricky sometimes, but worked fine. However, when I
> > run with the current mkiv beta, the figure is simply overlapping
> > the next column, and it does not auto-migrate. 
> > 
> > Also \startpostponing does not work here because it will indeed
> > move to the next page, but still only occupies the left column,
> > thus overlapping any text in the second column.
> > 
> > Is that functionality gone, or do I need to do something special?
> > 
> > Best wishes,
> > Taco
> > 
> > PS On top of that, the column balancing creates bad inter-paragraph
> > spacing in the left column. No idea where that comes from! :(
> 
> 
> Also, I just tried \definecolumnset, but a) the balance=yes key does
> not work, and b) I still get awful inter-par spacing on the left
> column, except with \setuplayout[grid=yes] (but that should not be
> needed to just get a reasonable placing, I think).
> 
> Taco

I would also love to see a solution to this. I also tried to play with
the \definecolumnset instead of the \startcolumns but when there are is
a lot of inline math, \definecolumnset produces just horrible inter-par
spacing.

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

Re: [NTG-context] column-spanning floats

2018-07-31 Thread Taco Hoekwater


> On 31 Jul 2018, at 13:57, Taco Hoekwater  wrote:
> 
> Hi all,
> 
> It used to be that in an example like the one attached where you were using
> \startcolumns and used an \externalfigure that was wider than the column 
> width, 
> the figure would automatically be moved to the top of _both_ columns on the 
> next page. 
> 
> That was a bit tricky sometimes, but worked fine. However, when I run with 
> the current mkiv beta, the figure is simply overlapping the next column, and 
> it does not auto-migrate. 
> 
> Also \startpostponing does not work here because it will indeed move to the
> next page, but still only occupies the left column, thus overlapping any
> text in the second column.
> 
> Is that functionality gone, or do I need to do something special?
> 
> Best wishes,
> Taco
> 
> PS On top of that, the column balancing creates bad inter-paragraph spacing 
> in 
> the left column. No idea where that comes from! :(


Also, I just tried \definecolumnset, but a) the balance=yes key does not 
work, and b) I still get awful inter-par spacing on the left column, except
with \setuplayout[grid=yes] (but that should not be needed to just get
a reasonable placing, I think).

Taco





___
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] column-spanning floats

2018-07-31 Thread Taco Hoekwater
Hi all,

It used to be that in an example like the one attached where you were using
\startcolumns and used an \externalfigure that was wider than the column width, 
the figure would automatically be moved to the top of _both_ columns on the 
next page. 

That was a bit tricky sometimes, but worked fine. However, when I run with 
the current mkiv beta, the figure is simply overlapping the next column, and 
it does not auto-migrate. 

Also \startpostponing does not work here because it will indeed move to the
next page, but still only occupies the left column, thus overlapping any
text in the second column.

Is that functionality gone, or do I need to do something special?

Best wishes,
Taco

PS On top of that, the column balancing creates bad inter-paragraph spacing in 
the left column. No idea where that comes from! :(



tryme.pdf
Description: Adobe PDF document


tryme.tex
Description: Binary data
___
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
___

Re: [NTG-context] image file resolver in Lua?

2018-02-05 Thread Rudolf Bahr
On Sun, Feb 04, 2018 at 01:06:08PM +0100, Hans Hagen wrote:
> On 2/3/2018 7:57 AM, Rudolf Bahr wrote:
> > On Fri, Feb 02, 2018 at 04:17:32PM +0100, Henning Hraban Ramm wrote:
> > > Am 2018-02-02 um 12:08 schrieb Rudolf Bahr <qu...@quasi.de>:
> > > 
> > > > On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote:
> > > > > Ahoi,
> > > > > 
> > > > > I’m using a Lua function to calculate image sizes, cropping etc.
> > > > > This snippet:
> > > > > 
> > > > > local filename = figures.current().status.fullname
> > > > > local pic = img.scan{filename = filename}
> > > > > 
> > > > > ... works most of the time, but sometimes the "current" image is the 
> > > > > previous one, might be because I’m using layers and postponing.
> > > > > So I’d like to use just the same filename as I give to 
> > > > > \externalfigure, i.e. without path and extension.
> > > > > How can I address the same file path resolver in my Lua function?
> > > > > 
> > > > 
> > > > Moin, Hraban,
> > > > 
> > > > where could I find something about those lua functions?
> > > 
> > > Maybe here: 
> > > http://source.contextgarden.net/tex/context/base/mkiv/grph-inc.lua
> > > 
> > > The image placement functions I’m using are something Hans and others 
> > > helped me accomplish during the last meeting; AFAIK there’s no real 
> > > documentation.
> > > 
> > > Find attached the lua part. It’s probably more complicated than necessary
> > > 
> > > 
> > > I could work around my original problem: I’m using my image with 
> > > \externalfigure in an invisible place first, so it’s current, and 
> > > figures.current().status is the right one. :)
> > > 
> > > Here’s my (convoluted) placement macro:
> > > 
> > > % image on empty page, caption in margin
> > > % usage:
> > > % \startpostponing[pagenumber]
> > > % \pagefig[reference]{caption}{filename}
> > > % \stoppostponing
> > > % postponing is important, otherwise the page numbering gets wrong
> > > \def\pagefig{\dosingleempty\doPagefig}
> > > \def\doPagefig[#1]#2#3{
> > > % calculate image size
> > > \startfullpagemakeup
> > >\externalfigure[#3][width=1mm] % dummy to set image as current
> > >\def\myClipHeight{\ctxlua{ctxClipHeight("#3", \Resolution)}}
> > >\def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}}
> > >% image
> > >\setlayerframed[bglayer][%
> > >  frame=off,
> > >  offset=overlay,
> > >  x=21mm,
> > >  y=\mystartY,
> > >  height=\myClipHeight,
> > >  width=\textwidth,
> > >  align=flushleft,
> > >  ]{%
> > >  \clip[
> > >width=\textwidth,
> > >height=\myClipHeight,
> > >hoffset=0mm,
> > >voffset=0mm, % i.e. clip bottom! TODO: options!
> > >]{\externalfigure[#3][width=\textwidth]}
> > >   }
> > >\textreference[pre#1]{\myImgHeight}
> > >% caption
> > >\setlayerframed[bglayer][%
> > >frame=off,
> > >offset=overlay,
> > >linecorrection=on,
> > >x=143mm,y=\dimexpr\mystartY + 3pt\relax,
> > >height=\myClipHeight,
> > >width=\outermarginwidth,
> > >align={flushleft,low},
> > >valign=bottom,
> > >]{%
> > >\vbox{
> > >  \textreference[#1]{\strut #2}\vfill #2
> > >}}
> > > \stopfullpagemakeup
> > > }
> > > 
> > > 
> > > usage example:
> > > 
> > > \startpostponing[82]
> > > \pagefig[alinari-stelzen]{Gebrüder Alinari (Florenz, 19. 
> > > Jhd.)}{ka34/img/Gebr-Alinari_Kinder_auf_Stelzen}
> > > \stoppostponing
> > > 
> > > 
> > > 
> > > Greetlings, Hraban
> > > ---
> > > http://www.fiee.net
> > > http://wiki.contextgarden.net
> > > GPG Key ID 1C9B22FD
> > > 
> > 
> > Moin Hraban!
> > 
> > It's very interesting for me to see, how exactly you calculate
> > the size of images and texts with the help of lua!
> > 
> > Up to now I used to use python and a independend lua to provide some
> > necessary data for context. For instance python invokes

Re: [NTG-context] image file resolver in Lua?

2018-02-04 Thread Hans Hagen

On 2/3/2018 7:57 AM, Rudolf Bahr wrote:

On Fri, Feb 02, 2018 at 04:17:32PM +0100, Henning Hraban Ramm wrote:

Am 2018-02-02 um 12:08 schrieb Rudolf Bahr <qu...@quasi.de>:


On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote:

Ahoi,

I’m using a Lua function to calculate image sizes, cropping etc.
This snippet:

local filename = figures.current().status.fullname
local pic = img.scan{filename = filename}

... works most of the time, but sometimes the "current" image is the previous 
one, might be because I’m using layers and postponing.
So I’d like to use just the same filename as I give to \externalfigure, i.e. 
without path and extension.
How can I address the same file path resolver in my Lua function?



Moin, Hraban,

where could I find something about those lua functions?


Maybe here: http://source.contextgarden.net/tex/context/base/mkiv/grph-inc.lua

The image placement functions I’m using are something Hans and others helped me 
accomplish during the last meeting; AFAIK there’s no real documentation.

Find attached the lua part. It’s probably more complicated than necessary


I could work around my original problem: I’m using my image with 
\externalfigure in an invisible place first, so it’s current, and 
figures.current().status is the right one. :)

Here’s my (convoluted) placement macro:

% image on empty page, caption in margin
% usage:
% \startpostponing[pagenumber]
% \pagefig[reference]{caption}{filename}
% \stoppostponing
% postponing is important, otherwise the page numbering gets wrong
\def\pagefig{\dosingleempty\doPagefig}
\def\doPagefig[#1]#2#3{
% calculate image size
\startfullpagemakeup
   \externalfigure[#3][width=1mm] % dummy to set image as current
   \def\myClipHeight{\ctxlua{ctxClipHeight("#3", \Resolution)}}
   \def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}}
   % image
   \setlayerframed[bglayer][%
 frame=off,
 offset=overlay,
 x=21mm,
 y=\mystartY,
 height=\myClipHeight,
 width=\textwidth,
 align=flushleft,
 ]{%
 \clip[
   width=\textwidth,
   height=\myClipHeight,
   hoffset=0mm,
   voffset=0mm, % i.e. clip bottom! TODO: options!
   ]{\externalfigure[#3][width=\textwidth]}
}
   \textreference[pre#1]{\myImgHeight}
   % caption
   \setlayerframed[bglayer][%
   frame=off,
   offset=overlay,
   linecorrection=on,
   x=143mm,y=\dimexpr\mystartY + 3pt\relax,
   height=\myClipHeight,
   width=\outermarginwidth,
   align={flushleft,low},
   valign=bottom,
   ]{%
   \vbox{
 \textreference[#1]{\strut #2}\vfill #2
   }}
\stopfullpagemakeup
}


usage example:

\startpostponing[82]
\pagefig[alinari-stelzen]{Gebrüder Alinari (Florenz, 19. 
Jhd.)}{ka34/img/Gebr-Alinari_Kinder_auf_Stelzen}
\stoppostponing



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD



Moin Hraban!

It's very interesting for me to see, how exactly you calculate
the size of images and texts with the help of lua!

Up to now I used to use python and a independend lua to provide some
necessary data for context. For instance python invokes graphicsmagick
in order to get the size of images. Because it's provided in px and not
in pt, so often some further manual work is unavoidable.

Now, since lua and metafun are well integrated into context it suggests
itself to use luatex instead of python, though I like this language
very much.

Thank you very much, Hraban, for putting your macros and links
at my disposal!
Not sure what you want top know but a lot of image properties can be 
checked by prerolling:


\starttext

\getfiguredimensions[t:/sources/cow.pdf]

\starttabulate[|T|T|]
\NC \string\figurewidth \NC \figurewidth \NC \NR
\NC \string\figureheight\NC \figureheight\NC \NR
\NC \string\figurexscale\NC \figurexscale\NC \NR
\NC \string\figureyscale\NC \figureyscale\NC \NR
\TB
\NC \string\figuresize  \NC \figuresize  \NC \NR
\NC \string\figurelabel \NC \figurelabel \NC \NR
\NC \string\figurefileoriginal  \NC \figurefileoriginal  \NC \NR
\NC \string\figurefilepage  \NC \figurefilepage  \NC \NR
\NC \string\figurefileoptions   \NC \figurefileoptions   \NC \NR
\NC \string\figurefileconversion\NC \figurefileconversion\NC \NR
\NC \string\figurefileresolution\NC \figurefileresolution\NC \NR
\NC \string\figurefilecolor \NC \figurefilecolor \NC \NR
\NC \string\figurefilearguments \NC \figurefilearguments \NC \NR
\NC \string\figurefilecache \NC \figurefilecache \NC \NR
\NC \string\figurefileprefix\NC \figurefileprefix\NC \NR
\TB
\NC \string\figurenaturalwidth  \NC \figurenaturalwidth  \NC \NR
\NC \string\figurenaturalheight \NC \figurenaturalheight \NC \NR
\NC \string\figurexresolution   \NC \figurexresolution   \NC \NR
\NC \string\figureyresolution   \NC \figureyresolution   \NC \NR
\NC \string\figureorientation   \NC \figureorientation 

Re: [NTG-context] image file resolver in Lua?

2018-02-02 Thread Rudolf Bahr
On Fri, Feb 02, 2018 at 04:17:32PM +0100, Henning Hraban Ramm wrote:
> Am 2018-02-02 um 12:08 schrieb Rudolf Bahr <qu...@quasi.de>:
> 
> > On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote:
> >> Ahoi,
> >> 
> >> I’m using a Lua function to calculate image sizes, cropping etc.
> >> This snippet:
> >> 
> >> local filename = figures.current().status.fullname
> >> local pic = img.scan{filename = filename}
> >> 
> >> ... works most of the time, but sometimes the "current" image is the 
> >> previous one, might be because I’m using layers and postponing.
> >> So I’d like to use just the same filename as I give to \externalfigure, 
> >> i.e. without path and extension.
> >> How can I address the same file path resolver in my Lua function?
> >> 
> > 
> > Moin, Hraban,
> > 
> > where could I find something about those lua functions?
> 
> Maybe here: http://source.contextgarden.net/tex/context/base/mkiv/grph-inc.lua
> 
> The image placement functions I’m using are something Hans and others helped 
> me accomplish during the last meeting; AFAIK there’s no real documentation.
> 
> Find attached the lua part. It’s probably more complicated than necessary
> 
> 
> I could work around my original problem: I’m using my image with 
> \externalfigure in an invisible place first, so it’s current, and 
> figures.current().status is the right one. :)
> 
> Here’s my (convoluted) placement macro:
> 
> % image on empty page, caption in margin
> % usage:
> % \startpostponing[pagenumber]
> % \pagefig[reference]{caption}{filename}
> % \stoppostponing
> % postponing is important, otherwise the page numbering gets wrong
> \def\pagefig{\dosingleempty\doPagefig}
> \def\doPagefig[#1]#2#3{
> % calculate image size
> \startfullpagemakeup
>   \externalfigure[#3][width=1mm] % dummy to set image as current
>   \def\myClipHeight{\ctxlua{ctxClipHeight("#3", \Resolution)}}
>   \def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}}
>   % image
>   \setlayerframed[bglayer][%
> frame=off,
> offset=overlay,
> x=21mm,
> y=\mystartY,
> height=\myClipHeight,
> width=\textwidth,
> align=flushleft,
> ]{%
> \clip[
>   width=\textwidth,
>   height=\myClipHeight,
>   hoffset=0mm,
>   voffset=0mm, % i.e. clip bottom! TODO: options!
>   ]{\externalfigure[#3][width=\textwidth]}
>   }
>   \textreference[pre#1]{\myImgHeight}
>   % caption
>   \setlayerframed[bglayer][%
>   frame=off,
>   offset=overlay,
>   linecorrection=on,
>   x=143mm,y=\dimexpr\mystartY + 3pt\relax,
>   height=\myClipHeight,
>   width=\outermarginwidth,
>   align={flushleft,low},
>   valign=bottom,
>   ]{%
>   \vbox{
> \textreference[#1]{\strut #2}\vfill #2
>   }}
> \stopfullpagemakeup
> }
> 
> 
> usage example:
> 
> \startpostponing[82]
> \pagefig[alinari-stelzen]{Gebrüder Alinari (Florenz, 19. 
> Jhd.)}{ka34/img/Gebr-Alinari_Kinder_auf_Stelzen}
> \stoppostponing
> 
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
> 

Moin Hraban!

It's very interesting for me to see, how exactly you calculate 
the size of images and texts with the help of lua! 

Up to now I used to use python and a independend lua to provide some 
necessary data for context. For instance python invokes graphicsmagick 
in order to get the size of images. Because it's provided in px and not 
in pt, so often some further manual work is unavoidable.

Now, since lua and metafun are well integrated into context it suggests
itself to use luatex instead of python, though I like this language
very much.

Thank you very much, Hraban, for putting your macros and links 
at my disposal!

Regards, Rudolf

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

Re: [NTG-context] image file resolver in Lua?

2018-02-02 Thread Henning Hraban Ramm
Am 2018-02-02 um 12:08 schrieb Rudolf Bahr <qu...@quasi.de>:

> On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote:
>> Ahoi,
>> 
>> I’m using a Lua function to calculate image sizes, cropping etc.
>> This snippet:
>> 
>> local filename = figures.current().status.fullname
>> local pic = img.scan{filename = filename}
>> 
>> ... works most of the time, but sometimes the "current" image is the 
>> previous one, might be because I’m using layers and postponing.
>> So I’d like to use just the same filename as I give to \externalfigure, i.e. 
>> without path and extension.
>> How can I address the same file path resolver in my Lua function?
>> 
> 
> Moin, Hraban,
> 
> where could I find something about those lua functions?

Maybe here: http://source.contextgarden.net/tex/context/base/mkiv/grph-inc.lua

The image placement functions I’m using are something Hans and others helped me 
accomplish during the last meeting; AFAIK there’s no real documentation.

Find attached the lua part. It’s probably more complicated than necessary


I could work around my original problem: I’m using my image with 
\externalfigure in an invisible place first, so it’s current, and 
figures.current().status is the right one. :)

Here’s my (convoluted) placement macro:

% image on empty page, caption in margin
% usage:
% \startpostponing[pagenumber]
% \pagefig[reference]{caption}{filename}
% \stoppostponing
% postponing is important, otherwise the page numbering gets wrong
\def\pagefig{\dosingleempty\doPagefig}
\def\doPagefig[#1]#2#3{
% calculate image size
\startfullpagemakeup
  \externalfigure[#3][width=1mm] % dummy to set image as current
  \def\myClipHeight{\ctxlua{ctxClipHeight("#3", \Resolution)}}
  \def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}}
  % image
  \setlayerframed[bglayer][%
frame=off,
offset=overlay,
x=21mm,
y=\mystartY,
height=\myClipHeight,
width=\textwidth,
align=flushleft,
]{%
\clip[
  width=\textwidth,
  height=\myClipHeight,
  hoffset=0mm,
  voffset=0mm, % i.e. clip bottom! TODO: options!
  ]{\externalfigure[#3][width=\textwidth]}
}
  \textreference[pre#1]{\myImgHeight}
  % caption
  \setlayerframed[bglayer][%
  frame=off,
  offset=overlay,
  linecorrection=on,
  x=143mm,y=\dimexpr\mystartY + 3pt\relax,
  height=\myClipHeight,
  width=\outermarginwidth,
  align={flushleft,low},
  valign=bottom,
  ]{%
  \vbox{
\textreference[#1]{\strut #2}\vfill #2
  }}
\stopfullpagemakeup
}


usage example:

\startpostponing[82]
\pagefig[alinari-stelzen]{Gebrüder Alinari (Florenz, 19. 
Jhd.)}{ka34/img/Gebr-Alinari_Kinder_auf_Stelzen}
\stoppostponing



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD



grph-imagesize.lua
Description: Binary data
___
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
___

Re: [NTG-context] hiding page number in postponed makeup page

2017-09-21 Thread Hans Hagen

On 9/20/2017 8:32 PM, Pablo Rodriguez wrote:

On 09/19/2017 11:29 PM, Henning Hraban Ramm wrote:

[...]
Thank you for the suggestion, but it doesn’t help, not even in the MWE.


I don’t know, but the postponed page doesn’t behave as a makeup (at
least, with the page number):

 \setuppapersize[A9]
 \starttext
 \startbuffer[makeup]
 \startmakeup[standard][align=middle]
 123
 \stopmakeup
 \stopbuffer
 \getbuffer[makeup]

 \startpostponing[3]
 \getbuffer[makeup]
 \stoppostponing

 \input knuth

 \getbuffer[makeup]

 \input knuth

 \getbuffer[makeup]
 \stoptext

It is also weird that real page 10 gets a page label. Default pagestate
is stop (behavior is correct only on the first page [makeup on last page
also fails]).
postponed flushing happens inside the output routine and therefore has 
some limitations (other solutions would also have such limitations)


anyway, i do some extra checking now .. this was my test

\starttext

\startbuffer[makeup]
\startpagemakeup[pagestate=start,page=no]
\color[red]{
\vfill
\dorecurse{3}{
\samplefile{klein}
\vfill
}
}
\stoppagemakeup
\stopbuffer

\startcolor[green]
\dorecurse{10}{
\dontleavehmode{\bf 1:#1:} \samplefile{sapolsky}\par
}
\stopcolor

\startpostponing % [+3]
\getbuffer[makeup]
\stoppostponing

\startcolor[blue]
\dorecurse{25}{
\dontleavehmode{\bf 2:#1:} \samplefile{sapolsky}\par
}
\stopcolor

\stoptext

i'm not sure if this will stay the way it is but it needs testing.

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___

Re: [NTG-context] hiding page number in postponed makeup page

2017-09-20 Thread Pablo Rodriguez
On 09/19/2017 11:29 PM, Henning Hraban Ramm wrote:
> [...]
> Thank you for the suggestion, but it doesn’t help, not even in the MWE.

I don’t know, but the postponed page doesn’t behave as a makeup (at
least, with the page number):

\setuppapersize[A9]
\starttext
\startbuffer[makeup]
\startmakeup[standard][align=middle]
123
\stopmakeup
\stopbuffer
\getbuffer[makeup]

\startpostponing[3]
\getbuffer[makeup]
\stoppostponing

\input knuth

\getbuffer[makeup]

\input knuth

\getbuffer[makeup]
\stoptext

It is also weird that real page 10 gets a page label. Default pagestate
is stop (behavior is correct only on the first page [makeup on last page
also fails]).

Pablo
-- 
http://www.ousia.tk
___
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
___

Re: [NTG-context] hiding page number in postponed makeup page

2017-09-19 Thread Pablo Rodriguez
On 09/19/2017 04:46 PM, Henning Hraban Ramm wrote:
> Hi all,
> back from the meeting I’m still working on my full page figure placement.
> Most of it works so far, even if it tends to collide with floats, but now I’d 
> like to switch off the page numbers on that pages.

Hi Hraban,

if you plan full-page figure placement, I think this might help:

   \setuplayout[standard][footer=0cm]

Pablo


> The M(N)WE is simplified in that I use only a text area sized frame instead 
> of a full page image on a layer.
> If I could place the image layer on top of the page numbers that also would 
> be a solution.
> 
> 
> \setuppapersize[A6]
> \setuppagenumbering
>   [location=footer,
>   alternative=doublesided,
>   state=start]
> 
> \startsetups paginaoff
>   \setuppagenumbering[location=,] % doesn’t work
> \stopsetups
> 
> \setupmakeup[standard]
>   [page=no,
>   doublesided=no,
>   headerstate=empty,
>   footerstate=empty,
>   before=\setups{paginaoff}]
> 
> \starttext
> \input knuth
> 
> \startpostponing[+2]
> \startstandardmakeup
>   \setuppagenumbering[location=,] % doesn’t work
>   \framed
> [width=\textwidth,
> height=\textheight,
> background=color,
> backgroundcolor=blue,
> foregroundcolor=white,
> foregroundstyle=bold,
> frame=off,
>   ]{This page should show no page number}
> \stopstandardmakeup
> \stoppostponing
> 
> \dorecurse{5}{
>   \recurselevel
>   \input tufte \par
> }
> 
> \stoptext
> 
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
> 
> ___
> 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
> ___
> 


-- 
http://www.ousia.tk
___
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] hiding page number in postponed makeup page

2017-09-19 Thread Henning Hraban Ramm
Hi all,
back from the meeting I’m still working on my full page figure placement.
Most of it works so far, even if it tends to collide with floats, but now I’d 
like to switch off the page numbers on that pages.

The M(N)WE is simplified in that I use only a text area sized frame instead of 
a full page image on a layer.
If I could place the image layer on top of the page numbers that also would be 
a solution.


\setuppapersize[A6]
\setuppagenumbering
  [location=footer,
  alternative=doublesided,
  state=start]

\startsetups paginaoff
  \setuppagenumbering[location=,] % doesn’t work
\stopsetups

\setupmakeup[standard]
  [page=no,
  doublesided=no,
  headerstate=empty,
  footerstate=empty,
  before=\setups{paginaoff}]

\starttext
\input knuth

\startpostponing[+2]
\startstandardmakeup
  \setuppagenumbering[location=,] % doesn’t work
  \framed
[width=\textwidth,
height=\textheight,
background=color,
backgroundcolor=blue,
foregroundcolor=white,
foregroundstyle=bold,
frame=off,
  ]{This page should show no page number}
\stopstandardmakeup
\stoppostponing

\dorecurse{5}{
  \recurselevel
  \input tufte \par
}

\stoptext



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

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

Re: [NTG-context] everybeforeoutput vs everyafteroutput

2017-03-11 Thread Michael Eidenbenz
what i'm looking for is a way to
1. postpone a page, just before it is shipped out
2. instead ship out a page with saved tokens (images)
3. and then ship out the postponed page.

it tried to hook into the output routine without success because the 
\everybeforeoutput is typeset after the page is shipped out.

pageinjection [previouspage] sort of does what i want, but its a blank page 
without the layout.

any hints how i can solve this?

many thanks michael



> On 10 Mar 2017, at 17:36, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 3/10/2017 10:07 AM, Michael Eidenbenz wrote:
>> hello,
>> 
>> i try to understand the difference of everybeforeoutput and everafteroutput 
>> to inject some pages. it seems as there is no difference.
>> \the\everybeforeoutput is placed after the output of the page:
>> 
>> \newtoks\Before
>> \appendtoks
>> \the\Before
>> \global\Before\emptytoks
>> \to\everybeforeoutput
>> 
>> \newtoks\After
>> \appendtoks
>> \the\After
>> \global\After\emptytoks
>> \to\everyafteroutput
>> 
>> \starttext
>> \input{knuth}\par
>> \appendtoks{before}\to\Before
>> \appendtoks{after}\to\After
>> \stoptext
>> 
>> 
>> this code in page-otr.mkvi seems to put it before the content:
>> 
>> \def\page_otf_set_engine_output_routine#content%
>>  {\global\output
>> {\inotrtrue
>>  \the\everybeforeoutput
>>  #content\relax
>>  \the\everyafteroutput}}
>> 
>> can this be fixed?
> 
> there is nothing wrong .. you feed something in the output routine there
> 
> you can try to use one of the other \before\after ones but be aware of 
> possible interferences with tex's state, hold content etc ... 
> \startpostponing ... might do what you want
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
> www.pragma-pod.nl <http://www.pragma-pod.nl/>
> -
> ___
> 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
> ___

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

Re: [NTG-context] everybeforeoutput vs everyafteroutput

2017-03-10 Thread Hans Hagen

On 3/10/2017 10:07 AM, Michael Eidenbenz wrote:

hello,

i try to understand the difference of everybeforeoutput and everafteroutput to 
inject some pages. it seems as there is no difference.
\the\everybeforeoutput is placed after the output of the page:

\newtoks\Before
\appendtoks
\the\Before
\global\Before\emptytoks
\to\everybeforeoutput

\newtoks\After
\appendtoks
\the\After
\global\After\emptytoks
\to\everyafteroutput

\starttext
\input{knuth}\par
\appendtoks{before}\to\Before
\appendtoks{after}\to\After
\stoptext


this code in page-otr.mkvi seems to put it before the content:

\def\page_otf_set_engine_output_routine#content%
  {\global\output
 {\inotrtrue
  \the\everybeforeoutput
  #content\relax
  \the\everyafteroutput}}

can this be fixed?


there is nothing wrong .. you feed something in the output routine there

you can try to use one of the other \before\after ones but be aware of 
possible interferences with tex's state, hold content etc ... 
\startpostponing ... might do what you want


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___

Re: [NTG-context] Skipped figure numbers

2016-03-31 Thread Alan BRASLAU
On Thu, 31 Mar 2016 17:51:07 -0400
Aditya Mahajan <adit...@umich.edu> wrote:

> @Hans: Does it make sense to disable \incrementcounter if 
> \trialtypesetting is active?

I was going to suggest such things...

Here is a case where a float is not being used as a floating object in
that we want to control placement through location=here or, better,
location=force. We do this as users for we want to produce a caption
as well as make an entry into the list.

However, floats have some limitations: for example they cannot usually
handle multiple pages (except for some table splits), nor can they take
\startcolumns \stopcolumns, and I am sure that there are others.

Does anyone have suggestions/ideas around these kinds of issues? Should
a float with location=force be treated any differently?

Another annoying issue with floats: \startplacefloat\stopplacefloat
initiates a paragraph break. If one refers to a float (figure or table)
somewhere in a long paragraph, one might like the float to be anchored
starting from that location. I achieve this using
\startpostponing [+0]
  \startplacefigure
  \stopplacefigure
\stoppostponing
but this does not always work well. In addition, this is not very
satisfying (as it makes for ugly source code). Also, one might want to
use location=right or location=left without using "hang" and counting
lines. Hans has repeated that floats are complicated beasts and such
features would interfere with paragraph building. OK (But dare I say
that LaTeX does not seem to have any problem with this.)

Alan

P.S. Would not the use of \startcombination\stopcombination be an
alternative to the placefigures within a table?
___
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
___

[NTG-context] Broken floats when using postponing.

2014-06-03 Thread Alan BRASLAU
Hello,

The following minimal example yields an error using the latest version
from the garden:

\starttext
This is before \in{Figure}[fig:cow]
\startpostponing [+0] 
\startplacefigure [reference=fig:cow]
\externalfigure [cow]
\stopplacefigure
\stoppostponing
and this is after.
\stoptext


tex errorerror on line 3 in file virtual://page.nopage.1: ! Extra }, 
or forgotten \endgroup

\strc_floats_stop_place ...unwantedspaces \egroup 
  
l.3 \stopplacefigure
  

empty file


The problem appears with the use of \startpostponing\stoppostponing
(used to prevent a paragraph break in the middle of the sentence).

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


[NTG-context] Missing { inserted using placefigure and postponing

2013-09-21 Thread Marco Patzer
Hi,

I get a “Missing { inserted.” error under certain circumstances.
Here is an example:

\starttext
  \blackrule [height=8cm]

  \startpostponing
\placefigure
  [] {foo}{bar}
  \stoppostponing

  \blackrule [height=15cm]

  \startlines
  a
  b
  \stoplines
\stoptext

I used black rules to insert boxes of a particular height, any
content would do. Funnily enough it works with \placefigure []
{foo}{bar}, but not with

  \placefigure
[] {foo}{bar}

I have no clue what's wrong here.

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] Missing { inserted using placefigure and postponing

2013-09-21 Thread Hans Hagen

On 9/21/2013 12:01 PM, Marco Patzer wrote:

Hi,

I get a “Missing { inserted.” error under certain circumstances.
Here is an example:

\starttext
   \blackrule [height=8cm]

   \startpostponing
 \placefigure
   [] {foo}{bar}
   \stoppostponing

   \blackrule [height=15cm]

   \startlines
   a
   b
   \stoplines
\stoptext

I used black rules to insert boxes of a particular height, any
content would do. Funnily enough it works with \placefigure []
{foo}{bar}, but not with

   \placefigure
 [] {foo}{bar}

I have no clue what's wrong here.


the buffer is flushed in 'lines' mode so under a different endonlien 
regime (took me quite some tracing to figure that out) .. fix in beta 
(not sure if that spoils other cases)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] \startplacefigure breaking paragraph flow

2013-02-10 Thread Alan BRASLAU
On Sat, 9 Feb 2013 04:15:34 +0100
Marcin Borkowski mb...@amu.edu.pl wrote:

 when I issue a \startplacefigure, it breaks the flow of the paragraph.

I systematically use

\startpostponing [+0]
\startplacefigure
...
\stopplacefigure
\stoppostponing

to prevent the paragraph break of \startplacefigure

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


[NTG-context] images and text stacked in the margin

2012-11-12 Thread Andy Thomas
Dear list,

I am still struggling to achieve the page layout/look that I am trying to get. 
For an image of the desired page spread please look here: 
https://dl.dropbox.com/u/9089117/tufte-spread.png

The design is using the ample margin to place text (sidenotes), figures 
(images) and tables in the margin. I am unable to get both (images and text) to 
work properly. 


(1) put all in a \margintext
\margintext{...} for text
\margintext{\placefigure...} for external images

This option does not work if the position is close to a page break (cp. 
http://archive.contextgarden.net/message/2012.191529.3fbef120.en.html)


(2) use two different macros
\margintext{...} for text and
\placefigure[location=margin]{}{...} for external images 

This option does not work because they are placed on top of each other. I also 
tried \startplacefigure, but also no luck.


(3) put all in a \placefigure
\placefigure[margin,none]{}{Text Text} for text
\placefigure[margin,none]{}{...} for external images

This works best, because it starts from the top and nicely stacks the 
marginals. But it introduces a paragraph break where the sidenote is called. 
This does not work, it defeats the purpose (imagine a paragraph after every 
footnote).


(4) use (3) and postponing
\startpostponing [+1]%
\startplacefigure[location={margin,none}]%
Text text\stopplacefigure%
\stoppostponing%

Now, the paragraph break is gone, but the sidenote is on the next page, which 
does not make sense in our case (cp. 
http://tex.stackexchange.com/questions/56388/avoid-line-break-after-macro). In 
general, I do not understand, where the paragraph break at the \placefigure... 
comes from. It does not seam necessary in most cases (e.g. location=top) and 
postponing does avoid it. Can I 'gobble' it somehow?


Does anyone have an idea, how to make it work for images as well as text 
combined?

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


Re: [NTG-context] images and text stacked in the margin

2012-11-12 Thread Alan BRASLAU
On Mon, 12 Nov 2012 20:49:38 +0100
Andy Thomas andytho...@web.de wrote:

  You need to put the \placemargintext at the beginning of a
  paragraph, otherwise it will cause an unwanted break.  
 :(
 
 Unfortunately, this is not an option. The citations have to be
 referenced at the end of particular sentences. The first link
 (showing the spread) makes it more obvious. 

One trick used with floats to avoid the unwanted break that may or may
not work here with margintext is

\startpostponing [+0]
\startplacemargintext
\stoplacemargintext
\stoppostponing

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


Re: [NTG-context] postponing broken?

2012-07-11 Thread Hans Hagen

On 11-7-2012 14:58, Alan BRASLAU wrote:

Hello,

In the latest beta, postponing seems to be broken (or changed).

Minimal example:

\starttext
\input tufte
(see \in{figure}[fig:cow].)
\startpostponing [+0]
\startplacefigure [location=here,reference={fig:cow},
title={A cow that does not break the paragraph}]
\externalfigure [cow] [width=.5\textwidth]
\stopplacefigure
\stoppostponing
\input tufte
\stoptext



quick hack (in cont-new.mkiv):

unexpanded\def\page_postponed_blocks_flush
  {\setfalse\c_page_postponed_busy
   \ifconditional\c_page_postponed_busy
 % probably a nested flush
   \else\ifnum\c_page_postponed_blocks_next_page=\zerocount
 % nothing in cache
   \else\ifnum\c_page_postponed_blocks_next_page\zerocount
 % generic cache
 \page_postponed_blocks_flush_indeed
   \else\ifnum\c_page_postponed_blocks_next_page\realpageno
 % future content
   \else
 % pending content
 \page_postponed_blocks_flush_indeed
   \fi\fi\fi\fi}


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-


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


Re: [NTG-context] multi-page floats

2012-06-06 Thread luigi scarso
On Tue, Jun 5, 2012 at 8:25 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 18:17 schrieb luigi scarso:


 ! File ended while scanning use of \buff_gobble.

 Uhm I've tested but maybe I've made a wrong cut and paste.
 Re-check now.

 Ah, it 's a side effect of the previous code



 What did you change?
Who knows... I'm always try to use the latest beta, and sometime I
make some confusion.

 I also overlooked that there is no image, i.e. layer is not visible.
True: The next one
I've a problem with the pagenumber on header, but I can use
\setupbackgrounds[page][background={foreground,bg}]

%%
\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]
\setupbackgrounds[page][background={bg}]
%\setupbackgrounds[page][background={foreground,bg}]

\def\DoublePicAt#1{
  \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
  \strut
  \page
}

\starttext
\startpostponing[5]
\DoublePicAt{hacker}
\stoppostponing
\startpostponing[6]
\DoublePicAt{hacker-back}
\stoppostponing


\dorecurse{30}{
  \section{Knuth \recurselevel}
  \input knuth
}

\stoptext



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


[NTG-context] postponing conflicts with footnotes

2012-06-06 Thread Henning Hraban Ramm

Me again...

If a footnote doesn’t fit on the same page as its anchor, it gets  
placed on the next page - even if that’s a postponed one.

I’d like to keep my postponed pages free of interfering text.

\starttext

\startpostponing[3]
This page incidentally left blank.
\page
\stoppostponing

\dorecurse{10}{
Weit hinten, hinter den Wortbergen, fern der Länder Vokalien 
\footnote{\input tufte} und Konsonantien\footnote{\input zapf} leben  
die Blindtexte. Abgeschieden wohnen Sie in Buchstabhausen an der Küste  
des Semantik, eines großen Sprachozeans. Ein kleines Bächlein namens  
Duden\footnote{\input knuth} fließt durch ihren Ort\footnote{Ort} und  
versorgt sie mit den nötigen Regelialien. Es ist ein paradiesmatisches  
Land, in dem einem gebratene Satzteile in den Mund fliegen. Nicht  
einmal von der allmächtigen Interpunktion werden die Blindtexte 
\footnote{Blindtext} beherrscht – ein geradezu unorthographisches  
Leben. Eines Tages aber beschloß eine kleine Zeile Blindtext, ihr Name  
war Lorem\footnote{\input dawkins} Ipsum, hinaus zu gehen in die weite  
Grammatik. Der große Oxmox\footnote{ox pollox} riet ihr davon ab, da  
es dort wimmele von bösen Kommata, wilden Fragezeichen und  
hinterhältigen Semikoli, doch das Blindtextchen ließ sich nicht  
beirren. Es packte seine sieben Versalien, schob sich sein Initial in  
den Gürtel und machte sich auf den Weg. Als es die ersten Hügel des  
Kursivgebirges erklommen hatte, warf es einen letzten Blick zurück auf  
die Skyline\footnote{Esmane} seiner Heimatstadt Buchstabhausen, die  
Headline von Alphabetdorf und die Subline\footnote{sublime} seiner  
eigenen Straße, der Zeilengasse. Wehmütig lief ihm eine rhetorische  
Frage über die Wange, dann setzte es seinen Weg fort.

}

\stoptext




Greetlings, Hraban
---
http://www.fiee.net/texnique/
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
___


Re: [NTG-context] multi-page floats

2012-06-06 Thread luigi scarso
On Wed, Jun 6, 2012 at 9:37 AM, luigi scarso luigi.sca...@gmail.com wrote:
 On Tue, Jun 5, 2012 at 8:25 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 18:17 schrieb luigi scarso:


 ! File ended while scanning use of \buff_gobble.

 Uhm I've tested but maybe I've made a wrong cut and paste.
 Re-check now.

 Ah, it 's a side effect of the previous code



 What did you change?
 Who knows... I'm always try to use the latest beta, and sometime I
 make some confusion.

 I also overlooked that there is no image, i.e. layer is not visible.
And maybe this is what you want

\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]
\setupbackgrounds[page][background={bg}]

\def\DoublePicAt#1{
  \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
  \strut
  \page\stoppostponing
}

\newcount\AtPageCnt

\def\PostPoneA#1#2{%
\startpostponing[#2]%
\DoublePicAt{#1}}

\def\PostPone#1#2{%
\AtPageCnt=#2
\PostPoneA{#1}{\the\AtPageCnt}\stoppostponing
\advance\AtPageCnt by 1%
\PostPoneA{#1-back}{\the\AtPageCnt}\stoppostponing
}


\starttext

\PostPone{hacker}{5}

\dorecurse{30}{
  \section{Knuth \recurselevel}
  \input knuth
}
\stoppostponing
\stoptext


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


Re: [NTG-context] multi-page floats

2012-06-06 Thread luigi scarso
On Wed, Jun 6, 2012 at 11:39 AM, luigi scarso luigi.sca...@gmail.com wrote:
 On Wed, Jun 6, 2012 at 9:37 AM, luigi scarso luigi.sca...@gmail.com wrote:
 On Tue, Jun 5, 2012 at 8:25 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 18:17 schrieb luigi scarso:


 ! File ended while scanning use of \buff_gobble.

 Uhm I've tested but maybe I've made a wrong cut and paste.
 Re-check now.

 Ah, it 's a side effect of the previous code



 What did you change?
 Who knows... I'm always try to use the latest beta, and sometime I
 make some confusion.

 I also overlooked that there is no image, i.e. layer is not visible.
 And maybe this is what you want
errata/corrige
 \def\DoublePicAt#1{
      \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
      \strut
      \page\stoppostponing
 }


\def\DoublePicAt#1{
  \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
  \strut
  \page
}




 \newcount\AtPageCnt

 \def\PostPoneA#1#2{%
 \startpostponing[#2]%
 \DoublePicAt{#1}}

 \def\PostPone#1#2{%
 \AtPageCnt=#2
 \PostPoneA{#1}{\the\AtPageCnt}\stoppostponing
 \advance\AtPageCnt by 1%
 \PostPoneA{#1-back}{\the\AtPageCnt}\stoppostponing
 }


 \starttext

 \PostPone{hacker}{5}

 \dorecurse{30}{
      \section{Knuth \recurselevel}
      \input knuth
 }
 \stoppostponing
 \stoptext


 --
 luigi



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

Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm
Sorry for coming back again and again, but I’m still stuck, and my  
deadline is overdue.


* I need full-page pictures on defined pages in the middle of a chapter.

* I don’t care if I must define on page x or on the next right page  
after the current paragraph.


- The only way for full-page pictures (i.e. bleeding over the page)  
that I know of is layers.
- The only way to interrupt a story with full-page content that I know  
of is postponing.
(makeups were a dead end so far - maybe they can help to get to a  
right page withput using \page[right])


While each works for itself, I can’t get layers working within  
postponing.


And when that works, I need to wrap it in a macro, since I alway need  
to define and postpone three sequential pages.



Without postponing, this works:

--- *** ---
\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height= 
\dimexpr(\paperheight+6mm)]

%\definemakeup[rightpage][page=right]

\def\DoublePic#1{
%\startmakeup[rightpage] % error!
\page[right]
\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut

%\stopmakeup

	% empty back of the first picture, since it’s printed on transparent  
paper

%\startmakeup[rightpage] % error!
\page[right]

\resetlayer[bg]
	\setlayer[bg]{\externalfigure[#1-hg][height=\dimexpr(\paperheight 
+6mm)]}

\setupbackgrounds[page][background=bg]
\strut

%\stopmakeup
\page
}

\starttext

\input tufte

\DoublePic{koe}

\input knuth

\stoptext

--- *** ---

This doesn’t:

--- *** ---
\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height= 
\dimexpr(\paperheight+6mm)]


\def\DoublePicAt#1#2{
\startpostponing[#2]
\page[right] % tried also makeups...

\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut

\page[right]
\setuppagenumber[state=start]

\resetlayer[bg]
	\setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight 
+6mm)]}

\setupbackgrounds[page][background=bg]
\strut
\page
\stoppostponing
}

\starttext

\DoublePicAt{hacker}{5}

\dorecurse{30}{
\section{Knuth \recurselevel}
\input knuth
}

\stoptext

--- *** ---

Can you show me a way to use layers within postponing, please?



Greetlings, Hraban
---
http://www.fiee.net/texnique/
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
___


Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
On Tue, Jun 5, 2012 at 2:00 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Sorry for coming back again and again, but I’m still stuck, and my deadline
 is overdue.

 * I need full-page pictures on defined pages in the middle of a chapter.

 * I don’t care if I must define on page x or on the next right page after
 the current paragraph.

 - The only way for full-page pictures (i.e. bleeding over the page) that I
 know of is layers.
 - The only way to interrupt a story with full-page content that I know of is
 postponing.
 (makeups were a dead end so far - maybe they can help to get to a right page
 withput using \page[right])

 While each works for itself, I can’t get layers working within postponing.

 And when that works, I need to wrap it in a macro, since I alway need to
 define and postpone three sequential pages.


 Without postponing, this works:

 --- *** ---
 \setuppagenumbering[alternative=doublesided]
 \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]
 %\definemakeup[rightpage][page=right]

 \def\DoublePic#1{
        %\startmakeup[rightpage] % error!
        \page[right]

        \resetlayer[bg]
        \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
        \setupbackgrounds[page][background=bg]
        \strut

        %\stopmakeup

        % empty back of the first picture, since it’s printed on transparent
 paper
        %\startmakeup[rightpage] % error!
        \page[right]


        \resetlayer[bg]

  \setlayer[bg]{\externalfigure[#1-hg][height=\dimexpr(\paperheight+6mm)]}
        \setupbackgrounds[page][background=bg]
        \strut

        %\stopmakeup
        \page
 }

 \starttext

 \input tufte

 \DoublePic{koe}


 \input knuth

 \stoptext

 --- *** ---

 This doesn’t:

 --- *** ---
 \setuppagenumbering[alternative=doublesided]
 \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

 \def\DoublePicAt#1#2{
        \startpostponing[#2]
        \page[right] % tried also makeups...


        \resetlayer[bg]
        \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
        \setupbackgrounds[page][background=bg]
        \strut

        \page[right]
        \setuppagenumber[state=start]

        \resetlayer[bg]

  \setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

        \setupbackgrounds[page][background=bg]
        \strut
        \page
        \stoppostponing
 }

 \starttext

 \DoublePicAt{hacker}{5}


 \dorecurse{30}{
        \section{Knuth \recurselevel}
        \input knuth
 }

 \stoptext

 --- *** ---

 Can you show me a way to use layers within postponing, please?
A first step --- still quite similar to your macro. Hope it helps just for now.

\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

\def\DoublePicAt#1#2{
   %\startpostponing[#2]
   \page[right] % tried also makeups...
   \resetlayer[bg]
   \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
   \setupbackgrounds[page][background=bg]
   \strut

   \page[right]
   \setuppagenumber[state=start]

   \resetlayer[bg]
   
\setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

   \setupbackgrounds[page][background=bg]
   \strut
   \page
   %\stoppostponing
}

\starttext
\startpostponing[5]
\DoublePicAt{hacker}{5}
\stoppostponing

\dorecurse{30}{
   \section{Knuth \recurselevel}
   \input knuth
}

\stoptext

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

Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
Another one



\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

\unexpanded\def\DoDoublePicAt#1{
   \page[right] % tried also makeups...
   \resetlayer[bg]
   \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
   \setupbackgrounds[page][background=bg]
   \strut

   \page[right]
   \setuppagenumber[state=start]

   \resetlayer[bg]
   
\setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

   \setupbackgrounds[page][background=bg]
   \strut
   \page
}

\def\DoublePicAt#1#2{
\startpostponing[#2]
\DoDoublePicAt{#1}
\stoppostponing
}



\starttext
\DoublePicAt{hacker}{5}

\dorecurse{30}{
   \section{Knuth \recurselevel}
   \input knuth
}

\stoptext

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


Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm

Am 2012-06-05 um 14:42 schrieb luigi scarso:


Another one



\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height= 
\dimexpr(\paperheight+6mm)]


\unexpanded\def\DoDoublePicAt#1{
  \page[right] % tried also makeups...
  \resetlayer[bg]
  \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight 
+6mm)]}

  \setupbackgrounds[page][background=bg]
  \strut

  \page[right]
  \setuppagenumber[state=start]

  \resetlayer[bg]
  \setlayer[bg]{\externalfigure[#1-back][height= 
\dimexpr(\paperheight+6mm)]}


  \setupbackgrounds[page][background=bg]
  \strut
  \page
}

\def\DoublePicAt#1#2{
\startpostponing[#2]
\DoDoublePicAt{#1}
\stoppostponing
}



\starttext
\DoublePicAt{hacker}{5}

\dorecurse{30}{
  \section{Knuth \recurselevel}
  \input knuth
}

\stoptext


Thank you again, but, did you test that? I get:

)
Runaway argument?
\dorecur\section{\ETC.r} \stoppostponing
! File ended while scanning use of \buff_gobble.

system   tex  error on line 4 in file /Users/hraban/Library/ 
texmf/tex/texmf-context/tex/context/base/cont-yes.mkiv: File ended  
while scanning use of \buff_gobble ...


 1 %D \module
 2 %D   [   file=cont-yes,
 3 %Dversion=2012.06.01,
 4   %D  title=\CONTEXT\ Miscellaneous Macros,
 5 %D   subtitle=Startup Stub,
 6 %D author=Hans Hagen,
 7 %D   date=\currentdate,
 8 %D  copyright={PRAGMA ADE \ \CONTEXT\ Development Team}]
 9 %C
10 %C This module is part of the \CONTEXT\ macro||package and is
11 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12 %C details.
13
14 % At some point I will reconsider the \starttext .. \stoptext

inserted text
\par
l.4 }

}   context.finishjob()

\luat_start_lua_code_indeed ...ua \zerocount {#1}}

l.70 \stopluacode

?


Greetlings, Hraban
---
http://www.fiee.net/texnique/
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
___


Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
On Tue, Jun 5, 2012 at 6:01 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 14:42 schrieb luigi scarso:


 Another one


 \setuppagenumbering[alternative=doublesided]

 \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

 \unexpanded\def\DoDoublePicAt#1{
      \page[right] % tried also makeups...
      \resetlayer[bg]
      \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
      \setupbackgrounds[page][background=bg]
      \strut

      \page[right]
      \setuppagenumber[state=start]

      \resetlayer[bg]

  \setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

      \setupbackgrounds[page][background=bg]
      \strut
      \page
 }

 \def\DoublePicAt#1#2{
 \startpostponing[#2]
 \DoDoublePicAt{#1}
 \stoppostponing
 }



 \starttext
 \DoublePicAt{hacker}{5}

 \dorecurse{30}{
      \section{Knuth \recurselevel}
      \input knuth
 }

 \stoptext


 Thank you again, but, did you test that? I get:

 )
 Runaway argument?
 \dorecur\section{\ETC.r} \stoppostponing

 ! File ended while scanning use of \buff_gobble.
Uhm I've tested but maybe I've made a wrong cut and paste.
Re-check now.
-- 
luigi
___
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
___

Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
On Tue, Jun 5, 2012 at 6:08 PM, luigi scarso luigi.sca...@gmail.com wrote:
 On Tue, Jun 5, 2012 at 6:01 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 14:42 schrieb luigi scarso:


 Another one


 \setuppagenumbering[alternative=doublesided]

 \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

 \unexpanded\def\DoDoublePicAt#1{
      \page[right] % tried also makeups...
      \resetlayer[bg]
      \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
      \setupbackgrounds[page][background=bg]
      \strut

      \page[right]
      \setuppagenumber[state=start]

      \resetlayer[bg]

  \setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

      \setupbackgrounds[page][background=bg]
      \strut
      \page
 }

 \def\DoublePicAt#1#2{
 \startpostponing[#2]
 \DoDoublePicAt{#1}
 \stoppostponing
 }



 \starttext
 \DoublePicAt{hacker}{5}

 \dorecurse{30}{
      \section{Knuth \recurselevel}
      \input knuth
 }

 \stoptext


 Thank you again, but, did you test that? I get:

 )
 Runaway argument?
 \dorecur\section{\ETC.r} \stoppostponing

 ! File ended while scanning use of \buff_gobble.
 Uhm I've tested but maybe I've made a wrong cut and paste.
 Re-check now.
Ah, it 's a side effect of the previous code


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

Re: [NTG-context] multi-page floats

2012-06-05 Thread Wolfgang Schuster

Am 05.06.2012 um 14:00 schrieb Henning Hraban Ramm:

 Sorry for coming back again and again, but I’m still stuck, and my deadline 
 is overdue.
 
 * I need full-page pictures on defined pages in the middle of a chapter.
 
 * I don’t care if I must define on page x or on the next right page after 
 the current paragraph.
 
 - The only way for full-page pictures (i.e. bleeding over the page) that I 
 know of is layers.
 - The only way to interrupt a story with full-page content that I know of is 
 postponing.
 (makeups were a dead end so far - maybe they can help to get to a right page 
 withput using \page[right])
 
 While each works for itself, I can’t get layers working within postponing.
 
 And when that works, I need to wrap it in a macro, since I alway need to 
 define and postpone three sequential pages.

\starttext

\dorecurse{3}{\input tufte\par}

\startpostponing
\offset
  [x=-\the\dimexpr\backspace+1cm\relax,
   y=-\the\dimexpr\topspace+\headerheight+\headerdistance+1cm\relax]
  
{\externalfigure[mill][width=\the\dimexpr\paperwidth+2cm\relax,height=\the\dimexpr\paperheight+2cm\relax]}
\page
\stoppostponing

\dorecurse{5}{\input tufte\par}

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


Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm

Am 2012-06-05 um 19:55 schrieb Wolfgang Schuster:

Sorry for coming back again and again, but I’m still stuck, and my  
deadline is overdue.


* I need full-page pictures on defined pages in the middle of a  
chapter.


* I don’t care if I must define on page x or on the next right  
page after the current paragraph.


- The only way for full-page pictures (i.e. bleeding over the page)  
that I know of is layers.
- The only way to interrupt a story with full-page content that I  
know of is postponing.
(makeups were a dead end so far - maybe they can help to get to a  
right page withput using \page[right])


While each works for itself, I can’t get layers working within  
postponing.


And when that works, I need to wrap it in a macro, since I alway  
need to define and postpone three sequential pages.


\starttext

\dorecurse{3}{\input tufte\par}

\startpostponing
\offset
 [x=-\the\dimexpr\backspace+1cm\relax,
  y=-\the\dimexpr\topspace+\headerheight+\headerdistance+1cm\relax]
 {\externalfigure[mill][width=\the\dimexpr\paperwidth+2cm 
\relax,height=\the\dimexpr\paperheight+2cm\relax]}

\page
\stoppostponing

\dorecurse{5}{\input tufte\par}

\stoptext


Great, I didn’t know \offset (or I forgot)!
This way it’s much easier!
Thank you very much!

Of course, the \offset stuff works in a macro, but not postponing. But  
I can live with three lines of code per insertion.


Greetlings,
Hraban
___
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
___


Re: [NTG-context] multi-page floats

2012-06-04 Thread Henning Hraban Ramm

Am 2012-05-31 um 23:48 schrieb Hans Hagen:


On 31-5-2012 20:25, Henning Hraban Ramm wrote:
Ok, some days later I'm still not where I'd like to be (and my  
deadline

is overdue).
Let’s resume:

A running text is to be interrupted by spans of 3 pages.
Postponing (\startpostponing) works well for that, but I need to  
switch

off page numbering on two of that 3 pages - as far as I tried,
\setuppagenumbering as well as \setuppagenumber doesn’t work within
postponed sections.

Further, these pages contain full-page pictures, i.e. I need them
bleeding off the paper.
Normally, \setlayer works well for that, but I couldn’t get layers
working within postponed sections.

Since I need these interruptions several times in a very similar  
way, I
\def’ed that postponing stuff as a macro, but get errors that point  
to

expanding problems (I never get those).

I’d appreciate some pointers in which direction I should
think/investigate further.
E.g.
- are there alternatives to postponing? perhaps multi-page floats  
(but

at defined pages)?
- is there a possibility for bleeding full-page pictures without  
layers?
- can it work at all to change page numbering within a postponed  
page span?


maybe

\startmakeup[page]
   page a
\stopmakeup



Good hint. I setup:

\definemakeup[rightpage][page=right]
\definemakeup[leftpage][page=left]

and get empty right/left pages from within my macro.

Can I control if the content after a markup starts on a right or left  
page?



Further, if I try to use postponing in a macro, I get errors:

--- *** ---
Runaway argument?
\dorecur\section{K\ETC. \stoppostponing
! File ended while scanning use of \buff_gobble.

system   tex  error on line 0 in file : File ended while  
scanning use of \buff_gobble ...


empty file

inserted text
\par
* ./postpone
   \stoptext
--- *** ---

I guess I need to unexpand something?

My example:

--- *** ---

\def\TestPostpone#1{
\startpostponing[#1]
\strut
\page
\stoppostponing
}

\starttext

\TestPostpone{3}

\dorecurse{30}{
\section{Knuth \recurselevel}
\input knuth
}

\stoptext

--- *** ---


Greetlings, Hraban
---
http://www.fiee.net/texnique/
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
___


Re: [NTG-context] multi-page floats

2012-05-31 Thread Henning Hraban Ramm
Ok, some days later I'm still not where I'd like to be (and my  
deadline is overdue).

Let’s resume:

A running text is to be interrupted by spans of 3 pages.
Postponing (\startpostponing) works well for that, but I need to  
switch off page numbering on two of that 3 pages - as far as I tried,  
\setuppagenumbering as well as \setuppagenumber doesn’t work within  
postponed sections.


Further, these pages contain full-page pictures, i.e. I need them  
bleeding off the paper.
Normally, \setlayer works well for that, but I couldn’t get layers  
working within postponed sections.


Since I need these interruptions several times in a very similar way,  
I \def’ed that postponing stuff as a macro, but get errors that point  
to expanding problems (I never get those).


I’d appreciate some pointers in which direction I should think/ 
investigate further.

E.g.
- are there alternatives to postponing? perhaps multi-page floats (but  
at defined pages)?

- is there a possibility for bleeding full-page pictures without layers?
- can it work at all to change page numbering within a postponed page  
span?



Greetlings, Hraban
---
http://www.fiee.net/texnique/
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
___


Re: [NTG-context] multi-page floats

2012-05-31 Thread Hans Hagen

On 31-5-2012 20:25, Henning Hraban Ramm wrote:

Ok, some days later I'm still not where I'd like to be (and my deadline
is overdue).
Let’s resume:

A running text is to be interrupted by spans of 3 pages.
Postponing (\startpostponing) works well for that, but I need to switch
off page numbering on two of that 3 pages - as far as I tried,
\setuppagenumbering as well as \setuppagenumber doesn’t work within
postponed sections.

Further, these pages contain full-page pictures, i.e. I need them
bleeding off the paper.
Normally, \setlayer works well for that, but I couldn’t get layers
working within postponed sections.

Since I need these interruptions several times in a very similar way, I
\def’ed that postponing stuff as a macro, but get errors that point to
expanding problems (I never get those).

I’d appreciate some pointers in which direction I should
think/investigate further.
E.g.
- are there alternatives to postponing? perhaps multi-page floats (but
at defined pages)?
- is there a possibility for bleeding full-page pictures without layers?
- can it work at all to change page numbering within a postponed page span?


maybe

\starttext

page 1

\page

\startmakeup[page]
page a
\stopmakeup

\startmakeup[page]
page b
\stopmakeup

\startmakeup[page]
page d
\stopmakeup

page 2

\stoptext



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] multi-page floats

2012-05-28 Thread Hans Hagen

On 27-5-2012 16:06, Henning Hraban Ramm wrote:

Hi again,
in my current book project there are sets of full-page graphics, where
there’s first a drawing, to be printed on transparent paper, followed by
a water colour picture as background, i.e. a series of

right page: foreground graphic
right page: background graphic

The transparent pages are left out in pagination.
Between chapters (i.e. stories), the following macro does what I want:

\def\DoublePic#1{
\page[right] % foreground picture on transparent paper

\setuppagenumbering[state=stop]\setuppagenumber[state=stop]\par
\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1-fore][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut\par % page needs some content

\page[right] % background picture on normal paper

\setuppagenumber[state=start]\par
\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut\par

\page
\setuppagenumbering[state=start]
}


Now, the publisher would like to move the picture pages in the middle of
the stories, i.e. I need them to float here without manual page breaking.
How can I achieve that?

I’d also appreciate enhancements to my macro above.

(MkIV latest beta on OSX Intel.)

Thank you very much in advance!


\startpostponing

might help (you can add [pagenumber] or [+pagenumber] if needed)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] multi-page floats

2012-05-28 Thread Henning Hraban Ramm

Am 2012-05-28 um 19:27 schrieb Hans Hagen:


\startpostponing

might help (you can add [pagenumber] or [+pagenumber] if needed)


Oh, of course, Philipp Gesang recently reminded me.
I would like to use \startpostponing[right], but fixed pages are ok.


This works:

\starttext

\startpostponing[3]
\section{Tufte}
\input tufte
\strut

\page
\strut

\page

\section{More Tufte}
\input tufte

\page
\stoppostponing

\dorecurse{30}{
\section{Knuth \recurselevel}
\input knuth
}

\stoptext


But if I try to put graphics in layers within the postponing, I get  
empty pages.
Further, if I put that postponing stuff into a macro (see below), I  
get errors about \par ending the buffer. I guess I’d need some  
unexpanding, but where?
Without \def, I get 2 (instead of 3) empty pages, but with page  
numbers. I need to switch off the pagenumbering for the first two  
pages (because it’s a transparent page that doesn’t count); it’s  
probably also a problem fixed-page postponing...


\def\DoublePicAt#1#2{
\startpostponing[#2]
\setuppagenumbering[state=stop]\setuppagenumber[state=stop]

\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut

\page %[right] doesn’t work
\strut

\page

\setuppagenumber[state=start]

\resetlayer[bg]
	\setlayer[bg]{\externalfigure[#1-hg][height=\dimexpr(\paperheight 
+6mm)]}

\setupbackgrounds[page][background=bg]
\strut

\page
\setuppagenumbering[state=start]
\stoppostponing
}

Thanks in advance!

Greetlings, Hraban

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


Re: [NTG-context] full page images on fixed pages

2012-05-19 Thread Henning Hraban Ramm

Am 2012-05-17 um 13:49 schrieb Philipp Gesang:


In my current book project, I need to set images on fixed pages
(because only a few pages get printed in color),


I assume with “fixed pages” you mean “always on the page with a
certain number”. This, at least, might be solved with the
postponing mechanism:


\starttext

\startpostponing [3]
 \startstandardmakeup
   \externalfigure [cow] [width=\hsize]
 \stopstandardmakeup
\stoppostponing

\dorecurse{42}{\input knuth \par}

\stoptext



Thank you, that works, but the publisher decided to use glue binding  
to be able to put colored pages everywhere...


Can you explain, what standardmakeup really does? I know it’s used in  
free layout pages.




Not sure about your full page problem, though.


I'll open another thread on that.


Greetlings, Hraban
---
http://www.fiee.net/texnique/
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
___


Re: [NTG-context] full page images on fixed pages

2012-05-19 Thread Willi Egger
Hi Hraban,

Humble but is it that the page will be entirely covered with a float? In that 
case you might better use
the background mechanism so that you can place the float on the paper instead 
of the page?

Willi
On May 19, 2012, at 8:38 PM, Henning Hraban Ramm wrote:

 Am 2012-05-17 um 13:49 schrieb Philipp Gesang:
 
 In my current book project, I need to set images on fixed pages
 (because only a few pages get printed in color),
 
 I assume with “fixed pages” you mean “always on the page with a
 certain number”. This, at least, might be solved with the
 postponing mechanism:
 
 
 \starttext
 
 \startpostponing [3]
 \startstandardmakeup
   \externalfigure [cow] [width=\hsize]
 \stopstandardmakeup
 \stoppostponing
 
 \dorecurse{42}{\input knuth \par}
 
 \stoptext
 
 
 Thank you, that works, but the publisher decided to use glue binding to be 
 able to put colored pages everywhere...
 
 Can you explain, what standardmakeup really does? I know it’s used in free 
 layout pages.
 
 
 Not sure about your full page problem, though.
 
 I'll open another thread on that.
 
 
 Greetlings, Hraban
 ---
 http://www.fiee.net/texnique/
 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
 ___

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


Re: [NTG-context] full page images on fixed pages

2012-05-19 Thread Philipp Gesang
On 2012-05-19 20:38, Henning Hraban Ramm wrote:
 Am 2012-05-17 um 13:49 schrieb Philipp Gesang:
 
 In my current book project, I need to set images on fixed pages
 (because only a few pages get printed in color),
 
 I assume with “fixed pages” you mean “always on the page with a
 certain number”. This, at least, might be solved with the
 postponing mechanism:
 
 
 \starttext
 
 \startpostponing [3]
  \startstandardmakeup
\externalfigure [cow] [width=\hsize]
  \stopstandardmakeup
 \stoppostponing
 
 \dorecurse{42}{\input knuth \par}
 
 \stoptext
 
 
 Thank you, that works, but the publisher decided to use glue binding
 to be able to put colored pages everywhere...

Sounds like they are meaning it ...
 
 Can you explain, what standardmakeup really does? I know it’s used
 in free layout pages.

In its natural state (like \startmakeup without arguments), the
makeup 1. nil’s headers and footers, 2. zeroes whitespace
settings (\forgetall), (2.a. disables overfull box warnings,) and
3.  sets the text area to the current dimensions \textheight by
\textwidth. The output looks like most layout elements.

However, the personalized makeup environments as defined by
\definemakeup are much more complex. They basically allow to
insert parameterized layout and pagestyle exceptions without
affecting the layout of the surrounding pages. Implicitly, with
the makeup definition, a page layout is created as well, so the
options of \setuplayout work as well. This may be the key to the
solution to your full page issue. The *standardmakeup*
environment belongs to this second group, it is initialized as
(page-mak.mkvi):

  \definemakeup
[\v!standard]
[\c!width=\innermakeupwidth,
 \c!height=\textheight,
 \c!page=\v!right,
 \c!doublesided=\v!empty]

If you want to go hack on makeups, you might want to use the
“setups” key to add your code.  Of course, for the complete story
you’ll need to look up the definition of \page_makeup_start_yes.
(There’s some very basic info in “Layouts in Context”, pp. 49f,
too.)

Best regards
Philipp

 Not sure about your full page problem, though.
 
 I'll open another thread on that.
 
 
 Greetlings, Hraban
 ---
 http://www.fiee.net/texnique/
 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
 ___

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpkt6PACpHEI.pgp
Description: PGP signature
___
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
___

Re: [NTG-context] full page images on fixed pages

2012-05-17 Thread Philipp Gesang
Hi Henning,

On 2012-05-16 22:30, Henning Hraban Ramm wrote:
 In my current book project, I need to set images on fixed pages
 (because only a few pages get printed in color),

I assume with “fixed pages” you mean “always on the page with a
certain number”. This, at least, might be solved with the
postponing mechanism:


\starttext

\startpostponing [3]
  \startstandardmakeup
\externalfigure [cow] [width=\hsize]
  \stopstandardmakeup
\stoppostponing

\dorecurse{42}{\input knuth \par}

\stoptext


Not sure about your full page problem, though.

Philipp

  and full-page, i.e.
 bleeding 3mm.
 
 What’s the best way to achieve each?
 
 The only way for full-page images that I know of, is via layer/
 background, but I find it difficult to activate and deactivate that
 at the right pages.
 
 
 Greetlings, Hraban
 ---
 http://www.fiee.net/texnique/
 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
 ___

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpySDZti95xU.pgp
Description: PGP signature
___
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
___

Re: [NTG-context] placefigure adds break

2012-04-12 Thread Alan BRASLAU
Hello,

A follow-up on the solution
\startpostponing [+0]
\startplacefigure
…
\stopplacefigure
\stoppostponing

As a side effect, one then needs to be careful to surround
ALL placefigures with \startpostponing[+0]\stoppostponing,
even those that occur after a paragraph end
(where one is not concerned about adding a paragraph break),
else the floating figures may get placed out of order,
e.g. figure 4 before figure 3.

As this makes for somewhat sloppy tex files,
should not placefigure/table/other get FIXED
so as not to introduce a paragraph break?

Alan


On Thu Apr 5 15:38:05 CEST 2012 Alan BRASLAU wrote:

 On Thu, 5 Apr 2012 13:39:42 +0200
 Steffen Wolfrum context at st.estfiles.de wrote:
 
  
  Am 05.04.2012 um 13:25 schrieb luigi scarso:
  
   On Thu, Apr 5, 2012 at 1:10 PM, Aditya Mahajan adityam at umich.edu
   wrote:
   (Untested)
   
   \startpostponing[+1]
   \placefigure[top]{}{...}
   \stoppostponing
   
   Rest of the text
   
   
   Aditya
   \starttext
   
   \switchtobodyfont[rm,10pt]
   
   \input tufte \input ward \input zapf \input tufte \input ward \input
   zapf \input tufte \input ward %
   \input zapf \input tufte \input ward %
   \input zapf HERE%
   \startpostponing[+1]
   \placefigure[top]{}{\vskip3pt\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}
   \stoppostponing%
   AND HERE \input tufte \input ward %
   \input zapf \input tufte \input ward \input zapf \input tufte \input
   ward \input zapf \input tufte %
   \input ward \input zapf \input tufte \input ward \input zapf
   
   \stoptext
   
   seems ok
  
  
  
  indeed, a great result.
  (searching for this command now, I saw that it's a quite old
  command ... only I never knew it)
  
  thanks a lot Aditya and Luigi!
 
 
 I have been looking for a trick to place figures near their reference
 in the text, without imposing a paragraph break.
 This trick works (so thanks again to Aditya and Luigi):
 
 \starttext
 
 Some text is described \in{figure}[fig:reference].
 \startpostponing[+0]
 \startplacefigure[location=here,reference=fig:reference,
   title={This figure gets placed somewhere near its reference.}]
   \externalfigure[cow][width=\textwidth]
 \stopplacefigure
 \stoppostponing
 The text continues here without a paragraph break.
 
 \stoptext
 
 A few comments:
 
 1. The \startpostponing...\stoppostponing is necessary,
 although some other wrapper around the placefigure might also work.
 
 2. The % at the end of the lines in the above examples is not necessary
 unless one seeks to kill the spacing between {HERE}{AND HERE}.
 
 3. One should preferably be using \startplacefigure\stopplacefigure
 (rather than \placefigure). Besides being cleaner, as a bonus
 one gets to use title={},list={} for the figure caption and
 list of figure entry.
 
 Should placefigure be fixed somehow so as to hide its paragraph
 break itself?
___
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
___

Re: [NTG-context] [***SPAM***] placefigure adds break

2012-04-05 Thread Aditya Mahajan

On Thu, 5 Apr 2012, Steffen Wolfrum wrote:


Hi,

please have a look at thee example below:
I have a long paragraph (more than 3 pages), and I want to set a float/figure 
at top of page 2.
Thus, I need to write \placefigure *in* my paragraph, between two words.

How can I do that without adding a paragraph break after the respective word (marked 
HERE)?

Steffen
---

\starttext

\switchtobodyfont[rm,10pt]

\input tufte \input ward \input zapf \input tufte \input ward \input 
zapf \input tufte \input ward \input zapf \input tufte \input ward 
\input zapf HERE 
\placefigure[top]{}{\vskip3pt{\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}}\input 
tufte \input ward \input zapf \input tufte \input ward \input zapf 
\input tufte \input ward \input zapf \input tufte \input ward \input 
zapf \input tufte \input ward \input zapf


\stoptext


(Untested)

\startpostponing[+1]
\placefigure[top]{}{...}
\stoppostponing

Rest of the text


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


Re: [NTG-context] [***SPAM***] placefigure adds break

2012-04-05 Thread luigi scarso
On Thu, Apr 5, 2012 at 1:10 PM, Aditya Mahajan adit...@umich.edu wrote:
 (Untested)

 \startpostponing[+1]
 \placefigure[top]{}{...}
 \stoppostponing

 Rest of the text


 Aditya
\starttext

\switchtobodyfont[rm,10pt]

\input tufte \input ward \input zapf \input tufte \input ward \input
zapf \input tufte \input ward %
\input zapf \input tufte \input ward %
\input zapf HERE%
\startpostponing[+1]
\placefigure[top]{}{\vskip3pt\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}
\stoppostponing%
AND HERE \input tufte \input ward %
\input zapf \input tufte \input ward \input zapf \input tufte \input
ward \input zapf \input tufte %
\input ward \input zapf \input tufte \input ward \input zapf

\stoptext

seems ok

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


Re: [NTG-context] [***NOSPAM***] placefigure adds break

2012-04-05 Thread Steffen Wolfrum

Am 05.04.2012 um 13:25 schrieb luigi scarso:

 On Thu, Apr 5, 2012 at 1:10 PM, Aditya Mahajan adit...@umich.edu wrote:
 (Untested)
 
 \startpostponing[+1]
 \placefigure[top]{}{...}
 \stoppostponing
 
 Rest of the text
 
 
 Aditya
 \starttext
 
 \switchtobodyfont[rm,10pt]
 
 \input tufte \input ward \input zapf \input tufte \input ward \input
 zapf \input tufte \input ward %
 \input zapf \input tufte \input ward %
 \input zapf HERE%
 \startpostponing[+1]
 \placefigure[top]{}{\vskip3pt\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}
 \stoppostponing%
 AND HERE \input tufte \input ward %
 \input zapf \input tufte \input ward \input zapf \input tufte \input
 ward \input zapf \input tufte %
 \input ward \input zapf \input tufte \input ward \input zapf
 
 \stoptext
 
 seems ok



indeed, a great result.
(searching for this command now, I saw that it's a quite old command ... only I 
never knew it)

thanks a lot Aditya and Luigi!

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


Re: [NTG-context] [***NOSPAM***] placefigure adds break

2012-04-05 Thread Alan BRASLAU
On Thu, 5 Apr 2012 13:39:42 +0200
Steffen Wolfrum cont...@st.estfiles.de wrote:

 
 Am 05.04.2012 um 13:25 schrieb luigi scarso:
 
  On Thu, Apr 5, 2012 at 1:10 PM, Aditya Mahajan adit...@umich.edu
  wrote:
  (Untested)
  
  \startpostponing[+1]
  \placefigure[top]{}{...}
  \stoppostponing
  
  Rest of the text
  
  
  Aditya
  \starttext
  
  \switchtobodyfont[rm,10pt]
  
  \input tufte \input ward \input zapf \input tufte \input ward \input
  zapf \input tufte \input ward %
  \input zapf \input tufte \input ward %
  \input zapf HERE%
  \startpostponing[+1]
  \placefigure[top]{}{\vskip3pt\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}
  \stoppostponing%
  AND HERE \input tufte \input ward %
  \input zapf \input tufte \input ward \input zapf \input tufte \input
  ward \input zapf \input tufte %
  \input ward \input zapf \input tufte \input ward \input zapf
  
  \stoptext
  
  seems ok
 
 
 
 indeed, a great result.
 (searching for this command now, I saw that it's a quite old
 command ... only I never knew it)
 
 thanks a lot Aditya and Luigi!


I have been looking for a trick to place figures near their reference
in the text, without imposing a paragraph break.
This trick works (so thanks again to Aditya and Luigi):

\starttext

Some text is described \in{figure}[fig:reference].
\startpostponing[+0]
\startplacefigure[location=here,reference=fig:reference,
title={This figure gets placed somewhere near its reference.}]
\externalfigure[cow][width=\textwidth]
\stopplacefigure
\stoppostponing
The text continues here without a paragraph break.

\stoptext

A few comments:

1. The \startpostponing...\stoppostponing is necessary,
although some other wrapper around the placefigure might also work.

2. The % at the end of the lines in the above examples is not necessary
unless one seeks to kill the spacing between {HERE}{AND HERE}.

3. One should preferably be using \startplacefigure\stopplacefigure
(rather than \placefigure). Besides being cleaner, as a bonus
one gets to use title={},list={} for the figure caption and
list of figure entry.

Should placefigure be fixed somehow so as to hide its paragraph
break itself?

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


Re: [NTG-context] Bug with \startpostponing

2012-03-02 Thread Hans Hagen

On 1-3-2012 20:20, Aditya Mahajan wrote:

Hi,

The following works fine in MkII but gives a TeX capacity exceeded error
in MkIV.

\starttext
\input ward
\startpostponing[+1]
\framed[align=normal]{\input knuth \endgraf}
\stoppostponing
\dorecurse{15}{\input ward}
\stoptext


Some circular references (tex/lua calls using the same names and so), 
I'll make a new beta. Some of the postponing housekeeping moved to lua a 
while ago (as postponing relates to buffering).


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] Float on opposite page

2012-03-01 Thread Aditya Mahajan

On Thu, 1 Mar 2012, Charles wrote:


Hi,

I have a problem with float positioning. I would like to have text on even 
pages and text on odd pages. I tried:


- \placetable[opposite] but then the tables are not included.
- \placetable[rightpage] but then each table is on a new page.

I would like to have my figures/tables on a new even page, but if 2 
figures/tables fit on one page, they should not be on two different pages but 
together on the same even page (I was thinking opposite should do that).


Untested:


\setuppagenumbering[alternative=doublesided]

\starttext

Lorem ipsum dolor sit amet, maecenas malesuada, ut tellus ac a egestas donec, 
lectus aliquam, purus orci fermentum porta sed. Ut quis risus suspendisse, 
convallis vel velit suspendisse amet diam urna, erat auctor vestibulum nec 
amet lorem, at fringilla cursus aenean donec dui at. Neque duis luctus netus 
magna, orci nulla vivamus consectetuer nulla, amet felis in sodales dictum 
parturient ipsum, consequuntur malesuada.


\startpostponing[+1]


\placetable[top]{Legend 1}{Content of Table 1}

\placetable[top]{Legend 1}{Content of Table 2}


\stoppostponing

Vestibulum ut pretium fringilla dui dui odio, pellentesque arcu leo id. 
Malesuada curabitur, urna nostrum mauris lobortis, ante luctus donec a, 
congue arcu placerat dictum non integer, nulla non.


\stoptext


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


Re: [NTG-context] Float on opposite page

2012-03-01 Thread Charles

Le 01/03/2012 18:17, Aditya Mahajan a écrit :

On Thu, 1 Mar 2012, Charles wrote:


Hi,

I have a problem with float positioning. I would like to have text on
even pages and text on odd pages. I tried:

- \placetable[opposite] but then the tables are not included.
- \placetable[rightpage] but then each table is on a new page.

I would like to have my figures/tables on a new even page, but if 2
figures/tables fit on one page, they should not be on two different
pages but together on the same even page (I was thinking opposite
should do that).


Untested:


\setuppagenumbering[alternative=doublesided]

\starttext

Lorem ipsum dolor sit amet, maecenas malesuada, ut tellus ac a egestas
donec, lectus aliquam, purus orci fermentum porta sed. Ut quis risus
suspendisse, convallis vel velit suspendisse amet diam urna, erat
auctor vestibulum nec amet lorem, at fringilla cursus aenean donec dui
at. Neque duis luctus netus magna, orci nulla vivamus consectetuer
nulla, amet felis in sodales dictum parturient ipsum, consequuntur
malesuada.


\startpostponing[+1]


\placetable[top]{Legend 1}{Content of Table 1}

\placetable[top]{Legend 1}{Content of Table 2}


\stoppostponing


Vestibulum ut pretium fringilla dui dui odio, pellentesque arcu leo
id. Malesuada curabitur, urna nostrum mauris lobortis, ante luctus
donec a, congue arcu placerat dictum non integer, nulla non.

\stoptext


Aditya


Thanks but it doesn't work (TeX capacity exceeded) and anyway the 
figures would not be centered on the page.


Charles

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


[NTG-context] Bug with \startpostponing

2012-03-01 Thread Aditya Mahajan

Hi,

The following works fine in MkII but gives a TeX capacity exceeded error 
in MkIV.


\starttext
\input ward
\startpostponing[+1]
\framed[align=normal]{\input knuth \endgraf}
\stoppostponing
\dorecurse{15}{\input ward}
\stoptext

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


[NTG-context] Columnset error with \setupheader[state=high]

2011-12-07 Thread Peter Park Nelson
Update:

I don't have a solution yet, but here is my attempt to figure out where
this problem comes from. I may be (probably am) wrong; I am new to ConTeXt
and not an expert on its internals. But I'll toss this out to see if anyone
is interested.

When \startcolumnset is called, it seems to take a snapshot of the state
of the layout (via setuplayout). However, layout can change, even without
\setuplayout being explicitly called again, as in the case of header
state=high (which modifies the layout of  the first page only). By visual
inspection, it looks like the columnset output routine continues to use the
page dimensions from the first page on subsequent pages. Since the first
page has no header space, height of the text box on the first page will be
larger than on subsequent pages. Therefore, applying the first page height
on subsequent pages will result in text that runs over the footer area.

To see if a new call to \startcolumnset would fix things, I tried to find a
way to automatically do \startcolumnset again at the beginning of the
second page. A crude hack, using the startpostponing mechanism:

\startpostponing[2] % do this block on the second page
\unexpanded\stopcolumnset\unexpanded\startcolumnset[name] % manually end
the current columnset and then start it again.
\stoppostponing

This unfortunately results in a blank page after the first page; however,
the rest of the pages after that blank page have correct columnsets and
footers.

So a real solution to this problem could perhaps be done in two different
ways -- the difference being where in the ConTeXt code it is implemented:
A. The columnset output routine listens for changes in the layout state
and reloads or adjusts itself when layout state changes; or,
B. Any change in layout state passed to the output routine triggers a
re-call of the \startcolumnset macro.

These are probably oversimplified, but I hope someone who understands the
columnset output routine can see what I am trying to get at.
-- 
Peter Park Nelson
peter.park.nel...@gmail.com
___
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
___

Re: [NTG-context] Columnset error with \setupheader[state=high]

2011-12-07 Thread Peter Park Nelson
Those \unexpanded 's are not necessary, sorry.

On Wed, Dec 7, 2011 at 4:42 PM, Peter Park Nelson 
peter.park.nel...@gmail.com wrote:

 Update:

 I don't have a solution yet, but here is my attempt to figure out where
 this problem comes from. I may be (probably am) wrong; I am new to ConTeXt
 and not an expert on its internals. But I'll toss this out to see if anyone
 is interested.

 When \startcolumnset is called, it seems to take a snapshot of the state
 of the layout (via setuplayout). However, layout can change, even without
 \setuplayout being explicitly called again, as in the case of header
 state=high (which modifies the layout of  the first page only). By visual
 inspection, it looks like the columnset output routine continues to use the
 page dimensions from the first page on subsequent pages. Since the first
 page has no header space, height of the text box on the first page will be
 larger than on subsequent pages. Therefore, applying the first page height
 on subsequent pages will result in text that runs over the footer area.

 To see if a new call to \startcolumnset would fix things, I tried to find
 a way to automatically do \startcolumnset again at the beginning of the
 second page. A crude hack, using the startpostponing mechanism:

 \startpostponing[2] % do this block on the second page
 \unexpanded\stopcolumnset\unexpanded\startcolumnset[name] % manually end
 the current columnset and then start it again.
 \stoppostponing

 This unfortunately results in a blank page after the first page; however,
 the rest of the pages after that blank page have correct columnsets and
 footers.

 So a real solution to this problem could perhaps be done in two different
 ways -- the difference being where in the ConTeXt code it is implemented:
 A. The columnset output routine listens for changes in the layout state
 and reloads or adjusts itself when layout state changes; or,
 B. Any change in layout state passed to the output routine triggers a
 re-call of the \startcolumnset macro.

 These are probably oversimplified, but I hope someone who understands the
 columnset output routine can see what I am trying to get at.
 --
 Peter Park Nelson
 peter.park.nel...@gmail.com




-- 
Peter Park Nelson
peter.park.nel...@gmail.com
___
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
___

Re: [NTG-context] Columns and figures in MKIV

2011-07-01 Thread Jason Earl

On Thu, Jun 30 2011, Willi Egger wrote:

 Columnsets provide you the possibility to place column spanning pictures:

Thank you for the advice.  I was hoping to avoid having to learn about
columnsets, but I suppose learning is good.  Any hints on getting
columnsets and footnotes to play nicely?  Here's an example of how I
would normally use footnotes, but the footnote is obscured by the text.

--8---cut here---start-8---
\definecolumnset[Doublecoltext][n=2,balance=no]
\setupcolumnset[Doublecoltext][2][distance=5mm]
\starttext
\chapter[chap:testing]{Testing}

\startcolumnset[Doublecoltext]

  This is a short paragraph.  I think it should have a
  footnote.\footnote{And so it shall!  Unfortunately you won't be able
to see it because it is covered up with the text in the
columnsets.}

\input knuth

%\startpostponing
 \placefigure
   [btlr][fig:foo]
   {none}
   {\externalfigure[mill][width=1.5\textwidth,height=5cm]}
%\stoppostponing

\input tufte

\input knuth

\input tufte

\input knuth

\input tufte

\stopcolumnset
\stoptext
--8---cut here---end---8---

Once again, I am sorry if my question is naive.  I am working through
the examples in the Columnset manual to try and wrap my head around
them, but it is becoming pretty clear to me that it is a tool for layout
designers far more accomplished than I am.

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


Re: [NTG-context] Columns and figures in MKIV

2011-06-30 Thread Willi Egger
Columnsets provide you the possibility to place column spanning pictures:

Willi

\definecolumnset[Doublecoltext][n=2,balance=no]
\setupcolumnset[Doublecoltext][2][distance=5mm]
\starttext
\startcolumnset[Doublecoltext]
\chapter[chap:testing]{Testing}


\input knuth

%\startpostponing
 \placefigure
   [btlr][fig:foo]
   {none}
   {\externalfigure[mill][width=1.5\textwidth,height=5cm]}
%\stoppostponing

\input tufte

\input knuth

\input tufte

\input knuth

\input tufte

\stopcolumnset
\stoptext



On 30 Jun 2011, at 01:24, Jason Earl wrote:

 \starttext
 \startcolumns
 \chapter[chap:testing]{Testing}
 
 \startcolumns[n=2, tolerant=verytolerant]
 \input knuth
 
 %\startpostponing
  \placefigure
[center][fig:foo]
{none}
{\externalfigure[foo][]
  [width=1.5\textwidth]}
 %\stoppostponing
 
 \input tufte
 
 \input knuth
 
 \input tufte
 
 \input knuth
 
 \input tufte
 
 \stopcolumns
 \stoptext

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


[NTG-context] Columns and figures in MKIV

2011-06-29 Thread Jason Earl

I am trying to upgrade an existing document from using texexec and
pdftex to context and luatex.  Unfortunately, the document relies pretty
heavily on columns (using \startcolumns[n=2,tolerant=verytolerant]) and
the idea that figures that are too wide to place in a column float to
the top of the next page.

Unfortunately, this does not seem to be the case with the current
minimals.  The following example works fine for texexec (even if I
comment out the \startpostponing \stoppostponing code).  The figure is
placed (centered) at the top of page 2.  With MKIV, however, the figure
stays in the first column and bleeds over into the second column (the
postponing code does change it to the next page, but it doesn't force it
out of the column).

--8---cut here---start-8---
\enableregime[utf-8]

\starttext
\startcolumns
\chapter[chap:testing]{Testing}

\startcolumns[n=2, tolerant=verytolerant]
\input knuth

%\startpostponing
  \placefigure
[center][fig:foo]
{none}
{\externalfigure[foo][]
  [width=1.5\textwidth]}
%\stoppostponing

\input tufte

\input knuth

\input tufte

\input knuth

\input tufte

\stopcolumns
\stoptext--8---cut here---end---8---

I am using the Context minimal distribution (on Linux) and context
reports that the current version as:

current version: 2011.06.29 09:57

It is quite likely that I am simply doing this wrong, but I have read:

http://wiki.contextgarden.net/Columns

and it appears to support what I am trying to do.  I have experimented a
bit with columnsets, but they appear to be overkill for my use.  Then
again, I am probably doing it wrong.  Any advice would be appreciated.

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


Re: [NTG-context] Pagination problem with an intermezzo containing a footnote

2011-03-12 Thread Wolfgang Schuster

Am 11.03.2011 um 20:54 schrieb mathew:

 \starttext
 
 This is a sample document to demonstrate a possible bug. You will
 probably see a footnote below which appears before the page it's
 referenced from.
 
 \placeintermezzo[page][block:example]{Demonstrating a bug}
 \startframedtext[width=0.8\makeupwidth]
 This is a rather dull intermezzo.\footnote{But it does at least
 demonstrate a bug.}
 \stopframedtext
 
 \stoptext

This isn’t a bug. The problem with your footnote is that context
reads the note at page 1 where it saw the float and placed therefore
the note on page one but the float itself wasn’t placed because
context saved it and flushed it at the next page.

What you can do is to move the float first to a separate page
first and used a fixed float (force keyword) to immediately flush it. 

The saved method is to use local footnotes (you can find example
on the wiki) where the notes are placed below the float.

\starttext

This is a sample document to demonstrate a possible bug. You will
probably see a footnote below which appears before the page it's
referenced from.

\startpostponing
\placeintermezzo[force][block:example]
  {Demonstrating a bug}
  {\startframedtext[width=0.8\makeupwidth]
   This is a rather dull intermezzo.\footnote{But it does at least demonstrate 
a bug.}
   \stopframedtext}
\stoppostponing

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


[NTG-context] running headers on postponed makeup

2010-12-18 Thread Philipp Gesang
Hi all,

after discovering postponed insertions I encountered a problem
when combining it with the makeup mechanism I am so fond of.

···8

\definemakeup[my]
\setupmakeup[my][
  headerstate=start,
  page=yes,
]

\startbuffer[mkup]
  \startmymakeup
\vfill\externalfigure[cow][width=\hsize]\vfill
  \stopmymakeup
\stopbuffer

\setuppagenumbering[alternative=doublesided,location=footer]
\setupheadertexts [{\getmarking[section]}] [outer] [outer] 
[{\getmarking[section]}]

\starttext

\startpostponing[+2]
  \getbuffer[mkup]
\stoppostponing

\dorecurse{10}{\section{the Don spake} \input knuth }

\stoptext

···8

Is there way to get the running header on the makeup page?
Tweaking the “headerstate” does not seem to have an effect on
this.

Thanks in advance, Philipp


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpK8BUTyBT8g.pgp
Description: PGP signature
___
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
___


Re: [NTG-context] Temporary landscape

2010-10-13 Thread Aditya Mahajan

On Wed, 13 Oct 2010, Hans Hagen wrote:


On 13-10-2010 3:22, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

I need to typeset contents of a wide file. This works:

---
\starttext

\setuppapersize[A4,landscape][A4,landscape]
\typefile[Dim]{Cha-MMax-iDL.txt}

\page

% RESTORE ORIGINAL PAGE SETTINGS

AAA

\stoptext


You can wikify this:

\setuplayout
 [location=middle]

\showframe

\def\PushPaperSize
 {\edef\PopPaperSize{\setuppapersize[\papersize][\printpapersize]}}

\starttext
   \setuppapersize[A4][A3]
   test \page
   \PushPaperSize
   \setuppapersize[A4,landscape][A3,landscape]
   test \page
   \PopPaperSize
   test \page
\stoptext


From my to be completed TUGboat article:

\section {Changing paper size within a document}

To get one page (containing a table or a figure) in landscape
mode, you can use \type{\adaptpapersize}. For example,

\starttyping
\definepapersize[main] [A4] [A4]
\definepapersize[extra][A4,landscape]
   [A4,landscape]

\setuppapersize[main]
\starttext
Page 1. Potrait \page
Page 2. Potrait \page
\adaptpapersize[extra]
Page 3. Landscape \page
Page 4. Potrait \page
\stoptext
\stoptyping

If you have a full page figure that you want to include in a landscape 
paper, you can combine \type{\adaptpapersize} with \CONTEXT's postponing 
mechanism.


\starttyping
  \startpostponing
\adaptpapersize[extra]
\placefigure
  [here]
  [fig:reference]
  {The caption of the figure}
  {\extrenalgraphics[full-page-figure]}
\page
  \stoppostponing
\stoptyping

The \type{postponing} environment postpones the figure until the next 
page. When the new page starts, \type{\adaptpapersize} changes to 
landscape mode. The \type{\page} is the end is to make sure even if some 
place is remaining on the page, we do not get any text there.


To get more than one page in landscape, you can reuse 
\type{\setuppapersize}.

For example,

\starttyping
\definepapersize[main] [A4] [A4]
\definepapersize[extra][A4,landscape]
   [A4,landscape]

\setuppapersize[main]
\starttext
Page 1. Potrait \page
Page 2. Potrait \page
\setuppapersize[extra]
Page 3. Landscape \page
Page 4. Landscape \page
\setuppapersize[main]
Page 5. Potrait \page
Page 6. Potrait \page
\stoptext
\stoptyping


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


Re: [NTG-context] Temporary landscape

2010-10-13 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Thank you both for the suggestions. My final code looks like this:

---
\def\PushPaperSize{\edef\PopPaperSize{\setuppapersize[\papersize][\printpapersize]}}

\definehead[subjectLand][subject]
\setuphead[subjectLand][before={\PushPaperSize\page},style=bold]

\setuptyping[Dim][bodyfont=small,style={\ttx\setupinterlinespace}]

\starttext

  \def\T#1#2{
\subjectLand{#1}
\setuppapersize[A4,landscape][A4,landscape]
\typefile[Dim]{../../Statics/Dim/Res/#2.txt}
\typefile[Dim]{../../Statics/Dim/Res/#2.txt} % Just to test (= more than 
one page)
\typefile[Dim]{../../Statics/Dim/Res/#2.txt} % Just to test (= more than 
one page)
\page
\PopPaperSize
  }

  \T{A}{ULS-MMax-iDL}

  \T{B}{ULS-MMax-iDL}
  \T{C}{ULS-MMax-iDL}
  \T{D}{ULS-MMax-iDL}

  AAA

\stoptext

---

I'd have one more question about page layout - let's have the following code:

---
\showframe

\starttext
  AAA
  \page
  \setuppapersize[A4,landscape][A4,landscape]
  BBB
  \page
  \setuppapersize[A4,landscape][A4,landscape]
  \setuplayout[topspace=3in] % How to change text height to keep the bottom 
print range?
  CCC
\stoptext
---

In this example, I changed the topsize by 2in, i.e. 3in (new value) - 1in 
(default = previous value). And I want to shorten the textheight by the same 
difference, i.e. by 2in (i.e. to keep the bottom range of print space).

I know that I can set textheight directly - but I don't want to do so, I want 
this value to be computed from the change of the topsize. Is it possible 
somehow?

Moreover, would it be possible by Lua code? Something like this (pseudo)code:

---
\startluacode
  local ts, th = context.topspace, context.textheight
  local dif = 72 -- 72bp = 1in
 -- Or to call a conversion routine, e.g. in2bp(1), if it 
exists?

  ts = ts + dif
  th = th - dif

  context(string.format(\\setuplayout[topspace=%i,textheight=%i], ts, th))

  -- or: context.setuplayout{topspace=ts, textheight=th}
\stopluacode
---

Best regards,

Lukas


On Wed, 13 Oct 2010 16:03:33 +0200, Aditya Mahajan adit...@umich.edu wrote:


On Wed, 13 Oct 2010, Hans Hagen wrote:


On 13-10-2010 3:22, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

I need to typeset contents of a wide file. This works:

---
\starttext

\setuppapersize[A4,landscape][A4,landscape]
\typefile[Dim]{Cha-MMax-iDL.txt}

\page

% RESTORE ORIGINAL PAGE SETTINGS

AAA

\stoptext


You can wikify this:

\setuplayout
 [location=middle]

\showframe

\def\PushPaperSize
 {\edef\PopPaperSize{\setuppapersize[\papersize][\printpapersize]}}

\starttext
   \setuppapersize[A4][A3]
   test \page
   \PushPaperSize
   \setuppapersize[A4,landscape][A3,landscape]
   test \page
   \PopPaperSize
   test \page
\stoptext


From my to be completed TUGboat article:

\section {Changing paper size within a document}

To get one page (containing a table or a figure) in landscape
mode, you can use \type{\adaptpapersize}. For example,

\starttyping
\definepapersize[main] [A4] [A4]
\definepapersize[extra][A4,landscape]
[A4,landscape]

\setuppapersize[main]
\starttext
 Page 1. Potrait \page
 Page 2. Potrait \page
 \adaptpapersize[extra]
 Page 3. Landscape \page
 Page 4. Potrait \page
\stoptext
\stoptyping

If you have a full page figure that you want to include in a landscape
paper, you can combine \type{\adaptpapersize} with \CONTEXT's postponing
mechanism.

\starttyping
   \startpostponing
 \adaptpapersize[extra]
 \placefigure
   [here]
   [fig:reference]
   {The caption of the figure}
   {\extrenalgraphics[full-page-figure]}
 \page
   \stoppostponing
\stoptyping

The \type{postponing} environment postpones the figure until the next
page. When the new page starts, \type{\adaptpapersize} changes to
landscape mode. The \type{\page} is the end is to make sure even if some
place is remaining on the page, we do not get any text there.

To get more than one page in landscape, you can reuse
\type{\setuppapersize}.
For example,

\starttyping
\definepapersize[main] [A4] [A4]
\definepapersize[extra][A4,landscape]
[A4,landscape]

\setuppapersize[main]
\starttext
 Page 1. Potrait \page
 Page 2. Potrait \page
\setuppapersize[extra]
 Page 3. Landscape \page
 Page 4. Landscape \page
\setuppapersize[main]
 Page 5. Potrait \page
 Page 6. Potrait \page
\stoptext
\stoptyping


Aditya


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


Re: [NTG-context] LuaTeX problems

2008-06-30 Thread Diego Depaoli
2008/6/27 Wolfgang Schuster [EMAIL PROTECTED]:
 On Thu, Jun 26, 2008 at 9:56 PM, Diego Depaoli [EMAIL PROTECTED] wrote:
 2008/6/26 Diego Depaoli [EMAIL PROTECTED]:
 Ooops, I was wrong...
 with this \startpostponing \stoppostponing luatex 0.25 fails too.

 \def\nodostartpostponing[#1]%
  {\doglobal\increment\nofpostponedpageblocks
   \bgroup % a little bit of misusing grouping
   \doifinstring{+}{#1}\advance \realpageno#1\relax % ugly but efficient
   \doglobal\appendetoks\noexpand\getpostponedblock
 {\realfolio}{\nofpostponedpageblocks}\to\postponedpageblocks
   \egroup
   \showmessage\m!layouts3\nofpostponedpageblocks
   %\dostartbuffer[rbuf-\nofpostponedpageblocks]%
   %  [\e!start\v!postponing][\e!stop\v!postponing]}
   \expanded{\dostartbuffer[rbuf-\nofpostponedpageblocks]%
 [\e!start\v!postponing][\e!stop\v!postponing]}}
Sorry for the delay in test but I was away from my pc...
Many thanks for the quick reply, sometime we pay for a worse and slower support!
Unfortunately this doesn't work
! Undefined control sequence.
argument \m

\normalshowmessage ... {interfaces.showmessage(#1
  ,#2,#3)}
\nodostartpostponing ...\egroup \showmessage \m !l
  ayouts3\nofpostponedpagebl...
l.102 \startpostponing[4]

?

Where I'm wrong?

Cheers,

-- 
Diego Depaoli
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] LuaTeX problems

2008-06-26 Thread Diego Depaoli
2008/6/26 Wolfgang Schuster [EMAIL PROTECTED]:
 On Thu, Jun 26, 2008 at 1:50 PM, Tomi Lindberg [EMAIL PROTECTED] wrote:
 2008/6/26, Wolfgang Schuster [EMAIL PROTECTED]:

 Do you call context book or context atkmom?

 As I'm trying to make whole project I use context atkmom.

 A project AFAIK only a collection of products with the same settings
 and you could use it to share environments between different product
 but the file itself is not intended to be processed by ConTeXt.

Now I'm again in my box
That's the error which I get running context myfile

%context giornalino-7.tex
MtxRun | loading configuration for /home/diego/tex/texmf/web2c from
/home/diego/tex/texmf-cache/luatex-cache/context/674254fbca699b0314c014473d5e0398/trees/a5a6a2c980cb29d5f5c1cc9e034556ad
MtxRun | run 1: luatex
--fmt=/home/diego/tex/texmf-cache/luatex-cache/context/674254fbca699b0314c014473d5e0398/formats/cont-en
--lua=/home/diego/tex/texmf-cache/luatex-cache/context/674254fbca699b0314c014473d5e0398/formats/cont-en.lua
./giornalino-7.tex
(giornalino-7.tex

ConTeXt  ver: 2008.06.22 17:38 MKIV  fmt: 2008.6.26  int: english/english

language   : language en is active
utilityfile | not present
system : cont-new loaded
(/home/diego/tex/texmf-context/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(/home/diego/tex/texmf-context/tex/context/base/cont-new.mkiv
lua: used config path - /home/diego/tex/texmf/web2c/texmf.cnf
lua: used cache path -
/home/diego/tex/texmf-cache/luatex-cache/context/674254fbca699b0314c014473d5e0398
) (/home/diego/tex/texmf-context/tex/context/base/cont-mtx.tex))
system : cont-old loaded
(/home/diego/tex/texmf-context/tex/context/base/cont-old.tex
loading: Context Old Macros
)
system : cont-fil loaded
(/home/diego/tex/texmf-context/tex/context/base/cont-fil.tex
loading: Context File Synonyms
)
system : cont-sys loaded
(/home/diego/tex/texmf-context/tex/context/user/cont-sys.tex
(/home/diego/tex/texmf-context/tex/context/base/type-tmf.tex)
(/home/diego/tex/texmf-context/tex/context/base/type-siz.tex)
(/home/diego/tex/texmf-context/tex/context/base/type-otf.tex))
bodyfont   : 12pt rm is loaded
specials   : tex loaded
system : giornalino-7.top loaded
(giornalino-7.top
specials   : loading definition file tpd
(/home/diego/tex/texmf-context/tex/context/base/spec-tpd.tex
specials   : loading definition file fdf
(/home/diego/tex/texmf-context/tex/context/base/spec-fdf.tex
(/home/diego/tex/texmf-context/tex/context/base/spec-fdf.mkiv))
specials   : fdf loaded
)
specials   : fdf loaded
)
layout : 1 times text postponed
)
*

and this is the piece code causing the issue
begins here
\setupexternalfigures[location={local,global,default}]
\startpostponing[4]

\offset

[leftoffset=-\backspace,

topoffset=-\dimexpr\topspace+\headerheight\relax]

{\clip

  [width=\paperwidth]

 {\externalfigure[cow][width=2\paperwidth,height=\paperheight]}}

\stoppostponing



\startpostponing[5]

\noheaderandfooterlines

\offset

[leftoffset=-\backspace,

 topoffset=-\dimexpr\topspace+\headerheight\relax]

{\clip

 [hoffset=\paperwidth,width=\paperwidth]

 {\externalfigure[cow][width=2\paperwidth,height=\paperheight]}}

\stoppostponing

---ends here--

Cheers
-- 
Diego Depaoli
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] LuaTeX problems

2008-06-26 Thread Diego Depaoli
2008/6/26 Diego Depaoli [EMAIL PROTECTED]:
Ooops, I was wrong...
with this \startpostponing \stoppostponing luatex 0.25 fails too.


-- 
Diego Depaoli
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] LuaTeX problems

2008-06-26 Thread Wolfgang Schuster
On Thu, Jun 26, 2008 at 9:56 PM, Diego Depaoli [EMAIL PROTECTED] wrote:
 2008/6/26 Diego Depaoli [EMAIL PROTECTED]:
 Ooops, I was wrong...
 with this \startpostponing \stoppostponing luatex 0.25 fails too.

\def\nodostartpostponing[#1]%
  {\doglobal\increment\nofpostponedpageblocks
   \bgroup % a little bit of misusing grouping
   \doifinstring{+}{#1}\advance \realpageno#1\relax % ugly but efficient
   \doglobal\appendetoks\noexpand\getpostponedblock
 {\realfolio}{\nofpostponedpageblocks}\to\postponedpageblocks
   \egroup
   \showmessage\m!layouts3\nofpostponedpageblocks
   %\dostartbuffer[rbuf-\nofpostponedpageblocks]%
   %  [\e!start\v!postponing][\e!stop\v!postponing]}
   \expanded{\dostartbuffer[rbuf-\nofpostponedpageblocks]%
 [\e!start\v!postponing][\e!stop\v!postponing]}}

Regards
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Booklet hint

2008-06-23 Thread Wolfgang Schuster
On Fri, Jun 20, 2008 at 4:18 PM, Diego Depaoli [EMAIL PROTECTED] wrote:
 2008/6/20 Wolfgang Schuster [EMAIL PROTECTED]:
 What kind and size of font you suggest to maximize readability saving paper?

 I use myself a size between 8 and 10pt but it depends on the font and
 8pt could be too small for a few fonts. You could also try to adjust the
 margins to get more text on the page.
 Thanks, 9pt was my original choice, but someone complained about this size.
 In the meanwhile I got another problem.
 The central page of this booklet should contain a text  which fits an
 A4 sheet so we will have
 [A5][A4, landscape] papersize on pages 1-8, 2-7, 3-6 and [A4,
 rotated][A4,landscape] in pages 4-5.
 My trivial code (obviously) doesn't work and searching wiki and ml
 didn't give much help:

 \setuppapersize[A5][A4, landscape]
 \setuparranging[2UP]
 \startpostponing[4]
 \setuppapersize[A4,rotated][A4,landscape]
 \input knuth
 \page
 \stoppostponing
 \startext
 \dorecurse{50}{\input hawking}
 \stoptext

 How can I achieve the desired result?

Write the text for the A4 page in a seperate document and
include it as a figure.

\setupexternalfigures[location={local,global,default}]

\setuppapersize[A5][A4, landscape]
\setuparranging[2UP]

\startpostponing[4]
\offset
  [leftoffset=-\backspace,
   topoffset=-\dimexpr\topspace+\headerheight\relax]
  {\clip
 [width=\paperwidth]
 {\externalfigure[cow][width=2\paperwidth,height=\paperheight]}}
\stoppostponing

\startpostponing[5]
\noheaderandfooterlines
\offset
  [leftoffset=-\backspace,
   topoffset=-\dimexpr\topspace+\headerheight\relax]
  {\clip
 [hoffset=\paperwidth,width=\paperwidth]
 {\externalfigure[cow][width=2\paperwidth,height=\paperheight]}}
\stoppostponing

\starttext

\dorecurse{50}{\input hawking}

\stoptext

Regards
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Booklet hint

2008-06-23 Thread Diego Depaoli
2008/6/23 Wolfgang Schuster [EMAIL PROTECTED]:
 Write the text for the A4 page in a seperate document and
 include it as a figure.

 \setupexternalfigures[location={local,global,default}]

 \setuppapersize[A5][A4, landscape]
 \setuparranging[2UP]

 \startpostponing[4]
 \offset
  [leftoffset=-\backspace,
   topoffset=-\dimexpr\topspace+\headerheight\relax]
  {\clip
 [width=\paperwidth]
 {\externalfigure[cow][width=2\paperwidth,height=\paperheight]}}
 \stoppostponing

 \startpostponing[5]
 \noheaderandfooterlines
 \offset
  [leftoffset=-\backspace,
   topoffset=-\dimexpr\topspace+\headerheight\relax]
  {\clip
 [hoffset=\paperwidth,width=\paperwidth]
 {\externalfigure[cow][width=2\paperwidth,height=\paperheight]}}
 \stoppostponing

 \starttext

 \dorecurse{50}{\input hawking}

 \stoptext

Many thanks Wolfgang, your sample does the goal.
I'll try it in my booklet.
Could be interesting for the wiki?

Cheers,

-- 
Diego Depaoli
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
]
# \setuptextbackground
\setuptextposition[name][settings]
\setuptextrules[options]
\setuptexttexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber]
\setuptextvariable[name][options]
\setupthinrules[options]
\setuptolerance[options]
\setuptop[text|margin|edge][options]
\setuptoptexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber]
\setuptype[options]
\setuptyping[file|typing|name][options]
\setupunderbar[options]
\setupurl[options]
\setupversions[options]
\setupwhitespace[none|small|medium|big|line|fixed|fix|dimension]
# \setvalue
# \setvariables
# \setxvalue
# \setxvariables
# \showaccents
\showbodyfont[settings]
\showbodyfontenvironment[settings]
# \showcharacters
\showcolor[name]
\showcolorgroup[name][horizontal|vertical|name|value|number]
\showexternalfigures[alternative=a|b|c]
\showfields[names]
# \showfont
\showframe[text|margin|edge]
\showgrid
# \showgridboxes
# \showgridsnapping
\showlayout
# \showlayoutcomponents
\showmakeup
\showpalet[name][horizontal|vertical|name|value]
\showprint[typesetting papersize][printing papersize][settings]
\showsetups
\showstruts
# \showstruts
\showsymbolset[name]
# \snaptogrid
\someline[reference]
\somewhere{text}{text}[reference]
\sort[text]{text}
\space
\splitfloat[settings]{text}{text}
# \splitstring
# \SR
# \start \stop
# \start \stop
\startalignment[width|left|right|middle|inner|outer|wide|broad|height|bottom|line|reset|hanging|nothanging|hyphenated|nothyphenated]
 \stopalignment
# \startarabicpar \stoparabicpar
# \startarabictext \stoparabictext
# \startappendices \stopappendices
\startbackground \stopbackground
# \startbackmatter \stopbackmatter
# \startbaselinecorrection \stopbaselinecorrection
# \startblockquote \stopblockquote
# \startbodymatter \stopbodymatter
\startbuffer[name] \stopbuffer
\startcolor[name] \stopcolor
\startcolumns[settings] \stopcolumns
\startcombination[matrix] \stopcombination
\startcomment[name][settings] \stopcomment
\startcomponent file \stopcomponent
\startdescription{text} \stopdescription
\startdocument[name] \stopdocument
\startenumeration \stopenumeration
\startenvironment file \stopenvironment
\startfact\fact text \\ text \\ text \\\fact text \stopfact
\startfigure[name][file][factor=number][frame=on|off] \stopfigure
\startfloattext[left|right|high|middle|low|offset|tall][reference]{text}{text} 
\stopfloattext
# \startFLOWcell \stopFLOWcell
# \startFLOWchart \stopFLOWchart
\startformula \stopformula
# \startframedcontent \stopframedcontent
\startframedtext[left|right|middle|none][settings] \stopframedtext
# \startfrontmatter \stopfrontmatter
# \starthanging \stophanging
\starthiding \stophiding
\startinteractionmenu[name] \stopinteractionmenu
\startitemgroup[name][options][settings] \stopitemigroup
# \startitemize \stopitemize
# \startitemize \stopitemize
# \startJScode \stopJScode
# \startJSpreamble \stopJSpreamble
# \startJSscripts \stopJSscripts
\startlegend[two]\leg text \\ text \\ text \\\leg \stoplegend
\startline[reference] \stopline
\startlinecorrection \stoplinecorrection
\startlinenumbering[continue] \stoplinenumbering
\startlines \stoplines
\startlocal \stoplocal
\startlocalenvironment \stoplocalenvironment
\startlocalfootnotes \stoplocalfootnotes
# \startlocalsetups \stoplocalsetups
\startmakeup[name][settings] \stopmakeup
\startmarginblock \stopmarginblock
\startmarginrule[number] \stopmarginrule
# \startmode \stopmode
# \startMPpage \stopMPpage
\startnamemakeup \stopnamemakeup
\startnarrower[left|middle|right] \stopnarrower
# \startnointerference \stopnointerference
# \startnotmode \stopnotmode
\startopposite \stopopposite
\startoverlay{text}{text} \stopoverlay
\startoverview[names] \stopoverview
\startpacked[blank] \stoppacked
\startparagraph \stopparagraph
\startpositioning \stoppositioning
\startpostponing \stoppostponing
\startproduct file \stopproduct
\startprofile[names] \stopprofile
\startproject file \stopproject
\startquotation[left|middle|right] \stopquotation
\startregister[text]{text+text+text} \stopregister
# \startsetups \stopsetups
# \startstandardmakeup \stopstandardmakeup
\startsymbolset[name] \stopsymbolset
\startsynchronization \stopsynchronization
\starttable[text|name] \stoptable
\starttables[text|name] \stoptables
\starttabulate[text][settings] \stoptabulate
# \startTEXpage \stopTEXpage
# \starttext \stoptext
# \starttextbackground \stoptextbackground
# \starttextdata \stoptextdata
\starttextrule[top|bottom]{text} \stoptextrule
\starttyping \stoptyping
\startunpacked \stopunpacked
\startversion[numbers] \stopversion
# \startXMLdata \stopXMLdata
# \startXMLignore \stopXMLignore
# \startXMLmapping \stopXMLmapping
\stretched{text}
# \strut
# \strutdepth
# \strutheight
# \struttedbox
\sub[references]
\subject[references]{text}
\subsection[references]{text}
\subsubject[references]{text}
\subsubsection[references]{text}
\subsubsubject[references]{text}
\switchtobodyfont[font settings]
\switchtorawfont[name]
\sym{text}
\symbol[name][name

Re: [NTG-context] OT: typo-fun

2007-08-30 Thread Wolfgang Schuster
2007/8/30, frantisek holop [EMAIL PROTECTED]:
 hi there,

 is it possible to achieve this somehow?:
 http://www.smashingmagazine.com/images/404-2/book.png

\starttext

\startpostponing[404]
\startstandardmakeup[align=left]
The page\crlf
cannot be found
\stopstandardmakeup
\stoppostponing

\dorecurse{420}{\dontleavehmode\page}

\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] OT: typo-fun

2007-08-30 Thread Hans Hagen
frantisek holop wrote:
 hi there,
 
 is it possible to achieve this somehow?:
 http://www.smashingmagazine.com/images/404-2/book.png
 
 :)

\starttext

\dorecurse{100}{\input tufte \par}

\startpostponing
\vbox to \vsize \bgroup \vfill
 \definedfont[Serif at 40pt] \setupinterlinespace
 \raggedleft Who Took \endgraf This Page? \par
\vfill \egroup
\stoppostponing

\dorecurse{100}{\input linden \par}

\stoptext


-)

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] OT: typo-fun

2007-08-30 Thread frantisek holop
hmm, on Thu, Aug 30, 2007 at 02:37:02PM +0200, Hans Hagen said that
 frantisek holop wrote:
  hi there,
  
  is it possible to achieve this somehow?:
  http://www.smashingmagazine.com/images/404-2/book.png

i am sorry, i wasn't specific enough.

what i meant was, to have a book in context, any book,
check if we are on page 404, output the joke, continue
normally.

 \starttext
 
 \dorecurse{100}{\input tufte \par}
 
 \startpostponing
 \vbox to \vsize \bgroup \vfill
  \definedfont[Serif at 40pt] \setupinterlinespace
  \raggedleft Who Took \endgraf This Page? \par
 \vfill \egroup
 \stoppostponing
 
 \dorecurse{100}{\input linden \par}
 
 \stoptext

-- 
never test for an error you don't know how to handle.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] OT: typo-fun

2007-08-30 Thread Aditya Mahajan
On Thu, 30 Aug 2007, frantisek holop wrote:

 hmm, on Thu, Aug 30, 2007 at 02:37:02PM +0200, Hans Hagen said that
 frantisek holop wrote:
 hi there,

 is it possible to achieve this somehow?:
 http://www.smashingmagazine.com/images/404-2/book.png

 i am sorry, i wasn't specific enough.

 what i meant was, to have a book in context, any book,
 check if we are on page 404, output the joke, continue
 normally.

Wolfgang's solution does exactly that. \startpostponing[404] will put 
the material on page 404.

Aditya

 \starttext

 \dorecurse{100}{\input tufte \par}

 \startpostponing
 \vbox to \vsize \bgroup \vfill
  \definedfont[Serif at 40pt] \setupinterlinespace
  \raggedleft Who Took \endgraf This Page? \par
 \vfill \egroup
 \stoppostponing

 \dorecurse{100}{\input linden \par}

 \stoptext

 --
 never test for an error you don't know how to handle.
 ___
 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  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___




-- 
Aditya Mahajan | EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam | Ph: 734.262.4008
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] postponed block and headers

2006-11-16 Thread Paul Jones

Below is somewhat of a silly example, but it does show the problem I am
experiencing.  It looks like the commands inside of the postponing block can
not effect the headers.  Is this a bug or am I doing something wrong?  The
only way I have been able to change the headers is to place a \page[blank]
at the beginning of my postponed block, but then there are no headers for
the rest of the document. Basically I just want there to be no headers on
any page where I postpone a block.  Any help would be much appreciated

\setuppagenumbering[conversion=numbers, location=]
\setupheadertexts[pagenumber]
\setuphead[chapter][header=high, footer=high]

\startpostponing[+2]
\chapter{Chapter with header}
\stoppostponing

\starttext
\chapter{Chapter no header}
\dorecurse{20}{\input davis  }
\stoptext


paul
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] postoned text and headers

2006-11-09 Thread Paul Jones

Any ideas on this?  I have tried everything I can think of, to turn
off headers on a postponed page, including using page[blank], etc. but
nothing seems to work quite right.  Attached is a sample showing the
issue.  This is one of the last issues I have (I think).

Thanks,
paul

On 11/7/06, Paul Jones [EMAIL PROTECTED] wrote:

Hello everyone,

I have a tex document where I postpone (\startpostponing) certain
pages until later in the document.  On those pages I would like the
headers/footers turned off.  I have tried \noheaderandfooterlines, and
setting the header to high, but neither seem to work.  Have I done
something wrong or is there another way to do this?  Here is an
example of what I tried to describe.

%output=pdf
\setuppagenumbering[conversion=numbers, location=]
\setupheadertexts[pagenumber][][][pagenumber]

\starttext
\startpostponing[+2]
\page
\noheaderandfooterlines
%this will generally be a fullbleed picture or set of pictures on a
page by themselves
\framed[frame=on, width=\textwidth, height=\textheight]
{\dorecurse{1}{\input zapf}}
\page
\stoppostponing

\dorecurse{20}{\input davis  }
\stoptext

Thanks in advance for any help,
paul



headers.tex
Description: TeX document
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] postoned text and headers

2006-11-07 Thread Paul Jones
Hello everyone,

I have a tex document where I postpone (\startpostponing) certain
pages until later in the document.  On those pages I would like the
headers/footers turned off.  I have tried \noheaderandfooterlines, and
setting the header to high, but neither seem to work.  Have I done
something wrong or is there another way to do this?  Here is an
example of what I tried to describe.

%output=pdf
\setuppagenumbering[conversion=numbers, location=]
\setupheadertexts[pagenumber][][][pagenumber]

\starttext
\startpostponing[+2]
\page
\noheaderandfooterlines
%this will generally be a fullbleed picture or set of pictures on a
page by themselves
\framed[frame=on, width=\textwidth, height=\textheight]
{\dorecurse{1}{\input zapf}}
\page
\stoppostponing

\dorecurse{20}{\input davis  }
\stoptext

Thanks in advance for any help,
paul
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] afterpage

2006-08-28 Thread Hans Hagen
Peter Rolf wrote:
 Hi Paul,

 Paul Jones wrote:
   
 Hello,

 I have used Latex in the past and have the following code that inserts
 information on certain pages using afterpage.  Is there some way to do a
 similar thing in context?

 

 \setupoutput[pdf]
 \definelayer[info]

 \setuplayer[info]
   [height=\paperheight,width=\paperwidth]

 \setupbackgrounds[page]
   [background={text,info}]% info layer is above normal text layer

 \def\WhichPage#1{%
   \def\docommand##1{\ifnum\pageno=##1\relax
 \setlayerframed[info][x=20mm,y=\dimexpr\paperheight-15mm,location=r]
 [background=color,backgroundcolor=white]
   {\tfb This page is inserted on page \number\pageno}\fi}%
 \rawprocesscommalist[#1]\docommand}%
   
...

lemme show you a few tricks:

(1) test for a number in a set (use \expanded{\doifinset} if in doubt)
(2) use the rightbottom as preset

\def\WhichPage#1%
  {\doifinset{\realfolio}{#1}
 {\setlayerframed
[info]
[preset=rightbottom,x=20mm,y=15mm]
[background=color,backgroundcolor=white]
{\tfb This page is inserted on page \realfolio}%
   }}


\def\WhichPage#1%
  {\doifinset{\realfolio}{#1}
 {\setlayerframed
[info]
[preset=rightbottom,x=20mm,y=15mm]
[background=color,backgroundcolor=white]
{\tfb This page is inserted on page \realfolio}%
   }}

or cleaner (no macro and args involved):

\startsetups [at some pages]

  \setlayerframed
[info]
[preset=rightbottom,x=20mm,y=15mm]
[background=color,backgroundcolor=white]
{\tfb This page is inserted on page \realfolio}

\stopsetups 

\setupheadertexts[\doifinset{\realfolio}{3,4}{\directsetup{at some pages}}]

now, this inserts *as overlay*

however if one wants to insert something after a specific page, there is

% \startpostponing [pagenumber] [+pageoffset]
%
% \startpostponing[2]
%   PAGE 2 \blank
% \stoppostponing
%
% \startpostponing[+1]
%   PAGE +1 \blank
% \stoppostponing
%
% \startpostponing[+2]
%   PAGE +2 \blank
% \stoppostponing
%
% \starttext \dorecurse{4}{\input tufte \page} \stoptext


Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] afterpage

2006-08-28 Thread Peter Rolf
Hans Hagen wrote:
 Peter Rolf wrote:
 Hi Paul,

 Paul Jones wrote:
   
 Hello,

 I have used Latex in the past and have the following code that inserts
 information on certain pages using afterpage.  Is there some way to do a
 similar thing in context?

 
 \setupoutput[pdf]
 \definelayer[info]

 \setuplayer[info]
   [height=\paperheight,width=\paperwidth]

 \setupbackgrounds[page]
   [background={text,info}]% info layer is above normal text layer

 \def\WhichPage#1{%
   \def\docommand##1{\ifnum\pageno=##1\relax
 \setlayerframed[info][x=20mm,y=\dimexpr\paperheight-15mm,location=r]
 [background=color,backgroundcolor=white]
   {\tfb This page is inserted on page \number\pageno}\fi}%
 \rawprocesscommalist[#1]\docommand}%
   
 ...
 
 lemme show you a few tricks:
 
 (1) test for a number in a set (use \expanded{\doifinset} if in doubt)
 (2) use the rightbottom as preset

 \def\WhichPage#1%
   {\doifinset{\realfolio}{#1}
  {\setlayerframed
 [info]
 [preset=rightbottom,x=20mm,y=15mm]
 [background=color,backgroundcolor=white]
 {\tfb This page is inserted on page \realfolio}%
}}
 
 
 \def\WhichPage#1%
   {\doifinset{\realfolio}{#1}
  {\setlayerframed
 [info]
 [preset=rightbottom,x=20mm,y=15mm]
 [background=color,backgroundcolor=white]
 {\tfb This page is inserted on page \realfolio}%
}}
 
 or cleaner (no macro and args involved):
 
 \startsetups [at some pages]
 
   \setlayerframed
 [info]
 [preset=rightbottom,x=20mm,y=15mm]
 [background=color,backgroundcolor=white]
 {\tfb This page is inserted on page \realfolio}
 
 \stopsetups 
 
 \setupheadertexts[\doifinset{\realfolio}{3,4}{\directsetup{at some pages}}]
 
 now, this inserts *as overlay*

This is much better. Thank you! :)

 however if one wants to insert something after a specific page, there is

Oeps, this is what \afterpage doessorry Paul for the wrong answer ;)

Peter

 % \startpostponing [pagenumber] [+pageoffset]
 %
 % \startpostponing[2]
 %   PAGE 2 \blank
 % \stoppostponing
 %
 % \startpostponing[+1]
 %   PAGE +1 \blank
 % \stoppostponing
 %
 % \startpostponing[+2]
 %   PAGE +2 \blank
 % \stoppostponing
 %
 % \starttext \dorecurse{4}{\input tufte \page} \stoptext
 
 
 Hans
 
 
 
 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -
 
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
 
 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] General Float Placement Question

2006-04-25 Thread Hans Hagen
Randall Skelton wrote:
 Many thanks for the reply Hans.  I'm a little puzzled by what happens 
 when I use \setuppagenumbering[alternative=doublesided].  For example:
you can also try this:

\startpostponing
\placefigure
  [Fig:a]
  {Figure a caption goes here}
  {\externalfigure[a][width=0.8\makeupwidth]}
\page
\placefigure
  [Fig:b]
  {Figure b caption goes here}
  {\externalfigure[b][width=0.8\makeupwidth]}
\page
\stoppostponing


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] placefloat

2006-01-22 Thread Hans van der Meer


On Jan 19, 2006, at 18:00, Taco Hoekwater wrote:



(2) Second question. Is there a mechanism whereby one can force  
the  float to at least the next page when there is no room for it  
below  the current point on the page?


There is:

  \startpostponing
stuff with postponed floats
  \stoppostponing

I believe it is mentioned in a manual somewhere, but don't recall
off-hand which one. However, I'm not confident that that mechanism
does precisey what you want, and it is definately not automatic.


It seems to do what I wanted. Putting small figures in the margin on  
the next page from where the call is made.


I seem to remember some mentioning of remaining space on the page in  
ConTeXt-fashion but cannot find it again.

Or can I just rely on TeX's \pagetotal? I tried something as:
\scratchdimen=\textheight
\advance\scratchdimen by -\pagetotal
\ifdim\scratchdimen#1\relax ...

Is it an option to enrich \startpostponing to \startpostponing 
[need=distance]?
( reprogramming \setvalue{\e!start\v!postponing} is it?  asks a bit  
too much of my inner-ConTeXt skills)


I tried something on the following lines, but got stuck with a  
remaining \stoppostponing when there appears to enough space.

Defining \stoppostponing to \empty seems not to work.
\def\startpostponingwhen[#1]{%
\scratchdimen=\textheight
\advance\scratchdimen by -\pagetotal
\ifdim\scratchdimen#1\relax
\let\dostoppostponingwhen=\stoppostponing
\expandafter\startpostponing
\fi}

yours sincerely,
dr. H. van der Meer

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] placefloat

2006-01-19 Thread Taco Hoekwater



Hans van der Meer wrote:
(1) My intention was to place some material into the left margin on  the 
page, but did not succeed.


Added to the collector. I'm positive that there is at least a little
bug somewhere in your list of problems, but I have no time right now
to do research.



(2) Second question. Is there a mechanism whereby one can force the  
float to at least the next page when there is no room for it below  the 
current point on the page?


There is:

  \startpostponing
stuff with postponed floats
  \stoppostponing

I believe it is mentioned in a manual somewhere, but don't recall
off-hand which one. However, I'm not confident that that mechanism
does precisey what you want, and it is definately not automatic.

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] modules.pdf

2005-08-17 Thread luigi.scarso

Mojca Miklavec wrote:



I would suggest to keep the old files and name them like
2005-08-16-modules.pdf 


done


(and perhaps to keep all the files (except
ConTeXt itself of course) since they have to be updated from time to
time as new files are added to the distribution). That way the old
content will not misteriously disappear.

 

patches.zip contains patches for files with  some typo-errors (eg. $x4 
instead of $x$)
they  are (almost) irrelevant at format-generation time, because they 
are not

processed at all .

Also, some macros are in dutch (eg, \blank[2*groot]);
I excluded some others macros (\startpostponing ), correct some others
( \getvalue{period graybox} with \dotgray)
added \loadmap[gbk] and so on.

Partial contents  are ugly (or broken ?) ;
there are many important modules to document (see Core Commands in 
modules.pdf;

inside modules.tex, 3=ok, 1=to be documented, 0= to be exctract)

There are some overfull lines;
maybe there is a better sectioning (or multiple pdfs ?).


So, I think that this is a good starting point

I think that all patches should be approvated before to go into an 
official distro;

after that we can discuss all other stuffs.



It would be a nice idea to put that files on the garden anyway
 



no problem to me

luigi
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context