1

I'm a newbie to bibliography styles in Latex, I'm trying to print out a bibliography, which should look this

title, url, year

Right now, though, it looks like

title, year, url

My bib file looks like this:

@article{gleichtaktdrossel,
  title={{Funktionsweise einer Gleichtaktdrossel}},
  note = {URL: \url{http://www.richtek.com/~/media/Richtek/Design%20Support/Technical%20Documentation/AN008/EN/Version6/image002.gif?file=preview.png}},
  year={2008},
}

If I don't mention a url in the bib file the year is printed out at the end of the sentence.

  • Welcome to TeX SX! Would you mind posting a full compilable code? – Bernard Dec 3 '16 at 15:25
  • Assuming you're using BibTeX, the formatting of bibliographic entries is determined by the chosen bibliography style. Which bibliography style does your document employ? – Mico Dec 3 '16 at 15:32
  • Are you really using the entry type @article for the entry at hand? You must be getting warnings about missing fields, right? Have you considered using the entry type @misc instead? – Mico Dec 3 '16 at 15:34
  • Im using texmaker and there im including the bib files. I don't get any warning about missing fields :) – s kop Dec 4 '16 at 12:20
1

I think you're making two mistakes. Nothing calamitous, for sure, just ordinary rookie mistakes which can happen while generating formatted bibliographies.

  • You should not be using the entry type @article for the entry at hand. The @article type is meant for pieces that were published in journals. You have probably been getting warning messages from BibTeX -- which you may or may not have been ignoring, that some entries were missing required fields. For the @article type, fields named author and journal are required. You should probably be using the @misc entry type instead for the entry at hand.

  • Once you've switched to the @misc entry type, you should also change the name of the field that contains the URL from note to howpublished: In most bibliography styles I'm familiar with, the material in the year field is placed after the material contained in the howpublished field. (As you've discovered, material in a field named note tends to be placed at the very end.)

The following example uses the plainnat bibliography style and the natbib citation management package. The ordering of the fields -- title before howpublished before year -- is the same in many other bibliography styles.

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@misc{gleichtaktdrossel,
  title={{Funktionsweise einer Gleichtaktdrossel}},
  howpublished = {URL: \url{http://www.richtek.com/%7E/media/Richtek/Design%20Support/Technical%20Documentation/AN008/EN/Version6/image002.gif?file=preview.png}},
  year={2008},
}
\end{filecontents}

\documentclass{article}
\usepackage{url}
\usepackage[numbers,square]{natbib}
\bibliographystyle{plainnat}

\begin{document}
\cite{gleichtaktdrossel}
\bibliography{mybib}
\end{document}

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.