我在论文中使用 latex,在参考文献中使用 texmaker 和 mendley。我以前也使用过 latex 和参考文献,但我一直使用 Overleaf,所以我不知道我使用 TexMaker 有什么问题,因为我的参考文献显示为问号[?]
而不是数字。
这是我的代码:
% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
% IMPORT SETTINGS
\documentclass[12pt,a4paper,twoside,openright]{report}
\usepackage[justification=centering]{caption}
\input{../include/settings.tex}
% Documents' beginning
\begin{document}
\pagenumbering{roman}
\setcounter{page}{0}
% TITLE PAGE
\input{../include/title_page.tex}
% ENTITIES
\input{../include/empty_page.tex}
\input{../include/entities.tex}
% COPYRIGHT
\input{../include/empty_page.tex}
\input{../include/copyright.tex}
% DEDICATION [OPTIONAL]
% \input{../include/empty_page.tex}
% \input{../include/dedication.tex}
% ACKNOWLEDGMENTS [OPTIONAL]
\input{../include/empty_page.tex}
\input{../include/acknowledgments.tex}
% FINANCING [IF APPLIABLE]
% \input{../include/empty_page.tex}
% \input{../include/financing.tex}
% EPIGRAPH [OPTIONAL]
% \input{../include/empty_page.tex}
% \input{../include/epigraph.tex}
% RESUMO
\input{../include/empty_page.tex}
\input{../abstract/abstract_pt.tex}
% ABSTRACT
\input{../abstract/abstract_en.tex}
%\begin{spacing}{1} % change vertical space between toc, lof, lot and glossaries entries
\printglossaries
\listoffigures
\listoftables
\tableofcontents
%\end{spacing}
% INTRODUCTION
\input{../chapters/introduction/introduction_main.tex}
% METHODS
\input{../chapters/methods/methods_main.tex}
% RESULTS
\input{../chapters/results/results_main.tex}
% CONCLUSION
\input{../chapters/conclusion/conclusion_main.tex}
% REFERENCES / BIBLIOGRAPHY
\cleardoublepage
\bibliography{../references/TESE}
\bibliographystyle{ieeetr}
% INDEX [OPTIONAL]
% Each time you want to add an entry to index you need to use \index{text}
\newpage\null\newpage
\printindex
% APPENDICES [OPTIONAL]
\newpage\null\newpage
\input{../chapters/appendices/appendices_main.tex}
\end{document}
\end{document}
.bib
下面是通过 Mendeley 生成的名为“TESE”的我的文件的示例:
@article{Manganaro2016,
author = {Manganaro, Lorenzo and Attili, Andrea and Dalmasso, Federico and Fausti, Federico and Giordanengo, Simona and Mazza, Giovanni and Monaco, Vincenzo and Sacchi, Roberto and Vignati, Anna and Cirio, Roberto},
journal = {PoS},
keywords = {Intro},
mendeley-tags = {Intro},
title = {{Control of the dose distribution in charged particle therapy}},
url = {http://pos.sissa.it/},
year = {2016}
}
@article{Katiaparodiphysikuni-muenchende2017,
author = {Katiaparodiphysikuni-muenchende, Cc Katia Parodi and Crespo, Paulo},
file = {:D$\backslash$:/Tese/mail{\_}Tese{\_}1.pdf:pdf},
pages = {3--5},
title = {{Master Thesis in M{\"{u}}nchen - Rita Rego}},
year = {2017}
}
希望可以有人帮帮我!
答案1
嗯,你给出的代码不是可编译并有类似的部分
\bibliography{../references/TESE}
\input{../include/settings.tex}
我无法证明../references/TESE
bib 文件的路径是正确的。而且我们的代码中TESE.bib
没有您的ed 文件...\input
为了摆脱这些问题,我建议开始使用以下 MWE 评估您的错误,例如命名它mwe.tex
:
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Manganaro2016,
author = {Manganaro, Lorenzo and Attili, Andrea and
Dalmasso, Federico and Fausti, Federico and
onaco, Vincenzo and Sacchi, Roberto and
Vignati, Anna and Cirio, Roberto},
journal = {PoS},
keywords = {Intro},
mendeley-tags = {Intro},
title = {{Control of the dose distribution in charged particle
therapy}},
url = {http://pos.sissa.it/},
year = {2016},
}
@article{Katiaparodiphysikuni-muenchende2017,
author = {Katiaparodiphysikuni-muenchende, Cc Katia Parodi and
Crespo, Paulo},
journal = {missing journal},
file = {:D$\backslash$:/Tese/mail{\_}Tese{\_}1.pdf:pdf},
pages = {3--5},
title = {{Master Thesis in M{\"{u}}nchen - Rita Rego}},
year = {2017},
}
\end{filecontents}
\documentclass{article}
\begin{document}
\cite{Katiaparodiphysikuni-muenchende2017} and \cite{Manganaro2016}.
\bibliographystyle{ieeetr} % ieeetr
\bibliography{\jobname} % print bibliography created with filecontents
\end{document}
然后我得到以下结果并且没有错误:
请将此代码复制到您的计算机/overleaf 并使用通常的链pdflatex mwe.tex
, bibtex mwe.aux
, pdflatex mwe.tex
,进行编译pdflatex mwe.tex
。
现在应该可以编译并且不会出现任何错误,并且它不应该包含任何?
。
- 如果是这样,我猜你给出的 bib 文件路径是错误的。更正它并重试。
- 如果不是这样,编译
bibtex mwe.aux
没有成功。请向 overleaf 的支持人员寻求帮助!
编译后,mwe.tex
使用 mwe 尝试您的 bib 文件,以确保 bib 文件没有错误。