Difference between revisions of "Bibliographic/Citeproc Writer Interaction"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Proposal)
m (Benefits)
Line 41: Line 41:
 
* on the loading of a reference, probably on the insertion of the first  citation to that reference.
 
* on the loading of a reference, probably on the insertion of the first  citation to that reference.
 
* when the style is changed.
 
* when the style is changed.
* to generate the Reference Table
+
* to generate or update the Reference Table
  
 
[[Category:Bibliographic]]
 
[[Category:Bibliographic]]

Revision as of 05:46, 20 September 2006

Background

I ,David Wilson, initially envisaged Citeproc interacting with Writer each time a user added a citation. That is - A user adds a new reference, Writer requests Citeproc to return the Initial Citation String for that reference. The user adds a second citation to the document and Write requests Citeproc to return the Subsequent Citation String for that reference. etc.

Proposal

However CiteProc interaction with Writer can greatly simplified if Citeproc is only called when a new reference is added to the document, the Bibliography is generated or the style is changed.

Each reference will have its data stored in the biblio-data.xml file in the save package. I propose that when a reference is added, Citeproc be called to generate the full range of formatted Citation text strings for a given style, with possibilities such as:

  • initial full citation
  • subsequent shortened citation
  • Ibid text
  • author name
  • year

The last are suggested as part of the mechanism to implement the 'Exclude Author's Name' and 'Exclude Year' options in the Insert Citation dialogue.

These could be contained in an internal reference list object. When a user adds a citation, Writer only needs to pick one of these stored references from the reference object. When the user changes the document style, Citeproc would be called to regenerate all the citation strings in one pass, then the standard update fields function would update the citation text strings in the document by picking them up again from the biblio-data.xml file. The repeated citation to the same reference, needing the 'Ibid' text would be detected by Writer.

Bibliography / reference table generation would be be done by passing the list of citation IDs to Citeproc and returning the generated text. wp-bib-functions2.png

Benefits

I see two possible benefits -

It would remove Citeproc from the basic processing flow of text rendering,so there would be saving in processing time and, hence screen update time after a change, but how significant this would be I do not know. The worst case would be a large document where you move a block of text from the back to front of the document and several hundred subsequent and initial references needed to be regenerated.

It would isolate the Writer text rendering from Citeproc which would make it easier and much safer to play with Citeproc prototyping and to plug in alternative formatting engines, as there would be a simpler interaction with Writer, as opposed to a dynamic situation of needing to call the formatting engine regenerate a citation in order complete page rendering.

The main difference is that under the initial scheme Citeproc is called  -

  • on the insertion of each citation
  • when a citation is moved and -
    • the move changes it from initial and subsequent positions
    • the reference is now repeated requiring a 'Ibid' tag.
  • when the style is changed.
  • to generate the Reference Table

Under the proposed scheme Citeproc is called -

  • on the loading of a reference, probably on the insertion of the first citation to that reference.
  • when the style is changed.
  • to generate or update the Reference Table
Personal tools