ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: layers
Date: Mon, 27 Aug 2001 17:36:05 +0200	[thread overview]
Message-ID: <5.1.0.14.1.20010827173537.04987008@server-1> (raw)

[-- Attachment #1: Type: text/plain, Size: 3265 bytes --]

At 01:50 PM 8/26/2001 +0100, Christopher Tipper wrote:

  >> with some notion of z-coordinates to allow layers to be superimposed
  >> using some notion of priority. Such a concept would not appear to
  >> be possible in the existing TeX architectural model, and is a
  >> significant barrier, in my view to commercial acceptance.

actually, it *can* be done in context sincethere is a layering model, and
actually one can do pretty sophisticated things with it -)

 >Page 1: The line passes through the central float. No doubt some solution
 >could be found whereby a blank white graphic is used as a background to
 >the float, but this is useless if the size of the text box is not known in
 >advance, and must be recalculated for every

This is indeed a good solution, just put a background there, how is the
text typeset now? Put it in a \framed and there you got your background.

 >instance. This is just not sensible, and points out the need for a more
 >general float mechanism. btw I have read Frank Mittelbach's work on
 >xo-pfloat for LaTeX 3, and forgive my obtuseness, but what this guy calls
 >'floats' are just too limited to be useful: for instance I saw no evidence
 >of floats that can be arbitrarily positioned on the page in a
 >deterministic manner.

the new multi column otr will give you some of the control that you want,
including spread graphics and so

 >Page 2: This issue arose during compilation of XML and involves a float in
 >the ConTeXt sense of the word i.e. a graphic. The problem is that the text
 >does not flow accurately past the graphic on the page, and this sort of
 >result would be extremely embarrassing if it were to be published. There
 >is nothing I as a publisher can do to solve this issue, which looks like
 >the result of a flawed algorithm.

\setuptolerance[verytolerant,stretch]

is your friend here.

 >Page 3 and 4: This is more of a question, and may not be an issue at all,
 >but would obviously benefit from a streamlined float handling interface.
 >Page 3 is the XSLT output for the web-page of this article (printed from
 >IE using Acrobat Distiller). Page 4 is the limited rendition I have with
 >the Context from the same XML source. As you can see I have a photograph
 >which has a rather long caption attached. Postioning the caption is
 >trivial in HTML, and I have written XSL templates to transform:

 >   {\placefigure[\XMLpar{image}{align}{}]%
 >     {none}%

 >How may one deal with the <caption> tags in a manner similar to the web
 >layout on page 3?

just put the caption text instead of {none}

or use \startcombination[1*1] {graphic} {text} \stopcombination

this kind of things are doable.

So, live is  not that hard, all you need is a bit of faith: see attachment
for an example of layering; you can imagine that there can be multiple
layers, you can also moves things around on layers, repeat them, etc etc;
[it's a nice mental exercise to figure out hwo this is done.] Now, given
that you can also hook in metapost code, imagine what you can do with
graphics spanning layers.

The issue is not so much if/how it can be done [since much more can be done
that people are made to believe, but to start thinking in how to apply
these techniques. I'm still in the proces of learning.

Hans

[-- Attachment #2: test.tex --]
[-- Type: text/plain, Size: 658 bytes --]

% output=pdftex

\starttext 

\setupcolors[state=start]

\definelayer[test][position=yes]
\defineoverlay[test][\composedlayer{test}]

\setupbackgrounds[page][background=test]

\useexternalfigure[koe 1][koe]
  [width=3cm,
   background=color,backgroundcolor=red,
   backgroundoffset=2cm]

\useexternalfigure[koe 2][koe]
  [width=3cm,
   background=color,backgroundcolor=green,
   backgroundoffset=2cm]

\input tufte 

\placefigure{}{\externalfigure[koe 1]} 

\input tufte 

\placefigure{}{\setlayer[test]{\externalfigure[koe 2]}}

\input tufte 

\placefigure{}{\setlayer[test][hoffset=-2cm]{\externalfigure[koe 2]}}

\input tufte 

\typefile{test}

\stoptext

[-- Attachment #3: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------

             reply	other threads:[~2001-08-27 15:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-27 15:36 Hans Hagen [this message]
2012-08-06 18:06 Layers Bill Meahan
2012-08-06 18:47 ` Layers luigi scarso
2012-08-06 19:27   ` Layers Bill Meahan

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=5.1.0.14.1.20010827173537.04987008@server-1 \
    --to=pragma@wxs.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).