latextexbibliographybiblatex

Get Bibliography using biblatex


I am using the below code for citations.

\documentclass[12pt]{article}

\usepackage{amssymb,amsmath,amsfonts,eurosym,geometry,ulem,graphicx,caption,color,setspace,sectsty,comment,footmisc,caption,pdflscape,subfigure,array,booktabs,dcolumn,threeparttable,adjustbox,dirtytalk,multirow,tabularx,booktabs,longtable,placeins,tikz}

\usepackage[backend=biber,natbib,style=authoryear,citestyle=authoryear]{biblatex}

\usepackage{float}
\restylefloat{table}

\usepackage{pgfplots}
\pgfplotsset{width=12cm,compat=1.9}
\usepackage{pst-func}
\psset{unit=2cm}

\usepackage[english]{babel}

\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue,citecolor=blue,linkcolor=red}

\addbibresource{segmentation.bib}

\begin{document}

This is a sample \cite{sample}.

\end{document}

The output that I am getting is:

enter image description here

However, I need it like (Author, Year). Also, I want the bibliography to appear in the paper, and not able to do so and I want the entire Author, Year to get linked, that is, when I click on it, it takes me to the relevant page in the bibliography.

Could you please help me with that?

Thank You


Solution


  • \documentclass[12pt]{article}
    
    \usepackage{amssymb,amsmath,amsfonts,eurosym,geometry,ulem,graphicx,caption,color,setspace,sectsty,comment,footmisc,caption,pdflscape,subfigure,array,booktabs,dcolumn,threeparttable,adjustbox,dirtytalk,multirow,tabularx,booktabs,longtable,placeins,tikz}
    
    \usepackage[backend=biber,natbib,style=authoryear,citestyle=authoryear]{biblatex}
    
    \usepackage{float}
    \restylefloat{table}
    
    \usepackage{pgfplots}
    \pgfplotsset{width=12cm,compat=1.9}
    \usepackage{pst-func}
    \psset{unit=2cm}
    
    \usepackage[english]{babel}
    
    \usepackage{hyperref}
    \hypersetup{colorlinks=true,urlcolor=blue,citecolor=blue,linkcolor=red}
    
    \addbibresource{biblatex-examples.bib}
    
    \begin{document}
    
    This is a sample \citep{knuth:ct}.
    
    
    \printbibliography
    
    \end{document}