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

error running filter #252

Closed
pavilaalo opened this issue Oct 1, 2022 · 5 comments
Closed

error running filter #252

pavilaalo opened this issue Oct 1, 2022 · 5 comments

Comments

@pavilaalo
Copy link

Hi,

I am getting this error when rendering the filters (scholarly-metadata and author-info-blocks) that previously worked.

scholarly-metadata.lua:95: not a named object: List: 0x7fc1a771ecf0
stack traceback:
...d /scholarly-metadata.lua:95: in function 'to_named_object'
[C]: in function 'pandoc.List.map'
...d /scholarly-metadata.lua:144: in upvalue 'canonicalize'
...d /scholarly-metadata.lua:176: in function <...d /scholarly-metadata.lua:175>
Error: pandoc document conversion failed with error 83
Execution halted

I did not change the code, is the code I had and worked

output:
bookdown::word_document2:
pandoc_args:
- --lua-filter=/scholarly-metadata.lua
- --lua-filter=/author-info-blocks.lua
- --reference-doc=/style_template_manuscript.docx

SESSION INFO

R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.4

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.2.1 bookdown_0.29 fastmap_1.1.0 htmltools_0.5.3 tools_4.2.1
[6] yaml_2.3.5 rmarkdown_2.16 knitr_1.40 xfun_0.33 digest_0.6.29
[11] rlang_1.0.6 evaluate_0.16

Any suggestion?
Is it possible to use these filters in Quarto?

Pablo

@tarleb
Copy link
Member

tarleb commented Oct 1, 2022

It might be possible to get those filters to work in Quarto, but Quarto has its own mechanism for author names and affiliations. AFAIK it is partially based on the filters you mention, and I'd recommend to use that if possible. In fact, I'm planning to deprecate the two filters here in the future. Let us know if there a blockers that prevent you from using Quarto's default mechanism for this and we can try to find ways to make it work.

Cc @cderv

@pavilaalo
Copy link
Author

Thank you for your response. I haven't switched to quarto yet but I have tried. There are templates for different journals that allow to include author affiliations but I haven't been able to get them printed and they are set for pdf or html output (not MS Word). Unfortunately, most of the journals I submit require that the manuscript be in MS word (and I have to say that the filters are great).
Also, it is possible to include the filters in quarto as they are (so I hope you don't deprecate them) including the following in the YAML (see also quarto-dev/quarto-cli#287)

filters:

  • scholarly-metadata.lua
  • author-info-blocks.lua
  • quarto

but I get the same error as in Rmarkdown.

Any idea about this error? any idea on how to make them work (at least in Rmarkdown)?

scholarly-metadata.lua:95: not a named object: List: 0x7fc1a771ecf0
stack traceback:
...d /scholarly-metadata.lua:95: in function 'to_named_object'
[C]: in function 'pandoc.List.map'
...d /scholarly-metadata.lua:144: in upvalue 'canonicalize'
...d /scholarly-metadata.lua:176: in function <...d /scholarly-metadata.lua:175>
Error: pandoc document conversion failed with error 83
Execution halted

@cderv
Copy link
Contributor

cderv commented Oct 3, 2022

@pavilaalo can you open an issue in https://github.com/rstudio/bookdown/ and share an example I can use to reproduce ?

bookdown uses some filters too for some features, and maybe there is a conflict. Thank you

@pavilaalo
Copy link
Author

pavilaalo commented Oct 3, 2022 via email

@tarleb
Copy link
Member

tarleb commented Apr 16, 2023

The problem has been identified in the linked issue. Closing here

@tarleb tarleb closed this as completed Apr 16, 2023
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

No branches or pull requests

3 participants