使用问号代替引用,使用双问号代替图表和表格的交叉引用

使用问号代替引用,使用双问号代替图表和表格的交叉引用

我用 Sweave (R+LaTeX) 写论文。一切都很顺利,直到我买了一台新电脑。我复制了 Sweave 文件 (.Rnw),其中包含所有图表和参考书目 (.bib)。

当我在新电脑上编译文件时,一切都很好,文本、图形、表格和布局......但是:

  • 尽管文档末尾的参考书目是 100%(编号、标题等),但每个文内引用都是一个问号。

  • 尽管图表是 100%(编号、标题等),但每个图表的交叉引用都是双问号。

知道哪里出了问题吗?

谢谢,艾尔莎

\documentclass[a4paper,12pt,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{cite}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\usepackage{colortbl}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage[english=usenglishmax]{hyphsubst}
\usepackage[nottoc]{tocbibind}
\usepackage{tabularx,array}
\usepackage{enumitem}
\usepackage{changepage} 
\usepackage[all]{nowidow}
\usepackage{longtable}
\usepackage{scrextend}
\usepackage{amsmath}
\usepackage{etoolbox}
\usepackage{tikz}
\usepackage{titlecaps}
\usepackage{rotating}
\usepackage{nameref}
\usepackage{pdfpages}
\usepackage{xcolor}
\usepackage{color}
\usepackage{placeins}
\usepackage{pdflscape}
\usepackage{subfigure}
\usepackage{cleveref}
\usepackage{tabularx}
\usepackage[utf8]{inputenc}
\usepackage{floatrow}
\usepackage{float}
\usepackage{titlesec}
\usepackage{arydshln}
\usepackage{amsfonts,amssymb}
\setcounter{secnumdepth}{4}
\bibliographystyle{acm}
\usepackage{alphalph}
\renewcommand*{\thesubfigure}{(\alphalph{\value{subfigure}})}
\renewcommand{\chaptername}{}
\usepackage{graphicx}
\usepackage[justification=justified,format=plain]{caption}
\usepackage{afterpage}

\makeatletter
\renewcommand\@pnumwidth{2cm}
\patchcmd{\l@chapter}{\bfseries}{}{}{}
\makeatother

\begin{document}
%
%
% 
\renewcommand\bibname{References}
\bibliography{TemporalPartitioning2}

\end{document}

附加信息:

我运行时得到的错误bibtex是:

> This is BibTeX, Version 0.99d (MiKTeX 2.9.6840 64-bit) The top-level
> auxiliary file: Draft_PhDThesis_dec2017.aux The style file: acm.bst I
> found no \bibdata command---while reading file
> Draft_PhDThesis_dec2017.aux Warning--I didn't find a database entry
> for "Wulf" Warning--I didn't find a database entry for "Haeckel"
> Warning--I didn't find a database entry for "bioce" Warning--I didn't
> find a database entry for "Strauss" ... (There was 1 error message)

当我查看 .aux 文件时,我注意到没有 \bibdata{...},我相信它是由 \bibliography{...} 创建的。不知道哪里出了问题。

我不认为问题仅仅出在 bibtex 和参考书目上,因为图表的交叉引用也无法正常工作。除非有两个独立的问题,但我不这么认为。

问题肯定出在安装上,因为当我在旧笔记本电脑上运行它时,它运行正常...我还没能找出问题所在...如果有人能有一天阐明这一点,那就太感谢了!

答案1

我最终解决了这个问题。在 R Studio 中,我单击:工具 > 全局选项 > Sweave > Latex 编辑和编译

那里勾选了“编译后清除辅助输出”框。我取消了勾选,现在一切正常。

谢谢,艾尔莎

这是我可以更改辅助输出设置的窗口屏幕截图

相关内容