0

I am a newbie to LaTeX. I am finishing my thesis and I need my in-text references to be authoryear, rather than numbers. I had my references sorted, with the in-text references as authoryear in author order, and the bibliography also in author order.

enter image description here

enter image description here

I have now been told my in-text references should still be authoryear but they should be in chronological order. I was using the following code:

\documentclass[12pt,twoside]{book} %,PageStyleII,times,numbering,print,custombib
\usepackage{geometry}                       % See geometry.pdf to learn the layout options. There are lots.
\geometry{a4paper}                          % ... or a4paper or a5paper or ... 
\usepackage{floatrow}
\usepackage{setspace}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{lscape}
%\usepackage{float}
\usepackage{booktabs}
\captionsetup[figure]{font={small}, skip=1pt, singlelinecheck=false}
\captionsetup[subfigure]{font={small}, skip=1pt, singlelinecheck=false}
\captionsetup{labelfont=bf}
\captionsetup[table]{font={small}, skip=1pt, singlelinecheck=false}
\raggedbottom
\usepackage{lineno}
\usepackage{mathtools}
\usepackage[all]{nowidow}

\usepackage{cite}
\usepackage{natbib}
\renewcommand\bibname{References}
\usepackage[nottoc]{tocbibind}

\begin{document}

\mainmatter
\Include(Intro)
    

% ********************************** Bibliography ******************************
\begin{spacing}{0.9}

%\addcontentsline{toc}{section}{References}
\bibliographystyle{apalike}%{agsm}apalike, chronological
\bibliography{references} % Path to your References.bib file

\cleardoublepage
\end{spacing}

\end{document}

When I changed to \bibliographystyle{chronological}, it gives the in-text references as authoryear but in chronological order, as I need, but the bibliography is also in chronological order rather than alphabetical by author.

enter image description here

enter image description here

Is there a style that gives the in-text references in chronological order and the bibliography in alphabetical order? I have seen a lot of what look to be very complicated work-arounds using natbib, etc but I wondered if there is a style that does that automatically?

I found this biblatex - quote in chronological order but bibliography list must be alphabetical order but it didn't work for me.

