改变参考风格

改变参考风格

我是 LaTeX 新手,我已收到期刊的指示,要求我修改我的 LaTeX 参考文献以符合

在此处输入图片描述(期刊是 Cell iScience)。无论我做什么,都无法解决这个问题,请帮助我。

答案1

biblatex可以根据自己的意愿构建书目风格。

在下面的示例中,我根据您所指示的期刊的要求设置了参考书目驱动程序articlebook

其余的 bibentry 类型(如果需要)留给您。

\begin{filecontents}[overwrite]{bib.bib}
@article{sondheimer2000rnq1,
  title={Rnq1: an epigenetic modifier of protein function in yeast},
  author={Sondheimer, Neal and Lindquist, Susan},
  journal={Molecular cell},
  shortjournal={Mol. cell},
  volume={5},
  number={1},
  pages={163--172},
  year={2000},
  publisher={Elsevier},
  doi={https://doi.org/10.1016/s1097-2765(00)80412-8}
}
@article{duck2023,
  title={Another article},
  author={Paulinho van Duck},
  journal={Quack University Journal},
  volume={1},
  number={2},
  pages={3--4},
  year={2023},
  url={https://www.site/of/the/article.com}
}
@book{cowan1997molecular,
  title={Molecular and cellular approaches to neural development},
  author={Cowan, William Maxwell and Jessell, Thomas M and Zipursky, Stephen Lawrence},
  year={1997},
  publisher={Oxford University Press}
}
\end{filecontents}

\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage{csquotes}

\usepackage[
    style=ext-numeric,
    maxbibnames=99, 
    sorting=none,   
    giveninits=true,
    uniquename=init,
    autocite=superscript,
    ]{biblatex}

\usepackage{xurl}
\usepackage{hyperref}
\usepackage{xcolor}
\hypersetup{
    colorlinks,
    linkcolor={cyan},
    citecolor={cyan},
    urlcolor={cyan}
    }

% Bibliography settings
% label number with no square brackets and dot
\DeclareFieldFormat{labelnumberwidth}{#1\adddot}

% Inversion of given and family names
\DeclareNameAlias{default}{family-given}

% no space between initials
\renewcommand*{\bibinitdelim}{}

% titles without quotes
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat[article]{title}{#1}

% year in parenthesis
\DeclareFieldFormat{date}{\mkbibparens{#1}}

% journal in normal font
\DeclareFieldFormat{journaltitle}{#1}

% space between journal title
\renewcommand*{\jourvoldelim}{\addspace}

% leave out "In:" before journal name
\renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct\nopunct}}}

% print only volume (no number)
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit{\addcomma\addspace}%
  }

% leave out "pp." from pages
\DeclareFieldFormat{pages}{#1}
    
% links without the word "URL" and "DOI" and normal font
\urlstyle{same}
\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat{doi}{\url{#1}}

% publisher in parentheses
\newbibmacro*{publisher}{%
  \printtext[parens]{%
    \printlist{publisher}%
    \setunit{\addcomma\addspace}%
    }
  }

% Short journal name instead of complete journal name
% code from https://tex.stackexchange.com/a/272503/101651
\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite=true]{
      \step[fieldsource=shortjournal]
      \step[fieldset=journal, origfieldval]
    }
  }
}

\DeclareBibliographyDriver{article}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{date}%
  \newunit\newblock%
  \usebibmacro{maintitle+title}%
  \newunit\newblock%
  \usebibmacro{journal}%
  \newunit\newblock%
  \usebibmacro{volume+number+eid}%
  \setunit{\addcolon\addspace}\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock%
  \usebibmacro{doi+eprint+url}%
  \usebibmacro{finentry}%
  }  
  
\DeclareBibliographyDriver{book}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{date}%
  \newunit\newblock%
  \usebibmacro{maintitle+title}%
  \setunit{\addspace}\newblock%
  \usebibmacro{publisher}%
  \newunit\newblock%
  \usebibmacro{doi+eprint+url}%
  \usebibmacro{finentry}%
  }  
% END Bibliography and citation customization

\addbibresource{bib.bib}

\begin{document}
Autocite: \autocite{sondheimer2000rnq1}

Supercite: \supercite{sondheimer2000rnq1}

Cite: \cite{duck2023}

Parencite: \parencite{cowan1997molecular}

Textcite: \textcite{sondheimer2000rnq1}

\printbibliography

\end{document}

在此处输入图片描述

相关内容