[OS X TeX] Trouble with undefined references using Chapter bibliographies

Herbert Schulz herbs at wideopenwest.com
Fri Oct 15 01:10:45 CEST 2010


On Oct 14, 2010, at 5:42 PM, Anand Ramaswamy wrote:

> I am using TexShop Version 2.37 and am trying to generate individual
> chapter bibliographies. I follow the instructions from an earlier
> post:
> "Put \bibliographystyle and \bibliography
> commands in each \included le. Run LATEX; run BibTEX on each
> included le; run LATEX; run LATEX."
> 
> However, when I do this I get a warning of undefined references when i
> run latex on the root document and although the bibliography shows up
> in the document the references show up as [?]. I had somebody else run
> it on a machine not using TexShop and it seems to work okay. I tried
> installing all the packages related to bibliography using texlive but
> I still get the same error.
> Would appreciate your assistance...
> 
> Thanks,

Howdy,

I'm not quite sure what you are trying to achieve. If you want to end up with a single bibliography in the end why not just make one large bibliography in the root file and just have the cite commands in each included file. 

In each included file put the line

% !TEX root = path/to/root/file

(e.g., if the included file is in a folder in the folder holding myrootfile.tex then path/to/root/file would be ../myrootfile.tex). This is so TeXShop ``knows'' what file to compile when you edit one of the included files.

Then try to use one of the latexmk engines. If you really want to be running latex (rather than pdflatex) move the latexmk.engine file from ~/Library/TeXShop/Engines/Inactive/Latexmk/ two folder up, to ~/Library/TeXShop/Engines/ and restart TeXShop (~/Library/ is the Library folder in your HOME folder). Finally put the line

% !TEX TS-program = latexmk

at the top of the root file. From then on just run Typeset->Typeset (Cmd-T) and all the necessary runs of latex, bibtex, etc., will automatically happen.

Also note that all the necessary bibliography packages (which ones are you using) are already part of TeX Live (installed by MacTeX) so don't need installing.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the macostex-archives mailing list