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

Example not build #22

Open
natir opened this issue Oct 19, 2022 · 7 comments
Open

Example not build #22

natir opened this issue Oct 19, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@natir
Copy link

natir commented Oct 19, 2022

Hello,

First thank for your work.

I try to use this project but when I try to run project on example make failled:

➜ make ARTICLE=example/paper.md
INARA_ARTIFACTS_PATH=publishing-artifacts/ pandoc \
  --data-dir=data \
  --defaults=shared \
  --defaults=pdf.yaml \
  --defaults=resources/joss/defaults.yaml \
  --resource-path=.:resources:example/ \
  --metadata=article-info-file=resources/default-article-info.yaml \
  --variable=joss \
  --output=publishing-artifacts/paper.pdf \
  example/paper.md
[INFO] Running filter data/filters/parse-latex.lua
[INFO] Completed filter data/filters/parse-latex.lua in 2 ms
[INFO] Running filter data/filters/inline-cited-references.lua
Error running filter data/filters/inline-cited-references.lua:
data/filters/inline-cited-references.lua:6: attempt to call a nil value (field 'references')
stack traceback:
	data/filters/inline-cited-references.lua:6: in function 'Pandoc'
make: *** [Makefile:33 : publishing-artifacts/paper.pdf] Erreur 83
```

System:
- Fedora: 36
- pandoc: 2.14
- make: 4.3
- lua 5.4.4
- pdfTeX: 3.141592653-2.6-1.40.22
- TeX Live 2021 full install
@tarleb
Copy link
Collaborator

tarleb commented Oct 19, 2022

Thanks for reporting this. It looks like we expect the paper to have at least one entry in the bibliography, but that's not a good assumption to make and should be fixed.

@tarleb tarleb added the bug Something isn't working label Oct 19, 2022
@natir
Copy link
Author

natir commented Oct 21, 2022

I add citation and autoreference in example document and I still get same error.

diff --git a/example/paper.md b/example/paper.md
index 7dcd5fb..6eef7df 100644
--- a/example/paper.md
+++ b/example/paper.md
@@ -157,6 +157,8 @@ the [pandoc manual](https://pandoc.org/MANUAL#extension-citations)
 for additional features, including page locators, prefixes,
 suffixes, and suppression of author names in citations.

+test @smith2018 [@bradford197]
+
 ### Mathematical Formulæ

 Equations and other math content has is marked by dollar signs (`$`). A
@@ -404,6 +406,8 @@ number of the referenced float. E.g., in this document
 | Lua      | dynamic, strong | yes               | strict     | 1993    |
 | C        | static, weak    | no                | strict     | 1972    |

+Ref to table \autref{proglangs} \ref{proglangs}
+
 ## Equations

 Cross-references to equations work similar to those for floating

@zyzzyxdonta
Copy link

I ran into this same issue. This even happens with the example paper.

Pandoc version is:

pandoc 2.14.0.3
Compiled with pandoc-types 1.22.1, texmath 0.12.3.3, skylighting 0.10.5.2,
citeproc 0.4.0.1, ipynb 0.1.0.1

Please let me know if you need any further information.

@tarleb
Copy link
Collaborator

tarleb commented May 4, 2023

Thank you. Does this still happen with pandoc 3.1?

@zyzzyxdonta
Copy link

Thank you for the quick response. I wasn't aware my OS didn't ship the newest version. So I tried with the newest binary from GitHub:

pandoc 3.1.2
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /home/x/.local/share/pandoc
Copyright (C) 2006-2023 John MacFarlane. Web:  https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

This seems to solve the initial problem. However, I now run into another error:

INARA_ARTIFACTS_PATH=publishing-artifacts/ /home/x/Downloads/pandoc-3.1.2/bin/pandoc \
  --data-dir=data \
  --defaults=shared \
  --defaults=pdf.yaml \
  --defaults=resources/joss/defaults.yaml \
  --resource-path=.:resources:./ \
  --metadata=article-info-file=resources/default-article-info.yaml \
  --variable=joss \
  --output=publishing-artifacts/paper.pdf \
  paper.md
[INFO] Running filter data/filters/parse-latex.lua
[INFO] Completed filter data/filters/parse-latex.lua in 7 ms
[INFO] Running filter data/filters/inline-cited-references.lua
[INFO] Loaded paper.bib from paper.bib
[INFO] Completed filter data/filters/inline-cited-references.lua in 22 ms
[INFO] Running filter citeproc
[INFO] Loaded apa.csl from resources/apa.csl
[INFO] Completed filter citeproc in 72 ms
[INFO] Running filter data/filters/normalize-metadata.lua
[INFO] Completed filter data/filters/normalize-metadata.lua in 9 ms
[INFO] Running filter data/filters/time.lua
[INFO] Completed filter data/filters/time.lua in 4 ms
[INFO] Running filter data/filters/normalize-author-names.lua
[INFO] Completed filter data/filters/normalize-author-names.lua in 24 ms
[INFO] Running filter data/filters/substitute-in-format.lua
[INFO] Completed filter data/filters/substitute-in-format.lua in 4 ms
[INFO] Running filter data/filters/add-images.lua
[INFO] Loaded joss/aas-logo.png from resources/joss/aas-logo.png
[INFO] Loaded joss/europar-logo.png from resources/joss/europar-logo.png
[INFO] Loaded joss/logo.png from resources/joss/logo.png
[INFO] Completed filter data/filters/add-images.lua in 5 ms
[INFO] Running filter data/filters/draft.lua
[INFO] Completed filter data/filters/draft.lua in 4 ms
[INFO] Running filter data/filters/self-citation.lua
JSON parse error: Error in $: Incompatible API versions: encoded with [1,23] but attempted to decode with [1,22,1].
Error running filter data/filters/self-citation.lua:
Error running filter pandoc:
Filter returned error status 64
stack traceback:
        data/filters/self-citation.lua:56: in function 'Meta'

@zyzzyxdonta
Copy link

I think this was due to the fact that you can only pass the Pandoc executable to make and the old pandoc-lua exe was used. After adding the downloaded files to the path, this error is gone, too. Thank you!

@tarleb
Copy link
Collaborator

tarleb commented May 4, 2023

Great to hear! I'll leave this open until we have more meaningful error messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants