[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-users
Subject:    Re: Chapterbib: another \bibstyle command error
From:       Jürgen_Spitzmüller <spitz () lyx ! org>
Date:       2017-01-21 16:51:23
Message-ID: 1485017483.17617.18.camel () lyx ! org
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


Am Freitag, den 30.12.2016, 16:05 +0100 schrieb Jürgen Spitzmüller:
> Am Freitag, den 30.12.2016, 11:47 -0200 schrieb Rudi Gaelzer:
> > > On the command line, you get the error as well, although you
> > 
> > probably
> > > haven't noticed it.
> > 
> >   
> > It's not quite like that. If I run bibtex for each child
> > individually, the bbl's are generated without a hitch. The error
> > comes when I bibtex'ed the main file.
> > Your bibtexall script does not distinguish between the master and
> > children aux's and processes them all, without issuing any message
> > to
> > the console.  
> 
> Right. The script can be extended to ignore the main file, though.
> Could you try if the (untested) attached bibtexallx script works?

Meanwhile I found the time to try it myself. The attached script works
for me. I also updated the wiki page.

HTH
Jürgen

> Jürgen
["bibtexallx" (bibtexallx)]

#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-

# \author Juergen Spitzmueller

# This file is a wrapper on bibtex to let LyX
# process every aux file in the temp directory
# except for the master file's.
# This is needed if you use chapterbib with LyX.
# Place this file somewhere in your PATH , then
# open Tools->Preferences->LaTeX in LyX and change
# the "bibtex command" from "bibtex" to "bibtexallx".

import sys, os
for filename in os.listdir("."):
	if filename.endswith('.aux'):
		f = os.path.splitext(filename)[0]
                if f == sys.argv[1]:
                    continue
		os.popen('bibtex ' + f)

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic