在 LaTeX 中双倍行距 ACM 会议论文
我正在使用 acm LaTeX 模板,但我无法将论文翻倍间隔。
我的 LaTeX 文档如下所示:
\documentclass{acm_proc_article-sp}
\usepackage{setspace}
\doublespacing
\begin{document}
...
\end{document}
当我使用 pdflatex 编译上述文档时,我在使用命令 \doublespacing
的行上收到以下错误消息:
Missing number, treated as zero \doublespacing
I am using the acm LaTeX template and I have trouble making my paper double spaced.
My LaTeX document looks like the following:
\documentclass{acm_proc_article-sp}
\usepackage{setspace}
\doublespacing
\begin{document}
...
\end{document}
When I compile the above document using pdflatex, I get the following error message on the line that I use the command \doublespacing
:
Missing number, treated as zero \doublespacing
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
\linespread{2}
应该可以工作。 据我所知,不需要任何软件包,如果您愿意,您可以将其更改为 1.9 间距或 2.1 间距...\linespread{2}
should work. Doesn't need any packages, as far as I can tell, and you could change it to 1.9-spacing or 2.1-spacing, if you felt like it...看起来 acm_proc_article-sp 类做了一些奇怪的事情,使
setspace
包感到困惑。 在.tex
文档的序言中,添加以下行:我不知道为什么
acm_proc_article-sp
类将\@ptsize
重新定义为是空的。It looks like the
acm_proc_article-sp
class does some funky things that confuses thesetspace
package. In the preamble of your.tex
document, add the following lines:I have no idea why the
acm_proc_article-sp
class redefines\@ptsize
to be empty.我相信您想使用
\usepackage{doublespace}
来双倍间距您的文档。 要放入单行距块,请用\begin{singlespace}
和\end{singlespace}
包围它。参考: http://web.mit.edu/olh/Latex/ess-latex .html
I believe you want to use
\usepackage{doublespace}
to double-space your document. To put in a block of singlespacing, surround it with\begin{singlespace}
and\end{singlespace}
.Ref: http://web.mit.edu/olh/Latex/ess-latex.html
由于某种原因,
acm_proc_article-sp
类似乎将\@ptsize
重新定义为空。 我不知道\@ptsize
是用来做什么的,所以我不想弄乱它。 使用\show
命令(请参阅链接文本 有关这个奇妙命令的更多信息),我看到\doublespacing
被解压缩为换句话说,
\doublespacing
本质上等同于\setstretch{ 1.667}
,如果\@ptsize
恰好是1
或2
,则拉伸因子略有不同。 因此,我认为解决您的问题的最不引人注目的解决方案是将\doublespacing
替换为\setstretch{1.667}
。The
acm_proc_article-sp
class seems to redefine\@ptsize
to be empty for some reason. I don't know what\@ptsize
is used for, so I don't want to mess with it. Using the\show
command (see link text for more on this fantastic command), I see that\doublespacing
is unpacked intoIn other words,
\doublespacing
is essentially equivalent to\setstretch{1.667}
, with slightly different stretch factors if\@ptsize
happens to be1
or2
. So I think the most unobtrusive solution to your problem is replace\doublespacing
by\setstretch{1.667}
.我刚刚尝试了这个命令(在我的序言中)的双倍间距,它工作得很好:
I just tried out this command (in my preamble) for double spacing and it worked fine:
接受的解决方案的替代方案:如果您在实际文档中包含行
\doublespacing
(我在\ maketitle
命令),而不是在序言中。 所以类似:我不确定为什么这是不同的,但我认为将其包含在实际文档中会自动填充您缺少的参数。
Alternative to the accepted solution: you can use
\usepackage{setspace}
if you include the line\doublespacing
within your actual document (I have it right after the\maketitle
command), instead of in your preamble. So something like:I'm not sure why this is different, but I think including it in the actual document automagically fills in the params you're missing.
尽管这是一条古老的线索,但对于那些偶然发现的人来说:
你所拥有的实际上是正确的并且有效。 问题出在正在使用的模板上。 可能它会覆盖某些命令(例如 \doublespacing)。
这对我来说编译和工作得很好:
Though this is an old thread, for those who stumble uppon:
What you have is actually correct and works. The problem is with the template that is being used. Probably it is overriding some command (like the \doublespacing).
This compiles and works fine for me:
不要这样做。 您需要遵循 ACM 会议论文集文章提交说明,无论如何,该说明都不希望您将文章加倍行距。
Don't do it. You need to follow the ACM conference proceedings article submission instructions, which don't want you to double-space the article anyway.