# Changing line spacing only within a \cfrac expression

There are a few questions asking how to change line spacing in table or equation environments, for example. The usual solution is to do something like

\makeatletter
\patchcmd{\env@cases}{1.2}{0.72}{}{}
\makeatother


Unfortunately the \cfrac command is not an environment, so this doesn't work. Is there a similar solution to the above using patchcmd? My thesis style file uses a baselineskip of 1.6 if that matters, and this makes cfractions way too vertically spaced.

I'm using the article class with 11pt font and the style file has the line

\renewcommand{\baselinestretch}{1.7}


Also the style file changes back to single spacing in figures and footnotes using such code as

\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
\@tfor \@tempa :=#2\do
}\global\count\@currbox\@tempcnta}\@fltovf\fi
\global\setbox\@currbox\vbox\bgroup
\def\baselinestretch{1}\@normalsize
\boxmaxdepth\z@
\hsize\columnwidth \@parboxrestore}


Hopefully there's a way to do something like this for cfractions.

• Please tell us which document class you employ and how you're modifying \baselineskip (or maybe \baselinestretch?) at present.
– Mico
May 3 at 7:26
• It's the article class and the command in the style file is \renewcommand{\baselinestretch}{1.7}. I just updated my question to this effect and gave additional style file information. May 3 at 7:29

This produces the attached output, but I reduced the space 'manually'. Maybe you can make a macro of it.

\documentclass{article}%
\usepackage{amsmath}
\usepackage{setspace}
\begin{document}%
\setstretch{2.6}


This is a long text. This is a long text. This is a long text. This is a long text. This is a long text.\

\textbf{This is a long text. This is a long text. This is a long text. This is a long text. This is a long text.}\\

{$\setstretch{1.2} \cfrac[r]{a}{b}$}\\
abeeeee deeeee fkkkkkkkk abeeeee deeeee fkkkkkkkk abeeeee deeeee fkkkkkkkk abeeeee deeeee fkkkkkkkk abeeeee deeeee fkkkkkkkk%
\end{document}%