0

I'm trying to include my references based on:

https://www.springernature.com/gp/authors/campaigns/latex-author-support

But it turned out I can't include references even on their original example. I get only question marks in the place where references should appear. And compiling .bib file, paper or using F11 - does not help. There is no way to include references. Although in ACM or IEEEtran format it worked.

How to include that references in their original example?

This is thei example wihtout some sections:

%Version 2.1 April 2023
% See section 11 of the User Manual for version history
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                 %%
%% Please do not use \input{...} to include other tex files.       %%
%% Submit your LaTeX manuscript as one .tex document.              %%
%%                                                                 %%
%% All additional figures and files should be attached             %%
%% separately and not embedded in the \TeX\ document itself.       %%
%%                                                                 %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%\documentclass[referee,sn-basic]{sn-jnl}% referee option is meant for double line spacing

%%=======================================================%% %% to print line numbers in the margin use lineno option %% %%=======================================================%%

%%\documentclass[lineno,sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style

%%======================================================%% %% to compile with pdflatex/xelatex use pdflatex option %% %%======================================================%%

%%\documentclass[pdflatex,sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style

%%Note: the following reference styles support Namedate and Numbered referencing. By default the style follows the most common style. To switch between the options you can add or remove Numbered in the optional parenthesis. %%The option is available for: sn-basic.bst, sn-vancouver.bst, sn-chicago.bst, sn-mathphys.bst. %

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

%%%% Standard Packages %%<additional latex packages if required can be included here>

\usepackage{graphicx}% \usepackage{multirow}% \usepackage{amsmath,amssymb,amsfonts}% \usepackage{amsthm}% \usepackage{mathrsfs}% \usepackage[title]{appendix}% \usepackage{xcolor}% \usepackage{textcomp}% \usepackage{manyfoot}% \usepackage{booktabs}% \usepackage{algorithm}% \usepackage{algorithmicx}% \usepackage{algpseudocode}% \usepackage{listings}% %%%%

%%%%%=============================================================================%%%% %%%% Remarks: This template is provided to aid authors with the preparation %%%% of original research articles intended for submission to journals published %%%% by Springer Nature. The guidance has been prepared in partnership with %%%% production teams to conform to Springer Nature technical requirements. %%%% Editorial and presentation requirements differ among journal portfolios and %%%% research disciplines. You may find sections in this template are irrelevant %%%% to your work and are empowered to omit any such section if allowed by the %%%% journal you intend to submit to. The submission guidelines and policies %%%% of the journal take precedence. A detailed User Manual is available in the %%%% template package for technical guidance. %%%%%=============================================================================%%%%

%\jyear{2021}%

%% as per the requirement new theorem styles can be included as shown below \theoremstyle{thmstyleone}% \newtheorem{theorem}{Theorem}% meant for continuous numbers %%\newtheorem{theorem}{Theorem}[section]% meant for sectionwise numbers %% optional argument [theorem] produces theorem numbering sequence instead of independent numbers for Proposition \newtheorem{proposition}[theorem]{Proposition}% %%\newtheorem{proposition}{Proposition}% to get separate numbers for theorem and proposition etc.

\theoremstyle{thmstyletwo}% \newtheorem{example}{Example}% \newtheorem{remark}{Remark}%

\theoremstyle{thmstylethree}% \newtheorem{definition}{Definition}%

\raggedbottom %%\unnumbered% uncomment this for unnumbered level heads

\begin{document}

\title[Article Title]{Article Title}

%%=============================================================%% %% Prefix -> \pfx{Dr} %% GivenName -> \fnm{Joergen W.} %% Particle -> \spfx{van der} -> surname prefix %% FamilyName -> \sur{Ploeg} %% Suffix -> \sfx{IV} %% NatureName -> \tanm{Poet Laureate} -> Title after name %% Degrees -> \dgr{MSc, PhD} %% \author*[1,2]{\pfx{Dr} \fnm{Joergen W.} \spfx{van der} \sur{Ploeg} \sfx{IV} \tanm{Poet Laureate} %% \dgr{MSc, PhD}}\email{iauthor@gmail.com} %%=============================================================%%

\author*[1,2]{\fnm{First} \sur{Author}}\email{iauthor@gmail.com}

\author[2,3]{\fnm{Second} \sur{Author}}\email{iiauthor@gmail.com} \equalcont{These authors contributed equally to this work.}

\author[1,2]{\fnm{Third} \sur{Author}}\email{iiiauthor@gmail.com} \equalcont{These authors contributed equally to this work.}

\affil*[1]{\orgdiv{Department}, \orgname{Organization}, \orgaddress{\street{Street}, \city{City}, \postcode{100190}, \state{State}, \country{Country}}}

\affil[2]{\orgdiv{Department}, \orgname{Organization}, \orgaddress{\street{Street}, \city{City}, \postcode{10587}, \state{State}, \country{Country}}}

\affil[3]{\orgdiv{Department}, \orgname{Organization}, \orgaddress{\street{Street}, \city{City}, \postcode{610101}, \state{State}, \country{Country}}}

%%==================================%% %% sample for unstructured abstract %% %%==================================%%

\abstract{The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. Authors are advised to check the author instructions for the journal they are submitting to for word limits and if structural elements like subheadings, citations, or equations are permitted.}

%%================================%% %% Sample for structured abstract %% %%================================%%

% \abstract{\textbf{Purpose:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to. % % \textbf{Methods:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to. % % \textbf{Results:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to. % % \textbf{Conclusion:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to.}

\keywords{keyword1, Keyword2, Keyword3, Keyword4}

%%\pacs[JEL Classification]{D8, H51}

%%\pacs[MSC Classification]{35A01, 65L10, 65L12, 65L20, 65L70}

\maketitle

\section{Introduction}\label{sec1}

The Introduction section, of referenced text \cite{bib1} expands on the background of the work (some overlap with the Abstract is acceptable). The introduction should not include subheadings.

Springer Nature does not impose a strict layout as standard however authors are advised to check the individual requirements for the journal they are planning to submit to as there may be journal-level preferences. When preparing your text please also be aware that some stylistic choices are not supported in full text XML (publication version), including coloured font. These will not be replicated in the typeset article if it is accepted.

\section{Cross referencing}\label{sec8}

Environments such as figure, table, equation and align can have a label declared via the \verb+\label{#label}+ command. For figures and table environments use the \verb+\label{}+ command inside or just below the \verb+\caption{}+ command. You can then use the \verb+\ref{#label}+ command to cross-reference them. As an example, consider the label declared for Figure~\ref{fig1} which is \verb+\label{fig1}+. To cross-reference it, use the command \verb+Figure \ref{fig1}+, for which it comes up as ``Figure~\ref{fig1}''.

To reference line numbers in an algorithm, consider the label declared for the line number 2 of Algorithm~\ref{algo1} is \verb+\label{algln2}+. To cross-reference it, use the command \verb+\ref{algln2}+ for which it comes up as line~\ref{algln2} of Algorithm~\ref{algo1}.

\subsection{Details on reference citations}\label{subsec7}

Standard \LaTeX\ permits only numerical citations. To support both numerical and author-year citations this template uses \verb+natbib+ \LaTeX\ package. For style guidance please refer to the template user manual.

Here is an example for \verb+\cite{...}+: \cite{bib1}. Another example for \verb+\citep{...}+: \citep{bib2}. For author-year citation mode, \verb+\cite{...}+ prints Jones et al. (1990) and \verb+\citep{...}+ prints (Jones et al., 1990).

All cited bib entries are printed at the end of this article: \cite{bib3}, \cite{bib4}, \cite{bib5}, \cite{bib6}, \cite{bib7}, \cite{bib8}, \cite{bib9}, \cite{bib10}, \cite{bib11}, \cite{bib12} and \cite{bib13}.

\section{Examples for theorem like environments}\label{sec10}

For theorem like environments, we require \verb+amsthm+ package. There are three types of predefined theorem styles exists---\verb+thmstyleone+, \verb+thmstyletwo+ and \verb+thmstylethree+

%%=============================================%% %% For presentation purpose, we have included %% %% \bigskip command. please ignore this. %% %%=============================================%% \bigskip \begin{tabular}{|l|p{19pc}|} \hline \verb+thmstyleone+ & Numbered, theorem head in bold font and theorem text in italic style \\hline \verb+thmstyletwo+ & Numbered, theorem head in roman font and theorem text in italic style \\hline \verb+thmstylethree+ & Numbered, theorem head in bold font and theorem text in roman style \\hline \end{tabular} \bigskip %%=============================================%% %% For presentation purpose, we have included %% %% \bigskip command. please ignore this. %% %%=============================================%%

For mathematics journals, theorem styles can be included as shown in the following examples:

\begin{theorem}[Theorem subhead]\label{thm1} Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. \end{theorem}

Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

\begin{proposition} Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. \end{proposition}

Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

\begin{example} Phasellus adipiscing semper elit. Proin fermentum massa ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. \end{example}

Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

\begin{remark} Phasellus adipiscing semper elit. Proin fermentum massa ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. \end{remark}

Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

\begin{definition}[Definition sub head] Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. \end{definition}

Additionally a predefined proof'' environment is available: \verb+\begin{proof}+ \verb+...+ \verb+\end{proof}+. This prints aProof'' head in italic font style and the ``body text'' in roman font style with an open square at the end of each proof environment.

\begin{proof} Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. \end{proof}

Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

\begin{proof}[Proof of Theorem~{\upshape\ref{thm1}}] Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. \end{proof}

\noindent For a quote environment, use \verb+\begin{quote}...\end{quote}+ \begin{quote} Quoted text example. Aliquam porttitor quam a lacus. Praesent vel arcu ut tortor cursus volutpat. In vitae pede quis diam bibendum placerat. Fusce elementum convallis neque. Sed dolor orci, scelerisque ac, dapibus nec, ultricies ut, mi. Duis nec dui quis leo sagittis commodo. \end{quote}

Sample body text. Sample body text. Sample body text. Sample body text. Sample body text (refer Figure~\ref{fig1}). Sample body text. Sample body text. Sample body text (refer Table~\ref{tab3}).

\section{Methods}\label{sec11}

Topical subheadings are allowed. Authors must ensure that their Methods section includes adequate experimental and characterization data necessary for others in the field to reproduce their work. Authors are encouraged to include RIIDs where appropriate.

\textbf{Ethical approval declarations} (only required where applicable) Any article reporting experiment/s carried out on (i)~live vertebrate (or higher invertebrates), (ii)~humans or (iii)~human samples must include an unambiguous statement within the methods section that meets the following requirements:

\begin{enumerate}[1.] \item Approval: a statement which confirms that all experimental protocols were approved by a named institutional and/or licensing committee. Please identify the approving body in the methods section

\item Accordance: a statement explicitly saying that the methods were carried out in accordance with the relevant guidelines and regulations

\item Informed consent (for experiments involving humans or human tissue samples): include a statement confirming that informed consent was obtained from all participants and/or their legal guardian/s \end{enumerate}

If your manuscript includes potentially identifying patient/participant information, or if it describes human transplantation research, or if it reports results of a clinical trial then additional information will be required. Please visit (\url{https://www.nature.com/nature-research/editorial-policies}) for Nature Portfolio journals, (\url{https://www.springer.com/gp/authors-editors/journal-author/journal-author-helpdesk/publishing-ethics/14214}) for Springer Nature journals, or (\url{https://www.biomedcentral.com/getpublished/editorial-policies#ethics+and+consent}) for BMC.

\section{Discussion}\label{sec12}

Discussions should be brief and focused. In some disciplines use of Discussion or Conclusion' is interchangeable. It is not mandatory to use both. Some journals prefer a sectionResults and Discussion' followed by a section `Conclusion'. Please refer to Journal-level guidance for any specific requirements.

\section{Conclusion}\label{sec13}

Conclusions may be used to restate your hypothesis or research question, restate your major findings, explain the relevance and the added value of your work, highlight any limitations of your study, describe future directions for research and recommendations.

In some disciplines use of Discussion or 'Conclusion' is interchangeable. It is not mandatory to use both. Please refer to Journal-level guidance for any specific requirements.

\backmatter

\bmhead{Supplementary information}

If your article has accompanying supplementary file/s please state so here.

Authors reporting data from electrophoretic gels and blots should supply the full unprocessed scans for key as part of their Supplementary information. This may be requested by the editorial team/s if it is missing.

Please refer to Journal-level guidance for any specific requirements.

\bmhead{Acknowledgments}

Acknowledgments are not compulsory. Where included they should be brief. Grant or contribution numbers may be acknowledged.

Please refer to Journal-level guidance for any specific requirements.

\section*{Declarations}

Some journals require declarations to be submitted in a standardised format. Please check the Instructions for Authors of the journal to which you are submitting to see if you need to complete this section. If yes, your manuscript must contain the following sections under the heading `Declarations':

\begin{itemize} \item Funding \item Conflict of interest/Competing interests (check journal-specific guidelines for which heading to use) \item Ethics approval \item Consent to participate \item Consent for publication \item Availability of data and materials \item Code availability \item Authors' contributions \end{itemize}

\noindent If any of the sections are not relevant to your manuscript, please include the heading and write `Not applicable' for that section.

%%===================================================%% %% For presentation purpose, we have included %% %% \bigskip command. please ignore this. %% %%===================================================%% \bigskip \begin{flushleft}% Editorial Policies for:

\bigskip\noindent Springer journals and proceedings: \url{https://www.springer.com/gp/editorial-policies}

\bigskip\noindent Nature Portfolio journals: \url{https://www.nature.com/nature-research/editorial-policies}

\bigskip\noindent \textit{Scientific Reports}: \url{https://www.nature.com/srep/journal-policies/editorial-policies}

\bigskip\noindent BMC journals: \url{https://www.biomedcentral.com/getpublished/editorial-policies} \end{flushleft}

\begin{appendices}

\section{Section title of first appendix}\label{secA1}

An appendix contains supplementary information that is not an essential part of the text itself but which may be helpful in providing a more comprehensive understanding of the research problem or it is information that is too cumbersome to be included in the body of the paper.

%%=============================================%% %% For submissions to Nature Portfolio Journals %% %% please use the heading ``Extended Data''. %% %%=============================================%%

%%=============================================================%% %% Sample for another appendix section %% %%=============================================================%%

%% \section{Example of another appendix section}\label{secA2}% %% Appendices may be used for helpful, supporting or essential material that would otherwise %% clutter, break up or be distracting to the text. Appendices can consist of sections, figures, %% tables and equations etc.

\end{appendices}

%%===========================================================================================%% %% If you are submitting to one of the Nature Portfolio journals, using the eJP submission %% %% system, please include the references within the manuscript file itself. You may do this %% %% by copying the reference list from your .bbl file, paste it into the main manuscript .tex %% %% file, and delete the associated \verb+\bibliography+ commands. %% %%===========================================================================================%%

\bibliography{sn-bibliography}% common bib file %% if required, the content of .bbl file can be included here once bbl is generated %%\input sn-article.bbl

\end{document}

Tom
  • 175
  • 1
    Welcome to TeX.SE! Can you please explain better? Do you have error messages? Which one? Can you show us a short compilable TeX code resulting in your issue? – Mensch Aug 09 '23 at 17:22
  • I can't put here thei example, because it is to long. But I cut some random stuff from there and put it here. – Tom Aug 09 '23 at 17:32
  • 1
    If you plan on publishing with Springer, ask them; if not, use a different document class – DG' Aug 09 '23 at 17:34
  • My goal is to publish in International Journal of Information Technology, but they suggest to use Springer template. – Tom Aug 09 '23 at 17:37
  • you need to run pdflatex, then bibtex, then pdflatex twice otherwise ? are expected – David Carlisle Aug 09 '23 at 19:07
  • @DavidCarlisle it looks like there some problem with "\cite". – Tom Aug 09 '23 at 19:25
  • \cite is a standard latex command. – David Carlisle Aug 09 '23 at 19:55
  • @DavidCarlisle I run it more than twice. I'm pretty sure that there is again some problem with that \documentclass[sn-mathphys,Numbered]{sn-jnl}. – Tom Aug 09 '23 at 20:00
  • The above code has \bibliography{sn-bibliography}. Did you place the file sn-bibliography.bib into your working directory? Does it contain the required entries? You will probably also need the file sn-mathphys.bst placed in your working directory. – Jasper Habicht Aug 09 '23 at 20:20
  • Yes, sn-bibliography.bib is there. It has all entries. I have here folder bst, there were few files. I moved them to my working directory and it works now. I have no idea why they separated them if they are needed. – Tom Aug 09 '23 at 20:27
  • But I still can't make my article work. What is it enough to change names of that files? For example sn-mathphys.bst to myarticle-mathphys.bst? – Tom Aug 09 '23 at 20:33
  • No, you should not change the names of the .bst file, because the document class will look for this file name. You may rename your .tex file of course, and if you rename your .bib file you just need to change \bibliography{<file name>} accordingly. – Jasper Habicht Aug 09 '23 at 20:42
  • have you run bibtex? what error did you get? copy the exact error from latex or bibtex to a code block in your question. – David Carlisle Aug 09 '23 at 20:43
  • I get for example: "Citation `marsaglia2003xorshift' on page 3 undefined". – Tom Aug 09 '23 at 20:46
  • @JasperHabicht I did it and it doesn't work. – Tom Aug 09 '23 at 20:58
  • It is hard to help without seeing the actual code you use. I get the example provided by Springer working and it seems you got it working too. So, all I can tell you is that you should examine how this working example is built and use these insights for your own article. Every citation needs to have an entry in the .bib file that you need to link in your .tex file using the \bibliography command. There isn't much more to it actually, except that you need to run PDFLaTeX and BibTeX and again PDFLaTeX twice and to copy the relevant .cls and .bst files into your working directory. – Jasper Habicht Aug 09 '23 at 21:02
  • When I changed my article name to their article name "sn-article" and my bibltex file to their name "sn-bibliography" - I got their references. I don't know what is going on here. – Tom Aug 09 '23 at 21:07
  • Try starting from a clean working directory. Delete all files that are not necessary (or, in Overleaf, say "Recompile from scratch"). Make sure that you only have those files in your working directory that you really need. – Jasper Habicht Aug 09 '23 at 21:10
  • It only puts there bibliography if I name my tex file "sn-article". And it puts there their bibliography, not mine, even if in the end of my paper is "\bibliography{myown-bibliography}". – Tom Aug 09 '23 at 21:21
  • ""Citation `marsaglia2003xorshift' on page 3 undefined"" is not an error. If you ran bibtex it would become defined unless there was an error, which is why we ask for the error from bibtex or latex – David Carlisle Aug 09 '23 at 21:22
  • "The command cannot be executed latex - synctex=1 -interaction=nonstopmode %.tex", but I get the same for sn-bibliography which works. – Tom Aug 09 '23 at 21:27
  • 1
    that is not a tex error, that is an operating system error saying the command can not run. That error is unrelated to anything in the file. The file would not have been read at all – David Carlisle Aug 09 '23 at 21:46
  • So I don't know where to find any error. I don't see any. – Tom Aug 09 '23 at 21:54
  • "So I don't know where to find any error. I don't see any" naturally if, as you show, latex has not been run, you can not have an error, or any output, from latex. – David Carlisle Aug 09 '23 at 22:02
  • From what I do with latex and what I noticed you can never run bib file. – Tom Aug 10 '23 at 10:55
  • Ok, I found a company, which do this to me for few hundred dollars. There no point of wasting time on this. Especially because no one knows what is wrong with this. I can't put even my email there (see my other topic). This is ridiculous how badly and buggy Latex is. I would say all it is good for are math formulas. In everything else, working with Latex is an ordeal. – Tom Aug 10 '23 at 11:19
  • It is not really a problem with (La)TeX per se, but rather with a document class that has limited support and maintenance, I would assume. Also, as has been stated in the comments already: If you can't provide the code (for whatever reasons) to enable others to reproduce the problem you encounter, it is difficult to help you. But this does situation is not only valid for (La)TeX, but for virtually every code, regardless of the language. – Jasper Habicht Aug 10 '23 at 15:24
  • I have never struggled so much with c++ or Python. Here I don't know where to even start looking for error. – Tom Aug 10 '23 at 17:15

0 Answers0