Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using LaTeX to typeset my thesis, using a class that some students at my school wrote to typeset according to the graduate school formatting requirements. The class uses the setspace package to double-space the document.

The problem that I am having is that LaTeX is deciding of its own volition to spontaneously revert to single spacing for paragraphs (or fragments of paragraphs)! It appears to be related to floats, as moving the declaration point of two table floats can make one of the instances double-space properly. However, the floats do not appear embedded in the text---they go onto a separate page---and adding a hard page break in the middle of the offending paragraph (or fragment) will produce a half-full, single-spaced page rather than a full double-spaced page.

Are there any commands I can use to tell LaTeX to cut it out, and consider the requested line spacing to be inviolate?

The smallest working example I've been able to produce is the following---it requires the nddiss2e class, which may be obtained from the ND graduate school website (http://graduateschool.nd.edu/assets/4699/nddiss2e_3.0.tgz):

\documentclass{nddiss2e} % doesn't misbehave with article or book  
\usepackage{lipsum}

\begin{document}

\chapter{ONE}

\section{Section}

\subsection{Subsection}

\lipsum[1]

\subsection{Force Field}

The force field for the simulations combines two pairwise potential
forms. Interactions between the sodium cations and the oxygen atoms
in both the Na-Ge-Nb and water are modeled using a Buckingham dispersion/repulsion
term \citep{jaramillo_1999} and a Coulombic point charge interaction
term:%\begin{equation}  
%U_{ij,buck}=A_{ij}\exp\left(\frac{-r_{ij}}{\rho_{ij}}\right)-\frac{C_{ij}}{r_{ij}^{6}}+\frac{q_{i}q_{j}}{r_{ij}}\end{equation}  
where $U_{ij,buck}$ is the Buckingham potential for a pair of sites
$i$ and $j$ separated by a distance $r_{ij}$, $A_{ij}$ and $C_{ij}$
are Buckingham parameters, and $q_{i}$ and $q_{j}$ are the point
charges for sites $i$ and $j$, respectively. Interactions between
the oxygen atoms in both the Na-Ge-Nb and water are modeled using
a pairwise potential combining a Lennard-Jones dispersion/repulsion
term and a Coulombic point charge interaction term:%\begin{equation}  
%U_{ij,LJ}=4\epsilon_{ij}\left(\left(\frac{\sigma_{ij}}{r_{ij}}\right)^{12}-\left(\frac{\sigma_{ij}}{r_{ij}}\right)^{6}\right)+\frac{q_{i}q_{j}}{r_{ij}}\end{equation}  
where $U_{ij,LJ}$ is the Lennard-Jones potential for a pair of sites
$i$ and $j$ separated by a distance $r_{ij}$, $\sigma_{ij}$ and
$\epsilon_{ij}$ are Lennard-Jones parameters, and $q_{i}$ and $q_{j}$
are the point charges for sites $i$ and $j$, respectively. The crystal
was modeled with Lennard-Jones sites at only the exposed oxygen atoms,
but with Coulombic sites at all atoms. Water was modeled using the
rigid Simple Point Charge (SPC) model \citep{berendsen_1981}. The
framework oxygen Lennard-Jones parameters were taken as identical
to the SPC oxygen for water-framework and cation-framework interactions.
The point charges for the framework were obtained using plane-wave
density functional theory calculations \citep{larentzos_2008} on K-Ge-Nb,
and one goal of this study was to verify the transferability of the
charges from K-Ge-Nb to Na-Ge-Nb. A complete listing of force field
parameters and partial charges is given in Tables \ref{tab:NaIPX_ljparams}
and \ref{tab:NaIPX_charges}. The simulation was carried out using
three-dimensional periodic boundary conditions. A cutoff of 11.5~\AA
was used for the Lennard-Jones terms. Long-range electrostatic interactions
were computed using the Ewald summation method \citep{wheeler_1997},
with a 11.5~\AA real-space cutoff, an h-vector cutoff of 3.75~\AA$^{-1}$,
and a damping factor of 0.3478.%  
\begin{table}[bph]  
\begin{centering}  
\caption{\label{tab:NaIPX_ljparams}{INTERACTION PARAMETERS
FOR SIMULATION OF NA-GE-NB}}  
%  
\begin{tabular}{cccccc}  
\hline  
Interaction & $\sigma_{ij}$ (\AA) & $\varepsilon_{ij}/k_{B}$ (K) & $A_{ij}$ (K) &  $\rho_{ij}$ (\AA) & $C_{ij}$ (K \AA$^{-6}$)\tabularnewline  
\hline  
\hline  
Na-O$_{\mathrm{framework}}$ &  &  & 61155438.4 & 0.2468 & 765893.5\tabularnewline  
Na-O$_{\mathrm{water}}$ &  &  & 61155438.4 & 0.2468 & 765893.5\tabularnewline  
O$_{\mathrm{water}}$-O$_{\mathrm{framework}}$ & 3.169 & 78.201 &  &  & \tabularnewline  
O$_{\mathrm{water}}$-O$_{\mathrm{water}}$ & 3.169 & 78.201 &  &  & \tabularnewline  
\hline  
\end{tabular}  
\par\end{centering}  
%  
\end{table}

\end{document}

Although there will be warnings about missing references, running the code through either latex proper or pdflatex will produce output demonstrating the offending behavior.

share|improve this question
2  
It's hard to debug this without a minimal working example. –  Lev Bishop Oct 21 '10 at 5:14
    
Sorry. I'm using MiKTeX 2.7, with nddiss2e retrieved from: graduateschool.nd.edu/assets/4699/nddiss2e_3.0.tgz . I can strip my working case down to a minimal master doc and a small fragment of a chapter, what's the preferred way to provide them? –  Craig Oct 21 '10 at 5:45
    
@Craig: Ideally you can strip it down to a manageable size (a page or two) and then edit it into your question. The lipsum package helps if you need a bunch of generated filler text to demonstrate a problem. –  Lev Bishop Oct 21 '10 at 6:12
add comment

1 Answer

up vote 3 down vote accepted

Add an empty line between

and a damping factor of 0.3478.%  
\begin{table}[bph]  

Floating tables are not part of the paragraph so it's best to separate them from it.

share|improve this answer
    
Wonderful, that fixed it! Thanks! –  Craig Oct 21 '10 at 7:40
1  
Yup. (Hmm, although you answered this 5 minutes ago, the SE software notified me just now.) Anyhow, ndiss2e.cls redefines the table environment, among other things turning singlespacing on. I would argue that it is a bug that it does not finish the current paragraph first. –  Harald Hanche-Olsen Oct 21 '10 at 7:47
    
Ah, that would explain what happened! And it also explains why it was only happening for tables, as figures don't need to have a single-space setting. How would you recommend to fix the bug? I'd like to submit a correction to the graduate school just in case anybody else gets caught by the same thing (which is liable to happen if they use LyX as their initial processor, as I did). –  Craig Oct 21 '10 at 7:56
1  
@Craig: just add \par at the beginning of the table redefinition. –  Will Robertson Oct 21 '10 at 9:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.