Skip to content

Notebook metadata proposal (title, subtitle, authors, affiliations) #6073

@FRidh

Description

@FRidh

While creating a presentation with the Notebook and Reveal.js I noticed it would be nice to add certain metadata to the notebook that could then be accessed in the template. Therefore, I would like to make a proposal of the metadata fields regarding the documents title, subtitle and affiliations.

Metadata proposal

I propose we separate authors from affiliations and use dictionaries to access them.
An affiliation is divided into 'institute, department and section'. Often all three are used on a title page, while only the institute is shown in the header/footer.

Regarding author names I propose we use the LaTeX way of Lastname/Firstname.
However, perhaps we should also separate the authors name like with the affiliations, having separate fields for the first, middle and last name. What do you think?

I've grouped these fields together into document, because I expect there will be a lot more metadata in the future, e.g. exporter specific settings.

{
"name": "",
"celltoolbar": "Slideshow",
"signature": "sha256:b01826fe48973cffb8307654e0cb5e48b963c0e44cb0013e9d5c5a5ebc13c321",

"document": {
    "title": "Title of document/presentation",
    "subtitle": "Subtitle of document/presentation",
    "authors": {
        "author1": {
            "name": "LastName, FirstName",
            "affiliation": "org1",
            "email" : "author1@domain.org",
            },
        "author2": {
            "name": "LastName, FirstName",
            "affiliation": "org2",
            "email" : "author2@domain.de",
            },
        },
    "affiliations": {
        "org1" : {
            "institute" : "University of...",
            "department": "Department of...",
            "section"   : "Laboratory of...",
            "street"    : "Street A",
            "city"      : "City A",
            "country"   : "Country A",
            "postcode"  : "Postcode A",
            },
        "org2" : {
            "institute" : "... GmbH",
            "department": "Department of...",
            "section"   : "Section...",
            "street"    : "Street A",
            "city"      : "City A",
            "country"   : "Country A",
            "postcode"  : "Postcode A",
            },
        },
    },
}

As you can see these are quite a lot of new fields. While many won't we used that often I think it is good to "standardize" the metadata.

Implementation

During conversion from the notebook to any other format these fields have to be accessible. If I am correct resources['metadata'] should store these values.

At which point should this ResourcesDict be filled with the metadata?
I suppose an additional preprocessor should be written that adds document to resources['metadata'] and that recursively converts all dictionaries to ResourcesDict?

Accessing metadata in templates

The metadata can then be accessed in templates, e.g. the title by calling
{{resources['metadata']['document']['title']}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions