ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Rolf <indiego@gmx.net>
Subject: Re: new betae
Date: Wed, 30 Aug 2006 12:17:11 +0200	[thread overview]
Message-ID: <44F565A7.3010809@gmx.net> (raw)
In-Reply-To: <44F545A1.9050100@wxs.nl>

Hans Hagen wrote:
> Peter Rolf wrote:
>> Hans Hagen wrote:
>>   
>>> Peter Rolf wrote:
>>>     
>>>> Hans Hagen wrote:
>>>>   
>>>>       
>>>>> Peter Rolf wrote
>>>>>     
>>>>>         
>>>>>> * 2 of 3 picture (png) are not found; both unfound file have a
>>>>>>   "_" in the name
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> hm, will look into it
>>>>>
>>>>>     
>>>>>         
>>>> I have found the cause of this one. If I don't use \usefigurebase the
>>>> gfx are found and included.
>>>>
>>>>   
>>>>       
>>>>>> * position of some (not all) overlay backgrounds is wrong (shifted to
>>>>>> the left); maybe only a side effect
>>>>>>   
>>>>>>       
>>>>>>           
>>>> Sadly the overlays are still placed at the wrong location.
>>>>
>>>> But one step after the other :)
>>>>
>>>> P
>>>>       
>>> of that you can make an example ... 
>>>
>>>     
>> ....I really don't know. This is what I found out so far...
>>
>> First of all all macros are placed with \setlayer in the same layer,
>> using \framed[background=...]{..} to set the content.
>>
>> For all macros with shifted overlays
>> * the text is placed at the correct position
>> * the overlay graphic ends exactly where the overlaybox starts
>>  -----------------------------
>> | overlay gfx  |     text     |
>>  -----------------------------
>>
>> The two working (non shifted) macros contain
>> * no text or
>> * the text is encapsulated in a \smash[d]
>>
>> Mhh, weird. I *removed the text* in one shifted macro and the overlay
>> gfx is placed correctly. Does that ring a bell?
>>   
> \starttext
> 
> \definelayer[test][width=10cm,height=10cm]
> 
> \setlayer[test]{xxx}
> \setlayer[test][preset=rightbottom]{xxx}
> 
> \framed[background=test,width=10cm,height=10cm]{zz}
> 
> \stoptext
> 
> works ok here, so the question is: what is the width/height of your layer
> 
No, it's a bit more complicated. I think the size of the layer has
nothing to do with it.

It's more like this (which works with the beta)

%------------
\definecolor [bluntorange] [r=.9373, g=.6471]
\setupcolors[state=start]

\definelayer[Test]
\setupbackgrounds[text]
  [background=Test]

\defineoverlay[BAR][{\bgroup\color[bluntorange]\blackrule[width=\overlaywidth,height=\overlayheight]\egroup}]

\def\FOO{\dosingleempty\doFOO}

\def\doFOO[#1]#2{% very simplified macro structure
  \bgroup
  \setupstrut\setupinterlinespace% normally with font change
  \framed[width=30mm,background=BAR]% width is always given
  {\vbox{\normaloffinterlineskip% vbox for additional offsets
    \hbox{#2\strut}}}% same for the hbox
  \egroup}


\starttext

\framed[width=\textwidth,height=50mm]\bgroup
\setlayer[Test][x=2cm,y=2cm]{\FOO{FOOBAR}}
\egroup

\stoptext
% -------------

The document is a multi-layer (context, not pdf layer) mp-graphic with
nested structures. So I have many boxes that are placed at specific
positions (using \setlayer). Some content is collected in a buffer and
then placed in a framed vbox (also by \setlayer). So this is not a
simple story (at least not for me).

I'll minimize the components of the xml source and then try to build the
structure of the macros by hand. No fun, but still better than living
without new context features. I'll start with this ASAP.

Greetings, Peter

  reply	other threads:[~2006-08-30 10:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29  7:58 new beta Hans Hagen
2006-08-29  8:51 ` Renaud AUBIN
2006-08-29 10:57   ` Hans Hagen
2006-08-29 11:02     ` Renaud AUBIN
2006-08-29 12:46       ` Hans Hagen
2006-08-29  9:56 ` Peter Rolf
2006-08-29 11:17   ` Hans Hagen
2006-08-29 12:54     ` Peter Rolf
2006-08-29 21:02       ` Hans Hagen
2006-08-29 23:45         ` Peter Rolf
2006-08-30  8:00           ` Hans Hagen
2006-08-30 10:17             ` Peter Rolf [this message]
2006-08-30 11:40               ` new betae Hans Hagen
2006-08-30 15:21                 ` new beta Peter Rolf
2006-08-30 20:58                   ` Hans Hagen
2006-08-30 10:27   ` Peter Rolf
2006-08-30 11:07     ` Peter Rolf
2006-08-29 17:50 ` Renaud AUBIN
2006-08-29 17:57   ` Renaud AUBIN

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=44F565A7.3010809@gmx.net \
    --to=indiego@gmx.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).