I'm trying to combine my dissertation chapters with one master file and would like to use chapterbib to have each chapter's individual bibliography show up. Following the directions here (http://wiki.lyx.org/BibTeX/Tips), the bibtexall.py wrapper is required to get chapterbib to work.

I've downloaded the file, made it executable in Linux Mint and Windows 8.1. What is alluding me is where to put the thing. The script itself says "Place this file somewhere in your PATH" (http://wiki.lyx.org/uploads/BibTeX/bibtexall), but I find that to be extremely vague and unhelpful for figuring out where to put it.

Should the drop down option in Tools -> Preferences -> Latex have the option of bibtexall, or should it be entered as a custom option? So far, I have entered it as a custom option, but that just results in [?] for the citations when the files are compiled.

I know this works because I managed to get it to work after a lot of trial and error maybe six months ago (Windows 7), but I will not have access to the computer I did that on until after I need to combine my dissertation. I am kicking myself for not taking notes and would appreciate any help.

I do have a very simplified example that I would be willing to upload if anyone points out how to do so.

  • On Linux Mint, you should be able to learn about your PATH with the command echo $PATH (the different 'paths' are separated by colons). Beyond that, though I can't help. I don't know LyX and whether it includes a mandatory editor for this 'drop down option' or you mean some more generic editor.
    – jon
    Commented Oct 16, 2016 at 21:16
  • Thank you for that. Now I have the .py file in one of the PATH options for Linux Mint. Sadly, still getting question marks. Looking at the output, seems bibtexall.py isn't running (.aux files are tripping up Lyx).
    – fish_dots
    Commented Oct 17, 2016 at 1:06
  • I'm afraid I have never even tried to use LyX, so I suppose that means I may have less of an understanding of how LyX interacts with BibTeX. In the LaTeX world, at least, any BibTeX-based script would need and read the .aux file(s)....
    – jon
    Commented Oct 17, 2016 at 1:47
  • I think it means the PATH of your Linux installation. So if you open up a terminal and type bibtexa and then press tab, it should expand. More technically, type "type bibtexall" and if bibtexall is in your PATH it should return the location. To change your PATH on linux google.
    – scottkosty
    Commented Oct 17, 2016 at 2:04
  • I don't know if the following will help, but here is a self-contained LyX dissertation template that has a separate .bib file for each chapter (using chapterbib): github.com/scottkosty/lyx-princeton-diss
    – scottkosty
    Commented Oct 17, 2016 at 2:04

1 Answer 1


Thanks to the example provided by scottkosty, I have arrived at a solution to my problem.

Turns out bibtexall.py is not necessary to use chapterbib as the documentation would suggest.

The method used in the linked dissertation example (github.com/scottkosty/lyx-princeton-diss) uses the following to have different bibliographies for each chapter with their own bib files:

  1. Have \usepackage{chapterbib} in your preamble
  2. Check off the sectioned bibliogrpahy box in Document -> Settings -> Bibliography
  3. If using linux, you may need to download bibtopic.sty. My distribution didn't seem to have it.
  4. Do steps 1 and 2 for the master file and each child file

It uses the standard bibtex option in Tools -> Preferences -> Latex. So you won't need to change this unless you were messing around trying to get bibtexall to work like I was.

This was a much easier solution than I have previously found for having multiple bibliographies. It worked on both Windows 8.1 and Linux Mint with minimal fuss.

You must log in to answer this question.

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