8

I have Texmaker 4.1.1 and autocomplete feature for citations doesn't work in it. I have my .bib file in the correct directory (the same as my .tex file), use biblatex, have added the command \addbibresource{<my .bib file>} in the correct place in the .tex file, and have already tried refreshing bibliography from Edit menu. Could you suggest some way to fix this?

Guido
  • 30,740
James
  • 183
  • 2
    Options-->Configure Texmaker-->Editor-->Is completion checked on and add .bib extension \addbibresource{biblatex-examples.bib}. Check if you can see bib file-name in Structure on left side pane. – texenthusiast Feb 19 '14 at 15:35
  • @texenthusiast Why not add an answer? :) –  Feb 20 '14 at 00:42
  • @HarishKumar Just to be safe, I am waiting reply from OP if my suggestion worked. – texenthusiast Feb 20 '14 at 02:43
  • @texenthusiast Some times (actually most of the times) you won't get reply if it works ;). Hence make it an answer :) –  Feb 20 '14 at 06:39
  • @texenthusiast Thank you for your help. I had already added the .bib file as the argument of addbibresource. But I checked if the settings for 'completion' which I found under the User menu was appropriate and it was strange for me why without changing any settings it started to work by accident. Just in case it may be useful to someone, i want to add that for making sure if 'bib file-name' appears in Structure on left side pane, one can also open the file with Texmaker from File menu. Thanks again :) – James Feb 20 '14 at 18:29
  • I double checked and yes the Completion checkbox does appear here: Options-->Configure Texmaker-->Editor – James Feb 20 '14 at 18:35
  • 1
    I found that closing and oppening the programme works really well. Be sure to try that – erncyp Sep 23 '15 at 14:25

6 Answers6

12

Made comment into answer which satisfied the OP

Options-->Configure Texmaker-->Editor--> Is completion checked on and add .bib extension \addbibresource{biblatex-examples.bib}. Check if you can see .bib file in Structure on left side pane or open the .bib file with Texmaker from File menu.

  • 11
    Sometimes I need to also press Edit -> Refresh Bibliography to make the new entries appear. (Alt-E, , ) – Niko Fohr Aug 21 '16 at 08:42
  • worth mentioning that this Refresh Bibliography trick needs to be done in Master in order to work, not in another script with e.g. sections. – joaoal Jan 17 '20 at 09:40
  • How would this work when using \bibliography{} instead? – Marten Oct 31 '23 at 19:19
2

I found it out now after several tests. I have the following file for all bibliography stuff:

\renewcommand{\bibname} {C Literaturverzeichnis} 
\bibliographystyle{alphadin} 
\bibliography{bibtex/entries} 
\addcontentsline{toc}{section}{\bibname}

And I had the same issue like you. Everything is working and the bibliography and literature is correctly referenced. But I do not have any cite popup/sugguestion.

So the only thing I needed to do to always get it working, was opening the file with the commands above and one time hit compile. Now I always get the cite popups again.

I don't know to do that automatically, but at least it's working again now. Maybe someone could share how to do that?

kwoxer
  • 121
  • Well it's a currently working solution. It just contains a question but that question is not needed to fix the issues. And the other solution above did not work when I was trying it right now. So I decided to show my solution here. Where is the problem guys? – kwoxer Apr 13 '15 at 12:43
  • I don't understand this answer since you are referencing only names and not what they should be. What should be the second argument in \renewcommand{\bibname}{someDirectoryQuestionmark}.

    Also addcontentsline seems like it would do something completely different and unrelated but it is related somehow? (I am not using a table of contents so it would be weird I would have to act on it.)

    – Marten Oct 31 '23 at 19:18
1

In Windows 7 and MikTex(basic-miktex-2.9.5105)+TexMaker4.3+bibtex file, I found that if I use command like these:

\bibliographystyle{bst file name} \bibliography {bib file name}

then \cite will not auto-complete.

yet however if I use command like these:

\bibliographystyle{bst file name} \bibliography{bib file name}

then \cite will auto-complete the reference normally.

The only difference is that there is a space between \bibliography and {bib file name} or not.

It should be noted that both of the above could display the reference in article normally.

hairuo
  • 21
  • Actually, for me on Windows 10 the opposite worked. Without the space, i.e. \bibliography{bib file name}, the auto-completion was not working. By adding the space and recompiling, the auto-completion worked. After this, I removed the space and compiled again, and the auto-completion was still working – cholo14 Nov 08 '20 at 13:27
0

Make sure to load the .bib file from your master document (root .tex file), loading it from and \input or \include will cause trouble.

It would look something like:

\documentclass[a4paper,11pt,oneside]{memoir}
    \input{Preamble}
    \bibliography{BIBLIOGRAPHY} % load the .bib here.
\begin{document}
    \cite{what ever} % should now run with auto compile.
\end{document}

Obv, you should remember to load BibLaTeX and set styles in your preamble.

Stefan Pinnow
  • 29,535
0

What worked for me is

Options-->Configure Texmaker-->Editor

and then check the checkbox near "check for external changes"

0

I had to add .bib to the name of the bibliography file:

so instead of \bibliography{bibliographyfilename} I have \bibliography{bibliographyfilename.bib} and now it works...

Good luck