[comp.text] Double spaced LaTeX

eliot@phoenix.Princeton.EDU (Eliot Handelman) (10/20/89)

Lamport pg. 155 says that "you can produce a `double-spaced' version of
the document for copy-editing \baselinestretch to 2." Here's what I did.

\documentstyle{article}
\begin{document}
\baselinestretch 2

This is a long document

\end{document}

All that happened was that `l2' showed up at the top of the first page.
What am I doing wrong?

Thanks for any help.

dhosek@jarthur.Claremont.EDU (Don Hosek) (10/20/89)

In article <10960@phoenix.Princeton.EDU> eliot@phoenix.Princeton.EDU (Eliot Handelman) writes:
>Lamport pg. 155 says that "you can produce a `double-spaced' version of
>the document for copy-editing \baselinestretch to 2." Here's what I did.
>\documentstyle{article}
>\begin{document}
>\baselinestretch 2
>This is a long document
>
>\end{document}

To re-set \baselinestretch, use \renewcommand, as in
\renewcommand{\baselinestretch}{2}

Do not, however, attempt to use this technique to create a double spaced
paper for anything other than copy-editing. The results will be sh*t.
Ideally, you should have a document style which adjusts assorted values
appropriately for double spacing (doublespace.sty is _not_ a reasonable
solution for all but the simplest of documents). Not only should environments
like quote and quotation be modified but also spacing in lists &c. should
also be changed.

Do it right or don't do it at all.

-dh
-- 
Don Hosek            | Internet: DHOSEK@HMCVAX.CLAREMONT.EDU
                     | Bitnet: DHOSEK@HMCVAX.BITNET
                     | Phone: 714-920-0655
(I used to be a Mudder, but I got better)

mrwittma@phoenix.Princeton.EDU (Martin R. Wittmann) (10/23/89)

In article <2527@jarthur.Claremont.EDU> dhosek@jarthur.UUCP (Don Hosek) writes:
>[ comments on how NOT to doublespace...] The results will be sh*t.
>Ideally, you should have a document style which adjusts assorted values
>appropriately for double spacing (doublespace.sty is _not_ a reasonable
>solution for all but the simplest of documents). Not only should environments
>like quote and quotation be modified but also spacing in lists &c. should
>also be changed.
>
>Do it right or don't do it at all.

OK, do you (Don) or anyone else have a good doublespaced LaTeX format?
I know that may seem like an oxymoron, but I am forced to doublespace my
thesis, and I would indeed like to "do it right".

As a (much less perferred) alternative, does anyone know of a reference
on typesetting that specifically deals with attractive doublespaced
layouts?

Thanks,					Martin Wittmann

dhosek@jarthur.Claremont.EDU (D.A. Hosek) (10/23/89)

In article <11021@phoenix.Princeton.EDU> mrwittma@phoenix.Princeton.EDU (Martin R. Wittmann) writes:
>In article <2527@jarthur.Claremont.EDU> dhosek@jarthur.UUCP (Don Hosek) writes:
>>Ideally, you should have a document style which adjusts assorted values
>>appropriately for double spacing (doublespace.sty is _not_ a reasonable
>>solution for all but the simplest of documents). Not only should environments
>>like quote and quotation be modified but also spacing in lists &c. should
>>also be changed.
>OK, do you (Don) or anyone else have a good doublespaced LaTeX format?
>I know that may seem like an oxymoron, but I am forced to doublespace my
>thesis, and I would indeed like to "do it right".
>
>As a (much less perferred) alternative, does anyone know of a reference
>on typesetting that specifically deals with attractive doublespaced
>layouts?

Well, there are several thesis styles in existence at this point: Stanford, 
MIT, UC (whichever C that might be), and possibly others. You probably will 
want to look at those to see what they're like and use those as a basis.
Since most thesis-requiring institutions have rather stringent requirements
for the appearance of their thesis (some sort of anal-retentive thing, I
believe), you will need to create a custom thesis style for your thesis
anyway. 

The above-mentioned thesis styles are available from sun.soe.clarkson.edu
in the directory pub/latex-style or from hmcvax.claremont.edu in the 
directory TeX_Root:[INPUTS.LATEX-CONTRIB]

If you run into any problems, feel free to post questions here and (depending
on my time constraints), I'll try to answer them. The more people know about
creating good LaTeX styles, the better of LaTeX users in general will be.

-dh

-- 
D.A. Hosek           | Internet: DHOSEK@HMCVAX.CLAREMONT.EDU
                     | Bitnet: DHOSEK@HMCVAX.BITNET
                     | Phone: 714-920-0655
(I used to be a Mudder, but I got better)

chris@mimsy.umd.edu (Chris Torek) (10/23/89)

