KileKile project: bibtex does not run on all files.

Information and discussion about Kile, an integrated LaTeX environment for Linux KDE
Post Reply
ha_entry
Posts: 4
Joined: Wed Sep 17, 2008 11:41 am

Kile project: bibtex does not run on all files.

Post by ha_entry »

hi all,

i have a kile project file, where the main .tex file includes 2-3 others (as chapters). i'm using the chapterbib package with the intention of having a bibliography section after each chapter, rather than at the end of the report/book.

my problem is that quickbuild does not run bibtex on all the files of the project, but only on the main/master file.

does anyone know how to configure kile to do what i need :?:

[additional remark: running at the console
  • latex main
    bibtex chapter1
    bibtex chapter2
    latex main
    latex main
does what i want]

my main/master file looks like:

Code: Select all

\documentclass[a4paper,10pt]{report}
\usepackage{manymanypackages}
\bibliographystyle{plain}
\usepackage{chapterbib}
\begin{document}

\include{chapter1}
\include{chapter2}

\end{document}
my included files chapter1.tex and chapter2.tex look like:

Code: Select all

\chapter{Chapter Title}
... content ...
\bibliographystyle{plain}
\bibliography{mybib}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Aiden83
Posts: 1
Joined: Mon Nov 24, 2008 2:04 pm

Kile project: bibtex does not run on all files.

Post by Aiden83 »

I am having a similar problem. I managed to get this working for one chapter by reconfiguring the Kile build settings (Configure Kile - Tools - Build). More specifically, I created a new Configuration for the Bibtex tool called chap1. For this configuration, I changed the tools option from the default '%S', to chapter1, where chapter1.tex is the tex file included in the main.tex document. I then add a new Quickbuild configuration of Latex - Bibtex(chap1) - Latex - Latex.

This works file, but often I have to run Quick build twice each time I need to rebuild. I would like to make this so that I only have to press Quick build once. I then have another problem in that I tried to include a second chapter but then the Quick build process loops infinitely on the third latex pass. I did occasionally get this looping problem with a single chapter but cant remember what conditions led to this.

Some code:
Main File

Code: Select all

\begin{document}
\bibliographystyle{apalike}
\include{testchap1}
% \input{testchap1.bbl}
\include{testchap2}
% \input{testchap2.bbl}
\backmatter
\chapter{Bibliography}
\bibliography{/home/yassie/Documents/KileProjects/Dissertation/AllThesis.bib}
\end{document}
chap1.tex

Code: Select all

\chapter[Australian ERIS]{An Australian \protect{\ac{ERIS}}}
\newpage
\bibliographystyle{apalike}                  % *.bst files
\bibliography{/home/yassie/Documents/KileProjects/Dissertation/AllThesis.bib}       % *.bib Files
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Kile project: bibtex does not run on all files.

Post by Juanjo »

A trick already explained in some other threads allows to launch BibTeX from the own tex file. Before \documentclass write a single line:

Code: Select all

\immediate\write18{bibtex chapter1} \immediate\write18{bibtex chapter2}
If you have \write18 enabled, TeX will launch BibTeX to process chapter1.aux and then chapter2.aux. If, in a certain LaTeX run, you don't want to do it, just comment out that line.

Search this forum for more info about \write18.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Post Reply