1

Basically, I am trying to write a paper for a Springer journal and I am using their template which you can download here. I am uploading it as a Zip file on Overleaf.

Thanks to this answer, I could manage to produce the citations because the bst files they have are in a bst folder, not in the root folder where .tex main article file exists. So I moved a bst file into the root folder. I could use \cite{...} command where it shows reference with number and square brackets, such as [1].

However, as their documentation claims, unfortunately, \citep{...} option is not working. It still gives me the same output as \cite{...} does. In other words, \citep{...} does not print (Jones et al., 1990).

As this answer points out, I tried to write \documentclass{sn-jnl} without "sn-mathphys" but this time, I get an error, "Package natbib Warning: Author undefined for citation 'bib1' on page 2 on input line 129." whic I do have it!

and I tried many things and could not work it out.

Note that minimal example is already in download file with the bib items.

EDIT:

As a commenter points out, here is Springer Nature latex template preamble:

%%\documentclass[pdflatex,sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style
%%\documentclass{sn-jnl}
%%\documentclass[sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style
\documentclass[sn-mathphys]{sn-jnl}% Math and Physical Sciences Reference Style
%%\documentclass[sn-aps]{sn-jnl}% American Physical Society (APS) Reference Style
%%\documentclass[sn-vancouver]{sn-jnl}% Vancouver Reference Style
%%\documentclass[sn-aps]{sn-jnl}% APA Reference Style
%%\documentclass[sn-chicago]{sn-jnl}% Chicago-based Humanities Reference Style
%%\documentclass[sn-standardnature]{sn-jnl}% Standard Nature Portfolio Reference Style
%%\documentclass[default]{sn-jnl}% Default
%%\documentclass[default,iicol]{sn-jnl}% Default with double column layout

Here I need to use \documentclass[sn-mathphys]{sn-jnl} since it is a mathematical paper. Besides, I put sn-mathphys.bst file in root folder, as I mentioned above.

This is the claim what this template does with \citep{...} command but it does not work:

enter image description here

Besides, what \citep does is pretty obvious. I want to have authoryear-style citation.

3
  • 2
    I'm afraid that, so far, you've been telling us more about what you're not doing instead of what you actually are doing. We need to know (a) the list of arguments of the \documentclass instruction in your document and (b) whether you want to generate authoryear-style or numeric-style citation call-outs.
    – Mico
    Feb 10, 2022 at 6:32
  • What you mean by telling you what I am not doing? This is a journal template that I am having an issue with. I have provided the download link. So far, there are lots of questions about the citations using this template, which I also gave two answers what has been offered as help and I have tried but I could not make it work. As my question is pretty clear that \citep command is not doing what it is supposed to do, even though Springer's documentation tells it does! What else do I need to tell? I edited my question
    – ARAT
    Feb 10, 2022 at 9:45
  • 1
    You provide no code we can test. We don't know what packages you load... Please provide a full (but minimal) example that others can copy and test as is (we don't need your full article, but the smallest you can make that still gives you problems). Then we can test at our end and provide solutions. As Mico writes, there yuo are jsut writing a lot of test describing your issue, but not code we can test as is.
    – daleif
    Feb 10, 2022 at 10:58

1 Answer 1

2

You seem to be under the impression that \citep will (should?) always produce authoryear-style citation call-outs. This impression is not correct.

Specifically, \citep can generate authoryear-style citation call-outs only if the bibliography style that's in use supports this citation call-out style. Unfortunately for you, sn-mathphys is not one of these bibiography styles.

Consider the following minimalist test document:

\documentclass[sn-mathphys]{sn-jnl} % use natbib package and sn-mathphys bib style
\begin{filecontents}[overwrite]{test.bib}
@misc{a:3001, author="Anne Author", title="Thoughts", year=3001}}
\end{filecontents}
%\setcitestyle{authoryear}

\begin{document}
\citep{a:3001}
\bibliography{test}
\end{document}

Sure enough, it produces a numeric-style citation call-out:

enter image description here

If one were to uncomment the directive \setcitestyle{authoryear}, one gets the following error message:

! Package natbib Error: Bibliography not compatible with author-year citations.

(natbib)                Press <return> to continue in numerical citation style.


See the natbib package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.23 ...mand\NAT@force@numbers{}\NAT@force@numbers

What's the upshot? The sn-mathphys bib style is not capable of generating authoryear-style citation call-outs. That is why both \cite and \citep create numeric-style citation call-outs instead.

You must log in to answer this question.

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