1

I don't know whether I should ask a new question.

Following the advice I got here

\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}

will produce

enter image description here

How I should modify the structure

\newcommand{\ignore}[1]{}
    \newcommand{\nobibentry}[1]{{\let\nocite\ignore\bibentry{#1}}}

in order to modify the format of the item that appears in the Abstract according to my will? For instance if I want to drop the appearance of the Title of the bib item?

Thanks a lot.

  • I don't think there's a need to use the (unknown) model1-num-names+blank bibliography style. A similar output is achieved with unsrt. – Werner Jan 20 '16 at 15:31
  • Hi. The question is a sequel of the original question http://%20%20%20%20%20%20%20[1]:%20http://tex.stackexchange.com/questions/288534/how-can-i-insert-a-complete-reference-into-abstract-using-bibtex-elsarticle. In the reply I got, it was suggested to modify model1-num-names.bst (by adding an additional line). – Dimitris Jan 20 '16 at 15:39
2

Not a general solution, because it depends on how the bst writes out the .bbl file. In this particular case, adding

\makeatletter
\def\bibinfo@X@title#1,{\ignorespaces}
\makeatother

to the preamble makes \bibentry (and so also \nobibentry) into ignoring the title field.

\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}

enter image description here

  • Thanks for the answer. I don't know what's happening. When I run a simple sample file everything works fine. But I when I add the workaround in the article that I working it appears an error message ! Paragraph ended before \@tempa was complete. – Dimitris Jan 20 '16 at 16:28
  • Can you add the bib entry causing the issue? – egreg Jan 20 '16 at 16:30
  • Of course! @article{billon2012new, title={New constitutive modeling for time-dependent mechanical behavior of polymers close to glass transition: Fundamentals and experimental validation}, author={Billon, No{\"e}lle}, journal={Journal of Applied Polymer Science}, volume={125}, number={6}, pages={4390--4401}, year={2012}, publisher={Wiley Online Library} } – Dimitris Jan 20 '16 at 16:36
  • The weird thing is that the sample file I have created calls also the same \bibliography ! And it works as desired! – Dimitris Jan 20 '16 at 16:37
  • Sorry, but if I add the bib entry in my test file, I get no error. – egreg Jan 20 '16 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.