ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: scarso luigi <scarsoluigi@libero.it>
Subject: Re: DocBookInConTeXt customization?
Date: 18 Dec 2002 18:42:00 +0100	[thread overview]
Message-ID: <1040233320.29827.17.camel@luigis.logo.net> (raw)
In-Reply-To: <20021217205400.GB1812@scaprea>

> I did not know what to do with such attributes as role, whose range of
> values is not constrained. Luigi's remark gives me an idea: I should
> put a hook in the stylesheet for the user's own formatting
> command. Something like \attributeaction[para][role]. The user could
> define such an action with something like
> \defineXMLattributeaction[para][role].
> 
> The attribute action should be invoked within a group in order to
> allow the user to change fonts etc. for this element. Therefore
> context cannot invoke the attribute action automatically, because it
> cannot know where it should do so. For example, some mappings for the
> opening tag invoke \egroup; if the attribute action had been invoked
> automatically, its scope would be ended immediately.
When I just start to play with xml/context, I realize a test for table
(i'm still playing with it) in which I write something like

<table>
<!-- ... other elements -->
<row>
<entry role="setupentry[nx=2,background=color,backgroundcolor=red]">
blahh blahh
</entry>
<!-- ... other elements -->
</row>
<!-- ... other elements -->
</table>

and define

\defineXMLpickup [entry] [role=]%
%%Open tag
{\expanded{\beforesplitstring{\XMLpar{entry}{role}{}}}\at [\to\Type%  
% get  ..options..]
\expanded{\aftersplitstring{\XMLpar{entry}{role}{}}}\at
[\to\rawOptions%  
% get  ..options..
\expanded{\beforesplitstring{\rawOptions}}\at ]\to\Options%  
\doifelse{\Type}{setupentry}%
{%then
\expanded{\bTD[\Options]}
}{%else
\bTD%  
}}%
%%Close tag
{\eTD}

Is your way, Simon ?

  reply	other threads:[~2002-12-18 17:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-08 15:12 Gour
2002-12-08 15:32 ` Bruce D'Arcus
2002-12-08 19:54   ` Gour
2002-12-08 20:38     ` Bruce D'Arcus
2002-12-08 20:48       ` Gour
2002-12-08 21:09         ` Bruce D'Arcus
2002-12-08 21:14           ` Gour
2002-12-09 20:09     ` Simon Pepping
2002-12-10 16:53       ` Gour
2002-12-10 17:04         ` Bruce D'Arcus
2002-12-10 17:49         ` Hans Hagen
2002-12-11 20:46         ` Simon Pepping
2002-12-12 10:34           ` Gour
2002-12-12 11:41             ` Bruce D'Arcus
2002-12-12 12:31               ` Gour
2002-12-12 13:29                 ` scarso luigi
2002-12-12 13:49                   ` Bruce D'Arcus
2002-12-12 14:22                     ` scarso luigi
2002-12-12 20:11                     ` Simon Pepping
2002-12-13 12:57                       ` scarso luigi
2002-12-13 14:32                         ` Hans Hagen
2002-12-17 20:54                         ` Simon Pepping
2002-12-18 17:42                           ` scarso luigi [this message]
2002-12-18 19:56                             ` Simon Pepping
2002-12-19 12:54                               ` scarso luigi
2002-12-19  8:34                             ` Hans Hagen
2002-12-12 20:05                   ` Simon Pepping
2002-12-08 20:46   ` Hans Hagen
2002-12-08 21:16     ` Gour

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=1040233320.29827.17.camel@luigis.logo.net \
    --to=scarsoluigi@libero.it \
    --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).