GeneralVertical spacing in twoside mode

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
lc
Posts: 7
Joined: Sat Oct 03, 2009 9:24 pm

Vertical spacing in twoside mode

Post by lc »

Hello all,

I'm working on a thesis using the report class and I'm having an interesting problem when I use the twoside option. I've recreated the problem in the working example below.

The issue is that in twoside, it seems to add vertical space around the section header in order to fill the page. If you run the same example without the twoside option, the line spacing is normal and the extra space falls at the end of the page, which is desirable in my case. What is causing the difference and is there a way to use the twoside option without this occurring?

Thanks very much,
LC

Code: Select all

%\documentclass[12pt]{report}
\documentclass[12pt,twoside]{report}
\usepackage{amsmath}

\begin{document}
\rule{4in}{4in}

\subsection{Stability}
At time $t=\tau_1$ the trajectory reaches the first surface,
$s_1=0$, after which $x_1$ and $x_5$ approach the origin asymptotically.
At time $t=\tau_2$ the trajectory reaches the third and fourth
surfaces, $s_3=s_4=0$. This implies that it has simultaneously
reached the second surface, $s_2=0$, since $s_2$ is proportional
to the product of $x_5$ and $s_2$ and $x_5\rightarrow0$ only
asymptotically. Hence, the trajectory reaches all surfaces in
finite time after which the sliding phase starts. During the
sliding phase, the dynamics can be re-derived using
$s_1=0\Rightarrow x_5=-\lambda x_1$, $s_2=0\Rightarrow x_6=-bx_2$,
and $s_3=0\Rightarrow x_4=-d_rx_3$
\begin{equation}
    \begin{aligned}
   \dot{x}_1 &= x_5 \\
   \dot{x}_2 &= -bx_2-\lambda x_1x_3 \\
   \dot{x}_3 &= -d_rx_3+\lambda x_1x_2 \\
   \dot{x}_4 &= -d_rx_4-d_r\lambda x_1x_2 \\
   \dot{x}_5 &= -\lambda x_5 \\
   \dot{x}_6 &= -bx_6+b\lambda x_3x_1.
    \end{aligned}
\end{equation}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

lc
Posts: 7
Joined: Sat Oct 03, 2009 9:24 pm

Re: Vertical spacing in twoside mode

Post by lc »

Is anyone at all familiar with how the twoside option affects the vertical spacing rules in the report class?

Thanks,
LC
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Vertical spacing in twoside mode

Post by localghost »

The cause of the problem is the equation environment. The amsmath package provides the \allowdisplaybreaks command for the preamble. But this won't work in a single equation environment. If you want to indicate that the equations belong to one group, you may use the subequations and align environments in combination.

Code: Select all

\begin{subequations}
  \begin{align}
    \dot{x}_1 &= x_5 \\
    \dot{x}_2 &= -bx_2-\lambda x_1x_3 \\
    \dot{x}_3 &= -d_rx_3+\lambda x_1x_2 \\
    \dot{x}_4 &= -d_rx_4-d_r\lambda x_1x_2 \\
    \dot{x}_5 &= -\lambda x_5 \\
    \dot{x}_6 &= -bx_6+b\lambda x_3x_1.
  \end{align}
\end{subequations}
This way the equations would have the same number with a small letter attached (a,b,c, …). But now this equation system can spread over two pages. That's all I can advice at the moment.


Best regards
Thorsten
lc
Posts: 7
Joined: Sat Oct 03, 2009 9:24 pm

Re: Vertical spacing in twoside mode

Post by lc »

Hmm, yes I realized that was causing the extra space. My question has more to do with why it behaves differently in oneside than in twoside. The way it handles the extra space in oneside is acceptable to me. Twoside seems to want to force the extra space in the middle of the page instead of at the bottom.

I appreciate your input. That solution would work if it was only equations that caused this problem, but I have the same issue with figures.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Vertical spacing in twoside mode

Post by localghost »

This effect is caused by a certain setting concerning the justification of the page bottom. The one-sided document has a ragged bottom, whereas the two-sided document has a flushed bottom. For the latter one you can explicitly set \raggedbottom. Note that this will end up in different page heights.
lc
Posts: 7
Joined: Sat Oct 03, 2009 9:24 pm

Vertical spacing in twoside mode

Post by lc »

localghost wrote:This effect is caused by a certain setting concerning the justification of the page bottom. The one-sided document has a ragged bottom, whereas the two-sided document has a flushed bottom. For the latter one you can explicitly set \raggedbottom. Note that this will end up in different page heights.
Perfect, I think that's exactly what I needed. Thank you!
Post Reply