1

I am getting started with BibTeX using this tutorial.

My TeX-File:

% !TeX program = luatex
\documentclass[12pt]{article}

% format font & encoding
\usepackage[onehalfspacing]{setspace}
\usepackage{fontspec}
\setmainfont{Arial}

% Babel & adjusted Titles
\usepackage[german]{babel}

% for figures
\usepackage{graphicx}  

% for adjusting the figure-position
\usepackage{float}

\begin{document}


%some content stuff

\nocite{*}
\bibliography{foo} 
\bibliographystyle{ieeetr}

\end{document}

My foo.bib-file so far:

@misc{luaAbout,
     title={the programming language lua}, 
     url={https://www.lua.org/about.html}, 
     journal={The Programming Language Lua}
 }

This is what was in my .bbl-file:

\begin{thebibliography}{1}

\end{thebibliography}

It looks like the .bbl-file would not be filled properly (this is not the first time I tried to work with BibTeX and had problems with the .bbl-file), what did I do wrong? I am using TeXstudio btw.

Edit:

I deleted the .bbl-file and compiled again. The new output was the following:

\begin{thebibliography}{1}

\bibitem{luaAbout}
``the programming language lua.''

\end{thebibliography}

Now I am still missing the url-tag. Are there problems converting it for BibTeX?

  • 2
    Please clarify what you mean by the bbl not being filled properly. The journal field is only meaningful for entries of type @article; for sure, the journal field is ignored for entries of type @misc, which is BibTeX's "catch all" entry type. – Mico Jul 14 '18 at 17:27
  • @Mico My problem was that my .bbl file was empty (as written above). Now I updated my question (there is content now, after I deleted the old .bbl-file). Sadly I am missing the url and journal tags. Since you just told me, that journal is ignored, i am just missing the url. Are there also problems with it? – Rüdiger Jul 14 '18 at 17:35
  • 2
    if and how url can be handled depends on the bibliographystyle. ieeetr.bst is quite old and I found no mention of url in it. Consider if you want to use the more modern biblatex/biber. Beside knowing url it can also handle unicode/utf8 much better than bibtex. – Ulrike Fischer Jul 14 '18 at 17:41
  • 1
    The ieeetr bibliography style, as already mentioned by @UlrikeFischer, is very old. In fact, it dates back to the early 1990s, a time when URLs were unknown to anyone except a few intrepid folk at CERN -- any even they almost certainly didn't dream about providing URL strings in a bibliographic entry. But then, why are you using the ancient ieeetr bib style? Have you considered using a more modern bib style such as IEEEtran? – Mico Jul 14 '18 at 17:53
  • 1
    Incidentally, the first line of your sample code, % !TeX program = luatex, should almost certainly be % !TeX program = lualatex. For sure, the plain-LuaTeX compiler will choke when it encounters the \documentclass instruction. – Mico Jul 14 '18 at 18:09
1

I wouldn't use the positively-ancient ieeetr bibliography style. That particular bibliography style has been around since the very beginnings of BibTeX in the 1980s. ieeetr was last updated meaningfully in the early 1990s, a time when nobody thought about including URL strings in bibliographic entries -- assuming, of course, that they had even heard about this new-fangled thing called a URL.

The newer IEEEtran bibliography style is programmed not to ingnore url fields for most entry types.

The entry type @misc is BibTeX's catch-all entry type. One thing it does not process is fields of type journal. The only BibTeX entry type that does anything with the journal field is called @article; it is meant to be use for pieces that were published in scholarly journals.

Here's a revised version of your sample code, along with its output.

enter image description here

% !TeX program = lualatex

\RequirePackage{filecontents}
\begin{filecontents}{foo.bib}
@misc{luaAbout, 
     title={About {Lua}},
     url  ={https://www.lua.org/about.html}, 
     year =2016,
}
\end{filecontents}

\documentclass[12pt]{article}

% font handling
\usepackage{fontspec}
\setmainfont{Arial}

% Babel & adjusted titles
\usepackage[german]{babel}

% for figures
\usepackage{graphicx}  

% for adjusting the figure-position
\usepackage{float}

% for typesetting URLs
\usepackage[hyphens,spaces]{url}

% choose a bibliography style
\bibliographystyle{IEEEtran}

% other packages
\usepackage[onehalfspacing]{setspace}

\usepackage[colorlinks,allcolors=blue]{hyperref}

% finally, the 'document' environment and its contents
\begin{document}
\cite{luaAbout}
\bibliography{foo} 
\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.