OthersOverleaf Citations not working

Information and discussion about other TeX distributions not listed above; installation, administration; field reports
Post Reply
late2latex
Posts: 1
Joined: Fri Nov 22, 2019 11:12 am

Overleaf Citations not working

Post by late2latex »

Hi, I am working on my thesis and am using a class that was written by the graduate studies office of my Uni. The problem, however, is that it is sorta compatible with Overleaf. I have three issues here with my project.

1. The main thesis citations index started from where the paper citation index ended instead of starting over from one again.

2. Citing multiple authors is not being printed in [1-2] format, it is instead in [1,2] format, which I do not want.

3. The .bib files with the bibliography are unresponsive. Only the \bibitem is working.
I am using the following packages to get started.

Code: Select all

\documentclass[times,12pt,titlepage]{mstogs}
\doublespacing
 % ... additions to ptotemplate ...
\usepackage[numbers,square,sort&compress]{natbib} % ... authoryear or numbers ...
%\setlength{\bibhang}{0.5in}
\usepackage{docmute}
\usepackage{siunitx}
\usepackage{graphicx}
\usepackage{url}
\usepackage[nopar]{lipsum}
\usepackage{threeparttable}
\usepackage{psfrag}
%\usepackage{cite}
\usepackage{threeparttable}
\usepackage[noprefix]{nomencl}
\makenomenclature
\usepackage[sectionbib]{chapterbib}

\bibliographystyle{mstogs}
Any help would be appreciated. Thank you.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Overleaf Citations not working

Post by kaiserkarl13 »

I don't know if I actually understanding point #1, but I suggest you read the chapterbib documentation: if you want references on a per-chapter basis, they SHOULD start over, but you'll need to load it and read the parts about use with natbib. If you want a global bibliography, you need [rootbib] (see documentation). You might have to reset the counter yourself when using natbib; I used code like this once upon a time:

Code: Select all

\@ifpackageloaded{natbib}{
  \let\newchapter\chapter
  \renewcommand{\chapter}{\setcounter{NAT@ctr}{0}\newchapter}
}
The style [1,2] is normal; you would only put a range with [1-3] (instead of [1,2,3]), which is what "sort&compress" is for.

What does "The .bib files with the bibliography are unresponsive. Only the \bibitem is working" mean? Note that "\bibitem" is used by the thebibliography environment, which BibTeX generates for you based on the .aux and .bib files. You should either be writing your bibliography inside the thebibliography environment (i.e., manually) or generating it with BibTeX, not both.

In the future, try to reproduce the problem you're having using one of the standard classes, then post a Infominimal working example.
User avatar
EnriqueVilla
Posts: 20
Joined: Thu Jun 26, 2025 10:31 pm

Re: Overleaf Citations not working

Post by EnriqueVilla »

Sounds frustrating! Your issues likely come from the custom mstogs class conflicting with Overleaf’s defaults. For the citation numbering, try resetting the counter manually before the thesis part. For [1-2] formatting, natbib should handle it—but double-check that sort&compress is working with your .bst file. And if .bib isn’t working, make sure \bibliography{yourfile} is included and that your project is set to use bibtex or biber, not just \bibitem. Sometimes class files override things silently.
Post Reply