我使用named
书目样式,内容如下引用公式由 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
虽然这种表述产生了所需的样式,但它会在文本宽度之外的边距空间中打印大量引用:
有没有办法强制这些引用保留在正文中?
答案1
正常情况下,\hfil
会扩大到\parendskip
,但\hfil\linebreak[3]
似乎根本没有扩大。
\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}