BibTeX, biblatex and biberSwitching between numeric and authoryear in natbib for multiple citations

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
shenoivis
Posts: 4
Joined: Mon Mar 23, 2015 6:53 am

Switching between numeric and authoryear in natbib for multiple citations

Post by shenoivis »

\documentclass[a4paper,12pt]{report}
\usepackage[author year]{natbib}

\makeatletter                         % Reference list option change
\renewcommand\@biblabel[1]{#1.}       %   from [1] to 1.

\newcommand\Mycitep[1]{% 
  (\citeauthor{#1},~\citeyear{#1})
  }
\newcommand\Mycitet[1]{%
  \citeauthor{#1}~(\citeyear{#1})}
 \setcitestyle{numbers}
 
  \begin{document}
  The researchers have proposed and are proposing the best practices \Mycitep{martilla1977importance}, guidelines and the concepts of risk mitigation strategies and business continuity planning with an aim to create resilient supply chains \Mycitep{martilla1977importance,shaw2012supplier}.
  
  
  
  \bibliography{jour_bibliography}
  \bibliographystyle{agsm}
  \end{document}
with jour_bibliography.bib:
@article{martilla1977importance,
  title={Importance-performance analysis},
  author={Martilla, John A and James, John C},
  journal={The Journal of Marketing},
  pages={77--79},
  year={1977},
  publisher={JSTOR}
}

@article{bogataj2007measuring,
  title={Measuring the supply chain risk and vulnerability in frequency space},
  author={Bogataj, David and Bogataj, Marija},
  journal={International Journal of Production Economics},
  volume={108},
  number={1},
  pages={291--301},
  year={2007},
  publisher={Elsevier}
}
The output as follows:

    The researchers have proposed and are proposing the best practices (Mar- tilla & James, 1977), guidelines and the concepts of risk mitigation strategies and business continuity planning with an aim to create resilient supply chains (Martilla & James, Shaw et al., 1977, 2012).

How can I extend it if the citation contains multiple entry?

I get the following wrong citation for multiple entry:

    (Martilla & James, Shaw et al., 1977, 2012)

instead of

    (Martilla & James, 1977; Shaw et al., 2012)
Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Switching between numeric and authoryear in natbib for multiple citations

Post by Johannes_B »

The old natbibBibTeX system cannot do it just as easy. Especially not with your strange commands.

Are you free to choose how you get the citations/bibliography? If so, please consider the modern package biblatex.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply