![如何解决辅助文件混淆引用的问题?](https://linux22.com/image/454098/%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E8%BE%85%E5%8A%A9%E6%96%87%E4%BB%B6%E6%B7%B7%E6%B7%86%E5%BC%95%E7%94%A8%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%9F.png)
我正在写一本书的第二个版本,出版商提供了第一版引文的 .tex 文件作为 \bibitem 条目(下面是缩短版)。
\makeatletter%
\renewenvironment{thebibliography}[1]
{\section*{\bibname
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\makeatother%
\chapter{}\label{app:A}
\def\bibname{REFERENCES}
\begin{thebibliography}{100}
\bibitem{bib1}Erdman, A. G., and Sandor, G. N., 1997, \textit{Mechanism Design: Analysis and Synthesis,} Vol. 1, 3rd Ed., Prentice Hall, Upper Saddle River, NJ.
\bibitem{bib2}Shigley, J.E., and Uicker, J. J., 1995, \textit{Theory of Machines and Mechanisms,} 2nd Ed., McGraw-Hill, New York.
\bibitem{bib3}Howell, L. L., and Midha, A., 1994, ``A Method for the Design of Compliant Mechanisms with Small-Length Flexural Pivots,'' \textit{Journal of Mechanical Design,} Trans. ASME, Vol. 116, No. 1, pp. 280--290.
\end{thebibliography}
通过 text2bib 脚本运行引文后https://text2bib.economics.utoronto.ca/,我自己有一个 .bib 文件,其中每个出版物都命名为“bib1”,“bib2”等,其名称与出版商提供的 .tex 文件中的引用相关。
主文件(下面缩写)引用新的 .bib 文件并注释掉发布者提供的 \bibitem 列表。
\documentclass[a4paper,fleqn]{book}%
\usepackage{cite}
\bibliographystyle{asmems4}
\begin{document}%
\include{c01}
\include{c02}
\include{c03}
\include{c04}
\include{c05}
\include{c06}
\include{c07}
\include{c08}
\include{c09}
\include{c10}
\include{c11}
\appendix
\bibliography{zzbib}
%\include{b01}
\end{document}
编译时,引用似乎全部出现,但我收到一个持续的严重错误(这里仅显示第一部分):
:\citation{BIB38:} 我将跳过此命令的剩余部分 引用键 BIB58 和 bib58 之间的大小写不匹配错误 ---文件 c01.aux 的第 72 行:\citation{BIB58:} 我将跳过此命令的剩余部分 引用键 BIB70 和 bib70 之间的大小写不匹配错误 ---文件 c01.aux 的第 73 行:\citation{BIB70:} 我将跳过此命令的剩余部分 1 级辅助文件:c02.aux 1 级辅助文件:c03.aux 1 级辅助文件:c04.aux 1 级辅助文件:c05.aux 引用键 BIB3 和 bib3 之间的大小写不匹配错误 ---文件 c05.aux 的第 18 行
我对一般的 LaTeX 问题非常熟悉,但对辅助文件在这里的作用基本一无所知。任何关于如何清除此问题的建议都会有所帮助。只是希望我不需要重命名所有引文。
谢谢!
更新:如果我没有很好地遵循格式,请原谅。这是我的第一篇文章。
我正在添加 .bib 文件(为了简洁起见,仅举几个例子,其余部分都会重复,除非您希望我分享所有内容)。
@book{bib1,
address = {Upper Saddle River, NJ},
author = {Erdman, A. G. and Sandor, G. N.},
edition = {3rd},
publisher = {Prentice Hall},
title = {Mechanism Design: Analysis and Synthesis},
volume = {1},
year = {1997},
}
@book{bib2,
address = {New York},
author = {Shigley, J. E. and Uicker, J. J.},
edition = {2nd},
publisher = {McGraw-Hill},
title = {Theory of Machines and Mechanisms},
year = {1995},
}
@article{bib3,
author = {Howell, L. L. and Midha, A.},
journal = {Journal of Mechanical Design},
number = {1},
pages = {280-290},
title = {A Method for the Design of Compliant Mechanisms with Small-Length Flexural Pivots},
volume = {116},
year = {1994},
unidentified = {Trans. ASME},
}
另一个更新:清除缓存后,第一次重新编译时错误数量会跳转,并且无法识别任何引用、图表或任何标签。(图中的示例)。
如果我再次重新编译,现在不知怎么地找到了图表和章节标签,但仍说在参考书目中找不到 bib## 名称。请注意,这是指小写的 bib##。
经过第三次重新编译后,错误再次消失,但现在的错误表明 BIB##(注意大写 BIB)不在参考书目中。
更新:这是第 1 章 (C01.tex) 的示例辅助文件。请注意它是如何从小写 bib 变为大写 BIB 的。我怀疑这与问题有关。
\relax
\citation{bib1,bib2}
\citation{bib3}
\citation{bib3}
\citation{bib4,bib5}
\@writefile{toc}{\contentsline {chapter}{\numberline {1}INTRODUCTION}{1}{}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:1}{{1}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {1.1}ADVANTAGES OF COMPLIANT MECHANISMS}{1}{}\protected@file@percent }
\newlabel{sec:1.1}{{1.1}{1}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.1}{\ignorespaces Examples of rigid-link mechanisms: (a) part of a reciprocating engine, and (b) Vise Grip.}}{1}{}\protected@file@percent }
\newlabel{fig:1.1}{{1.1}{1}}
\citation{bib6,bib7}
\citation{bib8,bib9}
\citation{bib6}
\citation{bib7}
\citation{bib6}
\citation{bib7}
\citation{bib4}
\citation{bib4}
\@writefile{lof}{\contentsline {figure}{\numberline {1.2}{\ignorespaces Examples of compliant mechanisms: (a) crimping mechanism (from \cite {bib3}), and (b) parallel-guiding mechanism.}}{2}{}\protected@file@percent }
\newlabel{fig:1.2}{{1.2}{2}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.3}{\ignorespaces (a) Compliant overrunning clutch, and (b) its rigid-body counterpart shown disassembled. (From \cite {bib6} and \cite {bib7}.)}}{2}{}\protected@file@percent }
\newlabel{fig:1.3}{{1.3}{2}}
\citation{bib10,bib11,bib12,bib13,bib14,bib15,bib16,bib17,bib18,bib19}
\@writefile{lof}{\contentsline {figure}{\numberline {1.4}{\ignorespaces (a) Compliant crimping mechanism developed by AMP Inc., and (b) its rigid-body counterpart. Because of symmetry, only half the mechanism is shown. (From \cite {bib4}.)}}{3}{}\protected@file@percent }
\newlabel{fig:1.4}{{1.4}{3}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.5}{\ignorespaces Example of a high-precision compliant mechanism.}}{3}{}\protected@file@percent }
\newlabel{fig:1.5}{{1.5}{3}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.6}{\ignorespaces Compliant die grippers used to hold a die during process in several different harsh chemicals.}}{3}{}\protected@file@percent }
\newlabel{fig:1.6}{{1.6}{3}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.7}{\ignorespaces Compliant constant-force robot end effector.}}{4}{}\protected@file@percent }
\newlabel{fig:1.7}{{1.7}{4}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.8}{\ignorespaces Compliant pliers, or Compliers, fishhook removal pliers.}}{4}{}\protected@file@percent }
\newlabel{fig:1.8}{{1.8}{4}}
\@writefile{toc}{\contentsline {section}{\numberline {1.2}CHALLENGES OF COMPLIANT MECHANISMS}{4}{}\protected@file@percent }
\newlabel{sec:1.2}{{1.2}{4}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.9}{\ignorespaces Compliant parallel motion bicycle brakes.}}{4}{}\protected@file@percent }
\newlabel{fig:1.9}{{1.9}{4}}
\citation{bib20}
\citation{bib21}
\citation{bib23}
\citation{bib24,bib25}
\citation{bib22}
\citation{bib8,bib9}
\citation{bib26,bib27,bib28,bib29,bib30,bib31,bib32,bib33,bib34,bib35,bib36,bib37,bib38,bib39,bib40,bib41,bib42,bib43,bib44,bib45,bib46,bib47,bib48,bib49,bib50,bib51,bib52,bib53,bib54,bib55,bib56,bib57,bib58,bib59,bib60,bib61,bib62,bib63,bib64,bib65,bib66,bib67,bib68,bib69,bib70,bib71,bib72,bib73,bib74,bib75,bib76,bib77,bib78,bib79,bib80,bib81,bib82,bib83,bib84,bib85}
\@writefile{lof}{\contentsline {figure}{\numberline {1.10}{\ignorespaces Common compliant devices. A binder clip, paper clips, backpack latch, lid eyelash curler, and nail clippers are shown.}}{5}{}\protected@file@percent }
\newlabel{fig:1.10}{{1.10}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.11}{\ignorespaces Longbow in its unstrung, strung, and drawn positions.}}{5}{}\protected@file@percent }
\newlabel{fig:1.11}{{1.11}{5}}
\@writefile{toc}{\contentsline {section}{\numberline {1.3}HISTORICAL BACKGROUND}{5}{}\protected@file@percent }
\newlabel{sec:1.3}{{1.3}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.12}{\ignorespaces Leonardo da Vinci's sketch of a compliant catapult. (From \cite {bib22}.)}}{5}{}\protected@file@percent }
\newlabel{fig:1.12}{{1.12}{5}}
\citation{bib26}
\citation{bib81}
\citation{bib83}
\citation{bib81}
\citation{bib38}
\citation{bib58}
\citation{bib70}
\@writefile{lof}{\contentsline {figure}{\numberline {1.13}{\ignorespaces (a) Single-axis cross-flexure pivot, and (b) Bendix Corporation flexural pivot.}}{6}{}\protected@file@percent }
\newlabel{fig:1.13}{{1.13}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.14}{\ignorespaces Load cell for force measurement.}}{6}{}\protected@file@percent }
\newlabel{fig:1.14}{{1.14}{6}}
\@writefile{toc}{\contentsline {section}{\numberline {1.4}COMPLIANT MECHANISMS AND NATURE\footnote {See \cite {bib26}, \cite {bib81}, and \cite {bib83}.}}{6}{}\protected@file@percent }
\newlabel{sec:1.4}{{1.4}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.15}{\ignorespaces Bee wings demonstrate the use of compliance in nature.}}{6}{}\protected@file@percent }
\newlabel{fig:1.15}{{1.15}{6}}
\citation{BIB38}
\citation{BIB58}
\citation{BIB70}
\@writefile{lof}{\contentsline {figure}{\numberline {1.16}{\ignorespaces An eel uses its compliance to swim.}}{7}{}\protected@file@percent }
\newlabel{fig:1.16}{{1.16}{7}}
\@writefile{toc}{\contentsline {section}{\numberline {1.5}NOMENCLATURE AND DIAGRAMS\footnote {The text and figures of this section are summarized from \cite {bib38}, \cite {bib58}, and \cite {bib70}.}}{7}{}\protected@file@percent }
\newlabel{sec:1.5}{{1.5}{7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.1}Compliant Mechanisms versus Compliant Structures}{7}{}\protected@file@percent }
\newlabel{subsec:1.5.1}{{1.5.1}{7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.2}Nomenclature}{7}{}\protected@file@percent }
\newlabel{subsec:1.5.2}{{1.5.2}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.17}{\ignorespaces (a) Compliant diving board, and (b) compliant cantilever beam.}}{8}{}\protected@file@percent }
\newlabel{fig:1.17}{{1.17}{8}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.18}{\ignorespaces One-link compliant mechanism.}}{8}{}\protected@file@percent }
\newlabel{fig:1.18}{{1.18}{8}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.19}{\ignorespaces Examples of link types.}}{8}{}\protected@file@percent }
\newlabel{fig:1.19}{{1.19}{8}}
\citation{bib86}
\@writefile{lof}{\contentsline {figure}{\numberline {1.20}{\ignorespaces Component characteristics of (a) segments, and (b) links.}}{9}{}\protected@file@percent }
\newlabel{fig:1.20}{{1.20}{9}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.3}Diagrams}{9}{}\protected@file@percent }
\newlabel{subsec:1.5.3}{{1.5.3}{9}}
\@writefile{toc}{\contentsline {section}{\numberline {1.6}COMPLIANT MEMS}{9}{}\protected@file@percent }
\newlabel{sec:1.6}{{1.6}{9}}
\citation{bib87}
\@writefile{lof}{\contentsline {figure}{\numberline {1.21}{\ignorespaces Symbol convention for compliant mechanism diagrams.}}{10}{}\protected@file@percent }
\newlabel{fig:1.21}{{1.21}{10}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.22}{\ignorespaces Diagrams representing the compliant mechanisms in (a) Figure 1.2\hbox {}a, (b) Figure 1.2\hbox {}b, (c) Figure 1.4\hbox {}a, and (d) Figure 1.11\hbox {}.}}{10}{}\protected@file@percent }
\newlabel{fig:1.22}{{1.22}{10}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.23}{\ignorespaces Scanning electron micrograph of a microcompliant bistable mechanism.}}{11}{}\protected@file@percent }
\newlabel{fig:1.23}{{1.23}{11}}
\@writefile{lof}{\contentsline {figure}{\numberline {P1.1}{\ignorespaces (a) Compliant member in a microengine, and (b) microengine that uses several compliant members. (Courtesy of Sandia National Laboratories, www.sandia.gov.)}}{11}{}\protected@file@percent }
\newlabel{fig:1.24}{{P1.1}{11}}
\newlabel{prb:1.1}{{1.1}{11}}
\newlabel{prb:1.2}{{1.2}{11}}
\newlabel{prb:1.3}{{1.3}{11}}
\newlabel{prb:1.4}{{1.4}{11}}
\newlabel{prb:1.5}{{1.5}{11}}
\newlabel{prb:1.6}{{1.6}{11}}
\@writefile{lof}{\contentsline {figure}{\numberline {P1.2}{\ignorespaces Figure for Problem 1.4\hbox {}.}}{11}{}\protected@file@percent }
\newlabel{prbfig:P1.4}{{P1.2}{11}}
\@writefile{lof}{\contentsline {figure}{\numberline {P1.3}{\ignorespaces Figure for Problem 1.5\hbox {}.}}{12}{}\protected@file@percent }
\newlabel{prbfig:P1.5}{{P1.3}{12}}
\@writefile{lof}{\contentsline {figure}{\numberline {P1.4}{\ignorespaces Figure for Problem 1.6\hbox {}.}}{12}{}\protected@file@percent }
\newlabel{prbfig:P1.6}{{P1.4}{12}}
\newlabel{prb:1.7}{{1.7}{12}}
\newlabel{prb:1.8}{{1.8}{12}}
\@writefile{lof}{\contentsline {figure}{\numberline {P1.5}{\ignorespaces Figure for Problem 1.7\hbox {}.}}{12}{}\protected@file@percent }
\newlabel{prbfig:P1.7}{{P1.5}{12}}
\@writefile{lof}{\contentsline {figure}{\numberline {P1.6}{\ignorespaces Figure for Problem 1.8\hbox {}.}}{13}{}\protected@file@percent }
\newlabel{prbfig:P1.8}{{P1.6}{13}}
\@setckpt{c01}{
\setcounter{page}{14}
\setcounter{equation}{0}
\setcounter{enumi}{8}
\setcounter{enumii}{0}
\setcounter{enumiii}{0}
\setcounter{enumiv}{0}
\setcounter{footnote}{3}
\setcounter{mpfootnote}{0}
\setcounter{part}{0}
\setcounter{chapter}{1}
\setcounter{section}{6}
\setcounter{subsection}{0}
\setcounter{subsubsection}{0}
\setcounter{paragraph}{0}
\setcounter{subparagraph}{0}
\setcounter{figure}{6}
\setcounter{table}{0}
\setcounter{LT@tables}{1}
\setcounter{LT@chunks}{2}
\setcounter{parentequation}{0}
}
另一个更新:首先,你们都很棒。我从中学到了很多东西,你们的建议帮助我学会了如何在这里分享更多有用和一般的信息。所以谢谢你们。
我包括了三个文件:main.tex、引用的章节 c01.tex(它尽可能少地隔离代码以提供工作示例)以及仅包含 bib38 的 .bib 文件。它产生了我认为是错误的根本原因。有趣的是,如果你注释掉某些部分,它会很好地工作。不太清楚为什么。
main.tex 文件
\documentclass[a4paper,fleqn]{book}%
\usepackage[numbers]{natbib}
\bibliographystyle{unsrtnat}
\begin{document}%
\pagenumbering{roman}
\setcounter{page}{1}%
\pagenumbering{arabic}
\include{c01}
\appendix
\bibliography{zzbib}
% \include{b01}
\end{document}
c01.tex
\chapter{INTRODUCTION}\label{chap:1}
\begin{figure}
%\includegraphic{c01f011.eps}
\caption{Longbow in its unstrung, strung, and drawn positions.\label{fig:1.11}}
\end{figure}
\begin{figure}
%\includegraphic{c01f012.eps}
\caption{Leonardo da Vinci's sketch of a compliant catapult. (From \cite{bib22}.)\label{fig:1.12}}
\end{figure}
Flexible elements have also been used extensively in measurement instruments \cite{bib8,bib9}. Examples include high-accuracy load cells (Figure \ref{fig:1.14}) for force measurement, and Bourdon tubes for pressure measurement.
The number of products that rely on flexible members to perform their functions has increased significantly over the last few decades, thanks in part to the development of stronger and more reliable materials. The use of compliant mechanisms will probably continue to increase with time as materials and design methodologies are improved. The demand for increased product quality and decreased cost also pressures manufacturers to implement compliant mechanisms.
\begin{figure}
%\includegraphic{c01f013.eps}
\caption{(a) Single-axis cross-flexure pivot, and (b) Bendix Corporation flexural pivot.\label{fig:1.13}}
\end{figure}
\begin{figure}
%\includegraphic{c01f014.eps}
\caption{Load cell for force measurement.\label{fig:1.14}}
\end{figure}
University and industry research has played an important role in the development of compliant mechanism theory and application \cite{bib26,bib38,bib58,bib70,bib81,bib83}. Appendix \ref{app:A} lists a number of important publications in the area.
\renewcommand\@makefntext{}\def\thefootnote{*}
\section{COMPLIANT MECHANISMS AND NATURE\protect\footnote{See \cite{bib26}, \cite{bib81}, and \cite{bib83}.}}\label{sec:1.4}
Humans and nature often have differing philosophies on mechanical design. Stiff structures are usually preferred by humans because for many, stiffness means strength. Devices that must be capable of motion are constructed of multiple stiff structures assembled in such a manner as to allow motion (e.g., door hinges, linkages, and roller bearings). However, stiffness and strength cannot be equated--stiffness is a measure of how much something deflects under load, whereas strength is how much load can be endured before failure. Despite human tendencies, it is possible to make things that are flexible \textit{and} strong. Nature uses stiff structures where needed--tree trunks, bones, teeth, and claws--but in living organisms, it more often relies on flexibility in living organisms. Bee wings (Figure \ref{fig:1.15}), bird wings, tree branches, leaf stems, fish (Figure \ref{fig:1.16}), and single-celled organisms are only a few examples of creations that use compliance to their advantage. Nature also has the advantage of \textit{growing} living things, and no assembly is required \cite{bib81}.
\begin{figure}
%\includegraphic{c01f015.eps}
\caption{Bee wings demonstrate the use of compliance in nature.\label{fig:1.15}}
\end{figure}
\renewcommand\@makefntext{}\def\thefootnote{*}
\section{NOMENCLATURE AND DIAGRAMS\protect\footnote{The text and figures of this section are summarized from \cite{bib38}, \cite{bib58}, and \cite{bib70}.}}\label{sec:1.5}
zzbib.tex
@article{bib38,
author = {Her, I. and Midha, A.},
journal = {Journal of Mechanisms, Transmissions, and Automation in Design},
number = {3},
pages = {348-355},
title = {A Compliance Number Concept for Compliant Mechanisms, and Type Synthesis},
volume = {109},
year = {1987},
unidentified = {Trans. ASME},
}
答案1
你提供的信息很少,但我猜你有类似的东西
\documentclass{book}
\begin{document}
\chapter{aaa\cite{bib2}}
\bibliography{bib}
\bibliographystyle{plain}
\end{document}
使用当前的 LaTeX,这将按预期工作,生成
但是如果你有旧的 LaTeX,你会收到警告
LaTeX Warning: Citation `BIB2' on page 2 undefined on input line 1.
用作\MakeUppercase
将大写页眉\cite{bib2}
变为大写\cite{BIB2}
\MakeUppercase
在当前的 LaTeX 中跳过,\cite
但如果更新 latex 不方便,你可以添加
\usepackage[overload]{textcase}
以类似的方式定义 MakeUppercase
或者更好的是使用当前的 LaTeX
\chapter[short aaa]{aaa\cite{bib2}}
因此,目录和页眉中使用不带引文的简短章节标题
更新示例
后面加上问题中的例子就和上面猜测的一样了,具体来说
\section{NOMENCLATURE AND DIAGRAMS\protect\footnote{The text and figures of this section are summarized from \cite{bib38}, \cite{bib58}, and \cite{bib70}.}}\label{sec:1.5}
这使得第 2 页的章节标题和第 3 页的大写页眉以及(使用旧乳胶)断开的大写引用。
使用
\section[NOMENCLATURE AND DIAGRAMS]
{NOMENCLATURE AND DIAGRAMS\protect\footnote{The text and figures of this section are summarized from \cite{bib38}, \cite{bib58}, and \cite{bib70}.}}\label{sec:1.5}
因此脚注不会出现在重复的文本中