James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.62k stars 529 forks source link

Support BibLaTex multiprenote and multipostnote #4313

Closed postylem closed 2 months ago

postylem commented 3 months ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [ x] The feature request has not been suggested in this repository.

The Missed*

Is your feature request related to a problem? Please provide a clear and concise description of what the problem is.

  • BibLaTex 'multicite' commands (see biblatex docs, §3.9.3 Qualified Citation Lists) seem to be not (fully) supported. Specifically, there are no autocomplete snippets for a so-called multi-prenote and multi-postnote (notes which come before / after the whole list of citations).
✔️ While a multi-citation command `\parencites`, with the following syntax, is supported
```tex
\parencites[pre][post]{bibid}[pre][post]{bibid} 
```
❌ the version with multiprenote and/or multipostnote (which are in parentheses) seem not to be supported:
```tex
\parencites(multipre)(multipost)[pre][post]{bibid}[pre][post]{bibid} 
```
This is the case with other multicite commands which all have the same syntax, such as `\footcites`, `\textcites`, `\smartcites`, and uppercase versions, etc.  Since these are standard commands in biblatex, it seems reasonable they should be supported, but maybe this is intentional. Sorry if so.

The Solution*

Please provide a solution you would like to have.

  • Autocomplete snippets (and other support? see below) for these commands.

Anything Else?

Add any other context about the feature request below.

  • I am not sure whether this is part of LaTeX-Workshop's features or not, but the more egregious problem that I notice when using these commands is that they do not seem to be supported by the latex syntax highlighter, and that this issue arises even without the parenthetical arguments (and also the spellchecking I am using, but that is an issue for another extension).
<img width="693" alt="Screenshot 2024-07-06 at 14 06 31" src="https://github.com/James-Yu/LaTeX-Workshop/assets/5202957/5e09e523-a268-4f23-a01a-0f91681292b7">

It's worth noting that the citation info on hover does work in all these cases.
James-Yu commented 2 months ago

Thanks for the issue. Have you tried latex-workshop.intellisense.package.dirs and its documentation?

jlelong commented 2 months ago

I will look into the syntax highlighting issue jlelong/vscode-latex-basics#93

jlelong commented 2 months ago

As far as intellisense is concerned, the multi-prenote (or postnote) versions are included in biblabtex.cwl but these entries are ignored by our Python script, which generates the biblatex.json data file. I will look into the conversion toolchain

postylem commented 2 months ago

latex-workshop.intellisense.package.dirs

Thanks, I hadn't looked at that, but now that I did, and I'm not sure I understand. Are you referring to what jlelong mentioned re these versions with parens being generated into the biblatex.json data file?

jlelong commented 2 months ago

@James-Yu We used to have intellisense for macros containing (...), but it was apparently removed by d545d62. I cannot remember why, do you have a better memory than I do?

Edit : related to #4270

James-Yu commented 2 months ago

Will check, may not be very soon sadly 😭