Jean-Marc Lasgouttes wrote:
>
> >>>>> "José" == José Abílio de Oliveira Matos <[EMAIL PROTECTED]> writes:
>
> José> Is it possible/desirable to have an extra field within the
> José> \ref inset? The goal is to have a unique interface for
> José> cross-references, between the latex, linuxdoc, and docbook
> José> layouts. The extra field could be ignored by the latex
> José> "front-end", but it would be used by the linuxdoc and docbook.
>
> All the InsetLatexCommand handle the syntax \foo[optarg]{arg}. This
> might not be what you want in this case. I do not know how we could
> come up with a common inset.
That's enough for now. I need the second argument because for some
backends, html being the most notable, it is necessary to name the link, so
that you can follow it.
Example:
*(linuxdoc)
See section <ref id="sec-intro" name="Introduction"> for an
introduction.
*(docbook)
See section <link linkend="sec-intro">Introduction</link>....
*(latex)
See section \ref{sec-intro} for an introduction.
So as you see I need an extra argument, "Introduction" in this case, that
coul be ignored by the latex "frontend". The advantage of the single
approach is the interoperability between the different layouts (and less
work for me :-)
Is this clear, it this example? Is there any major problem preventing the
extra argument in \ref?
> José> Is there any inset with optional atributes? This is only
> José> relevant for the \url and \htmlurl insets, since \htmlurl is a
> José> special case of \url, and this distinction is only relevant for
> José> the linuxdoc "front-end". I would like to have only one inset,
> José> to avoid extra-work to change between linuxdoc and docbook...
>
> See above. What is the exact kind of syntax you need? We could maybe
> use the \cite inset for that, since they have related semantics.
No, I need the cite inset for docbook, and also for linuxdoc...
Is it possible to have something like:
\url[LyX Home Page,html]{http://lyx.org}, or
\url[LyX Home Page][html]{http://lyx.org}.
That is, to have two optional arguments? (or maybe more, but now I only
need two)
> José> With this message follows two small diff, diff.C and diff.h,
> José> which should be applied respectivelly to buffer.C and buffer.h
> José> to completly support the textclasses, and to add the support for
> José> footnotes for linuxdoc. Tell me if it applies cleanly...
>
> I applied it, compiled successfully. So I committed that to cvs.
Great, thanks.
> JMarc
José
--
José Abílio de Oliveira Matos
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Half Moon tonight. (At least it's better than no Moon at all.)