# How to modify nature style?

I am using the Nature citation style. I would like to change the position of the article year and change a little format.

This is my sample code.

\usepackage[backend=biber,bibencoding=utf8,refsegment=chapter,style=nature,firstinits=true,isbn=false,doi=false,url=false,sorting=none,clearlang=true,natbib=true,intitle=true]{biblatex}
\DeclareFieldFormat[article]{citetitle}{#1}
\DeclareFieldFormat[article]{date}{#1;}
\AtEveryBibitem{%
\ifentrytype{article}{
\clearfield{url}%
\clearfield{urldate}%
\clearfield{review}%
\clearfield{series}%
\clearfield{eprint}%
\clearfield{eprinttype}%
}{}
}
\DeclareFieldFormat{booktitle}{\textbf{#1}\isdot}
\DeclareFieldFormat{journaltitle}{\textbf{#1}\isdot}


This is a result

I would like to move the article year and put it after the journal name without round brackets.

This is my expected result.

You may want to try the following redefinitions.

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber,
style=nature,
intitle=true,
isbn=false, doi=false, url=false, eprint=false,
]{biblatex}

\DeclareFieldFormat[article]{citetitle}{#1}
\DeclareFieldFormat{booktitle}{\textbf{#1}\isdot}
\DeclareFieldFormat{journaltitle}{\textbf{#1}\isdot}

\DeclareFieldFormat*{volume}{#1}

\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\iffieldundef{series}
{}
{%
\newunit
\printfield{series}%
}%
\printfield{issue}%
\usebibmacro{date}%
\printfield{volume}%
\newunit
\usebibmacro{issue}%
\newunit
}
\renewbibmacro{issue+date}{}

\begin{document}
\autocite{sigfridsson,aksin}

\printbibliography
\end{document}


If you want to know which bibmacros or field definitions you need to change, you usually have to have a look at the source of the bibliography style you are using. For @article, the type discussed in the question, nature.bbx has

\DeclareBibliographyDriver{article}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\iftoggle{bbx:articletitle}
{%
\usebibmacro{title}%
\newblock
}
{}%
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{bytranslator+others}%
\newunit\newblock
\printfield{version}%
\newunit\newblock
\usebibmacro{journal+issuetitle}%
\newunit
\usebibmacro{byeditor+others}%
\newunit
\usebibmacro{note+pages}%
\newunit
\iftoggle{bbx:isbn}
{\printfield{issn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\usebibmacro{issue+date}%
\newunit\newblock
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}%
}


Some guessing and a bit of trial and error shows that the bibmacro journal+issuetitle prints the journal title and volume, number information. note+pages prints the pages and issue+date the date.

So step one is to redefine issue+date to do nothing. The second step is to insert code to print the date after the journal title. To do that we redefine journal+issuetitle, which is originally defined in nature.bbx as

\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\iffieldundef{series}
{}
{%
\newunit
\printfield{series}%
}%
\printfield{volume}%
\newunit
\usebibmacro{issue}%
\newunit
}


You'll notice that the code we added to journal+issuetitle is a simplified version of nature.bbx's issue+date

\renewbibmacro*{issue+date}{%
\iffieldundef{year}
{}
{%
\iffieldundef{issue}
{\printtext[parens]{\usebibmacro{date}}}
{%
\printtext[parens]{%
\printfield{issue}%
\usebibmacro{date}%
}%
}%
}%
\newunit
}


The bottom line is: If you want to know which macros you need to redefine, check the implementation in the .bbx and .cbx files and chase down the bibmacro definitions.

• Thank you, it's work. Could you please explain your code? I tried to use \renewbibmacro but I have no clue to do that. Why did you use "\renewbibmacro*{journal+issuetitle}"? where can I get the document for this command? – Pisit Nakjai Sep 27 '20 at 8:19
• @PisitNakjai I added some explanations. Things like this can usually only be found out by reading the style source code. The documentation will usually not discuss this (as that would make things much too verbose.) – moewe Sep 28 '20 at 6:16
• Thank you very much. – Pisit Nakjai Sep 28 '20 at 7:10
• @PisitNakjai, you should express your gratitude by upvoting of answer and even accept it. – Zarko Oct 28 '20 at 7:49