1

I am writing a paper like the following one, and bibtex creates cites inside of cites:

\documentclass{article}
\begin{document}

cite1~\cite{abc:oopsla2005} 
cite2~\cite{martinAl:oopsla2005}

\bibliographystyle{plain}
\bibliography{bib,crossref}

\end{document}

Where bib.bib contains:

@InProceedings{martinAl:oopsla2005,
author = {Michael Martin and Benjamin Livshits and Monica S. Lam},
title = {Finding application errors and security flaws using {PQL}: a program query language},
crossref = {oopsla2005},
pages = {365--383},
}

and crossref.bib contains:

@proceedings{oopsla2005,
key = {OOPSLA 2005},
booktitle =  {Proceedings of the 20th {ACM SIGPLAN} Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005)},
title =      {Proceedings of the 20th {ACM SIGPLAN} Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005)},
year =      2005,
address =      {San Diego, California, USA},
month =        oct,
publisher =     acm,
note =         sigplan # {, 40(11)}       
}

So, when I create the pdf file, I get:

[1] M. Martin, B. Livshits, M. S. Lam, Finding application errors and security flaws using PQL: a program query language, in: [3], pp. 365–383. ACM SIGPLAN Notices, 40(11).

[2] C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhot ́ak, O. de Moor, D. Sereni, G. Sittampalam, J. Tibble, Adding trace matching with free variables to AspectJ, in: [3], pp. 345–364. ACM SIGPLAN Notices, 40(11).

where [3] is:

[3] OOPSLA 2005, Proceedings of the 20th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005), ACM Press, San Diego, California, USA, 2005. ACM SIGPLAN Notices, 40(11).

I would like to extend cites 1 and 2 to show the full content of these references. If I can show full references, I expect Latex/Bibtex removes reference 3.

Is it possible to set some parameters in Latex to achieve my goal? (I cannot use a line command option because my Latex file is compiled in the journal server)

In other words, I just want to get:

[1] M. Martin, B. Livshits, M. S. Lam, Finding application errors and security flaws using PQL: a program query language, in Proceedings of the 20th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005), ACM Press, San Diego, California, USA, 2005. ACM SIGPLAN Notices, 40(11).

[2] C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhot ́ak, O. de Moor, D. Sereni, G. Sittampalam, J. Tibble, Adding trace matching with free variables to AspectJ, in Proceedings of the 20th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005), ACM Press, San Diego, California, USA, 2005. ACM SIGPLAN Notices, 40(11).

1
  • You should probably be compiling with something like bibtex -min-crossrefs=5. However, your example above is missing the first citation, could you update the code? Commented Sep 4, 2014 at 7:31

1 Answer 1

2

Your posting is missing a few details, such as an entry for the piece by Allan et al. My answer thus can't fully replicate what you're after. Some observations:

  • To use BibTeX's crossref facility, use the label of one entry as the value of the crossref field of the other; don't use a field called key.

  • You're already doing this, but just for completeness: The entry being cross-referenced must come later in the bib file (or bib files) than the entry (or entries) that contain a crossref to that entry.

  • If you only want the "main" entries to show up in the bibliography but not the entry containing some of the crossref information, don't \cite the entry being cross-referenced.

  • If you want abbreviated first names, you should use a bibliography style such as abbrvnat (if you use the natbib package) or abbrv; don't use plain (or plainnat).

enter image description here

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents*}{bib.bib}
@InProceedings{martinAl:oopsla2005,
crossref = {oopsla2005},
author = {Michael Martin and Benjamin Livshits and Monica S. Lam},
title = {Finding application errors and security flaws using {PQL}: a program query language},
pages = {365--383},
}
\end{filecontents*}
\begin{filecontents*}{crossref.bib}
@book{oopsla2005,
booktitle =  {Proceedings of the 20th {ACM SIGPLAN} Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005)},
title =      {Proceedings of the 20th {ACM SIGPLAN} Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005)},
year =      2005,
address =      {San Diego, California},
month =        oct,
publisher =     acm,
note =         sigplan # {, 40(11)}  ,     
}
\end{filecontents*}
\usepackage{natbib}

\begin{document}
%cite1~\cite{oopsla2005} %% no need to 

\cite{martinAl:oopsla2005}

\bibliographystyle{abbrvnat}
\bibliography{bib,crossref}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .