## bibliography file not included in master document- \cite autocomplete not working

TXS - Help
Zefix
2014-06-24
2014-06-28
• Zefix - 2014-06-24

Hi,

maybe the title is not clear, here is my problem:
I have a .tex file with citations. As a bibliography management system I use biber and biblatex. When I include the bibliography file with the command \addbibresource{library.bib} txs does not realize that there is a bibliography file in the project and does not autocomplete the items of the keylist inside the \cite command.
If I use the command \bibliography{library} txs understands it and also shows an entry BIBLIOGRAPHY in the structure list. But then biber does not work.

I have had other problems with the lack of Unicode support for Bibtex and would like to continue working with biber. But autocomplete is an absolutely necessary feature for me.

Any help would be appreciated

• Henry Smith - 2014-06-24

I mitigated the issue by using JabRef. I mean it's probably strongly recommended anyway to use a tool like that, to stay sane when working with bibliography files.

• Zefix - 2014-06-25

I use Mendeley for this purpose- but I do not see how this has anything to do with autocomplete within txs.

As I wrote the autocomplete feature works if I add the bibliography file with \bibliography{library}. But txs does not understand that the \addbibresource command includes a file.

• Denis Bitouzé - 2014-06-25

What TXS' version do you use? Works like a charm here with 2.8.0 (and used to work with 2.7.0 as well).

• Henry Smith - 2014-06-25

Yes, of course. I'm sorry to confuse you like that. I alluded to the fact that, as far as I am aware, bibliography tools like that have a function to insert a reference into the LaTeX editor (in JabRef it is done via CTRL + L). Which i swhy I continued to use JabRef after some firsts doubtful moments. I'm sure Menedeley has something similar.

Auto-completion for biber/biblatex though... yes, that would be great. :)

• Tim Hoffmann - 2014-06-25

Any tool can insert bibliography ids into TeXstudio as long as it can run an external program. See the --insert-cite command line parameter. more information can be found in the user manual.

Last edit: Tim Hoffmann 2014-06-25
• Henry Smith - 2014-06-25

Interesting bit on the side though: when I hover with my mouse cursor above a \footcite-command, it shows me the relevant code from the bibliography file.

Last edit: Henry Smith 2014-06-25
• Tim Hoffmann - 2014-06-25

This is getting a bit off-topic.

@Zefix: What TXS' version do you use?

This works here:

\documentclass[]{article}
\usepackage[backend=biber,style=authoryear-icomp,sortlocale=de_DE,natbib=true,url=false,doi=true,eprint=false]{biblatex}

\begin{document}
\cite{Foo23}
\end{document}


Please provide a minimal example that displays the error.

• Henry Smith - 2014-06-27

I use 2.8 as well:

My MWE, in which I can't autocomplete the first reference via CTRL + SPACE.

\documentclass{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{filecontents*}{testbib.bib}
@Book{Augustine_1995_Heterogeneouscatalysis,
hyphenation   = {american},
author        = {Augustine, Robert L.},
title         = {Heterogeneous catalysis for the synthetic chemist},
shorttitle    = {Heterogeneous catalysis},
publisher     = {Marcel Dekker},
location      = {New York},
date          = {1995},
edition={1},
annotation    = {A plain \texttt{book} entry}
}
\end{filecontents*}

\usepackage[backend=biber,style=authoryear-icomp]{biblatex}

\begin{document}
\begin{itemize}
\item Wort.\footcite{Agustine_}
\item Wort.\footcite{Augustine_1995_Heterogeneouscatalysis}
\end{itemize}

\printbibliography
\end{document}


• Zefix - 2014-06-27

Alright I figured something out- it is in a working state for me, but in a weird one.

I had some problems with the Build settings. Previously when I went to settings- configure txs- build (advanced options turned on) I had changed
"txs:///biber"
to
"biber"

Because it would not generate a bibliography if I did not do that. The citations all appeared correctly, but there was no bibliography. When I changed it to "biber" it worked, but then there was no autocomplete.

Now I changed it back to "txs:///biber" and added a "user command" in the settings- configure txs- build menu:
"biber %"
And I get a bibliography as well as autocomplete. Txs also shows the bibliography file in the structure tab. I am still confused as to why this is necessary. And also the user defined command gets duplicated by itself... from time to time I delete all but one of them but they keep coming back. Funny enough, I am not even running the user command now. I just do the standard "F1" build, but it actually does not work if I remove the user defined command.

Since I am now convinced that it is rather a txs problem than a tex problem I attached my txsprofile.

I am using txs 2.7.0

Just to clarify: It is running now and I can totally live with this. If you want to fix it to understand what is happening and to make it work for future users: very cool.

• Henry Smith - 2014-06-27

I am using my bibliography file via

\addbibresource{../../Literatur/Datenbank/Lit-Datenbank.bib}

Might that be the catch here? Also, if it helps:

• Henry Smith - 2014-06-27

An old (unattended) topic on this, found through tex.sx: https://sourceforge.net/p/texstudio/discussion/907839/thread/9aaff015/

EDIT The line \addbibresource{../../Literatur/Datenbank/Lit-Datenbank.bib} needs to be in the project's main file, not in some other file, /settings/biblatex-stuff.text. Well, now I know.

Last edit: Henry Smith 2014-06-27
• Jan Sundermeyer - 2014-06-27

concernig your example, you mistyped "Agustine_" -> "Augustine_"

If corrected, everything works fine here.

• Jan Sundermeyer - 2014-06-27

I can't confirm, that the addbibresource needs to be in the main file.
The point is that txs needs to load/open the file where this definition is made.
So either you open that file manually or you let txs do it by enabling "automatically load all included files".
Otherwise it is a little difficult for txs to know what citations exist ...

• Zefix - 2014-06-27

@Henry Smith: your picture made me realize something else: in my "commands" tab of settings ('Befehle' in your picture) there is no entry for biber.
I do have it set as the default bibliography tool in build and it is in the dropdown menu there.

• Henry Smith - 2014-06-28

@Jan: Interesting. Just re-tested my MWE without the typo and it autocompleted. Then checked for the "automatically load all files" option and it wasn't marked. It also works if the little test bibliography file is in a sub folder.

However in my big project, even with checking the "loading all included files" option it won't recognize and load the file if the line is written in /settings/biblatex-file. (Yes I restarted TXS.)
Anyway, it is odd but does not really "bother" me.

@Zefix: Interesting, did it help with anything?

Last edit: Henry Smith 2014-06-28