logo4 Evolution is progress—                          
progress is creativity.        

Creole Reference Macro

view blog view wiki view wiki view wiki


Update: By May 2013 all reference were changed to the JSON format, so the xml formal is no longer available on this website.

I want to insert references into my text and at the end of my page display the bibliography, the list of cited references. I want that this system works throughout all included pages. That is, if a page is included its list of references should appear at the end of the main page not at the end of the subsection.


As with wiki's cite extension I need two macros

  1. where the reference has to be inserted <<ref>>
  2. where the bibliography has to be inserted <<references>>

Next I have three options

  1. The ref macro is an non bodied macro that only contains a reference identifier and the references macro contains the list of all cited references each of the uniquely identified. The references macro would be essentially a bodied macro then.
  2. The reverse. The ref macro is an bodied macro that contains all the reference information and the references macro can be a non bodied macro then, a placeholder for the references section.
  3. The mixed version as currently implemented with Wikipedia's cite extension needs two bodied macros


Place the references with the id as an essential and page as an optional parameter where you want it to appear ...

<<ref key="5040">>
<<ref pmid="15954103">>
<<ref key="2366" page="45">>
<<ref 5040>>

... and the proposed reference number as a body between the macro tags. If you want the software to choose its own chronological numbering use # instead ...

<<ref 5040>>#<</ref>>
<<ref 5040>>3<</ref>>

Finally where the reference list is intended to pop up ...

+++ recommended  
... CSL JSON entries
... imported from Zotero by drag and drop
... If many references are imported separately, take care
--- that all belong to the same array

+++ depricated and no longer supported
... the xml entries
... imported from Zotero by drag and drop
... If many references are imported separately, take care
--- that the xml header <?xml version="1.0"?> and the 
--- <listBibl xmlns="http://www.tei-c.org/ns/1.0"> tag
--- appear only once

Zotero's export formats are described on a separate page.
The export format has to be chosen from Zotero's export preferences. There has to be "CSL JSON" now. For the previous but now depricated XML export, TEI format was chosen.

Three reasons why TEI is depricated:

  1. TEI doesn't work any more after latest Zotero update.
  2. CSL JSON uses ID references that are unique throughout the website while TEI IDs where valid for a single page only, so I don't run into troubles with nested pages.
  3. CSL JSON is much easier to handle


These examples are TEI references only. My project does not support mixed references and it will never do.

This is some text that references Braendle's paper [1]. This one references the next paper written by Slack [2], and finally here is a reference to th third paper in the list [3]. And this is a somewhat clumsy book reference Niche Construction[4].

Tags: Software


(c) Mato Nagel, Weißwasser 2004-2013, Disclaimer