jmclawson / biblatex-mla

MLA-style citations and bibliographies using Biblatex
23 stars 9 forks source link

Incorrect order for some unpublished entries #22

Closed alabamenhu closed 3 years ago

alabamenhu commented 4 years ago

Unpublished entries without authors are shown first. My guess (without having looked at the internals particularly well) is that this is a result of a conversion from plain text to emphasized text, but I'm not 100% sure. Here's a test case

@unpublished{librodehorasisabel,
    Booktitle = {Libro de horas de Isabel I},
    Library = {Real Biblioteca del Palacio Real de Madrid},
    Number = {II/Tesoro},
    Year = {15\textsuperscript{th} c.}}
@book{cejador33,
    Address = {Madrid},
    Author = {Julio {Cejador y Frauca}},
    Edition = {3\textsuperscript{rd}},
    Publisher = {Hernando},
    Title = {Historia de la lengua y literatura castellana},
    Volume = {1},
    Year = {1933}}

The output shows (without the bullet points)

Which also means it's not showing the year for it. (As a work around I can fudge the year into another tag, but there's no great way to cheat on the order).

jmclawson commented 3 years ago

Thank you for this (from more than a year ago... 🙈)!

I'll be doing some work on things this summer once I have the 2021 update to the MLA Handbook. This weird issue will be among the things I'll work on.

alabamenhu commented 3 years ago

Thank you for this (from more than a year ago... 🙈)!

I'll be doing some work on things this summer once I have the 2021 update to the MLA Handbook. This weird issue will be among the things I'll work on.

No worries! This has been a crazy year. I was able to find a workaround for the dissertation but my LaTeX skills weren't quite up to the level for tracking down where it was happening at so I couldn't submit a patch =/

jmclawson commented 3 years ago

I've had a chance to jump into this issue today. There are two related issues here, stemming from two unconnected problems.

First, the lack of a "Title" field meant that the entry couldn't be sorted. To address the need to style some unpublished titles as titles of books, I've added some code to check for a "Type" field in an unpublished entry, where one might define Type = {book}. This switch will make it possible to present the title in italics rather than in quotation marks, while defining the Title field allows the entry to sort correctly in the Works Cited.

Second, the "Year" field wasn't displayed because Biblatex expects this field to have an integer, rather than some words or phrases. I've added some mapping to look for letters in the "Year" field. If it finds any, it will treat this field as an "Addendum" field.

These fixes will make their way into the next version. Here's the revised bibtex and the working output:

@unpublished{librodehorasisabel,
    Title = {Libro de horas de Isabel I},
    Type = {book},
    Library = {Real Biblioteca del Palacio Real de Madrid},
    Number = {II/Tesoro},
    Year = {15\textsuperscript{th} c.}}
@book{cejador33,
    Address = {Madrid},
    Author = {Julio {Cejador y Frauca}},
    Edition = {3\textsuperscript{rd}},
    Publisher = {Hernando},
    Title = {Historia de la lengua y literatura castellana},
    Volume = {1},
    Year = {1933}}
Screen Shot 2021-05-04 at 11 58 26 PM

Please let me know whether any of this is an unreasonable solution, since I don't often work with unpublished materials or works with uncertain dates.

jmclawson commented 3 years ago

In what will be the 2.0 version of biblatex-mla, which I'm readying for release, there's now support for simply using the Booktitle field as in your original example, and omitting the Title field.

The use case shown in my previous comment, with Title and with Type = {book} (or Type = {article} etc), will also work as an option for unpublished material when the title should be formatted.