Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proceeding title not recognised properly #77

Closed
vtta opened this issue Nov 10, 2023 · 3 comments · Fixed by #78
Closed

Proceeding title not recognised properly #77

vtta opened this issue Nov 10, 2023 · 3 comments · Fixed by #78

Comments

@vtta
Copy link
Contributor

vtta commented Nov 10, 2023

This given bibtex will produce the following results using this csl:

@inproceedings{Andler:1979:PPE:567752.567774,
    author = {Andler, Sten},
    title = {Predicate Path Expressions},
    booktitle = {Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages},
    series = {POPL '79},
    year = {1979},
    venue = {San Antonio, Texas},
    pages = {226--236},
    numpages = {11},
    url = {https://doi.org/10.1145/567752.567774},
    doi = {10.1145/567752.567774},
    acmid = {567774},
    publisher = {ACM},
    address = {New York, NY, USA},
}
cargo run --features=cli -- test.bib cite --csl acm.csl

Sten Andler. 1979. Predicate Path Expressions. In (POPL '79), 1979, San Antonio, Texas. ACM, New York, NY, USA, 226–236. https://doi.org/10.1145/567752.567774

Desired:

Sten Andler. 1979. Predicate Path Expressions. In Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL '79), 1979, San Antonio, Texas. ACM, New York, NY, USA, 226–236. https://doi.org/10.1145/567752.567774

It turns out that this line was wrongly placed after a EntryType::Conference.

EntryType::Proceedings,

Because @inproceedings will result in an Artical entry with both a Proceedings and a Conference parent. But only the Proceedings has the correct title. If EntryType::Conference is checked first, the correct title would not be seen.

log
[src/main.rs:224] &bibliography = Library(
    {
        "Andler:1979:PPE:567752.567774": Entry {
            key: "Andler:1979:PPE:567752.567774",
            entry_type: Article,
            title: Some(
                FormatString {
                    value: ChunkedString(
                        [
                            StringChunk {
                                value: "Predicate Path Expressions",
                                kind: Normal,
                            },
                        ],
                    ),
                    short: None,
                },
            ),
            authors: Some(
                [
                    Person {
                        name: "Andler",
                        given_name: Some(
                            "Sten",
                        ),
                        prefix: None,
                        suffix: None,
                        alias: None,
                    },
                ],
            ),
            date: Some(
                Date {
                    year: 1979,
                    month: None,
                    day: None,
                    approximate: false,
                },
            ),
            editors: None,
            affiliated: None,
            publisher: None,
            location: None,
            organization: None,
            issue: None,
            volume: None,
            volume_total: None,
            edition: None,
            page_range: Some(
                Numeric {
                    value: Set(
                        [
                            (
                                226,
                                Some(
                                    Hyphen,
                                ),
                            ),
                            (
                                236,
                                None,
                            ),
                        ],
                    ),
                    prefix: None,
                    suffix: None,
                },
            ),
            page_total: None,
            time_range: None,
            runtime: None,
            url: Some(
                QualifiedUrl {
                    value: Url {
                        scheme: "https",
                        cannot_be_a_base: false,
                        username: "",
                        password: None,
                        host: Some(
                            Domain(
                                "doi.org",
                            ),
                        ),
                        port: None,
                        path: "/10.1145/567752.567774",
                        query: None,
                        fragment: None,
                    },
                    visit_date: None,
                },
            ),
            serial_number: Some(
                SerialNumber(
                    {
                        "doi": "10.1145/567752.567774",
                    },
                ),
            ),
            language: None,
            archive: None,
            archive_location: None,
            call_number: None,
            note: None,
            parents: [
                Entry {
                    key: "Andler:1979:PPE:567752.567774",
                    entry_type: Proceedings,
                    title: Some(
                        FormatString {
                            value: ChunkedString(
                                [
                                    StringChunk {
                                        value: "Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages",
                                        kind: Normal,
                                    },
                                ],
                            ),
                            short: None,
                        },
                    ),
                    authors: None,
                    date: None,
                    editors: None,
                    affiliated: None,
                    publisher: Some(
                        FormatString {
                            value: ChunkedString(
                                [
                                    StringChunk {
                                        value: "ACM",
                                        kind: Normal,
                                    },
                                ],
                            ),
                            short: None,
                        },
                    ),
                    location: Some(
                        FormatString {
                            value: ChunkedString(
                                [
                                    StringChunk {
                                        value: "New York, NY, USA",
                                        kind: Normal,
                                    },
                                ],
                            ),
                            short: None,
                        },
                    ),
                    organization: None,
                    issue: None,
                    volume: None,
                    volume_total: None,
                    edition: None,
                    page_range: None,
                    page_total: None,
                    time_range: None,
                    runtime: None,
                    url: None,
                    serial_number: None,
                    language: None,
                    archive: None,
                    archive_location: None,
                    call_number: None,
                    note: None,
                    parents: [
                        Entry {
                            key: "Andler:1979:PPE:567752.567774",
                            entry_type: Proceedings,
                            title: Some(
                                FormatString {
                                    value: ChunkedString(
                                        [
                                            StringChunk {
                                                value: "POPL '79",
                                                kind: Normal,
                                            },
                                        ],
                                    ),
                                    short: None,
                                },
                            ),
                            authors: None,
                            date: None,
                            editors: None,
                            affiliated: None,
                            publisher: None,
                            location: None,
                            organization: None,
                            issue: None,
                            volume: None,
                            volume_total: None,
                            edition: None,
                            page_range: None,
                            page_total: None,
                            time_range: None,
                            runtime: None,
                            url: None,
                            serial_number: None,
                            language: None,
                            archive: None,
                            archive_location: None,
                            call_number: None,
                            note: None,
                            parents: [],
                        },
                    ],
                },
                Entry {
                    key: "Andler:1979:PPE:567752.567774",
                    entry_type: Conference,
                    title: None,
                    authors: None,
                    date: None,
                    editors: None,
                    affiliated: None,
                    publisher: None,
                    location: Some(
                        FormatString {
                            value: ChunkedString(
                                [
                                    StringChunk {
                                        value: "San Antonio, Texas",
                                        kind: Normal,
                                    },
                                ],
                            ),
                            short: None,
                        },
                    ),
                    organization: None,
                    issue: None,
                    volume: None,
                    volume_total: None,
                    edition: None,
                    page_range: None,
                    page_total: None,
                    time_range: None,
                    runtime: None,
                    url: None,
                    serial_number: None,
                    language: None,
                    archive: None,
                    archive_location: None,
                    call_number: None,
                    note: None,
                    parents: [],
                },
            ],
        },
    },
)
@zepinglee
Copy link
Contributor

My mistake in #74.

Perhaps the EntryType::Conference should be removed. A conference holds the event-title, event-date, event-place, and organizer fields but none of them are related to this get_container() function.

@vtta
Copy link
Contributor Author

vtta commented Nov 11, 2023

My mistake in #74.

Perhaps the EntryType::Conference should be removed. A conference holds the event-title, event-date, event-place, and organizer fields but none of them are related to this get_container() function.

But currently only event-place out of those fields are recognised properly:

                Entry {
                    key: "Andler:1979:PPE:567752.567774",
                    entry_type: Conference,
                    title: None,
                    authors: None,
                    date: None,
                    editors: None,
                    affiliated: None,
                    publisher: None,
                    location: Some(
                        FormatString {
                            value: ChunkedString(
                                [
                                    StringChunk {
                                        value: "San Antonio, Texas",
                                        kind: Normal,
                                    },
                                ],
                            ),
                            short: None,
                        },
                    ),
                    organization: None,
                    issue: None,
                    volume: None,
                    volume_total: None,
                    edition: None,
                    page_range: None,
                    page_total: None,
                    time_range: None,
                    runtime: None,
                    url: None,
                    serial_number: None,
                    language: None,
                    archive: None,
                    archive_location: None,
                    call_number: None,
                    note: None,
                    parents: [],
                },

@zepinglee
Copy link
Contributor

But currently only event-place out of those fields are recognised properly:

Ah, yes. Never mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants