1

I'm new (i.e. today!) to LaTex, and am assembling resources for a .bib file using the BibTex online editor (with the help of my more LaTex-savvy partner).

There's no entry category for online articles and resources, so after some research the advice seems to be either use a url field in @MISC, @ARTICLE or @ELECTRONIC. I also found two articles that suggest using @ONLINE, but this seems like an outlier and I'm not sure if it's widely supported?

I've already noticed that the LaTex community can offer varying solutions to a single problem, so I need to know the simplest and—if it exists—the canonical way to cite online sources, with a field for 'last accessed'.

Update

Here's my @ONLINE template (formatting borrowed from the online editor mentioned above):

@ONLINE {refkey,
    author    = "",
    title     = "",
    publisher = "",
    month     = "",
    year      = "",
    url       = "http://",
    urldate   = "YYYY-MM-DD"
}
  • 1
    package biblatex knows @online. It is superior to all the bibtex enhancements and citation packages introduced in the last 20 years. – Johannes_B Aug 30 '15 at 17:52
  • Thanks. Is there a guide to which fields to use for @online (e.g. urldate for last accessed), or can these be any of the available BibTeX fields? – Dave Everitt Aug 30 '15 at 17:54
  • 1
    The documentation of the package (texdoc biblatex) lists them all. Also available: texdoc.net and search for biblatex – Johannes_B Aug 30 '15 at 17:56
  • If you want to post these comments as an answer, I'll mark it 'accepted', as I now have the solution I needed. – Dave Everitt Aug 30 '15 at 17:59
  • 1
    Biblatex documentation, p.10. You also can automate using JabRef a bibliography manager written in Java. If you enable the biblatex mode, it will present you automatically all the mandatory and optional fields. Btw, you should compile your bibliography with biber, which has among other advantages that of understanding utf8. – Bernard Aug 30 '15 at 18:00
6

Over the years, many packages have been written to do some special bibliography stuff. Urls and DOIs became prominent over the years, and some bibliographystyles have added features to actually cite online material.

With biblatex we have a modern package that tries to implement all the functunality of the various packages in just one LaTeX package. It provides a dedicated entrytype for online resources.

Citing the package documentation, version 3.0:

online An online resource. author, editor and year are omissible in terms of § Missing and Omissible Data This entrytype is intended for sources such as web sites which are intrisically online resources. Note that all entry types support the url field. For example, when adding an article from an online journal, it may be preferable to use the @article type and its url field.

Required fields: author/editor, title, year/date, url

Optional fields, subtitle, titleaddon, language, version, note, organization, date, month, year, addendum, pubstate, urldate

If you have the freedom to choose biblatex over any other citation package, feel lucky. On the other hand, contributing to a journal can be a problem. Why update a workflow that is working?

Most journals still use BibTeX with classical bibliography styles. As biblatex was adding new features, not everything in a database will be reusable. Thinking about this at the beginning will save you some trouble later.

  • 1
    Since it looks like the OP has marked this as the canonical answer, it may be a good idea to add a bit more information regarding the first paragraph. Not everyone is free to use biblatex, after all... – Mico Aug 30 '15 at 18:58
  • @Mico Please undelete your answer, i was hoping for an alternative answer using natbib/apacite. I'll add a paragraph where biblatex isn't the way to go, i .e. journal publications. – Johannes_B Aug 30 '15 at 19:20
5

You haven't indicated which bibliography style you intend to use. Is that because you haven't decided yet which style, or styles, you'll employ?

BibTeX has been around for well more than two decades. The original BibTeX style files -- plain, unsrt, alpha, apalike, and a couple more -- all date back to an era when online resources didn't exist and thus weren't going to be cited. Unsurprisingly, these style files don't accommodate online material all that well. If, for some reason, you must use one of the original BibTeX style files, you're going to have to follow the path you've already identified, viz., use the note field of various entry types to store the relevant URL strings.

If you can use the natbib citation management package, you should use that package's associated style files -- plainnat, unsrtnat, and alphanat -- instead of plain, unsrt, and alpha. Being of a much more recent vintage, the natbib style files do know what to do with fields named url, eid, and issn.

Still working with BibTeX, the apacite package and its associated style file (also called apacite) offer even more entry types and fields types for each entry, many of them related to online and other electronic features. Do check out table 3 of the package's user guide for detailed information on which fields are recognized by which entries. E.g., you'll find that doi, lastchecked, url and urldate fields are recognized by all of the package's entry types (with the exception of the literal type, with which I'm not familiar).

For the ultimate (at least for now) in terms of power and flexibility when it comes to bibliography creation and management, do consider switching to the biblatex package. It's still in development, so things may at times not be as utterly stable as they are in the BibTeX world. (One of the downsides of BibTeX, some would say, is its utter stability -- and immobility.) Unfortunately, because biblatex is still relatively new, many journals and publishing houses that accept LaTeX documents as inputs will not run biblatex. Thus, it may be a good idea to incorporate at least some backward compatibility in your bib files, so that you can generate, if need be, bibliographies using either BibTeX or biblatex.

  • Thanks. chat.stackexchange.com/transcript/message/23766435#23766435 and the next from me. Feel free to make as many improvements as possible. :-) – Johannes_B Aug 30 '15 at 19:44
  • oh, good luck with that :-) See you in chat some time. – Johannes_B Aug 30 '15 at 19:53
  • @Mico - I haven't chosen a bibliography style, and the answer from Johannes_B settled the issue that was holding me up in a very direct and understandable manner (I just started with LaTeX today). But that's useful info - I'll look up the references and hopefully emerge with a durable solution. – Dave Everitt Aug 30 '15 at 20:28

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.