BibTeX, biblatex and biberUsing CTAN package in overleaf for Bath Harvard referencing

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
emmart
Posts: 3
Joined: Sun Sep 29, 2019 3:58 pm

Using CTAN package in overleaf for Bath Harvard referencing

Post by emmart »

Hello all,
I am completely new to BibTex and overleaf and an absolute beginner. I have been trying to understand how to use a package from CTAN for my bibliography but despite the explanations given, I am not managing to use it in overleaf.
The package: https://github.com/alex-ball/bathbib or https://ctan.org/pkg/bath-bst . Could anyone help me with it or has anyone done before?

Thanks all,
emmart

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Using CTAN package in overleaf for Bath Harvard referencing

Post by Ijon Tichy »

The package is available in TeX Live 2018 and 2019. Currently Overleaf uses a complete installation of the latest TeX Live 2018. So AFAIK it should be available on Overleaf without any further installation. Just use it as described in the manual from section 2–4 (section 1 is how to install the package, which should not be needed). So, what have to tried (please show us a Infominimal working example) and what are the error messages, that you have got?
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
emmart
Posts: 3
Joined: Sun Sep 29, 2019 3:58 pm

Using CTAN package in overleaf for Bath Harvard referencing

Post by emmart »

Hello, thanks for your answer
I have tried the code which is in the manual;

Code: Select all

\documentclass[12pt]{report}
\usepackage[square,numbers]{natbib}
\bibliographystyle{bathx}
\begin{document}

my text
\cite{saville2011}

\bibliography{Bibliography} 
%I also tried \bibliography{Bibliography.bib}
\end{document}

In a Bibliography.bib file I created the reference :

@incollection{saville2011,
author = {Saville, Alan},
title = {The Struck Lithic Artefacts},
booktitle = {Shifting sands : links of Noltland, Westray : interim report on Neolithic and Bronze Age excavations, 2007-09},
year = {2011},
editor = {Moore, Hazel and Wilson, Graeme},
series = {Archaeology report (Historic Scotland) ; no. 4},
publisher = {Historic Scotland},
pages = {96-98},
address = {Edinburgh}}




However, I am still getting the errors:
BibTeX I couldn't open style file bathx.bst : \bibstyle{bathx output.aux, line 2 : }
and
Package natbib Warning: Citation `saville2011' on page 1 undefined on input line 29.
So I'm not too sure which mistake I am making here.
Thanks for your time!
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Using CTAN package in overleaf for Bath Harvard referencing

Post by Ijon Tichy »

I have no problem with the example on Overleaf. Maybe your bib filename is wrong. Try the following example:

Code: Select all

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{filecontents*}{\jobname.bib}
@incollection{saville2011,
author = {Saville, Alan},
title = {The Struck Lithic Artefacts},
booktitle = {Shifting sands : links of Noltland, Westray : interim report on Neolithic and Bronze Age excavations, 2007-09},
year = {2011},
editor = {Moore, Hazel and Wilson, Graeme},
series = {Archaeology report (Historic Scotland) ; no. 4},
publisher = {Historic Scotland},
pages = {96-98},
address = {Edinburgh}}
\end{filecontents*}
\documentclass[12pt]{report}
\usepackage[square,numbers]{natbib}
\bibliographystyle{bathx}
\begin{document}
 
my text
\cite{saville2011}
 
\bibliography{\jobname} 
\end{document}
The Overleaf result is:

Image

The only warning message:
LaTeX Warning: File `output.bib' already exists on the system.
               Not generating it from this source.
is expected.

The (downloadable) blg file begins with:
This is BibTeX, Version 0.99d (TeX Live 2018)
Capacity: max_strings=100000, hash_size=100000, hash_prime=85009
The top-level auxiliary file: output.aux
The style file: bathx.bst
Reallocated wiz_functions (elt_size=4) to 6000 items from 3000.
Database file #1: output.bib
You've used 1 entry,
            5153 wiz_defined-function locations,
            884 strings with 6261 characters,
and the built_in function-call counts, 911 in all, are:
So everything is fine.

So I cannot reproduce your problem on Overleaf.

And with my local up-to-date installation of TeX-Live 2019 I got the same PDF result. (As expected, the log and blg differ in "TeX Live 2019" instead of "TeX Live 2018".)
Attachments
resulting bibliography
resulting bibliography
test_20190930_073602.png (13.21 KiB) Viewed 5268 times
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
emmart
Posts: 3
Joined: Sun Sep 29, 2019 3:58 pm

Using CTAN package in overleaf for Bath Harvard referencing

Post by emmart »

Thanks for your answer,
I copied your code and it worked, which I'm still not sure why but thanks a lot!
Post Reply