1

I'm having a lot of problems with biblatex. I need a reference section per chapter but everytime I compile, I get a bold text with the tag of my reference in the pdf and no reference appears at the end of my chapter.

I attach the main code (yes there are a lot of package and I don't understand if the problem is some incompatibility)

\RequirePackage[hyphens]{url}
\documentclass[a4paper,english,12pt,table]{book}
\usepackage[toc,page]{appendix}
\usepackage{cmap} % makes PDF searchable
\usepackage[english,italian]{babel}
\usepackage[latin9]{inputenc}
\usepackage{lmodern} % Latin Modern font
\usepackage[T1]{fontenc}
\usepackage{textcomp} % needed for fontenc
\usepackage[bookmarksnumbered,final]{easyoutput}
\usepackage{multirow}
\usepackage{layaureo}  
\usepackage{indentfirst}
\usepackage{subfig}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{amsmath, bm}
\usepackage{gensymb}
\usepackage{bigints}
\usepackage{caption}
\usepackage{mwe}
\usepackage{amsfonts}
\usepackage{tabu} 
\usepackage{amssymb}
\usepackage[subfigure]{tocloft}
\usepackage{array,amsmath}          
    \newcolumntype{C}{>{\displaystyle}c}
    \newcolumntype{L}{>{\displaystyle}l}
    \newcolumntype{R}{>{\displaystyle}r}
    \newcolumntype{z}{>{{}}c<{{}}} % for mathbin & mathrel

\usepackage[export]{adjustbox} \usepackage{graphicx} \usepackage{makecell} \setcellgapes{5pt} \usepackage{pdflscape} \usepackage{emptypage}

\usepackage{cancel} \usepackage{rotating} \usepackage{graphicx}

\usepackage{tikz} \usetikzlibrary{spy}

\usepackage{fancyhdr} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt}

\usepackage{geometry} \geometry{text={6.5in,9.5in} ,headheight=30pt } \setcounter{secnumdepth}{3}

\makeindex

\usepackage[backend=biber,style=authoryear,natbib=true]{biblatex} \addbibresource{bibliography.bib}

\newenvironment{abstract} {\cleardoublepage\thispagestyle{empty} \vspace{\stretch{1}} \begin{center}\textbf{\abstractname}\end{center}\bigskip} {\par\vspace{\stretch{2}}\cleardoublepage}

\pagestyle{fancy} \fancyhf{} \fancyhead[LE]{\includegraphics[height=0.03\textheight]{figure/logo1}} \fancyhead[RO]{\includegraphics[height=0.03\textheight]{figure/logo2}} \fancyhead[RE]{\leftmark} \fancyhead[LO]{\rightmark} \fancyfoot[RO, LE] {\thepage}

\usepackage{booktabs} \usepackage{tabularx} \usepackage{tabulary} \usepackage{pbox} \usepackage{tablefootnote}

\usepackage{hyperref} \makeatletter \pdfstringdefDisableCommands{\let(\fake@math} \newcommand\fake@math{}% just for safety \def\fake@math#1){[math]} \makeatother

%%% Style chapters \usepackage[explicit]{titlesec} \newlength\chapnumb \setlength\chapnumb{3cm} \titleformat{\chapter}[block] { \normalfont\sffamily}{}{0pt} { \parbox[b]{\chapnumb}{ \fontsize{120}{110}\selectfont\thechapter} \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{ \raggedleft \hfill{\LARGE#1}\ \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt} } } \titleformat{name=\chapter,numberless}[block] {\normalfont\sffamily}{}{0pt} {\parbox[b]{\chapnumb}{% \mbox{}}% \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{% \raggedleft% \hfill{\LARGE#1}\ \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Title} \author{Author} \date{Year}

\begin{document} \frenchspacing \mainmatter

\cleardoublepage

\selectlanguage{english}

\include{chap1}
\cleardoublepage

\backmatter \medskip

\end{document}

and the chapt1 for example is like this

\begin{refsection}
\chapter{Tracking Principle}\label{principle} \pagenumbering{arabic}
text text bla bla bla
\printbibliography[heading=subbibintoc]
\end{refsection}

while bibliography.bib is like this

@manual{itu_radio_regulations,
    editor="International Telecommunication Union",
    title = "Radio Regulations Volume 1",
    organization = "International Telecommunication Union",
    address = " Geneva, Switzerland",
    year = "2016"
}

I use Texstudio as editor. Not sure if it is important. I tried to follow a lot of already answered question about this problem but still I cannot solve it. I typically used bibtex but I saw that it is quite hard to have per-chapter bibliography with this so I tried biblatex

moewe
  • 175,683
Shika93
  • 371
  • 1
    Unrelated but don't use the tabu package, it is broken. And don't reset the page number in every chapter with \pagenumbering{arabic}, hyperref won't like that at all. Apart from this: when you have such problems, you should create a small test document in another folder, without all this packages and try there to get it working first. – Ulrike Fischer Aug 11 '21 at 12:24
  • 1
    You will have to compile your example with Biber and not with BibTeX. If you previously worked with BibTeX your editor is most likely still set up for BibTeX. Have a look at https://tex.stackexchange.com/q/154751/35864 to make your editor run Biber for you. If that does not help, you have a much better chance of getting help quickly, if you can share a small example document instead of your full preamble (https://tex.meta.stackexchange.com/q/228/35864). ... – moewe Aug 11 '21 at 15:29
  • 1
    ... It also helps to test your setup first with a small documents like https://gist.github.com/moewew/a021a93fe5c2eca195a47991798fc0c4 and https://gist.github.com/moewew/cd18e3277fe1457d55963be5005c816f before you try things in your big and complex document. (Both of the example documents I posted can be run exactly as is without any modification. The .bib file biblatex-examples.bib that is used in the example is installed on all systems with biblatex and is automatically found by Biber. This means that if the examples don't work for you, it is because of your workflow/editor setup.) – moewe Aug 11 '21 at 15:33
  • I knew it was a stupid problem...Thank you moewe, I solved simply changing in Texstudio's options BibTeX to Biber as you suggested and now everything is working. I just had to recompile and for each chapter I get its bibliography. Also thank you Ulrike Fischer, I will take care of your suggestions. – Shika93 Aug 11 '21 at 18:10

0 Answers0