[Tex/LaTex] Why doesn’t TeXstudio suggest any bib items for citation (can’t read multiline arguments)

auto-completioncitingtexstudio

When I use the \cite{} command, TeXstudio doesn't find any bib items.
Normally, I would expect that after typing \cite{ TeXstudio would suggest me all bib items available but it doesn't suggest me any. Even if I type in a existing bib item (\cite{Anderson.2012}) TeXstudio tells me (mouse over) that it doesn't know that bib item (underlined green).

My bibliography does contain the following item:

@book{Anderson.2012,
 author = {Anderson, David J. and Roock, Arne and Wolf, Henning},
 year = {2012},
 title = {Kanban: Evolution{\"a}res Change Management f{\"u}r IT-Organisationen},
 price = {EUR 34.90 (DE), EUR 35.90 (AT), sfr 49.90 (freier Pr.)},
 keywords = {Kanban;Kanban-System},
 address = {Heidelberg},
 edition = {Dt. Ausg. der 1. amerikan. Aufl., 1. korr. Nachdr},
 publisher = {dpunkt-Verl.},
 isbn = {9783898647304},
 series = {it-agile}
}

I use the following LaTeX template:
DHBW Horb LaTex Template

EDIT:
For clarification: TeXstudio does correctly work with the cite command. So it does find them. But the intellisense doesn't find (no suggestion) the bib item and therefore is no help (that’s the problem). I have to copy the bib key out of the .bib-file instead of TeXstudio suggesting all possible bib items.

MWE:
The problem seems to be when the options of biblatex are written in multiple lines.
For example:

\usepackage[
    backend=biber
    ]{biblatex}

In the template I use, the options are written as followed:

\usepackage[
    backend=biber, 
    bibwarn=true, 
    bibencoding=utf8, 
    sortlocale=de_DE, 
    style=alphabetic
    ]{biblatex}

If I delete all line breaks, TeXstudio does recognize the bib file.

As MWE:

\documentclass{article}
\usepackage[
    backend=biber
    ]{biblatex}
\addbibresource{bibliographie.bib}
\begin{document}
\cite{Anderson.2012}
\end{document}

Best Answer

In order to close this topic - I summarize:

For now, you will have to do

\usepackage[backend=biber,bibwarn=true,bibencoding=utf8,sortlocale=de_DE,style=alphabetic]{biblatex}

in one line or you tick the corresponding .cwl-file as can be seen below:

enter image description here


The discussion about this issue has been closed: https://sourceforge.net/p/texstudio/bugs/1648/


You may want to create a file biblatexTemp.cwl with:

# biblatex package, available from ctan
# commands for biblatex users
# tbraun, 19.08.2009
# dbitouze, 14.02.2012

\ExecuteBibliographyOptions{%<options%>}
#keyvals:\ExecuteBibliographyOptions
sorting=#nty,nyt,nyvt,anyt,anyvt,ynt,ydnt,none,debug,%<name%>
sortcase=#true,false
sortupper=#true,false
sortlocale=#auto,%<locale%>,de_DE,en_US,de_DE_phonebook,es_ES
sortlos=#bib,los
related=#true,false
sortcites=#true,false
maxnames=%<integer%>
minnames=%<integer%>
maxbibnames=%<integer%>
minbibnames=%<integer%>
maxcitenames=%<integer%>
mincitenames=%<integer%>
maxitems=%<integer%>
minitems=%<integer%>
autocite=#plain,inline,footnote,superscript,%<other%>
autopunct=#true,false
language=#autobib,autocite,auto,%<language%>
clearlang=#true,false
autolang=#none,hyphen,other,other*,langname
block=#none,space,par,nbpar,ragged
notetype=#goot+end,footonly,endonly
hyperref=#true,false,auto
backref=#true,false
backrefstyle=#none,three,two,tow+,three+,all+
backrefsetstyle=#setonly,memonly,setormem,setandmem,memandset,setplusmem
indexing=#true,false,cite,bib
loadfiles=#true,false
refsection=#none,part,chapter,section,subsection
refsegment=#none,part,chapter,section,subsection
citereset=#none,part,chapter,section,subsection
abbreviate=#true,false
date=#year,short,long,terse,comp,iso8601
datelabel=#year,short,long,terse,comp,iso8601
origdate=#year,short,long,terse,comp,iso8601
eventdate=#year,short,long,terse,comp,iso8601
urldate=#year,short,long,terse,comp,iso8601
alldates=#year,short,long,terse,comp,iso8601
datezeros=#true,false
dateabbrev=#true,false
defernumbers=#true,false
punctfont=#true,false
arxiv=#abs,ps,pdf,format
texencoding=#%<encoding%>,auto
bibencoding=#utf8,auto,%<encoding%>
safeinputenc=#true,false
bibwarn=#true,false
mincrossrefs=%<integer%>
#endkeyvals
\bibliography{bib files}

\addbibresource{bibliographic resource}#b
\addbibresource[options]{bibliographic resource}
\addglobalbib{resource}
\addglobalbib[options]{resource}
\addsectionbib{resource}
\addsectionbib[options]{resource}

\printbibliography
\printbibliography[key=value, ...]
\bibbysection
\bibbysection[key=value, ...]
\bibbysegment
\bibbysegment[key=value, ...]
\bibbycategory
\bibbycategory[key=value, ...]
\printshorthands
\printshorthands[key=value, ...]
\begin{refsection}
\begin{refsection}[bib files]
\end{refsection}
\newrefsection[bib files]
\begin{refsegment}
\end{refsegment}
\newrefsegment
\DeclareBibliographyCategory{category}
\addtocategory{category}{bibid}
\defbibheading{name}{code}
\defbibnote{name}{text}
\defbibfilter{name}{code}
\segment{integer}
\type{type}
\keyword{keyword}
\category{category}

\cite[prenote][postnote]{bibid}#c
\cite[postnote]{bibid}#c
\cite{bibid}#c
\Cite[prenote][postnote]{bibid}#c
\Cite[postnote]{bibid}#c
\Cite{bibid}#c

\parencite[prenote][postnote]{bibid}#c
\parencite[postnote]{bibid}#c
\parencite{bibid}#c
\Parencite[prenote][postnote]{bibid}#c
\Parencite[postnote]{bibid}#c
\Parencite{bibid}#c

\footcite[prenote][postnote]{bibid}#c
\footcite[postnote]{bibid}#c
\footcite{bibid}#c
\Footcite[prenote][postnote]{bibid}#c
\Footcite[postnote]{bibid}#c
\Footcite{bibid}#c

\textcite[prenote][postnote]{bibid}#c
\textcite[postnote]{bibid}#c
\textcite{bibid}#c
\Textcite[prenote][postnote]{bibid}#c
\Textcite[postnote]{bibid}#c
\Textcite{bibid}#c

\cite*[prenote][postnote]{bibid}#c
\cite*[postnote]{bibid}#c
\cite*{bibid}#c

\parencite*[prenote][postnote]{bibid}#c
\parencite*[postnote]{bibid}#c
\parencite*{bibid}#c

\supercite{bibid}#c

\cites{bibid}{bibid}#c
\cites(post){bibid}{bibid}#c
\cites(pre)(post){bibid}{bibid}#c
\cites(pre)(post)[post]{bibid}[post]{bibid}#c
\cites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\cites[post]{bibid}[post]{bibid}#c
\cites[pre][post]{bibid}[pre][post]{bibid}#c
\cites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\Cites{bibid}{bibid}#c
\Cites(post){bibid}{bibid}#c
\Cites(pre)(post){bibid}{bibid}#c
\Cites(pre)(post)[post]{bibid}[post]{bibid}#c
\Cites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\Cites[post]{bibid}[post]{bibid}#c
\Cites[pre][post]{bibid}[pre][post]{bibid}#c
\Cites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\parencites{bibid}{bibid}#c
\parencites(post){bibid}{bibid}#c
\parencites(pre)(post){bibid}{bibid}#c
\parencites(pre)(post)[post]{bibid}[post]{bibid}#c
\parencites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\parencites[post]{bibid}[post]{bibid}#c
\parencites[pre][post]{bibid}[pre][post]{bibid}#c
\parencites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\Parencites{bibid}{bibid}#c
\Parencites(post){bibid}{bibid}#c
\Parencites(pre)(post){bibid}{bibid}#c
\Parencites(pre)(post)[post]{bibid}[post]{bibid}#c
\Parencites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\Parencites[post]{bibid}[post]{bibid}#c
\Parencites[pre][post]{bibid}[pre][post]{bibid}#c
\Parencites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\textcites{bibid}{bibid}#c
\textcites(post){bibid}{bibid}#c
\textcites(pre)(post){bibid}{bibid}#c
\textcites(pre)(post)[post]{bibid}[post]{bibid}#c
\textcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\textcites[post]{bibid}[post]{bibid}#c
\textcites[pre][post]{bibid}[pre][post]{bibid}#c
\textcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\Textcites{bibid}{bibid}#c
\Textcites(post){bibid}{bibid}#c
\Textcites(pre)(post){bibid}{bibid}#c
\Textcites(pre)(post)[post]{bibid}[post]{bibid}#c
\Textcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\Textcites[post]{bibid}[post]{bibid}#c
\Textcites[pre][post]{bibid}[pre][post]{bibid}#c
\Textcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\footcites{bibid}{bibid}#c
\footcites(post){bibid}{bibid}#c
\footcites(pre)(post){bibid}{bibid}#c
\footcites(pre)(post)[post]{bibid}[post]{bibid}#c
\footcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\footcites[post]{bibid}[post]{bibid}#c
\footcites[pre][post]{bibid}[pre][post]{bibid}#c
\footcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\Footcites{bibid}{bibid}#c
\Footcites(post){bibid}{bibid}#c
\Footcites(pre)(post){bibid}{bibid}#c
\Footcites(pre)(post)[post]{bibid}[post]{bibid}#c
\Footcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\Footcites[post]{bibid}[post]{bibid}#c
\Footcites[pre][post]{bibid}[pre][post]{bibid}#c
\Footcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\supercites{bibid}{bibid}#c
\supercites(post){bibid}{bibid}#c
\supercites(pre)(post){bibid}{bibid}#c
\supercites(pre)(post)[post]{bibid}[post]{bibid}#c
\supercites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\supercites[post]{bibid}[post]{bibid}#c
\supercites[pre][post]{bibid}[pre][post]{bibid}#c
\supercites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\autocite[prenote][postnote]{bibid}#c
\autocite[postnote]{bibid}#c
\autocite{bibid}#c

\Autocite[prenote][postnote]{bibid}#c
\Autocite[postnote]{bibid}#c
\Autocite{bibid}#c

\autocite*[prenote][postnote]{bibid}#c
\autocite*[postnote]{bibid}#c
\autocite*{bibid}#c

\Autocite*[prenote][postnote]{bibid}#c
\Autocite*[postnote]{bibid}#c
\Autocite*{bibid}#c

\autocites{bibid}{bibid}#c
\autocites(post){bibid}{bibid}#c
\autocites(pre)(post){bibid}{bibid}#c
\autocites(pre)(post)[post]{bibid}[post]{bibid}#c
\autocites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\autocites[post]{bibid}[post]{bibid}#c
\autocites[pre][post]{bibid}[pre][post]{bibid}#c
\autocites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\Autocites{bibid}{bibid}#c
\Autocites(post){bibid}{bibid}#c
\Autocites(pre)(post){bibid}{bibid}#c
\Autocites(pre)(post)[post]{bibid}[post]{bibid}#c
\Autocites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\Autocites[post]{bibid}[post]{bibid}#c
\Autocites[pre][post]{bibid}[pre][post]{bibid}#c
\Autocites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\smartcite[prenote][postnote]{bibid}#c
\smartcite[postnote]{bibid}#c
\smartcite{bibid}#c

\Smartcite[prenote][postnote]{bibid}#c
\Smartcite[postnote]{bibid}#c
\Smartcite{bibid}#c

\smartcites{bibid}{bibid}#c
\smartcites(post){bibid}{bibid}#c
\smartcites(pre)(post){bibid}{bibid}#c
\smartcites(pre)(post)[post]{bibid}[post]{bibid}#c
\smartcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\smartcites[post]{bibid}[post]{bibid}#c
\smartcites[pre][post]{bibid}[pre][post]{bibid}#c
\smartcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\Smartcites{bibid}{bibid}#c
\Smartcites(post){bibid}{bibid}#c
\Smartcites(pre)(post){bibid}{bibid}#c
\Smartcites(pre)(post)[post]{bibid}[post]{bibid}#c
\Smartcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c
\Smartcites[post]{bibid}[post]{bibid}#c
\Smartcites[pre][post]{bibid}[pre][post]{bibid}#c
\Smartcites(pre)(post)[pre][post]{bibid}[pre][post]{bibid}#c

\svolcite{volume}{bibid}#c
\svolcite[prenote]{volume}{bibid}#c
\svolcite{volume}[page]{bibid}#c
\svolcite[prenote]{volume}[page]{bibid}#c

\Svolcite{volume}{bibid}#c
\Svolcite[prenote]{volume}{bibid}#c
\Svolcite{volume}[page]{bibid}#c
\Svolcite[prenote]{volume}[page]{bibid}#c

\tvolcite{volume}{bibid}#c
\tvolcite[prenote]{volume}{bibid}#c
\tvolcite{volume}[page]{bibid}#c
\tvolcite[prenote]{volume}[page]{bibid}#c

\Tvolcite{volume}{bibid}#c
\Tvolcite[prenote]{volume}{bibid}#c
\Tvolcite{volume}[page]{bibid}#c
\Tvolcite[prenote]{volume}[page]{bibid}#c

\avolcite{volume}{bibid}#c
\avolcite[prenote]{volume}{bibid}#c
\avolcite{volume}[page]{bibid}#c
\avolcite[prenote]{volume}[page]{bibid}#c

\Avolcite{volume}{bibid}#c
\Avolcite[prenote]{volume}{bibid}#c
\Avolcite{volume}[page]{bibid}#c
\Avolcite[prenote]{volume}[page]{bibid}#c

\notecite{volume}{bibid}#c
\notecite[prenote]{volume}{bibid}#c
\notecite{volume}[postnote]{bibid}#c
\notecite[prenote]{volume}[postnote]{bibid}#c

\Notecite{volume}{bibid}#c
\Notecite[prenote]{volume}{bibid}#c
\Notecite{volume}[postnote]{bibid}#c
\Notecite[prenote]{volume}[postnote]{bibid}#c

\pnotecite{volume}{bibid}#c
\pnotecite[prenote]{volume}{bibid}#c
\pnotecite{volume}[postnote]{bibid}#c
\pnotecite[prenote]{volume}[postnote]{bibid}#c

\Pnotecite{volume}{bibid}#c
\Pnotecite[prenote]{volume}{bibid}#c
\Pnotecite{volume}[postnote]{bibid}#c
\Pnotecite[prenote]{volume}[postnote]{bibid}#c

\fnotecite{volume}{bibid}#c
\fnotecite[prenote]{volume}{bibid}#c
\fnotecite{volume}[postnote]{bibid}#c
\fnotecite[prenote]{volume}[postnote]{bibid}#c

\citeauthor[prenote][postnote]{bibid}#c
\citeauthor[postnote]{bibid}#c
\citeauthor{bibid}#c

\citedate[prenote][postnote]{bibid}#c
\citedate[postnote]{bibid}#c
\citedate{bibid}#c

\Citeauthor[prenote][postnote]{bibid}#c
\Citeauthor[postnote]{bibid}#c
\Citeauthor{bibid}#c

\citetitle[prenote][postnote]{bibid}#c
\citetitle[postnote]{bibid}#c
\citetitle{bibid}#c

\citetitle*[prenote][postnote]{bibid}#c
\citetitle*[postnote]{bibid}#c
\citetitle*{bibid}#c

\citeyear[prenote][postnote]{bibid}#c
\citeyear[postnote]{bibid}#c
\citeyear{bibid}#c

\citeurl[prenote][postnote]{bibid}#c
\citeurl[postnote]{bibid}#c
\citeurl{bibid}#c

\nocite{bibid}#c

\fullcite[prenote][postnote]{bibid}#c
\fullcite[postnote]{bibid}#c
\fullcite{bibid}#c

\footfullcite[prenote][postnote]{bibid}#c
\footfullcite[postnote]{bibid}#c
\footfullcite{bibid}#c

\citename[prenote][postnote]{bibid}[format]{name list}
\citename[postnote]{bibid}[format]{name list}
\citename[postnote]{bibid}{name list}
\citename{bibid}[format]{name list}
\citename{bibid}{name list}#c

\citelist[prenote][postnote]{bibid}[format]{literallist}
\citelist[postnote]{bibid}[format]{literal list}
\citelist[postnote]{bibid}{literal list}
\citelist{bibid}[format]{literal list}
\citelist{bibid}{literal list}#c

\citefield[prenote][postnote]{bibid}[format]{field}
\citefield[postnote]{bibid}[format]{field}
\citefield[postnote]{bibid}{field}
\citefield{bibid}[format]{field}
\citefield{bibid}{field}#c

\citereset
\citereset*
\mancite

\pno
\ppno
\nopp
\psq
\psqq
\RN{integer}
\Rn{integer}

\DefineBibliographyStrings{language}{definitions}
\DefineBibliographyExtras{language}{code}
\UndefineBibliographyExtras{language}{code}
\DefineHyphenationExceptions{language}{text}
\NewBibliographyString{bibid}#c

\bibsetup
\bibfont
\citesetup
\newblockpunct
\newunitpunct
\finentrypunct
\bibleftparen
\bibrightparen
\bibleftbracket
\bibrightbracket
\bibnamedash
\labelnamepunct
\subtitlepunct
\bibpagespunct
\multinamedelim
\finalnamedelim
\revsdnamedelim
\andothersdelim
\multilistdelim
\finallistdelim
\andmoredelim
\multicitedelim
\supercitedelim
\compcitedelim
\nameyeardelim
\labelalphaothers
\prenotedelim
\postnotedelim
\mkbibnamelast{text}
\mkbibnamefirst{text}
\mkbibnameprefix{text}
\mkbibnameaffix{text}

\bibrangedash
\bibdatelong
\bibdateshort
\biburldatelong
\biburldateshort
\finalandcomma
\mkbibordinal{integer}
\mkbibmascord{integer}
\mkbibfemord{integer}
\bibhang
\biblabelsep
\bibitemsep
\bibitemextrasep
\bibparsep
abbrvpenalty # counter
lownamepenalty
highnamepenalty

\bibellipsis
\hyphenate
\hyphen
\nbhyphen
\noligature
\mknumalph{integer}
\mkbibacro{text}
\autocap{character}

# spanish
smartand # counter
\forceE
\forceY

# koma-script classes
\ifkomabibtotoc{true}{false}
\ifkomabibtotocnumbered{true}{false}

# memoir class
\ifmemoirbibintoc{true}{false}

#ifOption:natbib
#include:natbib
#endif

Save this as biblatexTemp.cwl in ~/.config/texstudio/ or %APPDATA%\texstudio\ and load it as "Permanently active completion files" as seen above.

This new file is offering you the solution mentioned by @samcarter.

Related Question