I'm doing my Ph.D. thesis in latex, but I'm in trouble to split the bibliography between the chapters. I tried a lot of stuff and packages and I get nothing. I don't know what I'm doing wrong. Despite the chapters have differents citations, for some reason, in both chapter's bibliography I have all citations. Please, take an look:
This is my "main.tex" file, wich is the only one that I compile:
Code: Select all
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[brazilian,brazil]{babel}
\usepackage[a4paper,left=4cm,right=3cm,bottom=2.5cm,top=2.8cm]{geometry}
\usepackage{fancyhdr,setspace,float,graphicx,lscape,array,longtable,colortbl,amsmath,amssymb,booktabs,multirow,hyperref,pdfpages,tocloft,titlesec,lipsum,natbib}
\usepackage[sectionbib]{chapterbib}
\renewcommand\cftloftitlefont{\Large\bfseries\hfill}
\renewcommand\cftlottitlefont{\Large\bfseries\hfill}
\renewcommand\cfttoctitlefont{\Large\bfseries\hfill}
\titleformat{\chapter}[display]
{\vspace*{-0.7cm}\bfseries\Huge}
{\filleft{\chaptertitlename}\Huge~\thechapter}
{1ex}
{\titlerule
\vspace{2ex}%
\filright}
[]
%****************************************************************************************************
% Seleção da fonte Palladio
\usepackage[sc]{mathpazo}
\linespread{1.05}
\usepackage[T1]{fontenc}
%****************************************************************************************************
\graphicspath{{imagens/}}
%****************************************************************************************************
\begin{document}
\input{capitulos/introduction}
\input{capitulos/cap02}
\end{document}
This is my "introduction.tex" file:
Code: Select all
\chapter{\sc Um título}
\lipsum[2-2]
Um exemplo de citação \citep{lamport1986latex} .
\begin{figure}[h]
\centering
\caption{Minha figura}
\includegraphics[scale=1.5]{ufv.jpg}
\end{figure}
\section{Seção nova}
\lipsum[2-3]
%%%% Referências do capítulo
\addcontentsline{toc}{section}{Referências Bibliográficas}
\bibliographystyle{apalike}
\bibliography{referencias}
And this is my "chap02.tex":
Code: Select all
\chapter{\sc Título do capítulo}
\lipsum[2-4] \lipsum[1]
\begin{table}[]
\centering
\caption{Minha tabela}
\label{my-label}
\begin{tabular}{lll}
1 & a & s \\ \hline
1 & a & x \\
2 & z & s
\end{tabular}
\end{table}
\section{Seção nova}
\lipsum[2-3]
De acordo com \cite{Rodrigues2016} e \cite{kopka2004guide}.
\addcontentsline{toc}{section}{Referências Bibliográficas}
\bibliographystyle{apalike}
\bibliography{referencias}
And this is what I get:
https://mega.nz/#!2Q5QlQqY!h5hnCWqh99Ej ... SGQXfcanoY
Despite the chapters have differents citations, for some reason, in both chapter's bibliography I have all citations.
Many thanks.