Jose Abilio Oliveira Matos a écrit :

> On Sun, Dec 16, 2001 at 05:31:29PM -0600, Patrick Hartling wrote:
> > I have just started learning about the use of DocBook with LyX (1.1.6fix3
> > and possibly 1.2 from CVS if I need newer features).  One thing I
> > immediately noticed when composing a DocBook article was the lack of a
> > bibliography style in the usual place.  I really like the way LyX handles
> > references, and I was counting on it being available with DocBook.  Is
> > there something special I have to do to enable its use?  I am completely
> > open to the use of raw SGML if that will provide me with some standard
> > way to make references.

The bibliography style is not available, but you can always use the SGML style
to write the bibliography. Here is an example:

<bibliography><title>Documentation</title>
<biblioentry>
<abbrev>TDG</abbrev>
<title>DocBook: The Definitive Guide</title>
<authorgroup>
<author><firstname>Norman</firstname><surname>Walsh</surname></author>
<author><firstname>Leonard</firstname><surname>Muellner</surname></author>
</authorgroup>
<copyright><year>1999, 2000, 2001</year> <holder>O'Reilly &amp; Associates,
Inc.</holder></copyright>
<isbn>156592-580-7</isbn>
<publisher><publishername>O'Reilly</publishername> </publisher>
</biblioentry>
</bibliography>

To refer to this you can use ERT and write <citation>TDG</citation> anywhere
in the doc.

>   Give me some time, and I will see what is needed to make it work.
>
>   If you have any other doubts or suggestions please feel free to post
> them here. Welcome aboard. :-)
>
>   BTW, Ben (G.) you had some ideas regarding what needed to be done to
> do it. Do you remember it?

Well, what I remember is that it is not so easy to support this since lyx
cannot define styles for the elements under the biblioentry tags. Now I only
suggest to support <bibliography> and <biblioentry> and let the user using ERT
to define the <abbrev>, etc. tags.

To support this basic bibliography style, I think it is needed at least to
have:

1. The style definition, like this:
# Bibliography style definition
Style Bibliography
  Margin                First_Dynamic
  LatexType             Item_Environment
  LatexName             bibliography
  NextNoIndent          1
  LeftMargin            MM
  ParSkip               0.4
  ItemSep               0
  TopSep                0.7
  BottomSep             0.7
  ParSep                0.5
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Bibliography
  LabelString           References
  LabelBottomSep    0.7

  # label font definition
  LabelFont
    Series              Bold
    Size                Larger
  EndFont
End

2. Define a docbook method for the InsetBibKey class to write the
<biblioentry> tag.
3. Change the makeDocBookFile method so that it is checked if it is a bibkey
in the LATEX_ITEM_ENVIRONMENT style (and if so calling bibkey->docbook()).
Now, with a bibliography style the biblioentries are translated as <listitem>.

4. Define a docbook method for the InsetCitation class to write the <citation>
tag (but I don't know where it should be called).

Well, I haven't checked if it's enough or if it's the good solution. Jose what
do you think about this?

BG

Reply via email to