ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Simon Pepping <spepping@scaprea.hobby.nl>
Subject: Re: DocBookInConTeXt customization?
Date: Mon, 9 Dec 2002 21:09:57 +0100	[thread overview]
Message-ID: <20021209200956.GA1164@scaprea> (raw)
In-Reply-To: <20021208195429.GA20944@inet.hr>

On Sun, Dec 08, 2002 at 08:54:29PM +0100, Gour wrote:
> I'd like something like:
> 
>          dic*
> DocBook -------> ConTeXt  ----> output
> 
> *dic = DocBookInConTeXt module

It is like you say at the top, but the context document is built on
the fly, i.e., it only exists in memory, and it never exists in its
entirety. It may be better to think of the XML file as the input file
for context. This is possible because the < is an active character
that invokes macro processing. Context's XML layer enables the
conversion author to write a mapping from XML tag to context commands:
when that tag is read, the corresponding context commands are invoked.

As Hans replies in a later email in this thread, the best strategy is
to map to existing context environments. I have done this as much as
possible. Then you can customize that environment after reading the
docbook module but before the XML file is input.

For example, docbook tables are typeset using context's 'natural
table' environment. So, if you would set
\setupTABLE[background=color,backgroundcolor=red], you would get that
(according to theory, I still have to test that).

I test the docbook module with a tex file containing the following
lines after inputing the docbook module:

\setupinteraction[state=start,color=blue]
\setupindenting[medium]
\setupheadertexts[section][pagenumber]
\setupheader[leftwidth=.7\hsize,style=slanted]
\setuppagenumbering[location=]
\setupitemize[each][packed][before=,after=,indentnext=no]

The table element also shows that you cannot arbitrarily customize the
output. The docbook module reads the colspec and col- and rowsep
settings from the table in the XML file, and applies the appropriate
settings, thus overwriting your settings. In this case that is
appropriate, because the XML file has priority over your settings.

I will try to document the customization options for the docbook
module somewhere after Christmas.
 
> which is similar to XSL toolchain:
> 
>          xslt            fop
> DocBook ------> XSL-FO  -----> output
> 
> with the exception that ConTeXt format is more user-friendly & capable than 
> xsl-fo format, and produces best quality output.

I am not sure that this is a good parallel. FO's are not customizable;
the XSLT stylesheets may be. And context could serve as the FO
processor, by the same mechanism of a mapping of FO's to context, if
someone would write it. That is what PassiveTeX does for latex. 

> With time, one can also expect that DocBookInConText module will get more users'
> input and be able to map more DocBook elements.

That would be welcome.

Regards, Simon

-- 
Simon Pepping
email: spepping@scaprea.hobby.nl

  parent reply	other threads:[~2002-12-09 20:09 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 [this message]
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
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=20021209200956.GA1164@scaprea \
    --to=spepping@scaprea.hobby.nl \
    --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).