I am using TeXworks with pdfLaTeX and BibTeX. When compiling my document, the order is:

  1. pdfLaTex
  2. BibTeX
  3. pdfLaTeX
  4. pdfLaTex

So far, I've been able to do this successfully for book sources. However, I am having trouble doing the same for online sources. I want to cite the following page: https://www.atnf.csiro.au/outreach/education/senior/astrophysics/stellarevolution_postmain.html.

Here is part of my References.bib file:

    title = {Post-Main Sequence Stars},
    author = {Australia Telescope National Facility},
    note = {Accessed: 14-11-2021},
    year = {2021},
    month = {Jul}

The issues that I'm facing here are:

  • including the url as url = https://www.atnf.csiro.au/outreach/education/senior/astrophysics/stellarevolution_postmain.html causes a "citation not found" error in my IDE
  • with the url removed, it is taking the title as a name, i.e. "Facility, A. T. N."

I am using APA referencing.

How do I set this up correctly?

  • The details of the best solution will depend on the exact bibliography style you use. (The argument of \bibliographystyle.) In particular not all BibTeX styles support URLs (in the same way). (url = https://www.atnf.csiro.au/outreach/education/senior/astrophysics/stellarevolution_postmain.html would be wrong in any case. url = {https://www.atnf.csiro.au/outreach/education/senior/astrophysics/stellarevolution_postmain.html}, would be correct syntax, but it depends on the style if it shows as expected.)
    – moewe
    Nov 14 at 12:29
  • For the author field you need to add an additional pair of braces: author = {{Australia Telescope National Facility}}, otherwise BibTeX tries to parse the name as the name of a person (with first and last name). See tex.stackexchange.com/q/10808/35864
    – moewe
    Nov 14 at 12:30
  • Using the curly extra set of curly braces inside the author field solved the name problem. However, putting the url inside curly braces yields a "missing $ inserted error".
    – Al2110
    Nov 14 at 12:39
  • The "missing $ error" can only be properly investigated if you can share with us which bibliography style you use. It may or may not help to load \usepackage{url} or \usepackage{hyperref} (the latter will load the former, so there is generally no pint in loading both packages).
    – moewe
    Nov 14 at 12:50
  • 1
    Did you try adding \usepackage{url} or \usepackage{hyperref} to your preamble? In a small test document I just tried that helped. If it does not help, I'm afraid you will have to share an example document that reproduces the error with as little code as possible, so we can see exactly what is going on at your end.
    – moewe
    Nov 14 at 21:27

I found solutions to the two problems, as follows:

  • the author name needed an extra set of curly braces inside:
author = {{Australia Telescope National Facility}}
  • the url problem required importing the url package:
  • 1
    Welcome to TeX.SE! Can you please add a short compilable TeX code showing your solution for a fast proof?
    – Mensch
    Nov 15 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.