我有一个 references.bib 文件,但是当我加载论文时,我的参考书目列表中只有一个参考文献,而我尝试使用 \cite 引用的其他几个参考文献都出现了“?”,尽管名称引用正确。
我知道这个问题与我加载的包及其顺序有关。我认为部分错误来自那里。目前,我更关心的是拥有完整的列表,而不是样式。
\documentclass{article}
\usepackage[utf8]{inputenc}
% Required package
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{float}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{apacite}
\usepackage{multirow}
\usepackage{ulem}
\usepackage[table]{xcolor}
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage{fancyhdr}
\usepackage{afterpage}
\usepackage{geometry}
\begin{document}
\subsection{A}
\cite{Dustmann_1996}.
\cite{Kuhlenkasper_2012}.
\section{A}
\begin{document}
\bibliography{references.bib}
\bibliographystyle{apacite}
\end{document}
\appendix
\section{Appendix}
\setcounter{table}{0}
\renewcommand{\thetable}{A\arabic{table}}
\begin{table}[H]
\caption{Tabulation of x information}
\label{Tabulation of x information}
\end{tabular}
\end{table}
\end{document}
最后的 \bibliography 部分出现错误,例如:输入行 27 上的引文“Kuhlenkasper_2012”未定义。 \bibliography{references.bib} 失控参数?l.33 \begin{document} 只能在序言中使用
这是我的references.bib(也包含其他参考资料)
@TECHREPORT{Kuhlenkasper_2012,
title = {Who Leaves and When?: Selective Outmigration of Immigrants from Germany},
author = {Kuhlenkasper, Torben and Steinhardt, Max},
year = {2012},
institution = {DIW Berlin, The German Socio-Economic Panel (SOEP)},
type = {SOEPpapers on Multidisciplinary Panel Data Research},
number = {490},
url = {https://EconPapers.repec.org/RePEc:diw:diwsop:diw_sp490}
}
@article{Dustmann_1996,
DOI= {10.2307/1344525},
ISSN = {02664658, 14680327},
URL = {http://www.jstor.org/stable/1344525},
author = {Christian Dustmann and Samuel Bentolila and Riccardo Faini},
journal = {Economic Policy},
number = {22},
pages = {213--250},
publisher = {[Center for Economic Studies, Maison des Sciences de l’Homme, Centre for Economic Policy Research, Wiley]},
title = {Return Migration: The European Experience},
urldate = {2022-07-31},
volume = {11},
year = {1996}
}
答案1
代码中有两个主要问题(除了制作 MWE 的一些问题,例如两个\begin{document}
语句等)。
第一个是使用ulem
包进行下划线。默认情况下,此包重新定义\emph
(用于强调参数的命令,默认情况下为斜体)以生成下划线。Apacite 在参考书目中使用,这会导致错误。可以使用 的包选项(即删除和添加 )\emph
来修复此问题。normalem
ulem
\usepackage{ulem}
\usepackage[normalem]{ulem}
第二个问题是 Apacite 无法识别url
(@techreport
但可以识别@article
)。因此,url 格式不适用于条目中的网址Kuhlenkasper_2012
。由于该 url 包含_
另一个错误,因此出现。要解决此问题,您可以使用howpublished = {\url{...}}
。这需要\usepackage{url}
。
E
另一个小改进是在周围增加了一组括号The {E}uropean Experience
以防止自动小写。
梅威瑟:
\documentclass{article}
\usepackage[utf8]{inputenc}
% Required package
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{float}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{apacite}
\usepackage{multirow}
\usepackage[normalem]{ulem}
\usepackage[table]{xcolor}
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage{fancyhdr}
\usepackage{afterpage}
\usepackage{geometry}
\usepackage{url}
\begin{document}
\subsection{A}
\cite{Dustmann_1996}.
\cite{Kuhlenkasper_2012}.
\section{A}
\bibliography{references.bib}
\bibliographystyle{apacite}
\appendix
\section{Appendix}
\setcounter{table}{0}
\renewcommand{\thetable}{A\arabic{table}}
\begin{table}[H]
\caption{Tabulation of x information}
\label{Tabulation of x information}
\end{table}
\end{document}
@TECHREPORT{Kuhlenkasper_2012,
title = {Who Leaves and When?: Selective Outmigration of Immigrants from Germany},
author = {Kuhlenkasper, Torben and Steinhardt, Max},
year = {2012},
institution = {DIW Berlin, The German Socio-Economic Panel (SOEP)},
type = {SOEPpapers on Multidisciplinary Panel Data Research},
number = {490},
howpublished = {\url{https://EconPapers.repec.org/RePEc:diw:diwsop:diw_sp490}}
}
@article{Dustmann_1996,
DOI= {10.2307/1344525},
ISSN = {02664658, 14680327},
URL = {http://www.jstor.org/stable/1344525},
author = {Christian Dustmann and Samuel Bentolila and Riccardo Faini},
journal = {Economic Policy},
number = {22},
pages = {213--250},
publisher = {[Center for Economic Studies, Maison des Sciences de l’Homme, Centre for Economic Policy Research, Wiley]},
title = {Return Migration: The {E}uropean Experience},
urldate = {2022-07-31},
volume = {11},
year = {1996}
}
结果: