# [Tex/LaTex] Setting the indents in bibliography

indentation

I want to set the indent of the first (1) and the second (2) (third..) line. In addition, setting the space (3) between first and second cite. Is it possible? Thank you.

My MWE is here:

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}

@article{einstein,
author = "Albert Einstein",
title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]",
journal = "Annalen der Physik",
volume = "322",
number = "10",
pages = "891--921",
year = "1905",
DOI = "http://dx.doi.org/10.1002/andp.19053221004",
keywords = "physics"
}

@book{dirac,
title = {The Principles of Quantum Mechanics},
author = {Paul Adrien Maurice Dirac},
isbn = {9780198520115},
series = {International series of monographs on physics},
year = {1981},
publisher = {Clarendon Press},
keywords = {physics}
}

@online{knuthwebsite,
author = "Donald Knuth",
title = "Knuth: Computers and Typesetting",
url  = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
keywords = "latex,knuth"
}

\end{filecontents}

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[main=turkish,english,shorthands=:!]{babel}
\usepackage{titlesec}
\usepackage[normalem]{ulem}
\usepackage{etoolbox}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage{titlesec}

\usepackage{titlesec}
\newcommand*{\myonevspace}{13.850574pt}% <-- Define a macro \myonehalfvspace
\newcommand*{\myonehalfvspace}{20.775861pt}% <-- Define a macro \myonehalfvspace
\newcommand*{\mytwovspace}{27.701147pt}% <-- Define a macro \mytwovspace

\titleformat{\chapter}
{\normalfont\normalsize\bfseries}{\thechapter.}{.5em}{}
\titlespacing{\chapter}{1cm}{0cm plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}

\usepackage[round]{natbib}
\bibliographystyle{plainnat} % or some other suitable bib style

\usepackage[none]{hyphenat}

\usepackage[spaces,obeyspaces,hyphens]{xurl} % allow arbitrary line breaks in URL strings
\urlstyle{same}

\begin{document}
\chapter{Chapter 1}
\setlength{\parindent}{1cm}

Chapter name and the first line of the paragraph is aligned here \cite{einstein}, \cite{dirac}, \cite{knuthwebsite}.

\setlength\bibhang{50pt}
\bibliography{\jobname}

\end{document}


You've indicated that you use the natbib package as well as (somewhat implicitly) an author-year citation call-out style.

Excerpting from section 2.12, "Other formatting options" (pp. 15f.) of the user guide of natbib package:

\bibhang The list of references for author-year styles uses a hanging indentation format: the first line of each reference is flush left, the following lines are set with an indentation from the left margin. This indentation is 1em by default but may be changed by redefining (with \setlength) the length parameter \bibhang.

\bibsep The vertical spacing between references in the list, whether author-year or numerical, is controlled by the length \bibsep. If this is set to 0pt, there is no extra line spacing between references. The default spacing depends on the font size selected in \documentclass, and is almost a full blank line. Change this by redefining \bibsep with \setlength command.

1. To modify the amount of indentation of the first line, natbib offers no special facilities as authoryear-style citation call-outs are being used. Since this citation style has no need for numbers, there's no need to modify the indentation of the first line of the formatted bibliographic item.
2. To modify the amount of hanging indentation in a paragraph, change the parameter \bibhang via a \setlength statement. E.g., \setlength\bibhang{0pt} directs LaTeX not to create a hanging indentation.
3. The default value of \bibsep is -- since the 12pt document class option is in effect -- 10pt plus 5pt minus 2pt. Note that is a "rubber length" in TeX parlance. The mild stretchability and shrinkability is actually a nice feature, especially if \flushbottom is in effect. To change this parameter to a fixed (i.e., non-strechable and non-shrinkable) length, issue a statement such as \setlength{\bibsep}{1\baselineskip}. (For the 12pt document class option, 1\baselineskip amounts to 14.5pt.)