LaTeX-Utilities icon indicating copy to clipboard operation
LaTeX-Utilities copied to clipboard

Empty Latex Command for Citation picker

Open samuelsaari opened this issue 3 years ago • 4 comments
trafficstars

Feature Request

Is your feature request related to a problem? Please describe.

I would like to cite from zotero and only get the citation key without \autocite{}, citep{} or the like.

Describe the solution you'd like

It would be great if when the setting "Zotero: Latex Command" was left empty, no text would be added around the citation key.

Describe alternatives you've considered

not applicable.

Sometime you already have the \autocite{} command and you want to keep on adding citations or would occasionally like to use \textcite{}. I also switch between natbib and biblatex and would like to automate that process myself

samuelsaari avatar Oct 06 '22 15:10 samuelsaari

Sorry, for now I don't have the environment to test this. What is the current behavior if you set an empty string in LaTex Command settings? According to the code, it should be able to output only the cite key.

leoleoasd avatar Oct 07 '22 05:10 leoleoasd

When the setting is an empty string, it will type "\autocite{}" around the citation key. Can't find the setting in json settings, only in the point and click settings.

This behavior was reproduced after reloading vscode and rebooting.

If this would be fixed some time in the future, would be grateful.

samuelsaari avatar Oct 07 '22 05:10 samuelsaari

As a piggyback request, it would be great if markdown user could customize the citation key as @key. {"latex-utilities.zotero.latexCommand": "@"} does not work for this purpose because it behaves like \@{key}.

jooyoungseo avatar Dec 31 '22 01:12 jooyoungseo

As far as I tested the empty LaTeX command works only when "latex-utilities.zotero.citeMethod": "vscode", not with the default Zotero citation picker.

{
  "latex-utilities.zotero.citeMethod": "vscode",
  "latex-utilities.zotero.latexCommand": ""
}

jooyoungseo avatar Dec 31 '22 03:12 jooyoungseo