authors-block icon indicating copy to clipboard operation
authors-block copied to clipboard

Move affiliation from below to above the table of contents (toc)

Open joundso opened this issue 2 years ago • 4 comments

Minor detail: If a table of contents is rendered, the affiliations are currently below it. For simplicity, however, I would expect the affiliations to be between the author names and (above) the table of contents.

Regardless: Many thanks for this awesome template!

joundso avatar Dec 16 '22 11:12 joundso

Using this _quarto.yml:

---
title: "Authors-block Example"

authors:
  - name: John Doe
    affiliations:
      - ref: jdct
    corresponding: true
    email: [email protected]
    orcid: 0000-1111-2222-3333
    equal-contributor: true
  - name: John Roe
    affiliations:
      - ref: jdct
    orcid: 0000-3333-2222-1111
  - name: Jane Roe
    affiliations:
      - ref: jdct
      - ref: iot
    orcid: 0000-2222-1111-3333
    equal-contributor: true

affiliations:
  - id: jdct
    name: John Doe Center for Technology, John Doe University, Doetown, Germany.
  - id: iot
    name: Institute of Technology, John Doe University, Doetown, Germany.

filters:
  - authors-block

format:
  #native: default
  docx:
    toc: true
  pdf: default
---

# Brings Quarto's Standardized Authors- & Affiliations-Block to docx-Documents

## Heading 2

Demo text.

Produces this output (with the affiliation below the table of contents): grafik

joundso avatar Dec 16 '22 12:12 joundso

Thx for this catch. I'll have a look into this soon.

kapsner avatar Dec 16 '22 14:12 kapsner

Hi @tarleb , it seems as if the toc information is included in the "meta" element, as affiliations, contribution statements etc. are added to the body. However, I have not found a possibility to access the "toc" from meta (actually, I do not know which key to use as "toc", "tableofcontents", "table-of-contents" all seem to be wrong), to move the toc to the beginning of the body-list. Any ideas how to solve this?

kapsner avatar Dec 17 '22 14:12 kapsner

This is a known limitation and currently not really solvable. Pandoc 3 will come with support for advanced custom writers, we'll have to wait till then.

tarleb avatar Dec 17 '22 15:12 tarleb