In article <11021@phoenix.Princeton.EDU> mrwittma@phoenix.Princeton.EDU
(Martin R. Wittmann) writes:
>As a (much less perferred) alternative, does anyone know of a reference
>on typesetting that specifically deals with attractive doublespaced
>layouts?

As the cowboy said, `there ain't no sech animal.'

(1/2 :-) )

More seriously: double spacing (or, better, 1.5-spacing) makes some
sense for typewritten text.  For most typesetting, where the lines are
shorter but contain as many words, it is ridiculous.  Universities
require it only because Universities are run by administrologies.
(Administrology: a group combining the worst features of bureaucracies
administration with the worst features of superstition.)
-- 
`They were supposed to be green.'
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@cs.umd.edu	Path:	uunet!mimsy!chris

beck@hermod.cs.cornell.edu (Micah Beck) (10/23/89)

In article <20336@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes:
>More seriously: double spacing (or, better, 1.5-spacing) makes some
>sense for typewritten text.  For most typesetting, where the lines are
>shorter but contain as many words, it is ridiculous.  

Some of us like to edit in pen (gasp!) on hardcopy (no, really?!) and then
enter the changes later.  For us, reasonable-looking double spacing of text
(not figures) would be a blessing.

Micah Beck
Cornell University

chris@mimsy.umd.edu (Chris Torek) (10/24/89)

>In article <20336@mimsy.umd.edu> I wrote:
>>For most typesetting ... [double spacing] is ridiculous.  

In article <33452@cornell.UUCP> beck@hermod.cs.cornell.edu (Micah Beck) writes:
>Some of us like to edit in pen (gasp!) on hardcopy (no, really?!) and then
>enter the changes later.  For us, reasonable-looking double spacing of text
>(not figures) would be a blessing.

That is why I said `most'.  What you are doing here is typesetting
for the purpose of editing, rather than typesetting for the purpose
of dissemination.

(Besides, you are supposed to edit in blue *pencil*, not ink :-) )
-- 
`They were supposed to be green.'
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@cs.umd.edu	Path:	uunet!mimsy!chris

lang@PRC.Unisys.COM (Francois-Michel Lang) (10/24/89)

%-------------------------------------------------------------------------------
%
% LaTeX Document style option "doublespace"
% -- usage:  \documentstyle[...,doublespace,...]{...}
%
% This style option produces a double-spaced document by redefining
% the LaTeX parameter \baselinestretch to 2.
%
% It also fixes a number of problems with standard LaTeX, as follows:
%
% 1. A new environment "singlespace" is provided, within which single
%    spacing will apply.
%    JFL - changed so that it works in regular text and so that vertical
%    space is before and after is correctly computed
% 2. Double spacing is turned off within footnotes and floats (figures
%    and tables).
% 3. Proper double spacing happens below tabular environments and in other
%    places where LaTeX uses a strut.
% 4. Slightly more space is inserted before footnotes.
% 5. JFL - fixes spacing before and after displayed math
%
% Note: This version sets a baselinestretch of 2. If this is too much,
%    put  \setstretch{1.7}  (or some appropriate value) before the
%    \begin{document} command. To print the document with single spacing
%    again, without removing "singlespace" environments, just put a
%    \setstretch{1} at the top of the document.
%
% PLEASE REPORT ANY BUGS
%
% Modified by: Jean-Francois Lamy
%                          lamy@ai.toronto.edu
%                          lamy@utai.uucp
%
% Author: Stephen Page  -- sdpage@prg.oxford.ac.uk
%                          sdpage%prg.oxford.ac.uk@cs.ucl.ac.uk
%
% Release date: 6 July 1986 - September 3, 1986
%
% Known bugs:
%    . It might be nice if spacing before the footnote rule (\footins)
%      were provided in a tidier way.
%    . Increasing struts may possibly cause some other obscure part of
%      formatting to fall over.
%    . \begin{singlespace}\begin{quote} produces the wrong spacing before
%      the quote (extra glue is inserted).
%    . shouldn't @setsize stretch parskip as well?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%---Set up double spacing

\def\baselinestretch{2}


%---New command "\setstretch" (slightly more mnemonic... and easier to type)

\def\setstretch#1{\renewcommand{\baselinestretch}{#1}}

%---Stretch the baseline BEFORE calculating the strut size. This improves
%   spacing below tabular environments etc., probably...
%   Comments are welcomed.

% 
% 
% \def\@setsize#1#2#3#4{\@nomath#1
%    \let\@currsize#1\baselineskip
%    #2\baselineskip\baselinestretch\baselineskip
%    \parskip\baselinestretch\parskip
%    \setbox\strutbox\hbox{\vrule height.7\baselineskip
%       depth.3\baselineskip width\z@}
%    \normalbaselineskip\baselineskip#3#4}
%--(beck 1/10/89) I commented out preceding defintion of setsize and
%  added the following revised definition from:  
% Kaja P. Christiansen  kaja@daimi.dk (uunet!mcvax!diku!daimi!kaja)
% Computer Science Department -- Aarhus University -- Aarhus -- DENMARK
% 
% In the 'doublespace' style for LaTeX we kept getting superfluous
% spaces in a formula like:  $ \bot_{\mbox{\scriptsize\sf O}} $.

