1

I am using the commands \bibliography{reference.bib}{} and \bibliographystyle{apa} to have references in APA style, where references.bib is the folder in which I have all my references. These references are articles (@article{...}), books (@book{...} and websites (@misc{...}). However, Latex first sorts the websites alphabetically and then the books and articles alphabetically. I want to have latex order these all together alphabetically. How can I do this?

A part of my reference.bib folder:

@misc{BM19,
  title = {Neighbourhood Monitor (Buurtmonitor) 2019},
  howpublished = {\url{https://s-hertogenbosch.buurtmonitor.nl/}},
  note = {Accessed: 2019-05-06}

@misc{CBS19,
  title = {The Central Agency for Statistics (CBS) 2019},
  howpublished = {\url{https://www.cbs.nl/nl-nl/dossier/nederland-regionaal/wijk-en-buurtstatistieken/kerncijfers-wijken-en-buurten-2004-2018}},
  note = {Accessed: 2019-05-06}

@article{kozak2009strong,
  title={What is strong correlation?},
  author={Kozak, Marcin},
  journal={Teaching Statistics},
  volume={31},
  number={3},
  pages={85--86},
  year={2009},
  publisher={Wiley Online Library}
}

@book{hill2012,
  title={Principles of econometrics},
  author={Hill, R Carter and Griffiths, William E and Lim, Guay C and Lim, Mark Andrew},
  volume={5},
  year={2012},
  publisher={Wiley Hoboken, NJ}
}
  • 1
    can you show a few bib entries how you enter your websites? – lulu Jul 11 '19 at 10:23
  • 1
    Please add them as text – lulu Jul 11 '19 at 10:34
  • I added it as text! – Luuk van Gasteren Jul 11 '19 at 10:36
  • The apa.bst available from http://mirrors.ctan.org/biblio/bibtex/contrib/misc/apa.bst hasn't been updated since 1992 and is adapted from apalike.bst. I doubt that it implements the current APA requirements. If you want real APA style, you should look into biblatex-apa or apacite. – moewe Jul 11 '19 at 10:37
  • I couldn't test the entries right now for lack of a proper MWE(B) (see https://tex.meta.stackexchange.com/q/228/35864 and https://tex.meta.stackexchange.com/q/4407/35864), but I notice that your @misc entries don't have an author. I'd expect to sort apa.bst by author, year and title. Maybe a missing author field is a problem here. – moewe Jul 11 '19 at 10:39
  • 3
    there is also a } missing after all the misc entries – lulu Jul 11 '19 at 10:41
  • 1
    You should also add a . after initials in name fields: author={Hill, R. Carter and Griffiths, William E. and Lim, Guay C. and Lim, Mark Andrew}, – moewe Jul 11 '19 at 10:43
  • Indeed, the problem is in the fact that websites do not have an author. I added authors and indeed it works. However, when I for example add as author author={Municipality New York} it shows York, M.N. How can I undo this abbreviation in @misc? – Luuk van Gasteren Jul 11 '19 at 11:04
  • The field volume=5 in the hill2012 entry is wrong; it should be edition=5. – Mico Jul 11 '19 at 11:07
  • Standard question for double braces with corporate authors like Gemeente 's-Hertogenbosch (author = {{Gemeente 's-Hertogenbosch}},): https://tex.stackexchange.com/q/10808/35864 – moewe Jul 11 '19 at 14:12

2 Answers2

1

Adding author fields to the @misc entries will allow for them to also be sorted alphabetically, based on the used author names. This would also allow you to use the title field for the actual title of the webpage you link to.

When websites are written by organisations, rather than specific authors with the standard setup of surnames and initials, it will be desirable to ensure that the organizations are written precisely as provided in the author fields, with no extra formatting. This can be done by wrapping them inside an extra set of curly braces.

For example, I would write the second entry from your question as:

@misc{CBS19,
  title = {Kerncijfers wijken en buurten 2004-2018},
  author = {{The Central Agency for Statistics (CBS)}}
  howpublished = {\url{https://www.cbs.nl/nl-nl/dossier/nederland-regionaal/wijk-en-buurtstatistieken/kerncijfers-wijken-en-buurten-2004-2018}},
  note = {Accessed: 2019-05-06},
  year = {2019}
}

Note the double set of braces in author = {{The Central Agency for Statistics (CBS)}}. The inner set of braces ensures that that is written out exactly as you spelled it (including uppercase and lowercase letters) in the bibliography.

1

If you want to have the bib entries sorted by author(s) and publication year, you must make sure that all entries have author (or editor) and year fields. Currently, several entries are missing one or both fields. Thus, don't be surprised if they aren't sorted by the author and year fields.

It shouldn't be difficult to come up with plausible values for those fields, even for webpages.

If you have a "corporate" author, such as author={Municipality New York}, be sure to encase the field in an extra pair of curly braces in order to keep BibTeX from parsing the name as being that of a person with given names "Municipality" and "New" and surname "York". I.e., you need to write author={{Municipality New York}}.

For the book by Hill et al, both the volume and publisher fields are plain wrong. You should (a) change volume = 5 to edition = 5 and (b) break up the information in the publisher field into two separate fields, publisher and address:

publisher = "Wiley",
address   = "Hoboken, NJ",

Here, then, is how I would re-work the four entries; you are obviously free to tweak some of the choices I had to make.

@misc{BM19,
  author       = "{'s-Hertogenbosch Administration}",
  title        = "{'s-Hertogenbosch Neighbourhood
                   Monitor ({Buurtmonitor})}",
  year         = 2019,
  howpublished = "\url{https://s-hertogenbosch.buurtmonitor.nl/}",
  note         = "Accessed: 2019-05-06",
} 

@misc{CBS19,
  author       = "{Dutch Central Agency for Statistics
                  (CBS)}",
  title        = "Kerncijfers wijken en buurten
                  2004--2018",
  year         = 2019,
  howpublished = "\url{https://www.cbs.nl/nl-nl/dossier/nederland-regionaal/wijk-en-buurtstatistieken/kerncijfers-wijken-en-buurten-2004-2018}",
  note         = "Accessed: 2019-05-06",
} 

@article{kozak2009strong,
  title        = "What is strong correlation?",
  author       = "Kozak, Marcin",
  journal      = "Teaching Statistics",
  volume       = 31,
  number       = 3,
  pages        = "85--86",
  year         = 2009,
  publisher    = "Wiley Online Library",
} 

@book{hill2012,
  title        = "Principles of Econometrics",
  author       = "Hill, R. Carter and Griffiths, William
                  E. and Lim, Guay C. and Lim, Mark
                  Andrew",
  edition      = 5,
  year         = 2012,
  publisher    = "Wiley",
  address      = "Hoboken, NJ",
}
Mico
  • 506,678