I am using TexMaker and I want my editor to auto-complete the \parencite{} command for biblatex for any number of arguments.

I already added \parencite{#bib#} in User > customize Completion, but I want auto-completion for comma-separated sources. By example:

\parencite{fooBar2020, BazBuzz2021}
\parencite{fooBar2020, BazBuzz2021, [more arguments]}

Is there a way to achieve that?

  • Does it work for other built-ins like \cite? If not, that would probably be something to contact the developers about. – moewe Jan 6 at 16:12
  • @moewe Good point. It is not supported by cite. Probably not implemented at all? Do you know some editor which implements it? – Olivier Melançon Jan 6 at 16:14
  • You might want to try TeXstudio, whose auto-complete features are slightly more customisable than TeXmaker's. But I'm the wrong person to ask about editors, I usually use Notepad++ or TeXworks (and Emacs when I'm feeling bold). – moewe Jan 6 at 16:22
  • 2
    TeXstudio's autocompletion supports comma-separated list in \cite{...}, and will auto work for \parancite if biblatex package is loaded. For any user defined commands, add \parencite{keylist}#c to a .cwl file under specific path. – muzimuzhi Z Jan 6 at 17:56
  • @muzimuzhiZ Do you want to type up a quick answer explaining that at least TeXstudio does the desired thing? – moewe Jan 7 at 9:09

(This is an extended version of my previous comment.)

I'm not familiar with TeXMaker, but TeXstudio does the desired thing. That is, in TeXstudio,

  • auto-completion for comma-separated citations in \cite{...} is supported,
  • if package biblatex is loaded, then that in \parencite{...} is also supported.

Moreover, suppose you have \newcommand\mycite[2][]{\cite[#1]{#2}}, then you can make TeXstudio's auto-completion support \mycite by adding

\mybib[post note]{bibid}#c

to a .cwl file under TeXstudio's config path and mark it autoloaded in Configure -> Completion.

Related TeXstudio docs:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.