tecosaur / LaTeX-Utilities

An add-on to LaTeX Workshop that provides some features that go beyond the bare essentials
MIT License
474 stars 28 forks source link

Support Pandoc citation format #376

Closed jooyoungseo closed 1 year ago

jooyoungseo commented 1 year ago

I wanted to use pandoc citation mode for zotero integration feature so I have played around with the existing setting like below:

{
  "latex-utilities.zotero.zoteroUrl": "http://localhost:23119/better-bibtex/cayw?format=pandoc"
}

However, the above did not take any effect. I have found that mblode/vscode-zotero supports this feature like below:

{
  "zotero-citation-picker.port": "http://127.0.0.1:23119/better-bibtex/cayw?format=pandoc"
}

It would be even nicer if users could customize the BetterBibTeX citation format through latex-utilities.zotero.

leoleoasd commented 1 year ago

Do you mean you want to use pandoc format in the latex document?

jooyoungseo commented 1 year ago

LaTeX Utilities: Cite from Zotero command could be used in any .md (or, .Rmd) file where LaTeX code is used like below:

./test.md:

This is an in-paren citation `[@key]`.

`@key` demonstrates an in-text citation.

``` latex
# LaTeX code here.


In this example, users may want to change the default behavior (i.e., `\autocite{key}`) to Pandoc-style citation (i.e., `@key`).
leoleoasd commented 1 year ago

I can add a config to toggle to pandoc format, but I think this config needs to be updated a lot if you are editing tex file and md files at the same time, and detecting the environment automatically to decide which format to use seems beyond the scope of this extension since we are focusing on editing tex files. For md files, there are other extensions to use, for example mblode/vscode-zotero.

If you have other comments, please feel free to reopen this issue.