Closed benjamineskola closed 1 year ago
My expectation was that a citeproc yaml file would be processed by pandoc to generate the output (as with the other output formats, which as far as I know don't support citeproc).
This is correct, if you specify --citeproc
on the command line. Did you? Even if you did, I think there may be a bug; pandoc should not be passing through the bibliography
to the template in this case.
With the commit I pushed, this should work: use --citeproc -t typst-citations
(the latter disables native typst citations and will omit #bibliography
in the template).
This is correct, if you specify --citeproc on the command line. Did you?
Sorry for being unclear: I specify citeproc
etc in a defaults file and left this out of my examples — the setup certainly works for me for other output formats.
Thanks for the quick response, that seems to fix it for me!
--citeproc -t typst-citations
@jgm -- this is not documented in the manual AFAICT? The extensions citations
section in the manual seems a bit arbitrary for org / docx, would you want this added there or just above https://pandoc.org/MANUAL.html#other-relevant-metadata-fields in a paragraph after mentioning LaTeX?
I'm really not sure. That section only talks about the effect on readers, and in typst's case, citations always work in the reader regardless of the extension. The extension only affects the writer.
Thanks John, I suppose anywhere in the docs is better than nowhere; I only found the citations extension applied to typst by digging into issues on GitHub (here and at quarto); by the way they have a simple switch:
https://quarto.org/docs/prerelease/1.4/typst.html#bibliography
When citeproc: true then they switch to citeproc and use typst-citations under-the-hood to disable typst system. This seems cleaner and would be easier to document…
I made a pull request to add this info to the Options
> --citeproc
section...
Explain the problem. I'm trying to generate a PDF, including citations, using as minimal a change as possible from
pdf-engine: latex
topdf-engine: typst
. When simply changing the engine totypst
failed, I tried changing the final output format to typst so I could see the output and try to make sense of the issue.Firstly, an absolute path to the bibliography fails. If I generate with
pandoc -s --bibliography "/Users/ben/Documents/Study/bibliography.yaml" …
then I get a typst file containing the following:When I tried processing this the error was as follows:
Note the lack of leading
/
in the error message: Typst seems to be stripping this and treating it as a relative path.Passing a relative path to Pandoc (e.g.
pandoc -s --bibliography=../bibliography.yaml …
) seems to work — at least, it finds the bibliography file.However this then produces the second error:
My expectation was that a citeproc yaml file would be processed by pandoc to generate the output (as with the other output formats, which as far as I know don't support citeproc). However it seems that the typst writer needs the yaml file to be in a different format (typst-specific?).
I don't know if the right thing to do is to alter Pandoc's behaviour or just to document it — I can completely understand if it's a limitation of the output format.
Pandoc version? pandoc 3.1.2 on macOS 13.3