# How to control the Bibliography numbered and author year in single command

I am using natbib package. I would like to control bib style in single command \numberedref.

My requirement is if the \numberedref command is available in the tex file the output is shown in numbered reference list all citation link should be appeared in numbered. If the command is not available by default, author year reference should be shown. This will happen without changing the reference list items like \bibitem[Sabatinis et al., 1999]{Sabatini:1999}

But I don't know the idea how to control the user defined single command \numberedref

My tex file below mentioned:

\documentclass[twocolumn]{article}
\usepackage{endnotes}
\usepackage[noblocks]{authblk}
\usepackage[switch]{lineno}
\usepackage{mdframed}
\usepackage{amsmath}
\usepackage{natbib}
\definecolor{gray}{cmyk}{0,0,0,0.70}
\bibpunct[, ]{(}{)}{;}{a}{\color{gray},}{,}

\def\@editor{}
\def\editor#1{%
\gdef\@editor{\raggedright \textbf{Edited by:}\newline #1}}

\def\@reviewer{}
\def\reviewer#1{%
\gdef\@reviewer{\raggedright \textbf{Reviewed by:}\newline #1}}

\def\@metanote{}
\def\metanote#1{%
\gdef\@metanote{\raggedright  #1}}

\def\@correspondence{}
\def\correspondence#1{%
\gdef\@correspondence{\textbf{\textit{*Correspondence:}}\newline%
\raggedright  #1}}

\def\@abstract{}
\def\abstract#1{%
\gdef\@abstract{\fontsize{9.5}{11.5}\selectfont #1}}

\def\@keywords{}
\def\keywords#1{%
\gdef\@keywords{\textbf{Keywords:} #1}}

\def\@firstpara{}
\def\firstpara#1{%
\gdef\@firstpara{\raggedright  #1}}

\mdfdefinestyle{theoremstyle}{%
linecolor=black,middlelinewidth=2pt,%
theoremseparator={~|},%
frametitlerule=false,%
apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={%
frametitlerulecolor=black,
frametitlerulewidth=1pt,
innertopmargin=6pt,
innerbottommargin=6pt,
innerleftmargin=6pt,
innerrightmargin=6pt,
frametitlebelowskip=0pt,
}

\mdtheorem[style=theoremstyle]{keybox}{KEY CONCEPT}

\begin{document}

\theendnotes

\title{Hormonal crosstalk for root development: a combined experimental and modeling perspective}
\author[1]{Junli Liu}
\author[2]{James Rowe}
\author[2]{Keith Lindsey}
\affil[1]{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK}
\affil[1]{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK}
\reviewer{Jedrzej Jakub Szymanski, Max Planck Institute of Molecular Plant Physiology, Germany }
\reviewer{Dimas Mendes Ribeiro, Universidade Federal de Vi\c{c}osa, Brazil}
\correspondence{Keith Lindsey is Professor of Plant Molecular Biology.}
\abstract{Plants are sessile organisms and therefore they must adapt their growth and architecture to a changing environment.}
\metanote{$\dagger$Joint corresponding authors}
\keywords{root development, POLARIS peptide, hormonal crosstalk, osmotic stress, kinetic modelin}
\firstpara{\section*{Introduction}
Hormone signaling systems coordinate plant \hfilneg}
\maketitle

Patterning in Arabidopsis root development is coordinated via a localized auxin concentration maximum in the root tip (\citealp{Sabatini:1999}), requiring the regulated expression of speciÞc genes. This auxin gradient has been hypothesized to be sink-driven (\citealp{Friml:2002}) and com- putational modeling suggests that auxin efßux carrier activity may be sufÞcient to generate the gradient in the absence of auxin biosynthesis in the root.

\clearpage

\begin{thebibliography}{999}
\bibitem[Sabatinis et al., 1999]{Sabatini:1999}Sabatini, S., Sabatini, S., Beis, D., Wolkenfelt, H., Murfett, J., Guilfoyle, T., et al. (1999). An auxin-dependent distal organizer of pattern and polarity in the Arabidopsis root. Cell 99, 463--472. doi: 10.1016/S0092-8674(00)81535-4
\bibitem[Friml et al., 2002]{Friml:2002}Friml, J., Benkova, E., Blilou, I., Wisniewska, J., Hamann, T., Ljung, K., et al. (2002). AtPIN4 mediates sink-driven auxin gradients and root patterning in Arabidopsis. Cell 108, 661--673. doi: 10.1016/S0092-8674(02)00656-6
\end{thebibliography}

\end{document}


• This sounds like a job for biblatex and its \autocite feature. – Johannes_B Dec 25 '14 at 11:31
• Please provide the sample for this. I don't know how to implement the above logic – Vetri Dec 25 '14 at 15:06
• I am unable to change the \citealp{} and thebibliography environment. Any logic is there – Vetri Dec 25 '14 at 15:38
• You seem to define a userinterface for authors to publish in a journal. Package biblatex provides package options in kay-value syntax. You can choose the style of citations to be numeric(which is the default) or authoryear. biblatex works best in conjunction with biber, a modern alternative to classic bibtex. <- If the bibliographical data is stored in an accompanying database. I switched to biblatex a while ago, so i am a bit rusty with natbib. – Johannes_B Dec 26 '14 at 8:47
• I think with natbib, the style of citations is controlled by a package option as well. Can you add to the question, what you mean by changing citealp and thebibliography? – Johannes_B Dec 26 '14 at 8:49