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

Pandoc error when using a block in metadata #523

Open
mutlusun opened this issue Apr 2, 2022 · 3 comments
Open

Pandoc error when using a block in metadata #523

mutlusun opened this issue Apr 2, 2022 · 3 comments
Labels

Comments

@mutlusun
Copy link
Contributor

mutlusun commented Apr 2, 2022

Hello,

Thank you again for all your work on papaja! In the recent master version, I found a little error when parsing the template with this metadata:

---
title             : "The title"
shorttitle        : "Title"

author: 
  - name          : "First Äuthor"
    affiliation   : "1"
    corresponding : yes    # Define only one corresponding author
    address       : |
      Postal address
    email         : "my@email.com"
    role:         # Contributorship roles (e.g., CRediT, https://casrai.org/credit/)
      - "Conceptualization"
      - "Writing - Original Draft Preparation"
      - "Writing - Review & Editing"
  - name          : "Ernst-August Doelle"
    affiliation   : "1,2"
    role:
      - "Writing - Review & Editing"
      - "Supervision"

affiliation:
  - id            : "1"
    institution   : "Wilhelm-Wundt-University"
  - id            : "2"
    institution   : "Konstanz Business School"

[...]

The error is:

Error running filter /home/[redacted]/.local/share/renv/cache/v5/R-3.6/x86_64-pc-linux-gnu/papaja/0.1.0.9999/3d0513cc1fe63c86d279f10e8f4a3e9f/papaja/lua/parse_metadata.lua:
Error while trying to get a filter's return value from lua stack.
Could not get Pandoc value: Could not read list: Could not get Block value: Could not read list: Could not get Inline value: Unknown inline type: Plain
Error: pandoc document conversion failed with error 83

The difference is that I have changed the address to use a block, see address: | Postal address. I have used that for some time to indent a rather long address.

To be honest, I'm not really sure whether this is a bug or not and whether it's necessary that this is working. At least, it worked with previous papaja versions. If you see this as a misuse of the address field, I'm comfortable with closing this issue. :)

Best

@crsh
Copy link
Owner

crsh commented Apr 4, 2022

Thanks for raising this. I have been battling these issues with my limited Lua-knowledge and I'm certainly looking to make this work. It will be a little while before I get around to looking into this unfortunately.

@crsh crsh added the bug label Apr 4, 2022
@lk1373190

This comment was marked as off-topic.

@crsh

This comment was marked as off-topic.

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

No branches or pull requests

3 participants