Skip to content

Commit

Permalink
fix(syntax): add missing biblatex \Cite
Browse files Browse the repository at this point in the history
refer: #2875
  • Loading branch information
lervag committed Jan 29, 2024
1 parent 37480f2 commit 843ff97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions autoload/vimtex/syntax/p/biblatex.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function! vimtex#syntax#p#biblatex#load(cfg) abort " {{{1
syntax match texCmdBib nextgroup=texFilesArg "\\addbibresource\>"

syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\bibentry\>"
syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\Cite\>\*\?"
syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\cite[pt]\?\>\*\?"
syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\citeal[tp]\>\*\?"
syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\cite\%(num\|text\|url\)\>"
Expand Down Expand Up @@ -48,6 +49,7 @@ function! vimtex#syntax#p#biblatex#load(cfg) abort " {{{1
\ '[Ppf]?[Nn]otecite',
\ '[pPfFsStTaA]?[Vv]olcite[s]?',
\ '[Ss]upercite[s]?',
\ 'Cite',
\ 'cite%(num|text|url|field|list|name)',
\ 'citeal[tp]',
\ 'foot%(full)?cite%(text)?',
Expand Down
7 changes: 6 additions & 1 deletion test/test-syntax/test-biblatex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
\usepackage{biblatex}
\usepackage{csquotes}

% \addbibresource{biblatex-examples.bib}
\addbibresource{../common/local1.bib}

\begin{document}
Expand All @@ -17,7 +18,8 @@
\smartcite{}
\Textcite[e.g.][]{}

\cite{}
\cite{fooBar}
\Cite{fooBar}
\citealp*{}
\citealp{}
\citealt*{}
Expand All @@ -32,4 +34,7 @@
\citeyear{}
\citeyearpar{}

\volcite{1}[23]{worman}
\volcite[23]{worman}

\end{document}

0 comments on commit 843ff97

Please sign in to comment.