我正在写一份文档,需要在里面放一个带有参考文献的示例。出于组织原因,我想将第一个参考文献作为一个部分,将主要参考文献以正常方式作为一个章节。我在 StackOverflow 上找到的解决方案都是全局解决方案,而不是局部解决方案。
我正在使用书目环境来打印它,并且需要在主要参考文献中使用它。
\documentclass[oneside,a4paper,12pt]{book}
\usepackage{inputenc}
\usepackage[pdfspacing]{classicthesis}
\begin{document}
\section{Main document chapter 1}
Main document that cites \cite{farias2016estudo}
\section{Introduction}
Inside example that cites \cite{roque2012historia} and ends
\begin{thebibliography}
\bibitem{roque2012historia} T. Roque, História da matemática, Zahar, (2012).
\end{thebibliography}
\section{Main document chapter 2}
Main document citting \cite{Paulo}
\begin{thebibliography}
\bibitem{farias2016estudo} D. G. d. Farias, {\em Um estudo do ensino de n{\'u}meros primos na Educa{\c{c}}{\~a}o B{\'a}sica}, Universidade Federal de Alagoas (2016).
\quad \hfill \url{http://www.repositorio.ufal.br/handle/riufal/2433}
\bibitem{Paulo} P. Ribenboim, The little book of bigger primes, Springer Science \& Business Media, (2004).
\end{thebibliography}
\end{document}
答案1
您可以使用xpatch
来替换\chapter
定义中的thebibliography
。\section
如果您在 组 内执行此操作{...}
,则不会影响文档的其余部分。
请注意,thebibliography
环境对于最宽的标签有一个强制参数。
\documentclass[oneside,a4paper,12pt]{book}
\usepackage{inputenc}
\usepackage[pdfspacing]{classicthesis}
\usepackage{xpatch}
\begin{document}
\tableofcontents
\section{Main document chapter 1}
Main document that cites \cite{farias2016estudo}
\section{Introduction}
Inside example that cites \cite{roque2012historia} and ends
{
\xpatchcmd{\thebibliography}{\chapter*{\bibname}}{\section*{\bibname}}{}{}
\begin{thebibliography}{9}
\bibitem{roque2012historia} T. Roque, História da matemática, Zahar, (2012).
\end{thebibliography}
}
\section{Main document chapter 2}
Main document citting \cite{Paulo}
\begin{thebibliography}{9}
\bibitem{farias2016estudo} D. G. d. Farias, {\em Um estudo do ensino de n{\'u}meros primos na Educa{\c{c}}{\~a}o B{\'a}sica}, Universidade Federal de Alagoas (2016).
\quad \hfill \url{http://www.repositorio.ufal.br/handle/riufal/2433}
\bibitem{Paulo} P. Ribenboim, The little book of bigger primes, Springer Science \& Business Media, (2004).
\end{thebibliography}
\end{document}