我正在使用多围兜包,用于从两个单独的文件创建包含两个参考书目的文档bib
。在其中一个文件中,每个条目的注释字段指示其学术产品的类型:期刊、会议、海报等,并用于\hfill
将注释放置在参考书目中条目的右下角。以下是完整示例:
\documentclass{article}
\usepackage{multibib}
\usepackage{amstext}
\newcites{scholarlyproducts}{\text{Scholarly Products}}
\usepackage{filecontents}
\begin{filecontents}{main.bib}
@book{knuth1979tex,
title = {TEX and METAFONT: New directions in typesetting},
author = {Knuth, Donald Ervin},
year = {1979},
publisher = {American Mathematical Society}
}
\end{filecontents}
\begin{filecontents}{products.bib}
@article{doe2018laification,
author = {Jane Doe},
title = {On the Laification of Tex},
journal = {Nature: typesetting},
volume = {2018},
note = {\hfill[journal]}
}
\end{filecontents}
\begin{document}
In~\cite{knuth1979tex}, the author uses math to beautiful effect.
\bibliographystyle{plain} % or acm, ieeetr, siam
\bibliography{main}
\nocitescholarlyproducts{doe2018laification}
\bibliographystylescholarlyproducts{unsrt}
\bibliographyscholarlyproducts{products}
\end{document}
我怀疑这不是注释字段的预期用途,但是它具有预期的效果,只是在每个条目的注释后添加了一个句点scholarlyproducts.bbl
,而这是我不想要的:
\begin{thebibliography}{1}
\bibitem{doe2018laification}
Jane Doe.
\newblock On the laification of tex.
\newblock {\em Nature: typesetting}, 2018.
\newblock \hfill[journal]. % <-- undesired period
\end{thebibliography}
如何防止参考书目样式在注释字段后添加句号?理想情况下,解决方案将是程序化的(而不是bst
黑客攻击),或者只是不使用注释字段。谢谢!
答案1
最简单的解决方案是更改文件bst
以满足您的需求。您不希望这样,因此还有其他解决方案:
添加到您的bib
文件
@preamble{"\def\gobbledot.{}"}
然后在每个注释字段的末尾写上\gobbledot
。例如
\begin{filecontents}{products.bib}
@article{doe2018laification,
author = {Jane Doe},
title = {On the Laification of Tex},
journal = {Nature: typesetting},
volume = {2018},
note = {\hfill[journal]\gobbledot}
}
\end{filecontents}
然后 TeX 将会跳过句号。