2

I am using the named bibliography style with the following citation formulation provided by karlkoeller:

\makeatletter
\let\@internalcite\cite
\def\cite{\def\citeauthoryear##1##2{##1, ##2}\@internalcite}
\def\shortcite{\def\citeauthoryear##1##2{##2}\@internalcite}
\def\@biblabel#1{\def\citeauthoryear##1##2{##1, ##2}[#1]\hfill}
\makeatother

While this formulation produces the desired style, it is printing a large number of citation beyond the text width, into the margin space:

enter image description here

Is there a way to force these citations remaining within the text body?

Luís de Sousa
  • 398
  • 5
  • 21

1 Answers1

1

Normally, \hfil will expand as much as \parendskip, but \hfil\linebreak[3] doesn't seem to expand at all.

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Book{Batty:2007,
author    = {Michael Batty},
title     = {Cities and Complexity},
publisher = {MIT Press},
year      = 2007}
\end{filecontents*}

\makeatletter
\let\@internalcite\cite
\def\cite{\def\citeauthoryear##1##2{##1, ##2}\@internalcite}
\def\shortcite{\def\citeauthoryear##1##2{##2}\@internalcite}
\def\@biblabel#1{\def\citeauthoryear##1##2{##1, ##2}[#1]\hfill}
\makeatother

\begin{document}
\sloppy
yadayada yadayada yadayada yadayada yadayada yada
This a citation \cite{Batty:2007}

\fussy
yadayada yadayada yadayada yadayada yadayada yada
This a citation \hfil\linebreak[3]\cite{Batty:2007}
This a citation \hfil\linebreak[3]\cite{Batty:2007}

\bibliographystyle{named}
\bibliography{\jobname}

\end{document} 

overline prevention

John Kormylo
  • 79,712
  • 3
  • 50
  • 120