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 isn't called with the --citeproc option #116

Open
TS-CUBED opened this issue Jan 14, 2023 · 1 comment
Open

pandoc isn't called with the --citeproc option #116

TS-CUBED opened this issue Jan 14, 2023 · 1 comment

Comments

@TS-CUBED
Copy link

I'm not sure if I'm missing something here, but I can't get Pandoc-Mode to do citations.

I have:

  • Doom Emacs
  • Pandoc-Mode installed without any settings changes
  • Pandoc 2.19

I do:

  • add citations with [@NameYear]
  • Open Pandoc-Mode with C-c /
  • Options - Citations - Process Citations (YES)
  • Options - Citations - Bibliography Files (library.bib)
  • Call Pandoc-to-pdf

I expect:

Pandoc to be called with --citeproc

But:

pandoc --read=markdown --write=html

resulting in no citations in the document.

If I run pandoc --citeproc --read=markdown -write=html manually, I do get the citations as expected.

@joostkremers
Copy link
Owner

Apologies for the late reply, somehow your message went under my radar...

If you convert to PDF, on first run you need to select the output format you want
to use for PDF creation. pandoc-mode then uses the settings for that particular
output format, which may not correspond to the output format you have currently
set in the buffer.

That is, if you open a file, usually the output format will be set to native.
If you then set any options, they are set for the native output format. When
you create a PDF, however, you need to select another output format, because
Pandoc cannot create an PDF from native output. Once you select that output
format, pandoc-mode tries to find a settings file for that output format and if
it doesn't find one, it calls pandoc with only the input and output formats set.

Unfortunately, this UI is a bit confusing, I admit. It's just that I don't know
any better way of handling it...

So what you need to do is first set the output format that you want to use for
PDF creation and then set the citeproc option.

If you save those settings, they will be used automatically the next time you
create a PDF from the same file using the same output format. You can also save
a global settings file, so that any file you convert to PDF using your selected
output format will use those settings.

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

2 participants