Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have in the preamble:

\documentclass{article}
\usepackage{amssymb,amstext,amsmath,latexsym,mathtools}
\usepackage[italian,british]{babel}
\usepackage{pdfpages}
\usepackage[utf8,latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}        
\usepackage{cmbright}
\usepackage{setspace}
\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage[style=authoryearcomp,firstinits=true,maxcitenames=2,maxbibnames=99]{biblatex}
\DeclareNameAlias{sortname}{last-first}
\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}
\renewcommand*{\multinamedelim}{\addcomma\space}
\renewcommand*{\finalnamedelim}{\addcomma\space}
\renewbibmacro{in:}{}
\addbibresource{trybib.bib}

\nocite{*}

I get these two errors:

conflicting options
'firstinits' conflicts with'uniquename=true'

and

Data encoding is 'latin1'
Use backend=bibtex8 or backend=biber

I need all these packages, how can I fix these errors?

share|improve this question
    
i dont think you can use two input encoding latin1 and utf8. \usepackage[style=authoryearcomp,firstinits=true,maxcitenames=2,maxbibnames=99]{‌​} , there is closing square bracket ']' missing probably. –  texenthusiast Jun 26 '12 at 18:16
3  
@texlearner A tip: You can use backticks ` to mark your inline code in comments as well as in posts. –  doncherry Jun 26 '12 at 18:18
    
@texlearner: Also, inputenc is for the input encoding (of your .tex file), fontenc would be for the font encoding. –  doncherry Jun 26 '12 at 18:19
    
@texlearner I have the same problem if I use just either 'latin1' or 'utf8'. I have to fix the options; I am trying to know how –  Aya Jun 26 '12 at 18:33

1 Answer 1

up vote 9 down vote accepted

I just had to do some sorting and cleaning up,
the following questions are probably relevant for you:

After that, I only had to do what biblatex was suggesting.
The following should compile without warnings/errors.
Please note the comments.

\documentclass{article}
\usepackage{amssymb,amstext,amsmath,latexsym,mathtools}  % do you really need all?
\usepackage{pdfpages}  % you had that package twice
\usepackage{setspace}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}  % use utf8 for all files
\usepackage[italian,british]{babel}   
\usepackage{cmbright}  % needs the cm-super package to be installed
% \usepackage{lmodern}  % try this one instead of cm-bright + cm-super

\usepackage[autostyle]{csquotes}     
\usepackage[
    backend=biber,  % run biber.exe instead of bibtex.exe
    style=authoryear-comp,
    firstinits=true,
    uniquename=init,  % this option is compatible with firstinits
    maxcitenames=2,
    maxbibnames=99
]{biblatex}
\DeclareNameAlias{sortname}{last-first}
\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}
\renewcommand*{\multinamedelim}{\addcomma\space}
\renewcommand*{\finalnamedelim}{\addcomma\space}
\renewbibmacro{in:}{}
\addbibresource{biblatex-examples.bib}

\usepackage{hyperref}  % hyperref should usually be the last package
\hypersetup{
    colorlinks=true
}

\begin{document}
Lorem ipsum, dolor sit amet \cite{kastenholz}.
At vero utilisam \cite{bertram}.
\printbibliography
\end{document}
share|improve this answer
    
Thank you very much. Yes without any errors, but the citation does not display! I am trying to get it right, then will tell you. Thank you –  Aya Jun 26 '12 at 22:44
    
excuse me, should I compile with bibtex filename.aux or biber filename.aux? –  Aya Jun 26 '12 at 23:57
    
biber actually operates on the .bcf file, so you should use that file extension or, even better, just use no file extension at all. –  matth Jun 27 '12 at 7:25
    
Thank you very much indeed. Now it worked.. –  Aya Jun 27 '12 at 12:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.