![如何使用 CSL 样式表 ieee-with-url 将条目间距更改为 0.5 左右](https://linux22.com/image/473715/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20CSL%20%E6%A0%B7%E5%BC%8F%E8%A1%A8%20ieee-with-url%20%E5%B0%86%E6%9D%A1%E7%9B%AE%E9%97%B4%E8%B7%9D%E6%9B%B4%E6%94%B9%E4%B8%BA%200.5%20%E5%B7%A6%E5%8F%B3.png)
我正在使用带有--citeproc
命令行参数的 Pandoc 来使用此处的 ieee-with-url CSL 样式表生成参考文献:https://www.zotero.org/styles?q=ieee-with-url:
pandoc --from markdown --output main.pdf --standalone --citeproc \
--bibliography=references.bib --csl=ieee-with-url.csl -M reference-section-title:References content.md
根据文档entry-spacing
控制之间的间距bibitems
。规范仅考虑整数:https://forums.zotero.org/discussion/10911/csl-setting-1-5-line-spacing-in-bibliography并传递到目标 Word/LaTeX/epbub 等程序以改变所需的设置。
我无法将值更改为 0.5 或类似的值,只能更改为整数。
这个Markdown
Hello, World!
This is a test [@texbook]. This is another test [@latex2e]. Yet this is another
test [@knuth:1984].
连同以下参考文献:
@book{texbook,
author = {Donald E. Knuth},
year = {1986},
title = {The {\TeX} Book},
publisher = {Addison-Wesley Professional}
}
@book{latex2e,
author = {Leslie Lamport},
year = {1994},
title = {{\LaTeX}: a Document Preparation System},
publisher = {Addison Wesley},
address = {Massachusetts},
edition = {2}
}
@article{knuth:1984,
title={Literate Programming},
author={Donald E. Knuth},
journal={The Computer Journal},
volume={27},
number={2},
pages={97--111},
year={1984},
publisher={Oxford University Press}
}
entry-spacing="0"
给出以下参考:
entry-spacing="1"
给出以下参考:
对我来说,之间的垂直间距要么太小,要么太大bibitems
。
参考书目的生成由该 LaTeX 模板控制:https://github.com/jgm/pandoc-templates/blob/master/default.latex#L349C1-L365C14
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing
{\begin{list}{}{%
\setlength{\itemindent}{0pt}
\setlength{\leftmargin}{0pt}
\setlength{\parsep}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1
\setlength{\leftmargin}{\cslhangindent}
\setlength{\itemindent}{-1\cslhangindent}
\fi
% set entry spacing
\setlength{\itemsep}{#2\baselineskip}}} % <-- changing manually to e.g. 0.5 shold work but cannot change the template
{\end{list}}
问题1:之后如何更改此设置,即我无法更改默认模板。
itemsep
问题 2: IEEE 样式表的参考书目中有 0 /垂直间距是否正常?在我看来,它有点压缩。