Duc*_*uck 5 r rstudio knitr r-markdown
I am working on RMarkdown to generate a report that includes an appendix after references. I have written the appendix on a different RMarkdown file and adapted my principal file to compile it. This is the code for my principal Rmd file that generates report:
---
bibliography: bb.bib
fontsize: 11pt
nocite: '@*'
output:
pdf_document:
includes:
after_body: Demo2.Rmd
keep_tex: yes
link-citations: true
---
\newpage
\section{Testing}\label{sec1}
```{r}
summary(cars)
```
\section{Demo}
This was done using @shiina and we will use some info from Section \ref{sec1} to do.
```{r}
summary(iris[,1:2])
```
\section{References}
Run Code Online (Sandbox Code Playgroud)
The file bb.bib contains next references:
@article {shiina,
author = {Shiina, Takayuki and Birge, John R.},
title = {Stochastic unit commitment problem},
journal = {International Transactions in Operational Research},
volume = {11},
number = {1},
publisher = {Blackwell Publishing},
pages = {19--32},
year = {2004},
}
@book{groewe2001,
title={Stochastic unit commitment in hydro-thermal power production planning},
author={Gr{\"o}we-Kuska, N. and R{\"o}misch, W.},
year={2001},
series = { Preprints aus dem Institut f{\"u}r Mathematik },
publisher = { Humboldt-Universit{\"a}t zu Berlin, Institut f{\"u}r Mathematik },
}
Run Code Online (Sandbox Code Playgroud)
Finally, my appendix Rmd file, Demo2.Rmd, contains this structure:
\appendix
\section*{Appendix}
\section{Additional info}
In this section we also follow @shiina to explain concepts.
Run Code Online (Sandbox Code Playgroud)
Compilation works fine and generate document but issues are appearing in the appendix section. I used a reference with @shiina to cite something, but I am getting this output in the final report:

The circle in black shows that citation from bibliography is not working. Instead of @shiina, it should appear Shiina and Birge (2004). I have tried replacing Rmd file with a TeX file but it did not work.
Is it any way to correct that?, I do not know if after_body needs to be adjusted or what to do.