Double-Spacing an ACM Proceedings Article in LaTeX
Asked Answered
K

8

23

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
Kellsie answered 29/6, 2009 at 2:34 Comment(2)
Title should probably be changed to "Double-Spacing an ACM Proceedings Article in LaTeX" since it doesn't apply generally to LaTeXLeapt
You might need to double space it to make it easier for your peers to review and leave notes on your paper.Kellsie
S
10

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

Steffin answered 29/6, 2009 at 2:41 Comment(1)
TeX-FAQ advises against using doublespace. They say to use setspace instead.Tautonym
P
22

\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...

Phenolphthalein answered 31/3, 2010 at 11:3 Comment(1)
I have used \linespread to great effect in the past with an argument similar to 1.2 or 1.3; I find this helps enormously when inlining vertically-aligned vectors etc.Galanti
S
14

It looks like the acm_proc_article-sp class does some funky things that confuses the setspace package. In the preamble of your .tex document, add the following lines:

% Redefines \@ptsize to make setspace happy
\makeatletter
\renewcommand{\@ptsize}{0}
\makeatother

% Double-spaces the entire document
\usepackage{setspace}
\doublespacing

I have no idea why the acm_proc_article-sp class redefines \@ptsize to be empty.

Southwesterly answered 29/6, 2009 at 6:1 Comment(0)
S
10

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

Steffin answered 29/6, 2009 at 2:41 Comment(1)
TeX-FAQ advises against using doublespace. They say to use setspace instead.Tautonym
P
4

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 into

\setstretch{1.667} \ifcase \@ptsize \relax \setstretch{1.667} \or 
\setstretch{1.618} \or \setstretch{1.655}\fi

In other words, \doublespacing is essentially equivalent to \setstretch{1.667}, with slightly different stretch factors if \@ptsize happens to be 1 or 2. So I think the most unobtrusive solution to your problem is replace \doublespacing by \setstretch{1.667}.

\documentclass{acm_proc_article-sp}
\usepackage{setspace}
\setstretch{1.667}
\begin{document}
...
\end{document}
Phelgen answered 11/7, 2009 at 4:49 Comment(1)
\@ptsize is used in the LaTeX base classes to determine the normal font size. When you specify 10pt, 11pt, or 12pt as a document class option (e.g., \documentclass[10pt]{article}, then \@ptsize it set to the last digit (i.e., 0, 1, or 2 for 10pt, 11pt, or 12pt, respectively). So the various line spacings in the case statement are set depending on the base font size.Southwesterly
W
3

I just tried out this command (in my preamble) for double spacing and it worked fine:

\usepackage{setspace}
\setstretch{2} 
Wynellwynn answered 23/4, 2010 at 1:3 Comment(0)
T
3

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:

\usepackage{fullpage}
\usepackage{setspace}
\begin{document}
\maketitle
\doublespacing
...
\end{document}

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.

Tacho answered 8/11, 2010 at 18:18 Comment(0)
M
2

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:

\documentclass{article}
\usepackage{setspace}
\doublespacing

\begin{document}
testing
\end{document}
Milburn answered 21/1, 2013 at 12:9 Comment(0)
M
-2

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.

Muzzle answered 10/4, 2010 at 21:40 Comment(2)
Maybe the author wants to temporarily use double spacing so that others can edit or comment on it more easily.Stationer
Eh … If it's for manual editing why bother with ACM styling at all?Daimon

© 2022 - 2024 — McMap. All rights reserved.