BibTeX, biblatex and biberbibunits | Remaining undefined Citations

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
rouroy
Posts: 3
Joined: Wed Jun 16, 2010 8:38 am

bibunits | Remaining undefined Citations

Post by rouroy »

Hi,

I'm writing my thesis and I have some troubles using bibunits. I work with MiKTeX 2.8 and TeXnicCenter on Windows to produce PDF files.

For example, if I have my main file "test.tex"

Code: Select all

\documentclass{article}
\usepackage{bibunits}

\begin{document}
\begin{bibunit}[plain]
blablabla\cite{alexandre2000} .
\putbib{bibtest}
\end{bibunit}
\end{document}
and the bibliography database file "bibtest.bib"

Code: Select all

@article{alexandre2000,
   author = {Alexandre, M.},
   title = {blabla},
   journal = {Journal},
   volume = {1},
   pages = {1},
   year = {2000}
}
I get two warnings saying: citation "alexandre2000" on page 1 undefined on input line 7. No bu1.bbl and the second warning: there were undefined references.
I don't understand what is the problem since I follow exactly what is say in the bibunits documentation.

And if I used a standard procedure for my bibliography, like this

Code: Select all

\documentclass{article}
\usepackage{cite}

\begin{document}
blablabla\cite{alexandre2000}.
\bibliographystyle{plain}
\bibliography{bibtest}
\end{document}
I get not trouble! So what I do wrong with bibunits? Does someone have an idea?

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
olofos
Posts: 56
Joined: Tue Nov 24, 2009 10:37 pm

Re: bibunits | Remaining undefined Citations

Post by olofos »

Do you run "bibtex bu1" after running the compiler? I've never used TeXnicCenter, but I suspect that most latex-aware editors are unable to detect when BibTeX needs to be run with an argument other than the main .aux file.
quentin_parsons
Posts: 1
Joined: Tue Jun 22, 2010 6:36 am

Re: bibunits | Remaining undefined Citations

Post by quentin_parsons »

Hi,

I've hit the same issue. The discussion thread above seems to have gone cold. Did you resolve your issue using the posted comment? Any ideas please?
Hypochristmutreefuzz
Posts: 2
Joined: Sat Jul 31, 2010 8:03 pm

bibunits | Remaining undefined Citations

Post by Hypochristmutreefuzz »

Hello,

I have the same problem with bibunits. I use TeXnicCenter and like to have a references section in each chapter. I think, like olofos said, the problem is that BibTeX needs to compile all the "bu<i>.aux" files. The
bibunits manual says:
For each bibunit, in sequence, there is now a corresponding file bu<i>.aux that
needs to be compiled through BibTEX. Suppose your document has <n> different
bibunits, you must now invoke BibTEX on bu1, . . . , bu<n>. This can be done by a
csh-script.

Code: Select all

#!/bin/csh
foreach auxfile (bu*.aux)
echo bibtex ‘basename $auxfile .aux‘
bibtex ‘basename $auxfile .aux‘
end
If you don’t have the base name command, you can use an alternative script where the suffix .aux is removed using "sed".

Code: Select all

#!/bin/csh
foreach auxfile (bu*.aux)
set auxfilebasename = ‘echo $auxfile | sed s/.aux//‘
echo bibtex $auxfilebasename
bibtex $auxfilebasename
end
It seems that this code needs to be sent to BibTeX somehow, however I dont know how to do this. I hope there is someone on this forum that can help me and anyone else who is struggeling with this!
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Re: bibunits | Remaining undefined Citations

Post by localghost »

These are C-Shell scripts for Unix like systems (e.g. Linux). The counterpart for Wind0ws (MSD0S) are batch files. So, with the necessary knowledge you will have to translate the scripts to make them work on your system.


Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Hypochristmutreefuzz
Posts: 2
Joined: Sat Jul 31, 2010 8:03 pm

bibunits | Remaining undefined Citations

Post by Hypochristmutreefuzz »

Thanks localghost,

I finally got it to work. I don't know how to translate the Unix script to windows, but I made a .bat file (random name) with the following code in it:

Code: Select all

pdflatex myfile
bibtex bu1
bibtex bu2
pdflatex myfile
pdflatex myfile
pause
(pause is optional)

This will run PDFLaTeX on "myfile.tex", then BibTeX on "bu1.aux and "bu2.aux" (if you have more references sections you need to add "bu3"), and then PDFLaTeX twice more. I don't know how to get this to work in TeXnicCenter, however I did get it to work in TeXmaker. At "Configure Texmaker" you type in the user field:

Code: Select all

"C:/Program Files/MiKTeX 2.7/miktex/bin/pdflatex.exe" -interaction=nonstopmode %.tex|"C:/Program Files/MiKTeX 2.7/miktex/bin/bibtex.exe" bu1.aux|"C:/Program Files/MiKTeX 2.7/miktex/bin/bibtex.exe" bu2.aux|"C:/Program Files/MiKTeX 2.7/miktex/bin/pdflatex.exe" -interaction=nonstopmode %.tex|"C:/Program Files/MiKTeX 2.7/miktex/bin/pdflatex.exe" -interaction=nonstopmode %.tex|"C:/Program Files/Adobe/Reader 9.0/Reader/AcroRd32.exe" %.pdf
This should do the same thing as the .bat file.
random89598
Posts: 1
Joined: Tue Nov 15, 2011 2:18 pm

bibunits | Remaining undefined Citations

Post by random89598 »

For TeXnicCenter, first make the file "compilebib.bat" with this content:

Code: Select all

@echo off
echo Processing auxiliary files with BibTeX
For %%i in (*.aux) Do bibtex %%i
then click "define output profiles" (Alt+F7), select the "Postprocessor" tab, and add new. Put "compilebib.bat" under executable. Works for me.
sbyrnes321
Posts: 1
Joined: Thu Mar 15, 2012 7:34 pm

bibunits | Remaining undefined Citations

Post by sbyrnes321 »

Here's my exact procedure for TeXworks...

I made a text file with the following:

Code: Select all

@echo off
echo Running texify for the first time
texify.exe %*
echo Processing auxiliary files with BibTeX
For %%i in (*.aux) Do bibtex %%i
echo Running texify for the second time
texify.exe %*
then saved the file as "texifycompilebib.bat". I put the file in my MikTeX bin folder C:\Program Files\MiKTeX 2.9\miktex\bin (not sure if that's necessary or wise but it worked).

Next, I opened TeXworks and went to Edit --> Preferences --> Typesetting. Under "Processing tools" I double-clicked my favorite processing tool that I had previously been using before I installed bibunits, which happened to be "pdfLaTeX+MakeIndex+BibTeX". Double-clicking shows what the processing tool does: It calls the program "texify.exe" with three specific arguments ("--pdf", "--tex-option=-synctex=1", "$fullname"). So I down wrote those three arguments on a piece of paper, and went back to the main processing tool window. Then I made a new Processing tool (plus sign in the bottom right), and named it "pdfLaTeX+MakeIndex+BibTeX for bibunits". I set it up to call my program (texifycompilebib.bat) instead of texify.exe, but otherwise I made it exactly the same as pdfLaTeX+MakeIndex+BibTeX, with the same three arguments in the same order.

Finally, in TeXworks, I can select "pdfLaTeX+MakeIndex+BibTeX for bibunits" from the drop-down menu at the top, and by clicking the green button the whole document re-compiles in one click! Very nice!!

Thanks everyone, especially random89598!
Irgi
Posts: 1
Joined: Tue Dec 11, 2012 1:55 pm

Re: bibunits | Remaining undefined Citations

Post by Irgi »

Thank you all. That fixed it for me too!
Post Reply