lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Citations: author/date and line breaking


From: Pont Lurcock
Subject: Re: Citations: author/date and line breaking
Date: Sat, 17 Jul 2004 10:58:04 +1200 (NZST)

On Fri, 16 Jul 2004, Ludovic Court?s wrote:

> > ... keeping my canonical reference list in BibTeX format and writing a
> > script to convert it to a Lout database, putting the desired citation
> > format into some unused option for @Reference (@Annote, say). Then I
> > can just set @RefCiteLabels to @Annote and it will work...

> It turns out that Jeff Kingston already wrote such a tool :
> http://www.cs.usyd.edu.au/~jeff/rtr.c

Yes, I've discovered rtr.c, and even modified it slightly for my own
purposes:

1. It crashed on unknown BibTeX field names. This appeared to be a minor
   array-size bug/typo which I corrected.
2. I modified it to allow field values to be delimited by braces as well
   as quotation marks (since my BibTeX database is in this format).

> Do you want to filter the BibTeX file so as to remove the authors' first
> name?

I need to replicate the behaviour of LaTeX's Harvard citation package,
which works like this:

BibTeX `author' field                             Citation

Ann Copestake                                     (Copestake, 1995)
Carl Pollard and Ivan A. Sag                      (Pollard and Sag, 1994)
Ann Copestake and Dan Flickinger and Ivan A. Sag  (Copestake et al., 1999)

I don't know how I'd go about doing this in Lout, or even if it's possible
without modifying the source, so I think that implementing a preprocessor
in, say, Perl or Python would be the most efficient solution. (At least
for me, this would be easier than augmenting rtr.c to do what I need.)

In general, I hope to implement some of the higher-level control which
BibTeX provides for citations and references. I want to get an identical
document whether my database contains

  Ann Copestake and Dan Flickinger and Ivan A. Sag

or

  Copestake, Ann and Flickinger, Dan and Sag, Ivan A.

I also want to deal with some minor conversion issues that rtr doesn't
address, such as variable capitalization in field names and accented
characters.

In short, I want a program which will eat my ugly, variegated BibTeX
database and produce a clean, uniform Lout database with the citation
format (and possibly parts of the reference format) hard-coded into unused
Lout fields.

No disrespect to Lout -- after all, I wouldn't be using it if I didn't
think it was better overall -- but BibTeX does seem to have more
capabilities for format munging.

(I will, of course, GPL and release this program if and when I get it
written. I'll also release my modifications to rtr.c as soon as I have the
time.)

Incidentally, Eric Marsden's Lout FAQ at
http://www.chez.com/emarsden/lout/loutFAQ-5.html mentions another BibTeX
to Lout converter written by one David Middleton, but I've been unable to
track it down.

Pont



reply via email to

[Prev in Thread] Current Thread [Next in Thread]