如何消除 lyx 中参考之间的垂直距离?

如何消除 lyx 中参考之间的垂直距离?

使用 LyX、BibTeX 文件和unsrt参考书目样式。程序会自动在每个参考文献之间留出一个空行,从而浪费大量空间!

有什么方法可以强制 LyX 在引用之间不留垂直间隙?

下面是一个 LaTeX MWE(或多或少由 LyX 生成),显示了该问题:

\documentclass{article}
\begin{document}
\bibliographystyle{unsrt}
\nocite{*}
\bibliography{testlyx}
\end{document}

在此处输入图片描述

以下是示例文件“testlyx.bib”:

@ARTICLE{authorA,
  author = {AuthorA},
  title = {This is the title A},
  journal = {journal A},
  year = {1993},
  volume = {47},
  pages = {58--61},
  month = {Feb}
}

@ARTICLE{authorB,
  author = {AuthorB},
  title = {That is the title B},
  journal = {journal A},
  year = {1994},
  volume = {50},
  pages = {53--79},
  month = {May}
}

答案1

项目之间的距离由文章类定义为 4pt;您可以通过修补命令来更改它\thebibliography

\begin{filecontents*}{\jobname.bib}
@ARTICLE{authorA,
  author = {AuthorA},
  title = {This is the title A},
  journal = {journal A},
  year = {1993},
  volume = {47},
  pages = {58--61},
  month = {Feb}
}

@ARTICLE{authorB,
  author = {AuthorB},
  title = {That is the title B},
  journal = {journal A},
  year = {1994},
  volume = {50},
  pages = {53--79},
  month = {May}
}
\end{filecontents*}
\documentclass{article}

%%% Start of code to add %%%
\usepackage{etoolbox}
\patchcmd\thebibliography
 {\labelsep}
 {\labelsep\itemsep=0pt\relax}
 {}
 {\typeout{Couldn't patch the command}}
 %%% End of code to add %%%

\begin{document}
\bibliographystyle{unsrt}
\nocite{*}
\bibliography{\jobname}
\end{document}

请注意,filecontents环境只是为了方便制作一个独立的示例。您应该添加的代码已在示例中标记。如何在 LyX 中做到这一点超出了我的知识范围。

在此处输入图片描述

如果想要正常的行距,那么稍微改变一下就可以了:

%%% Start of code to add %%%
\usepackage{etoolbox}
\patchcmd\thebibliography
 {\labelsep}
 {\labelsep\itemsep=0pt\parsep=0pt\relax}
 {}
 {\typeout{Couldn't patch the command}}
 %%% End of code to add %%%

结果如下:

在此处输入图片描述

相关内容