0

Before I came here and ask for help I really really searched a lot. I saw a lot of similar questions like this but none of them helped me to solve my problem.

Here's my problem: I have a main.tex file and on this file I \input 3 other .tex files which are chapters from my document. I have a global bib file. At the end of each chapters.tex I need to add the bibliography used on it. Any help on doing this? I appreciate all help here.

The example below is not my original files but the structure is similar.

This is the main.tex:

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Runnig Example}
\author{Example}
\date{June 2020}

\usepackage[alf]{abntex2cite}
\usepackage{bibunits}
\defaultbibliography{tese}

\begin{document}

\maketitle

\input{./tex/cap_1}
\input{./tex/cap_2}

\bibliography{tese}

\end{document}

this is the cap_1.tex:

\chapter\huge{Here is the Chapters Name}
\label{cap:intro}

\begin{bibunit}

\section{Section - Introduction}

Let's cite one author here \cite{Liu2012}

After cite the first author here should only show the bibliography for those authors used on this chapter.

\putbib[tese]
\end{bibunit}

this is the cap_2.tex:

\chapter\huge{Chapters 2}
\label{cap:2}

\begin{bibunit}

\section{Section - 2}

Let's cite one author here \cite{Becker2013}

After cite the second author here should only show the bibliography for those authors used on this chapter.

\putbib[tese]
\end{bibunit}

And this is the Bibtex tese.bib:

@INPROCEEDINGS{Becker2013,
  key          = {Becker2013},
  author       = {Karin Becker and Diego Tumitan},
  year         = {2013},
  title        = {Introdução à mineração de opiniões: conceitos, aplicações e desafios},
  booktitle    = {SIMPÓSIO BRASILEIRO DE BANCO DE DADOS - SBBD, 28., 2013},
  address      = {Recife - PE}
}

@book{Liu2012, 
author = {Liu, Bing}, 
title = {Sentiment Analysis and Opinion Mining}, 
year = {2012}, 
isbn = {1608458849}, 
publisher = {Morgan \& Claypool Publishers} 
}

1 Answer 1

-1

the solution that I found was to use \nocite{}. So, I just include the command \nocite{} at the end of each chapter and it works.

Something like this:

\chapter\huge{Here is the Chapters Name}
\label{cap:intro}

\begin{bibunit}

\section{Section - Introduction}

Let's cite one author here \cite{Liu2012}

After cite the first author here should only show the bibliography for those authors used on this chapter.

\nocite{Liu2012}
\putbib[tese]
\end{bibunit}
1
  • Welcome to TeX.SE!
    – Mensch
    Feb 17, 2021 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .