I am using the Bibulous tool to create nicely customizable bib styles (see also Create clean and simple custom bibstyle)
i.e. this tool uses an alternative command to parse the *.bib file and create the *.bbl file. Instead of using bibtex %.aux it uses a python-style macro /path/to/bibulous.py %.aux with a custom template file templates.bst. The compilation procedure for the *.tex document then follows the standard well known procedure :PdfLaTeX + Bibulous + PdfLaTeX (x2) + View Pdf
While this works fine on a simple example I have problems with more complex document structure, using \include{...} commands. References with \cite{...} in the main *.tex file are recognized fine and included in the Bibliography, but references from an included *.tex file are not recognized properly : Citation [...] on page [...] undefined as shown in the minimal working example below.
Any ideas how to use bibulous with included *.tex files, which should not be an exotic case at all, but rather common practice!?
This MWE needs 4 files + the bibulous macro
MWE.tex %main *.tex file
templates.bst %template file for bibulous formatting
bibl.bib %bib file with entries
sub.tex %a *.tex file included via \include{sub}
bibulous.py %file from the bibulous tool used as bibtex command
The main *.tex file MWE.tex
\documentclass[a4paper,11pt]{report}
\begin{document}
%Adding this line recognizes all entries in the *.bib
%file and creates Bibliography entries, but this is not
%safe when adding new references
%\nocite{*}
%This reference works fine
Reference in main MWE.tex file \cite{Lorem}
%include file sub.tex with another \cite{...} command
\include{sub}
%create bibliogpaphy from bibl.bib file
\bibliography{bibl}{}
\bibliographystyle{templates} %use templates.bst bibulous template file
\end{document}
A secondary *.tex file to be included by the \include{} command sub.tex
%this reference is not recognized properly
Reference in included sub.tex \cite{Ipsum}
An examplary bibliography database bibl.bib
@entry{Lorem,
title = {Lorem},
author = {A. Lorem},
year = {2015},
publisher = {Lorem Journal}
}
@entry{Ipsum,
title = {Ipsum},
author = {B. Ipsum},
year = {2015},
publisher = {Ipsum Journal}
}
An examplary template file for the bibliography formatting used by bibulous templates.bst
TEMPLATES:
entry = <au>, \textit{<title>}, <publisher>, <year>
bibtexin between, right? Question mark instead of citation number – Johannes_B Oct 22 '15 at 08:20bibtex %.auxcommand is replaced by/path/to/bibulous.py %.auxcreating the references. Then I run the usualPdfLaTeX + Bibulous+ PdfLaTeX (x2) + View Pdf. As I said this works fine with flat *.tex document structures, but not with included files. – HeXor Oct 22 '15 at 08:33