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

use Pandoc citeproc to convert [@citekey] to \cite{citekey} instead of hyperlink #40

Open
bbchen opened this issue Dec 14, 2020 · 2 comments
Labels

Comments

@bbchen
Copy link

bbchen commented Dec 14, 2020

In the workflow, pandoc citations [@citekey] are converted to something like this in LaTeX:

"Sint meis quo et, vis ad fæcete dolorem! Ad quøt moderatius elaboraret
eum(Crivellato \& Ribatti \protect\hyperlink{ref-crivellato2007}{2007}),
pro paulo ridens quaestio ut. 

Is it possible to convert [@citekey] to latex \cite{citekey} instead?

Thank you!

@iandol
Copy link
Owner

iandol commented Dec 27, 2020

Hi @bbchen, by default I always use Pandoc's citeproc engine to generate the formatted references, not BibLaTeX. You will see that the reference itself is already formatted. The hyperlink comes from the setting link-citations (see here for documentation). citeproc handles everything I and many other users need, so unless there is a formatting requirement CSL cannot fulfill, it is worth sticking to its use.

If you prefer to use Bib[La]TeX then you have to disable Pandoc's citeproc engine (doc here) in the metadata and enable the BibLaTeX transformation (biblatex or natbib depending on your workflow). To do that:

      citeproc: false
      biblatex: true

You can edit pandocomatic.yaml directly, or add this to your Scrivener front-matter YAML to override the pandocomatic template. In my pandocomatic templates, I use [refs] as generic settings and then add them to my output types like [latex-refs] or [docx-refs]:

https://github.com/iandol/dotpandoc/blob/master/pandocomatic.yaml#L28

Adjust this as required for your preferences...

@bbchen
Copy link
Author

bbchen commented Feb 20, 2021

Thank you so much for your very detailed answers. That solved my problem. citeproc works well for me, but sometimes I will need to work with collaborators using overleaf and they prefer bibtex.

Thanks again for the workflow. I have used Scrivener with your Scrivomatic to write a few proposals and manuscripts already.

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

2 participants