% The problem turned out to be a bug in the definition of \@setsize 
% in doublespace.sty causing \@setsize to insert (two) superfluous 
% spaces. The proper definition should be:

\def\@setsize#1#2#3#4{\@nomath#1%%%
   \let\@currsize#1\baselineskip
   #2\baselineskip\baselinestretch\baselineskip
   \parskip\baselinestretch\parskip
   \setbox\strutbox\hbox{\vrule height.7\baselineskip
      depth.3\baselineskip width\z@}%%%
   \normalbaselineskip\baselineskip#3#4}




%---Increase the space between last line of text and footnote rule.
%   This is a very untidy way to do it!

\skip\footins 20pt plus4pt minus4pt


%---Reset baselinestretch within footnotes and floats. Originally stolen
%   from Stanford thesis style.

\def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
   \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner
      \@parmoderr\@floatpenalty\z@
    \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
       \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
       \@tfor \@tempa :=#2\do
                        {\if\@tempa h\advance\@tempcnta \@ne\fi
                         \if\@tempa t\advance\@tempcnta \tw@\fi
                         \if\@tempa b\advance\@tempcnta 4\relax\fi
                         \if\@tempa p\advance\@tempcnta 8\relax\fi
         }\global\count\@currbox\@tempcnta}\@fltovf\fi
    \global\setbox\@currbox\vbox\bgroup 
    \def\baselinestretch{1}\small\normalsize
    \boxmaxdepth\z@
    \hsize\columnwidth \@parboxrestore}
\long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize
    \interlinepenalty\interfootnotelinepenalty 
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth \@parboxrestore
   \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
    {\rule{\z@}{\footnotesep}\ignorespaces
      #1\strut}}}

% Stolen from MIT.
%
% A single spaced quote (say) is done by surrounding singlespace with quote.
%
\def\singlespace{%
\vskip\parskip%
\vskip\baselineskip%
\def\baselinestretch{1}%
\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi%
\vskip-\parskip%
\vskip-\baselineskip%
}

\def\endsinglespace{\par}

%  spacing, doublespace and onehalfspace all are meant to INCREASE the
%  spacing (i.e. calling onehalfspace from within doublespace will not
%  produce a graceful transition between spacings)
%
\def\spacing#1{\par%
 \def\baselinestretch{#1}%
 \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi}

\def\endspacing{\par%
 \vskip \parskip%
 \vskip \baselineskip%
 \endgroup%
 \vskip -\parskip%
 \vskip -\baselineskip%
 \begingroup}

\def\onehalfspace{\spacing{1.5}}
\let\endonehalfspace=\endspacing

\def\doublespace{\spacing{2}}
\let\doublespace=\endspacing

% Fix up spacing before and after displayed math
% (arraystretch seems to do a fine job for inside LaTeX displayed math,
% since array and eqnarray seem to be affected as expected)
% Changing \baselinestretch and doing a font change also works if done here,
% but then you have to change @setsize to remove the call to @nomath)
%
\everydisplay{
   \abovedisplayskip \baselinestretch\abovedisplayskip%
   \belowdisplayskip \abovedisplayskip%
   \abovedisplayshortskip \baselinestretch\abovedisplayshortskip%
   \belowdisplayshortskip  \baselinestretch\belowdisplayshortskip}

----------------------------------------------------------------------------
Francois-Michel Lang
Paoli Research Center, Unisys         lang@prc.unisys.com      (215) 648-7256
Dept of Comp & Info Science, U of PA  lang@linc.cis.upenn.edu  (215) 898-9511

hedrick@athos.rutgers.edu (Charles Hedrick) (11/10/89)

You are not the only institution to have a bureacrat that judges
thesis formats.  However at Rutgers we somehow managed to get them
involved in the computer document-processing technology.  When we
first started doing theses using laser printers, we showed them a
sample.  They liked the looks, but of course wanted to control the
format.  So one of my staff worked out a procedure for certifying
formats (style files, whatever).  We produce a test document that uses
the full range of facilities (footnotes, references, chapter headings,
title page, etc.).  We go through an iterative adjustment process
until they get something they like.  By going through this process, we
get separate standards for computer-generated theses, and don't have
to emulate formats designed for typewriters.  We have certified
formats for several different laser printers in Scribe (the way Scribe
works, we have to certify each device type) and LaTeX.  I'm pretty
sure we have them for several other document processors as well.  It's
a pain to do, but it sure makes things easier for our Ph.D. students.