Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with bibliography #30

Open
scienceshaina opened this issue May 14, 2022 · 0 comments
Open

Help with bibliography #30

scienceshaina opened this issue May 14, 2022 · 0 comments

Comments

@scienceshaina
Copy link

scienceshaina commented May 14, 2022

Hi all, I am using this template (which I love, thank you so much for creating it!) but the bibliography page just shows up completely blank. I downloaded my copy of the template a while back so it could be something with an update but I looked through the style sheet and main tex file and I don't really see any differences. In my version of the style sheet I have:

%% Fix the bibliography

\AtBeginDocument{%
\let\base@thebibliography\thebibliography%
\let\endbase@thebibliography\endthebibliography%
%
@ifpackageloaded{biblatex}{%
% Double-space the bibliography entries, according to an interpretation
% of the discussion at
% http://tex.stackexchange.com/questions/13742/what-does-double-spacing-mean
\setlength{\bibitemsep}{\baselineskip}%
% Add entry to TOC
\AtBeginBibliography{%
\addcontentsline{toc}{\toc@section}{\MakeTextUppercase{\bibname}}%
}%
}{%
% Add entry to TOC
\renewenvironment{thebibliography}[1]{%
\begin{base@thebibliography}{#1}%
\addcontentsline{toc}{\toc@section}{\MakeTextUppercase{\bibname}}%
}{\end{base@thebibliography}}%
}%
}

At the end of the main document I have:
\interlinepenalty=10000 % prevent split bibliography entries
\bibliographystyle{umassthesis}
\bibliography{sample} (my file is called sample.bib and I just switched out the contents of it to match umthsmpl.bib)

Also, just to note I'm compiling in Overleaf.

I thought maybe it was because the biblatex package isn't loaded so I added that in the load packages section of the .cls. When I do that it gives these errors at these lines:

\bibliographystyle{umassthesis} --> "Biblatex error: \bibliographystyle is invalid"
\bibliography{sample} --> "can only be used in preamble"

ETA- I fixed it. I kep the load biblatex package line in the .cls and got rid of the bibliography lines at the end of the main tex document. I replaced those two lines with \printbibliography at the end and \addbibresource{sample.bib} right before \begin{document}.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant