(这几乎重复了句子结束后引用会破坏空格,因为我忘了在那里提到 Biblatex。)
我正在使用报告类来撰写论文。有时,多个连续的句子引用同一来源,因此Booh \cite{source}. Baah \cite{source}.
我不写,而是写Booh. Baah. \cite{source}
。但是,引用参考文献后面有一个放大的空格(表示句子的结尾),后面跟着一个正常的空格。
这样,读者就会将引用参考与下面的句子联系起来,而不是它后面的句子。
我可以用 来抑制扩大的空间\<space>
。但是如何获得引用后的扩大的空间?
最小示例:
\documentclass{report}
\usepackage[backend=bibtex, urldate=comp, style=numeric-comp, sorting=nyt]{biblatex}
\bibliography{test.bib}
\DeclareFieldFormat*{urldate}{}
\DeclareFieldFormat[online]{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\usepackage{csquotes}
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
\begin{document}
\xspaceskip=20pt % just to show the extended spaces more clearly
Hello, I am a sentence \cite{testarticle}. I am
a sentence as well. \cite{testarticle} And me too!
\printbibliography
\end{document}
测试.bib:
@ARTICLE{testarticle,
author = {Fowl, Artemis},
title = {How many centaurs fit into a chair?},
journal = {LEPRecon Journal},
year = {2016},
volume = {7},
pages = {429--439},
number = {64}
}
输出(设置为\xspaceskip
只是为了更清楚地标记句末空格):
答案1
这种间距对我来说似乎完全错误([1]
不是一个句子)但它可能是由以下内容产生的,其中插入了空间因子.
而不排版.
。
\documentclass{report}
\usepackage[backend=bibtex, urldate=comp, style=numeric-comp, sorting=nyt]{biblatex}
\bibliography{test2.bib}
\DeclareFieldFormat*{urldate}{}
\DeclareFieldFormat[online]{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\usepackage{csquotes}
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
\begin{document}
\xspaceskip=20pt % just to show the extended spaces more clearly
Hello, I am a sentence \cite{testarticle}.
a sentence as well. \cite{testarticle}\spacefactor\sfcode`\.{}
And me too!
\printbibliography
\end{document}