代码

代码

我想在每章末尾获取参考文献。参考文献在 bib 文件中。请帮帮我。我还想写出每章的标题。

    \documentclass[twoside]{book}
\usepackage[paperwidth=7.25in, paperheight=9.5in,bindingoffset=.75in]{geometry}
\usepackage{fancyhdr,graphicx,lipsum,multibib}
\usepackage{natbib}
\usepackage{chapterbib}
\usepackage{abstract}
\renewenvironment{abstract}[1]
{\begin{quote}
\noindent \rule{\linewidth}{.5pt}\par{\bfseries Abstract.} #1}
{\medskip\noindent \rule{\linewidth}{.5pt}
\end{quote}
}
\pagestyle{fancy}
\fancyhead[LO]{\includegraphics[width=1.5cm,height=1.5cm,keepaspectratio]{example-image-a}}
\fancyhead[RE]{\includegraphics[width=1.5cm,height=1.5cm,keepaspectratio]{example-image-b}}
\setlength{\headheight}{47.0pt}
\begin{document}
\include{ch1}
\include{ch2}
\end{document}

Ch1 文件

         \begin{abstract}
    Each chapter should be preceded   \cite{celik2009allee} ....
    \end{abstract}
      \bibliography{bibtex_1}
    \bibliographystyle{plain}

ch2 文件

        \begin{abstract}
        Each chapter should be preceded  \cite{guin2014spatial} ....
        \end{abstract}
          \bibliography{bibtex_2}
        \bibliographystyle{plain}

bibtex_1

@article{celik2009allee,
  title={Allee effect in a discrete-time predator--prey system},
  author={Celik, Canan and Duman, Oktay},
  journal={Chaos, Solitons \& Fractals},
  volume={40},
  number={4},
  pages={1956--1962},
  year={2009},
  publisher={Elsevier}
}
@article{gao2013dynamics,
  title={DYNAMICS OF A RATIO-DEPENDENT PREDATOR-PREY SYSTEM WITH A STRONG ALLEE EFFECT.},
  author={Gao, Yujing and Li, Bingtuan},
  journal={Discrete \& Continuous Dynamical Systems-Series B},
  volume={18},
  number={9},
  year={2013}
}

bibtex_2 文件

@article{guin2014spatial,
  title={Spatiotemporal dynamics of reaction--diffusion models of interacting populations},
  author={Guin, L N and Mandal, P K},
  journal={Applied Mathematical Modelling},
  year={http://dx.doi.org/10.1016/j.apm.2014.02.022},
  publisher={Elsevier}
}
@article{freedman1979stability,
  title={Stability analysis of a predator-prey system with mutual interference and density-dependent death rates},
  author={Freedman, HI},
  journal={Bulletin of Mathematical Biology},
  volume={41},
  number={1},
  pages={67--78},
  year={1979},
  publisher={Springer}
}

答案1

  • 我删除了与问题无关的软件包。
  • book没有abstract环境。为了编译代码,我必须删除包的使用abstract并替换\renewcommand...\newcommand...

与问题相关的问题:

  • http://dx.doi.org/10.1016/j.apm.2014.02.022不是年份,您无法说服 bibtex 接受它作为年份。我将其设为字段url
  • multibib似乎编译挂起,可能是因为它不完全一致(chapterbib虽然我没有调查)。相反,我删除了它。
  • plain与作者年份引用不兼容,这会导致natbib抱怨。但是,如果您继续编译,那就没问题了 - 它只是使用数字标签。您应该考虑使用plainnat,它是natbib,并且仍然会为您提供数字引用,而不会出现抱怨。

然后它就正常工作了。至少,规则的使用很奇怪,但这是你对参考书目定义的问题,abstract与参考书目无关。

代码

\begin{filecontents}{ch1.tex}
  \begin{abstract}
    Each chapter should be preceded   \cite{celik2009allee} ....
  \end{abstract}
  \bibliography{bib1}
  \bibliographystyle{plain}
\end{filecontents}
\begin{filecontents}{ch2.tex}
  \begin{abstract}
    Each chapter should be preceded  \cite{guin2014spatial} ....
  \end{abstract}
  \bibliography{bib2}
  \bibliographystyle{plain}
\end{filecontents}
\begin{filecontents}{bib1.bib}
  @article{celik2009allee,
    title={Allee effect in a discrete-time predator--prey system},
    author={Celik, Canan and Duman, Oktay},
    journal={Chaos, Solitons \& Fractals},
    volume={40},
    number={4},
    pages={1956--1962},
    year={2009},
    publisher={Elsevier}
  }
  @article{gao2013dynamics,
    title={DYNAMICS OF A RATIO-DEPENDENT PREDATOR-PREY SYSTEM WITH A STRONG ALLEE EFFECT.},
    author={Gao, Yujing and Li, Bingtuan},
    journal={Discrete \& Continuous Dynamical Systems-Series B},
    volume={18},
    number={9},
    year={2013}
  }
\end{filecontents}
\begin{filecontents}{bib2.bib}
  @article{guin2014spatial,
    title={Spatiotemporal dynamics of reaction--diffusion models of interacting populations},
    author={Guin, L N and Mandal, P K},
    journal={Applied Mathematical Modelling},
    url={http://dx.doi.org/10.1016/j.apm.2014.02.022},
    publisher={Elsevier}
  }
  @article{freedman1979stability,
    title={Stability analysis of a predator-prey system with mutual interference and density-dependent death rates},
    author={Freedman, HI},
    journal={Bulletin of Mathematical Biology},
    volume={41},
    number={1},
    pages={67--78},
    year={1979},
    publisher={Springer}
  }
\end{filecontents}
\documentclass{book}
\usepackage{natbib}
\usepackage{chapterbib}
\newenvironment{abstract}[1]
{\begin{quote}
    \noindent \rule{\linewidth}{.5pt}\par{\bfseries Abstract.} #1}
  {\medskip\noindent \rule{\linewidth}{.5pt}
  \end{quote}
}
\begin{document}
  \include{ch1}
  \include{ch2}
\end{document}

相关内容