On Friday 26 April 2002 12:03 pm, Juergen Spitzmueller wrote:
> Since Caesar has been killed, there are problems with some special kind of
> entries: those who cannot be parsed correctly by biblio.C. The citation
> style choice is empty in that case and I cannot chose a style.
> I have collected a few of those entries, some are from xampl.bib
>
> Just one example: If I have an entry with an empty year field, bibtex
> displays it as "Name (o.J.)" [o.J. = "ohne Jahresangabe" = "no year"], I
> can do:
>
> \citet{Spi}  ==>>  Spitzmüller (o.J.)
> \citep{Spi}  ==>> (Spitzmüller, o.J.)
> \citealt{Spi}          ==>> Spitzmüller o.J.
> \citealp{Spi}          ==>> Spitzmüller, o.J.
> \citeauthor{Spi}       ==>> Spitzmüller
> \citeyear{Spi}         ==>> o.J.
> \citeyearpar{Spi}      ==>> (o.J.)
>
> but not in current lyx-cvs.
> So I'd vote for reanimating Caesar.
>
> Juergen.
>
> Some (correct!) examples that are failing:
>
> @Misc{Spi,
>   Author         = {Spitzm\"uller, J\"urgen},
>   Title          = {An unpublished essay},
>   HowPublished   = {Private copy},
> }
>
> @MANUAL{manual-84,
>    key = "Manmaker",
>    title = "The Definitive Computer Manual",
>    year = "1984",
> }
>
> @BOOKLET{booklet-87,
>    key = "Kn{\printfirst{v}{1987}}",
>    title = "The Programming of Computer Art",
>    year = "1987",
> }
>
> @UNPUBLISHED{unpublished-minimal,
>    author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot",
>    title = "Lower Bounds for Wishful Research Results",
>    note = "Talk at Fanstord University (this is a minimal UNPUBLISHED
> entry)", }

Cæsar is dead; let him lie!

Why don't we do it as natbib does it. (How does it deal with entries that 
have neither an author/editor nor a year?)

Something like this perhaps. Can I leave the details to you? (Don't forget 
getNumericalStrings!)

frontends/controllers/biblio.C:

vector<string> const
getAuthorYearStrings(string const & key,
                    InfoMap const & map, vector<CiteStyle> const & styles)
{
        if (map.empty()) {
                return vector<string>();
        }

        string const author = getAbbreviatedAuthor(map, key);
        string const year   = getYear(map, key);
-       if (author.empty() || year.empty())
+       if (author.empty() && year.empty())
                return vector<string>();

+       if (author.empty())
+               author = _("No author");
+       if (year.empty())
+               year = _("No year");

        ...

Reply via email to