LaTeX forum ⇒ Feature Suggestionsadd .bib-file in files window - code and suggestion

Suggestions and discussions for new TeXnicCenter features
Posts: 1
Joined: Tue Dec 13, 2016 3:30 pm

add .bib-file in files window - code and suggestion

Postby texnicuser » Tue Dec 13, 2016 4:02 pm

Hello everybody,

when i started using TeXnicCenter i had used bibtex for my bibliography. When I added the bibresource with \bibliography {} the file was also added to the files tree in TeXnicCenter. As i switched to biblatex with biber, i would like to use the new command \addbibresource {} to load all my resources. But it brought the problem that i could not find the bibfile in the files tree in TNC. Not a big problem, but also not nice, because it's nice to have it there.

I can't simply replace the \bibliography command with \addbibresource because of the file extension. In \addbibresource it has to be spelled explicit like \addbibresource{literature.bib}. But if you do that in the argument of \bibliography, TNC will add another extension, for example \bibliography{literature.bib} will end in literature.bib.bib in the files tree in TNC. That means you can't open the literature.bib file from the files tree. I would suggest to implement an advanced option in the options of TNC to control the commands that will make TNC to add the files in the files tree. Then it could be possible to add resources that are not directly used in the project, too. That would be awfull.

Nevertheless i figured out how to work around that problem. Here's the code with a simple \renewcommand. I had to figure out the usage of the argument wildcards.

  1. \renewcommand{\bibliography}[2][.bib]{\addbibresource{#2#1}}
  2. \bibliography{directory/bibresource}

Maybe this could be helpful for someone like me!

Return to “Feature Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest