On Fri, Nov 02, 2001 at 02:23:03PM +0100, ben wrote:
> Hi,
>
> At least to have basic index support in LyX for DocBook I suggest the
> following patch:
>
> diff -u insets/insetindex.C.ref insets/insetindex.C
> --- insets/insetindex.C.ref Thu Nov 1 19:11:14 2001
> +++ insets/insetindex.C Thu Nov 1 19:15:12 2001
> @@ -33,6 +33,11 @@
> edit(bv, 0, 0, 0);
> }
>
> +int InsetIndex::docbook(Buffer const * buf, ostream & os) const
> +{
> + os << "<indexterm><primary>" << getContents() <<
> "</primary></indexterm>";
> + return 0;
> +}
I have changed the header by not including buf since it isn't used.
Commited.
> Inset::Code InsetIndex::lyxCode() const
> {
>
> diff -u insets/insetindex.h.ref insets/insetindex.h
> --- insets/insetindex.h.ref Fri Nov 2 12:43:54 2001
> +++ insets/insetindex.h Thu Nov 1 19:17:47 2001
> @@ -40,6 +40,8 @@
> void edit(BufferView * bv, bool front = true);
> ///
> Inset::Code lyxCode() const;
> + ///
> + int docbook(Buffer const *, std::ostream &) const;
> };
>
> Of course, it doesn't give a solution to define secondary or other level
> index entry...
That is a first order approach I would say. :-)
> Jose, what do you think about it? In latex there is also several index
> levels. Maybe the dialog box should allow to define the index more
> precisely.
I don't know if this is planned but it shouldn't be difficult to
implement.
> BG
--
Jos