2

I prefer the apalike bibliography style with the number in brackets in front (see also this post and this post). However what I am curious about is how to align the first and subsequent text lines neatly next to the number in brackets.

Example

Does anyone know how to do this?

3
  • I know how to do this with biblatex, but this is not apalike bib style, as far as I know: it is a numeric style. – Bernard Jan 12 '16 at 10:56
  • Could you give an example? I would like to have something similar to apa style but then with squared numbers – user89685 Jan 13 '16 at 16:25
  • 1
    Apa style would label something like Alziary & al. 1997, possibly between brackets, since it an authoryear style. – Bernard Jan 13 '16 at 16:54
3

You can update some of the settings loaded by the thebibliography environment to a set of fixed lengths:

enter image description here

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{adk-1997,
  author  = {B Alziary and JP D{\'e}camps and PF Koehl},
  title   = {A {PDE} approach to {A}sian options: {A}nalytical and numerical evidence},
  journal = {Journal of Banking \& Finance},
  year    = {1997},
  volume  = {21},
  number  = {5},
  pages   = {613-640}
}
\end{filecontents*}

\usepackage[numbers]{natbib}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\thebibliography}{\c@NAT@ctr\z@}{\c@NAT@ctr\z@
  \renewcommand{\makelabel}[1]{\makebox[1.2em][r]{##1\hfill}}%
  \setlength{\labelwidth}{1.2em}%
  \setlength{\labelsep}{.5em}%
  \setlength{\leftmargin}{\dimexpr\labelwidth+\labelsep}%
}{}{}
\makeatother

\begin{document}

\nocite{*}

\bibliographystyle{apalike}

\bibliography{\jobname}

\end{document}

You can increase the two length measures 1.2em that forms part of \makelabel and setting \labelwidth if you have more than 9 references.

2
  • +1 for assuring that the words Asian and Analytical aren't lowercased. :-) – Mico Mar 25 '16 at 3:36
  • Do you by any chance know how to make this work if the multibib package is used? I have posted this question, because the solution here does not seem to work with this package. – SampleTime Jan 19 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.