3

This question is based off the answer for the How to write a perfect equation parameters description? question:

I would like to have the parameters defined using \singlespacing as I am currently using \doublespacing for my thesis spacing. Both the suggested conditions and conditions* environments have proven of great use and I have also attempted to adapt the conditions* to reflect the no break after where: variant which I wish to implement.

Defining \singlespacing as I have done causes the conditions to have an unwanted indent and a missing \endgroup inserted error though visually it works

Defining the conditions* as I have done by adapting the above-mentioned variant also causes an unwanted indent and I cannot work out how to insert the \singlespacing parameter without causing errors.

Here is my MWE with all my modifications made:

\documentclass{scrreprt}
\usepackage{array,tabularx}
\usepackage{setspace}

\doublespace

\newenvironment{conditions}[1][where:]
  {\singlespace#1 \begin{tabular}[t]{>{$}l<{$} @{${}:{}$} l}}
  {\doublespace\end{tabular}\\[\belowdisplayskip]}


\newenvironment{conditions*}[1][where:]
  {#1 \begin{tabular}[t]{>{$}l<{$} @{}>{${}}c<{{}$}@{} l}}
  {\end{tabular}\\[\belowdisplayskip]}

\begin{document}

An equation just to start
\begin{equation}
P+N=S_{d}
\end{equation}
\begin{conditions}
 P     &  notional permeability factor \\
 N     &  number of waves \\
 S_{d} &  damage level
\end{conditions}
Some text after the equation.

Another equation with symbols
\begin{equation}
P+N=S_{d}
\end{equation}

\begin{conditions*}
 P     & :       &  notional permeability factor \\
 N     & \sim    &  number of waves \\
 S_{d} & \propto & damage level
\end{conditions*}
and so this is where we continue with some more text after the equation.

\end{document}
4

Looking for typographical beauty in a double spaced document is a lost in advance battle.

You can limit the damages with something like this:

\documentclass{scrreprt}
\usepackage{array,tabularx}
\usepackage{setspace}

\newenvironment{conditions}[1][where:]
  {\begin{minipage}{\textwidth}
   \vspace*{-.5\belowdisplayskip}%
   \linespread{1}\selectfont #1 \begin{tabular}[t]{>{$}l<{$} @{${}:{}$} l}}
  {\end{tabular}\end{minipage}\\[\belowdisplayskip]}

\newenvironment{conditions*}[1][where:]
  {\begin{minipage}{\textwidth}
   \vspace*{-.5\belowdisplayskip}%
   \linespread{1}\selectfont #1 \begin{tabular}[t]{>{$}l<{$} @{}>{${}}c<{{}$}@{} l}}
  {\end{tabular}\end{minipage}\\[\belowdisplayskip]}

\doublespacing

\begin{document}

An equation just to start
An equation just to start
An equation just to start
An equation just to start
\begin{equation}
P+N=S_{d}
\end{equation}
\begin{conditions}
 P     &  notional permeability factor \\
 N     &  number of waves \\
 S_{d} &  damage level
\end{conditions}
Some text after the equation.
Some text after the equation.
Some text after the equation.
Some text after the equation.
Some text after the equation.
Some text after the equation.
Some text after the equation.

Another equation with symbols
Another equation with symbols
Another equation with symbols
Another equation with symbols
Another equation with symbols
Another equation with symbols
\begin{equation}
P+N=S_{d}
\end{equation}
\begin{conditions*}
 P     & :       &  notional permeability factor \\
 N     & \sim    &  number of waves \\
 S_{d} & \propto & damage level
\end{conditions*}
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.

\end{document}

enter image description here

Note that the correct command is \doublespacing, not \doublespace.

  • Again thank you for all your help, I am still rather confused about spacing pro's and cons and how to go about them, I am required to used a ~1.5 line spacing for my text so a friend set me up to use \doublespacing with the setspace package explaining that the \linespread{1.5} command was more trouble than its worth. I am still none the wiser. Thank you for all. – Fiztban Jan 29 '15 at 18:21
  • Hi again, I have been using your code and it's been suiting me wonderfully. However I cannot seem to affect the font used within the environment which is currently in sans-serif for the last column. I am using kpfonts and my text is in Roman \fontfamily{jkp} how do I allow the second column in conditions and third column in conditions* to be in roman jkp font? – Fiztban Feb 25 '15 at 15:28
  • @Fiztban Please, make a new question with the failing code. – egreg Feb 25 '15 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.