Edited: Here is the code for an Intro.tex file and a references.bib file, for testing (sorry, don't know how to get these attached).

Intro.tex:

\chapter{Introduction}

I would like there references in-text in the chapter to be in chronological order \citep{Carr1983, Brooker2018, Harrison2010, Dickson2023}, while they are alphabetical by author in the Bibliography.

references.bib:

@article{Carr1983,
author = {Carr, Michael H.},
doi = {10.1016/0019-1035(83)90168-9},
file = {:Users/LA/Library/Application Support/Mendeley Desktop/Downloaded/Carr - 1983 - Stability of streams and lakes on Mars.pdf:pdf},
issn = {10902643},
journal = {Icarus},
number = {3},
pages = {476--495},
title = {{Stability of streams and lakes on Mars}},
volume = {56},
year = {1983}
}
@article{Brooker2018,
author = {Brooker, L. M. and Balme, M. R. and Conway, S. J. and Hagermann, A. and Barrett, A. M. and Collins, G. S. and Soare, R. J.},
doi = {10.1016/j.icarus.2017.11.022},
file = {:Users/LA/Library/Application Support/Mendeley Desktop/Downloaded/Brooker et al. - 2018 - Clastic polygonal networks around Lyot crater, Mars Possible formation mechanisms from morphometric analysis.pdf:pdf},
issn = {10902643},
journal = {Icarus},
keywords = {Geological processes,Mars,climate,surface},
pages = {386--406},
publisher = {Elsevier Inc.},
title = {{Clastic polygonal networks around Lyot crater, Mars: Possible formation mechanisms from morphometric analysis}},
url = {https://doi.org/10.1016/j.icarus.2017.11.022},
volume = {302},
year = {2018}
}
@article{Harrison2010,
author = {Harrison, Tanya N. and Malin, Michael C. and Edgett, Kenneth S. and Shean, David E. and Kennedy, Megan R. and Lipkaman, Leslie J. and Cantor, Bruce A. and Posiolova, Liliya V.},
doi = {10.1029/2010GL045074},
file = {:Users/LA/Library/Application Support/Mendeley Desktop/Downloaded/Harrison et al. - 2010 - Impact-induced overland fluid flow and channelized erosion at Lyot Crater, Mars.pdf:pdf},
issn = {00948276},
journal = {Geophysical Research Letters},
keywords = {http://dx.doi.org/10.1029/2010GL045074, doi:10.102},
number = {21},
pages = {1--6},
title = {{Impact-induced overland fluid flow and channelized erosion at Lyot Crater, Mars}},
volume = {37},
year = {2010}
}
@article{Dickson2023,
author = {Dickson, J L and Palumbo, A M and Head, J W and Kerber, L and Fassett, C I and Kreslavsky, M A},
doi = {10.1126/science.abk2464},
file = {:Users/LA/Library/Application Support/Mendeley Desktop/Downloaded/Dickson et al. - 2023 - Gullies on Mars could have formed by melting of water ice during periods of high obliquity.pdf:pdf},
issn = {0036-8075},
journal = {Science},
month = {jun},
number = {6652},
pages = {1363--1367},
title = {{Gullies on Mars could have formed by melting of water ice during periods of high obliquity}},
url = {https://www.science.org/doi/10.1126/science.abk2464},
volume = {380},
year = {2023}
}
6
  • 1
    well you can the sorting, but this is madness. How should anyone find e.g. the reference Ward? Read through the complete bibliography? Sep 21, 2023 at 14:55
  • Sorry, I don’t know what you mean? The in-text references (where there are a few together as the examples above) need to be in chronological order, while the bibliography needs to be alphabetical by author. Is there a style that does that, that you know of? Sep 21, 2023 at 14:59
  • 1
    ah, sorry I misunderstood. Make a complete example with some references so that one can test your issue. Sep 21, 2023 at 15:03
  • It’s not an issue I have. I just would like to know if there is a referencing style that does chronological in-text and alphabetical in the bibliography. Sep 21, 2023 at 15:29
  • 1
    Well sorry but if you don't give me a test document I can't check if the code I have in mind works. Sep 21, 2023 at 16:06

1 Answer 1

2

With biblatex+ biber it would be rather trivial as the answers in the question you linked to show. With natbib it is a bit more difficult, but you can try the following. Do not use the cite package with natbib. natbib has its own code. I added the Dickson2023-b entry to test entries with an extrayear suffix.

\documentclass{article}
\begin{filecontents}[overwrite]{test-order.bib}
@article{Carr1983,
author = {Carr, Michael H.},
doi = {10.1016/0019-1035(83)90168-9},
file = {:Users/LA/Library/Application Support/Mendeley Desktop/Downloaded/Carr - 1983 - Stability of streams and lakes on Mars.pdf:pdf},
issn = {10902643},
journal = {Icarus},
number = {3},
pages = {476--495},
title = {{Stability of streams and lakes on Mars}},
volume = {56},
year = {1983}
}
@article{Brooker2018,
author = {Brooker, L. M. and Balme, M. R. and Conway, S. J. and Hagermann, A. and Barrett, A. M. and Collins, G. S. and Soare, R. J.},
doi = {10.1016/j.icarus.2017.11.022},
file = {:Users/LA/Library/Application Support/Mendeley Desktop/Downloaded/Brooker et al. - 2018 - Clastic polygonal networks around Lyot crater, Mars Possible formation mechanisms from morphometric analysis.pdf:pdf},
issn = {10902643},
journal = {Icarus},
keywords = {Geological processes,Mars,climate,surface},
pages = {386--406},
publisher = {Elsevier Inc.},
title = {{Clastic polygonal networks around Lyot crater, Mars: Possible formation mechanisms from morphometric analysis}},
url = {https://doi.org/10.1016/j.icarus.2017.11.022},
volume = {302},
year = {2018}
}
@article{Harrison2010,
author = {Harrison, Tanya N. and Malin, Michael C. and Edgett, Kenneth S. and Shean, David E. and Kennedy, Megan R. and Lipkaman, Leslie J. and Cantor, Bruce A. and Posiolova, Liliya V.},
doi = {10.1029/2010GL045074},
file = {:Users/LA/Library/Application Support/Mendeley Desktop/Downloaded/Harrison et al. - 2010 - Impact-induced overland fluid flow and channelized erosion at Lyot Crater, Mars.pdf:pdf},
issn = {00948276},
journal = {Geophysical Research Letters},
keywords = {http://dx.doi.org/10.1029/2010GL045074, doi:10.102},
number = {21},
pages = {1--6},
title = {{Impact-induced overland fluid flow and channelized erosion at Lyot Crater, Mars}},
volume = {37},
year = {2010}
}
@article{Dickson2023,
author = {Dickson, J L and Palumbo, A M and Head, J W and Kerber, L and Fassett, C I and Kreslavsky, M A},
doi = {10.1126/science.abk2464},
file = {:Users/LA/Library/Application Support/Mendeley Desktop/Downloaded/Dickson et al. - 2023 - Gullies on Mars could have formed by melting of water ice during periods of high obliquity.pdf:pdf},
issn = {0036-8075},
journal = {Science},
month = {jun},
number = {6652},
pages = {1363--1367},
title = {{Gullies on Mars could have formed by melting of water ice during periods of high obliquity}},
url = {https://www.science.org/doi/10.1126/science.abk2464},
volume = {380},
year = {2023}
}

@article{Dickson2023-b,
author = {Dickson, J L and Palumbo, A M and Head, J W and Kerber, L and Fassett, C I and Kreslavsky, M A},
doi = {10.1126/science.abk2464},
file = {:Users/LA/Library/Application Support/Mendeley Desktop/Downloaded/Dickson et al. - 2023 - Gullies on Mars could have formed by melting of water ice during periods of high obliquity.pdf:pdf},
issn = {0036-8075},
journal = {Science},
month = {jun},
number = {6652},
pages = {1363--1367},
title = {{Gullies on Mars could have formed by melting of water ice during periods of high obliquity}},
url = {https://www.science.org/doi/10.1126/science.abk2464},
volume = {380},
year = {2023}
}
\end{filecontents}
\usepackage[sort]{natbib}
\makeatletter
\ExplSyntaxOn

\AddToHook{cmd/NAT@sort@cites/after}{\mart_sort_cites:N\NAT@cite@list}% 
 
\cs_new_protected:Npn \mart_sort_cites:N #1
  { 
    \clist_sort:Nn #1
     {
       \NAT@parse {##1}       
       \regex_extract_once:nVNF {\d+}\NAT@date \l_tmpa_seq
         {\seq_put_right:Nn\l_tmpa_seq{9999}}       
       \NAT@parse {##2}       
       \regex_extract_once:nVNF {\d+}\NAT@date \l_tmpb_seq
         {\seq_put_right:Nn\l_tmpb_seq{9999}}       
       \int_compare:nNnTF 
         { \seq_item:Nn \l_tmpa_seq {1} }> {\seq_item:Nn \l_tmpb_seq {1}}
         {\sort_return_swapped:}
         {\sort_return_same:}        
     }
  }
  
\ExplSyntaxOff 
\makeatother

\begin{document}
\citep{Dickson2023-b,Carr1983, Brooker2018, Harrison2010, Dickson2023}
\bibliographystyle{apalike}%{agsm}apalike, chronological
\bibliography{test-order} % Path to your References.bib file

\end{document}

enter image description here

1
  • It didn't work for me but I can't show you in the comment section, so I have put it as an answer below. Verboten, I know, but mais voila. Sep 22, 2023 at 11:16

You must log in to answer this question.

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