1

This is a follow up question to Several citations in the same bracket


I want to cite multiple authors in the same \cite{} command instead of making each of them in separated. It works fine for citations of one specific kind (e.g. only articles) but I get error when mixing different types of publications (e.g. @book, @article, @THESIS).

\cite{ref1}, \cite{ref2} ----> [1], [2] OK!

\cite{ref1,ref2} ----> [1, 2] OK! for references of the same type (ref1 and ref2 being articles).

\cite{ref1,ref2} ----> [1, 2] FAIL! for references of the different type (ref1 being an article and ref2 a thesis).

How to solve that problem in my document?

OBS1: This kind of reference is demanded in my thesis and I can't make it work. The citation package is abntcite.

OBS2: The style of document I am using is the standard of my institution (for PhD- and Master Thesis) and I don't know every detail of the documentclass. I can't even make a MWE that works. Still my attempt:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{book,
  editor        = "J. C. Candy and G. C. Temes",
  title         = "Oversampling Delta-Sigma Data Converters Theory, Design and Simulation",
  publisher     = "{IEEE} Press.",
  location      = "New York",
  year          = "1992"
}
@article{article1,
  author        = "A. Castaldini and A. Cavallini and B. Fraboni and P. Fernandez and J. Piqueras",
  title         = "Midgap Traps Related to Compensation Processes in {CdTe} Alloys",
  journaltitle  = "Phys. Rev. B.",
  volume        = "56",
  number        = "23",
  year          = "1997",
  pages         = "14897-14900"
}
@article{article2,
  author        = "M. Coates and A. Hero and R. Nowak and B. Yu",
  title         = "Internet Tomography",
  journaltitle  = "IEEE J. Selected Areas Commun.",
  month         = 05,
  year          = "2002",
  note          = "to be published"
}
@THESIS{PhD1,
author = {Souza, J. R. de}, 
title = {Model},
school = inpebr,
year = {1997},
type = GESPhD,
address = sjc,
pages = {182},
note = { },
url = { }
}%
@MISC{oliveira,
   organization = {Instituto Tecnologico de Aeronautica - ITA},
   author   = {Oliveira, A. B. V. and  Walter, F.},
   title    = {Ionospheric equatorial anomaly studies during solar storms},
   year = {2005},
   url = { },
   urlaccessdate = { },
   note      = {In: International Union of Radio Science},
   address   = {São José dos Campos – SP},
   publisher = {Instituto Tecnológico de Aeronáutica},
}
\end{filecontents*}
\documentclass[12pt,twoside,onecolumn,openright,a4paper]{report}
\gdef\@tipocitacao{alf}
\DeclareOption{CitacaoNumerica}{%
    \typeout{-------------->Opcao: CitacaoNumerica}
    \gdef\@tipocitacao{num}
}
%%% Pacote da ABNTeX para referências dentro das normas %%%
\gdef\@sepbr{no} %% yes ou no para pagebackref em abnt-verbatim-entry

%\gdef\@tipocitacao{num}
\usepackage[debug,pagebackref=\@ativapbr,breaklinks,bookmarksopen=true,colorlinks=true,linkcolor=bblue,citecolor=bblue,urlcolor=bblue,filecolor=bblue,bookmarksnumbered=true,hyperindex=true,verbose=true]{hyperref}

\usepackage[\@tipocitacao,abnt-emphasize=bf,abnt-etal-cite=2,abnt-etal-list=0,abnt-repeated-title-omit=yes,abnt-show-options=warn,abnt-verbatim-entry=\@sepbr,abnt-url-package=url]{abntcite}
%% Ativa bibliografia explicita (abnt-verbatim-entry) no formato bibtex
%% incompatível com o backref.sty por enquanto (ou um ou outro)
\gdef\@ativapbr{true} %% true or false : ativa pagebackref


\bibliography{\jobname}

\begin{document}

\cite{book, article1, article2}

\printbibliography

\end{document}
2
  • It is going to be very difficult to help without any idea what code you're using (e.g. where is abntcite.sty found?). However, you are missing \makeatletter and \makeatother in the preamble around the stuff which includes @ in macro names.
    – cfr
    Jun 25 '16 at 1:53
  • Note that by default, this just works. It doesn't matter whether the entries have different types or not. It might not like the spaces, though.
    – cfr
    Jun 25 '16 at 1:55
2

It may as well be that the OP has already finished her thesis by now, but here we go...

First of all I picked up on a few bibliography entries missing commas (,) and field delimeters ({ } or " "), so there's that. Also, I don't know if you defined it and forgot to put it in the MWE but there is no standard bblue color for hyperref, there's also that. Second (as far as I'm aware) you should use normal \usepackage for document writing instead of the class writing command \RequirePackage, the same could be said fo \DeclareOption.

Finally, to answer the question: I'm not quite sure what the problem is with abntcite and, honestly, I don't care. Neither should you, as it's deprecated. Both abntex class and abntcite package have new versions which are being properly maintained: abntex2 and abntex2cite respectively, and should be used instead (both manuals are in pt_BR). With the proper modifications and the use of abntex2cite your code compiles just fine! Check it out.

\documentclass[12pt,twoside,onecolumn,openright,a4paper]{report}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{book,
  editor        = "J. C. Candy and G. C. Temes",
  title         = "Oversampling Delta-Sigma Data Converters Theory, Design and Simulation",
  publisher     = "{IEEE} Press.",
  location      = "New York",
  year          = "1992"
}

@article{article1,
  author        = "A. Castaldini and A. Cavallini and B. Fraboni and P. Fernandez and J. Piqueras",
  title         = "Midgap Traps Related to Compensation Processes in {CdTe} Alloys",
  journaltitle  = "Phys. Rev. B.",
  volume        = "56",
  number        = "23",
  year          = "1997",
  pages         = "14897-14900"
}

@article{article2,
  author        = "M. Coates and A. Hero and R. Nowak and B. Yu",
  title         = "Internet Tomography",
  journaltitle  = "IEEE J. Selected Areas Commun.",
  month         = 05,
  year          = "2002",
  note          = "to be published"
}

@THESIS{PhD1,
author = "Souza, J. R. de", 
title = "Model",
school = "inpebr",
year = "1997",
type = "GESPhD",
address = "sjc",
pages = "182"
}

@MISC{oliveira,
   organization = "Instituto Tecnologico de Aeronautica - ITA",
   author   = "Oliveira, A. B. V. and  Walter, F.",
   title    = "Ionospheric equatorial anomaly studies during solar storms",
   year = "2005",
   note      = "In: International Union of Radio Science",
   address   = "São José dos Campos – SP",
   publisher = "Instituto Tecnológico de Aeronáutica"
}
\end{filecontents*}

\usepackage[debug,
            pagebackref=true,
            breaklinks,
            bookmarksopen=true,
            colorlinks=true,
            linkcolor=blue,
            citecolor=blue,
            urlcolor=blue,
            filecolor=blue,
            bookmarksnumbered=true,
            hyperindex=true,
            verbose=true]{hyperref}

\usepackage[alf,
            abnt-emphasize=bf,
            abnt-etal-cite=2,
            abnt-etal-list=0,
            abnt-repeated-title-omit=yes,
            abnt-show-options=warn,
            abnt-verbatim-entry=no,
            abnt-url-package=url]{abntex2cite}

\begin{document}

\cite{book, article1, article2}

\bibliography{\jobname}

\end{document}

Furthermore, if you do not have the abntex2cite package consider upgrading your TeX distribution to the newest available. Or, if you know your ways, manually add the relevant classes/packages.

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.