Matteo Gamboz gamboz at medialab.sissa.it
Mon Apr 8 18:18:52 CEST 2013

On Wed, Apr 03, 2013 at 08:54:15AM +0530, Radhakrishnan CV wrote:
> On Tue, Apr 2, 2013 at 8:18 PM, Matteo Gamboz <gamboz at medialab.sissa.it>wrote:
> >   I'm trying to add some metadata to a docbook xml.
> > I'd like to map some simple macros like "\keywords{k}" to xml fragments
[...]
> Your source document will look like:
>
> %-----------------begin x.tex ------------
> \documentclass{article}
> \begin{document}
> \keywords{aa,bb,cc,dd,kkk}
[...]

Thanks a lot for your help, which got me started (thanks also for the
"\@for" tip, which I didn't know).

I have a related question: I have a macro that is used before
"\begin{document}" that I need to "intercept" and redefine.

This macro has the form
\def\y#1{\def\x{#1}}
and then "\x" will be used elsewhere (in \maketitle).

Unfortunately, since it's employed in the preamble, by the time I
reach it, it has already been used and its argument is "lost".

I've tried with or without a package and a relative .4ht file and in
any way I was able to think of, but I'm stuck.

I'm guessing that this cannot be done because all my configuration
code is placed just before "\begin{document}" and I'll have to move
the macro in question. Could you/anyone confirm this?

I'm attaching a test.tar.gz with a tex and a cfg file.

If it might be of interest, the real macros I'm working on are the
"\author" and "\affiliation" macros from the jheppub package (I'm
attaching an example.tar.gz from the site of the journal JHEP).

Thanks
m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.tar.gz
Type: application/octet-stream
Size: 387451 bytes
Desc: not available
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.gz
Type: application/octet-stream
Size: 372 bytes
Desc: not available