[OS X TeX] TeXShop and Bibunits engine

Joshua Smith joshua.smith at ucsf.edu
Mon May 14 18:59:10 EDT 2007


Hello all,

I would like to use the package bibunits to create a document with a  
bibliography for each section of a document, and furthermore, I would  
like a TeXShop engine that handles the bibtex processing of the  
bu1.aux, bu2.aux, ... files that are produced.  On p. 4 of the  
documentation, the package author suggests a script

#!/bin/sh
foreach auxfile (bu*.aux)
   echo bibtex ‘basename $auxfile .aux‘
   bibtex ‘basename $auxfile .aux‘
end

I created an engine with this, but when I run it, I get the following  
error message:

bibtex ‘basename bu1.aux .aux‘
bibtex: Need exactly one file argument.
Try `bibtex --help' for more information.

I also tried the alternative script that the author suggests:

#!/bin/sh
foreach auxfile (bu*.aux)
   set auxfilebasename = ‘echo $auxfile | sed s/.aux//‘
   echo bibtex $auxfilebasename
   bibtex $auxfilebasename
end

but I get the error message:

/Volumes/Files/Library/TeXShop/Engines/BibTeX bibunits.engine: line  
3: syntax error near unexpected token `('
/Volumes/Files/Library/TeXShop/Engines/BibTeX bibunits.engine: line  
3: `foreach auxfile (bu*.aux) '

I do not know anything about shell scripting, so can someone suggest  
modifications to this script that will work?

Thanks,
Josh



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list