我有一个问题。根据我从这里
\begin{filecontents*}{\jobname.bib}
@article{one,
author={A. Uthor},
title={Title},
journal={Journal},
year={2010},
}
@article{two,
author={A. Uthor},
title={Title 2},
journal={Journal},
year={2011},
}
@article{three,
author={W. Riter},
title={Title},
journal={Journal},
year={2012},
}
@article{four,
author={S. C. I. Entist},
title={Title},
journal={Journal},
year={2013},
}
\end{filecontents*}
\documentclass[preprint,12pt]{elsarticle}
\usepackage{bibentry}
\newcommand{\ignore}[1]{}
\newcommand{\nobibentry}[1]{{\let\nocite\ignore\bibentry{#1}}}
\begin{document}
\nobibliography*
\begin{frontmatter}
\title{Title}
\author{Me}
\begin{abstract}
In my abstract I want to talk about \nobibentry{one}.
\end{abstract}
\end{frontmatter}
In the body of the text there is \cite{three}, and also I talk
about \cite{two,four}, but I should also not forget to cite
somewhere the \cite{one}.
\bibliographystyle{model1-num-names+blank}
\bibliography{\jobname}
\end{document}
将产生
我应该如何修改结构
\newcommand{\ignore}[1]{}
\newcommand{\nobibentry}[1]{{\let\nocite\ignore\bibentry{#1}}}
为了根据我的意愿修改摘要中出现的项目的格式?例如,如果我想删除 bib 项目标题的外观?
答案1
这不是通用的解决方案,因为它取决于如何bst
写出.bbl
文件。在这个特定情况下,添加
\makeatletter
\def\bibinfo@X@title#1,{\ignorespaces}
\makeatother
序言部分\bibentry
(以及同样\nobibentry
)忽略了标题字段。
\begin{filecontents*}{\jobname.bib}
@BOOK{simo2006computational,
title={Computational inelasticity},
author={Simo, Juan C and Hughes, Thomas JR},
volume={7},
year={2006},
publisher={Springer Science \& Business Media},
}
@article{one,
author={A. Uthor},
title={Title},
journal={Journal},
year={2010},
}
@article{two,
author={A. Uthor},
title={Title 2},
journal={Journal},
year={2011},
}
@article{three,
author={W. Riter},
title={Title},
journal={Journal},
year={2012},
}
@article{four,
author={S. C. I. Entist},
title={Title},
journal={Journal},
year={2013},
}
\end{filecontents*}
\documentclass[preprint,12pt]{elsarticle}
\usepackage{bibentry}
\newcommand{\ignore}[1]{}
\newcommand{\nobibentry}[1]{{\let\nocite\ignore\bibentry{#1}}}
\makeatletter
\def\bibinfo@X@title#1,{\ignorespaces}
\makeatother
\begin{document}
\nobibliography*
\begin{frontmatter}
\title{Title}
\author{Me}
\begin{abstract}\raggedright % just to show no extra spaces are added
In my abstract I want to talk about \nobibentry{simo2006computational}.
And also \nobibentry{one}.
\end{abstract}
\end{frontmatter}
In the body of the text there is \cite{three}, and also I talk
about \cite{two,four}, but I should also not forget to cite
somewhere the \cite{simo2006computational}. Also \cite{one}.
\bibliographystyle{model1-num-names+blank}
\bibliography{\jobname}
\end{document}