Skip to content

Feature: Bibliography Support

koraktor edited this page Aug 13, 2010 · 2 revisions

Bibliography entries should be stored in a style-agnostic YAML file, i.e. something like this:


 - :id: glyphguide
   :title: Glyph Guide
   :author: Fabio Cevasco
   #...
 - :id: roughing
   :title: Roughing It
   :author: Mark Twain
   #...

In this way:

  • A bibliography[] call would generate the bibliography according to the style specified in a configuration setting, e.g. document.bibstyle.
  • You can call cite[glyphguide] to link to the bibliography entry according to document.bibstyle.

Bibliography and citations styles could be defined as macros. So for example, like there’s a folder for html macros (and soon for textile and markdown macros), there could be files for specific bibstyles (loaded conditionally depending on document.bibstyle), like this:


 +-glyph/
    +-macros/
       +-html/
       |  +-bibstyles
       |     +-din1505.rb
       |     +-iso690.rb
       +-markdown/
       |  +-bibstyles
       |     +-din1505.rb
       |     +-iso690.rb
       +...

In this case, glyph/macros/html/bibsyles/din1505.rb would contain two macros (cite and bibliography) outputting HTML code for din1505-style macros, and glyph/macros/markdown/bibsyles/din1505.rb the same two macros but outputting markdown code, and so on for all output formats supported by glyph in the future (including LaTeX, maybe…).

Note: A work in progress implementation of this feature is available in koraktor/glyph@bibliography.