natbib no ordena ni comprime

natbib no ordena ni comprime

Tengo un artículo en el que estoy usando natbib con sort&compressopción, pero no parece funcionar.

\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=2cm,rmargin=2cm}
\usepackage{mathrsfs}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[sort&compress,numbers]{natbib}
\usepackage{babel}
\begin{document}

\title{Title}
\maketitle
\begin{abstract}
Abstract text
\end{abstract}

\section{Introduction}

Introduction text \citet{J2009,J2013,J2016}.

\bibliographystyle{unsrtnat}
\bibliography{references}

\end{document}

y este es el archivo de referencias

% filename references.bib

@Article{J2016,
  author  = {Jappo, P.M.},
  title   = {Title1},
  journal = {Mech. Res. Commun.},
  year    = {2016},
  volume  = {X},
  pages   = {1--2},
}

@Article{J2013,
  author  = {Jappo, P.M.},
  title   = {Title2},
  journal = {Phys. Lett. A},
  year    = {2013},
  volume  = {X},
  pages   = {1--2},
}

@Article{J2009,
  author  = {Jappo, P.M.},
  title   = {Title3},
  journal = {Math. Comput. Simul},
  year    = {2009},
  volume  = {X},
  pages   = {1--2},
}

Respuesta1

natbibno puede ordenar \citetcitas porque ordena y comprime solo secuencias numéricas. No prueba si los nombres son iguales o no, antes de comprimir las secuencias numéricas. Entonces solo \citeo \citepse puede comprimir.

\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[sort&compress,numbers]{natbib}
\usepackage{babel}
\begin{document}

\title{Title}
\maketitle
\begin{abstract}
Abstract text
\end{abstract}

\section{Introduction}

Introduction text \cite{J2009,J2013,J2016}.

\bibliographystyle{unsrtnat}
\bibliography{\jobname}

\end{document}

ingrese la descripción de la imagen aquí

De hecho, la documentación natbibes de alguna manera engañosa.

Si sabes que los autores son los mismos, puedes usar

Introduction text \citeauthor{J2009} \cite{J2009,J2013,J2016}.

Llegar

ingrese la descripción de la imagen aquí

pero yo llamaría a esto sólo una solución alternativa, no una solución.

Una solución real sería cambiar abiblatexconbiber. Puede utilizar la opción natbibsi no desea cambiar todo el contenido \citetde su documento existente:

\begin{filecontents*}{\jobname.bib}
% filename references.bib

@Article{J2016,
  author  = {Jappo, P.M.},
  title   = {Title1},
  journal = {Mech. Res. Commun.},
  year    = {2016},
  volume  = {X},
  pages   = {1--2},
}

@Article{J2013,
  author  = {Jappo, P.M.},
  title   = {Title2},
  journal = {Phys. Lett. A},
  year    = {2013},
  volume  = {X},
  pages   = {1--2},
}

@Article{J2009,
  author  = {Jappo, P.M.},
  title   = {Title3},
  journal = {Math. Comput. Simul},
  year    = {2009},
  volume  = {X},
  pages   = {1--2},
}
\end{filecontents*}

\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[style=numeric-comp,sortcites,natbib]{biblatex}
\usepackage{babel}
\addbibresource{\jobname.bib}

\begin{document}

\title{Title}
\maketitle
\begin{abstract}
Abstract text
\end{abstract}

\section{Introduction}

Introduction text \citet{J2009,J2013,J2016}.

\printbibliography

\end{document}

Esto resulta en:

solución biblatex

información relacionada