Is there a way to export into Docbook format?

Is there a way to export into Docbook format?

Peter
  • no. What did you have in mind?
    I have never worked with docbook, but Zotero exports bibliographic data in all kinds of formats, but docbook is a general document format, no? Zotero doesn't export to, say, doc, odt, or tex, either.
  • Pandoc supports both DocBook and CSL: http://johnmacfarlane.net/pandoc/
  • adamsmith says "Zotero doesn't export to, say, doc, odt, or tex, either."

    The Zotero Firefox plugin certainly exports to BibTex, which the bib. format for tex.

    Docbook and LaTeX are structurally similar (that will get me shot!) in that the user composes marked up source code and passes that through a "compiler" to produce typeset output. If I want to use LaTex I can export bib. entries suitable to paste into my LaTex source by selecting BibTex as output type from export.

    I now use Docbook rather than LaTex (for reasons outside scope of the forum) and would like a DocBook menu pick on the Zotero Firefox export dialog so I can paste bib. entries into my DocBook sources.

    I suppose I could use the Dublin Core export menu pick and write some code to transform it to DocBook sytle, but a native solution would be better
  • I'm still confused. Does docbook have a bibliographic format? If so, where is it specified?
    If it doesn't, I don't quite get what you're after.

    Also, if it does have such a format: writing any export format, but especially XML, is a _huge_ amount of work, but doesn't require a huge amount of expertise - so doing that for a relatively niche format would likely be something that only someone with a direct interest - e.g. you - would do.

    Also, see Rintze's comment on Pandoc - if I understand correctly you can already use docbook&pandoc&citeproc and use existing zotero output formats - I think most people use bibtex.
  • "I'm still confused. Does docbook have a bibliographic format?"

    Yes - here http://www.docbook.org/tdg5/en/html/bibliography.html

    Although not as popular as tex with the academic community, DocBook is hardly a niche. All(?) the O'Reilly books are written with it.

    I will check out pandoc but that will need to wait till Monday.
  • ok, that makes sense then.
    My comment about the likelihood of this happening remains, though. In six years of Zotero, you're the first person to ask about this. Which isn't saying it's bad or wouldn't be nice - but it would likely need someone who'll want to use it to code it.

    Translators are separate js files in relatively simple js and you can use existing export translators (like DC) as templates.

    The other thing I found is REFDB, which appears to read bibtex and convert it to docbook format.
  • edited June 16, 2012
    Looking through the DocBook bibliography links, it looks like this is an intermediate rendering form, rather than an exchange format. Both of the forms (biblioentry and bibliomixed) specify only a small number of fields, and call for some undefined post-processing to occur before rendering; and the docs indicate that different (undefined) processing expectations for bibliographic content can raise document interchange issues. From that, it seems that there is no single standard DocBook bibliographic data format to which Zotero could export.

    Others here know this terrain much better than I do, but it looks like you would probably be best off exporting data to one of the existing exchange formats, and crafting a tool to convert the data into the form needed by your DocBook toolchain.
  • I fear fbennett may be correct in the last para above and so I guess it is Plan B time.

    It is possible to write a parser for XML almost as fast as one can write, so I will target the output of the current Dublin Core export and transform that into something I can paste into DocBook sources.

    I wonder just how much of the Dublin Core Zotero export actually uses, and how much I can leave stubbed out...

    I will post a note here when it is done, in case anyone else wants a copy.
  • Hi @quanglewangle

    I plan to use Docbook for my next project too. What solution did you finally use?
  • Sorry, retired now and I no longer have access to my materials and can't remember without them.
Sign In or Register to comment.