0

I'm writing a project in LaTex, and when I'm inserting a reference, it will not work. The name I named in the bib-file only gets into the pdf in bold.

Here is my code:

\usepackage[backend=biber,style=authoryear,autocite=inline]{biblatex}
\usepackage[style=numeric,sorting=none]{biblatex}
\addbibresource{Bibliography.bib}
\usepackage[labelfont={bf, it}]{caption}
\captionsetup{font=footnotesize, textfont=it}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{float}
\usepackage[normalem]{ulem}
\useunder{\uline}{\ul}{}
\usepackage[T1]{fontenc} 
\usepackage[table,xcdraw]{xcolor}
\usepackage{multicol}
\usepackage{adjustbox}
\usepackage{array}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage{tabu}
\usepackage{rotating}
\usepackage{amsmath}
%\usepackage[table,xcdraw]{xcolor}
\usepackage[a4paper, total={6in, 9in}]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[L]{\fontsize{10}{12}}
\linespread{1.5}
\usepackage{times}
\usepackage[none]{hyphenat}
\sloppy
\usepackage{hyperref}
\usepackage[utf8]{inputenc}

And my bib-file looks like this:

@article{t,
  title = {Technological Aspects of β-Carotene Production},
  journal = {Food and Bioprocess Technology},
  volume = {4},
  number = {5},
  pages = {693-701},
  year = {2011},
  issn = {19355149, 19355130},
  author = {Ribeiro, Bernardo Dias and Barreto, Daniel Weingart and Coelho, Maria Alice Zarur}
}

And then the t will appear in the pdf in bold, when I use ~autocite{t}. Furthermore in my main I entered: \printbibliography[title={Bibliography}]

  • 1
    have you run biber to generate the bibliography? – David Carlisle Jun 19 '19 at 8:23
  • @DavidCarlisle How do you do that? – Line Jun 19 '19 at 8:28
  • Welcome to TeX SX! Just run from the command line biber name-of-you-tex-file. But there's probably a simpler way from your editor (the details depend on the editor). The normal cycle is (pdf)latex -> biber -> pdflatex (twice). – Bernard Jun 19 '19 at 9:03
  • The preamble snippet loads biblatex twice with conflicting options. This should produce an error. You should load the package only once. More generally, the preamble loads a lot of packages. Do you need all of them? Do you know why you load each package? I also find the loading order of some of the packages a bit unusual, but you should probably be fine as long as hyperref is loaded last (as it is at the moment). – moewe Jun 19 '19 at 15:56
  • If you are having trouble running Biber have a look at tex.stackexchange.com/q/154751/35864 and maybe tex.stackexchange.com/q/63852/35864 for some background. – moewe Jun 19 '19 at 15:57
1

The first two lines of the preamble snippet will produce the error

! LaTeX Error: Option clash for package biblatex.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

This is the typical message you get when you load a package twice with conflicting options. In general it is best to avoid loading packages multiple times.

Replace

\usepackage[backend=biber,style=authoryear,autocite=inline]{biblatex}
\usepackage[style=numeric,sorting=none]{biblatex}

with a single \usepackage instruction loading biblatex with the desired options. Say

\usepackage[backend=biber, style=authoryear]{biblatex}

After you have fixed the preamble you should remove the temporary files (.aux, .bbl, .bcf, ...) and re-compile with LaTeX, Biber, LaTeX, LaTeX. See Question mark or bold citation key instead of citation number and Biblatex with Biber: Configuring my editor to avoid undefined citations for help on getting your editor to run Biber for you. Troubleshooting for biber can be an entry point to troubleshoot simple Biber issues.


With that error resolved, you might get a second error when you cite the entry t with pdfLaTeX

! Package inputenc Error: Unicode character β (U+03B2)
(inputenc)                not set up for use with LaTeX.

The raw β in the title can not be handled by inputenc by default. This is not an issue if you use a Unicode engine (XeLaTeX or LuaLaTeX). With pdfLaTeX you could help LaTeX along with

\DeclareUnicodeCharacter{03B2}{\ensuremath{\beta}}

or using the textgreek package

\usepackage{textgreek}
\DeclareUnicodeCharacter{03B2}{\textbeta}

MWE

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=authoryear]{biblatex}

\usepackage{textgreek}
\DeclareUnicodeCharacter{03B2}{\textbeta}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{t,
  author  = {Ribeiro, Bernardo Dias and Barreto, Daniel Weingart
             and Coelho, Maria Alice Zarur},
  title   = {Technological Aspects of β-Carotene Production},
  journal = {Food and Bioprocess Technology},
  volume  = {4},
  number  = {5},
  pages   = {693-701},
  year    = {2011},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}


\begin{document}
\cite{sigfridsson,t}
\printbibliography
\end{document}

Bibliography

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.