I am using TeXworks with pdfLaTeX and BibTeX. When compiling my document, the order is:
- pdfLaTex
- BibTeX
- pdfLaTeX
- 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:
@misc{atnf_21,
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.htmlcauses a "citation not found" error in my IDE - with the url removed, it is taking the
titleas a name, i.e. "Facility, A. T. N."
I am using APA referencing.
How do I set this up correctly?
\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.htmlwould 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 '21 at 12:29authorfield 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 https://tex.stackexchange.com/q/10808/35864 – moewe Nov 14 '21 at 12:30authorfield solved the name problem. However, putting the url inside curly braces yields a "missing $ inserted error". – Al2110 Nov 14 '21 at 12:39$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 '21 at 12:50\bibliographystyle{apacite}. – Al2110 Nov 14 '21 at 19:50\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 '21 at 21:27