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


  %Adding this line recognizes all entries in the *.bib 
  %file and creates Bibliography entries, but this is not 
  %safe when adding new references

  %This reference works fine
  Reference in main MWE.tex file \cite{Lorem}

  %include file sub.tex with another \cite{...} command

  %create bibliogpaphy from bibl.bib file
  \bibliographystyle{templates} %use templates.bst bibulous template file


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

    title     = {Lorem},
    author    = {A. Lorem},
    year      = {2015},
    publisher = {Lorem Journal}

    title     = {Ipsum},
    author    = {B. Ipsum},
    year      = {2015},
    publisher = {Ipsum Journal}

An examplary template file for the bibliography formatting used by bibulous templates.bst

entry = <au>, \textit{<title>}, <publisher>, <year>
  • You did run bibtex in between, right? Question mark instead of citation number
    – Johannes_B
    Commented Oct 22, 2015 at 8:20
  • In this case I don't use bibtex, since I am using the bibulous tool, so the standard bibtex %.aux command is replaced by /path/to/bibulous.py %.aux creating the references. Then I run the usual PdfLaTeX + Bibulous+ PdfLaTeX (x2) + View Pdf. As I said this works fine with flat *.tex document structures, but not with included files.
    – HeXor
    Commented Oct 22, 2015 at 8:33
  • Can you add this information to the question (by editing it) so others not familiar with the python tool know the procedure. This will push the questioin back on top of the mainsite visible for all, too.
    – Johannes_B
    Commented Oct 22, 2015 at 9:57
  • I added a short explanation of the bibulous macro to the original post
    – HeXor
    Commented Oct 22, 2015 at 10:32
  • I just digged a bit into the main bibulous.py macro (version 1.3) and found that actually only the *.aux file created from the master *.tex file is parsed for citation entries, but not included files. I added a small tweak for my purpose to make it work, but I will contact the package author to include it in the official version.
    – HeXor
    Commented Oct 23, 2015 at 11:19

1 Answer 1


I added the ability of the *.aux file parser to call itself recursively so that it can catch text inserted with TeX's \include command. The updated bibulous.py file is now available on the Project Website and works for the MWE given here.

[This answer was converted from one of the comments.]

  • That is exactly the tweak I added to my local file ;-) Thanks alot!
    – HeXor
    Commented Nov 3, 2015 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .