1

I'd like to change spacing locally (without packages such as "setspace"). My preamble:

    \documentclass[11pt]{book} %[makeidx,bezier,theorem, ukrain]
    \textheight=172mm
    \textwidth=112mm
    \usepackage{makeidx}
    \makeindex
    %\nofiles
    \usepackage[english,russian]{babel}
    \usepackage[cp1251]{inputenc}

    \usepackage[T2A]{fontenc}
    \usepackage{amsmath,amssymb,calc} 
    \usepackage{indentfirst}
    \usepackage{amsmath,multicol}
    \usepackage{amssymb}
    \usepackage{amsmath}
    \usepackage{amsthm}
    \usepackage{amscd}
    \usepackage{graphicx}
    \usepackage[mathscr]{eucal}
    \usepackage[dvips]{color} %%% ????

    \usepackage{layout}
    \usepackage{floatflt}
    \usepackage{nccsect} 
    \usepackage{calc}
    \usepackage{here}
    \usepackage[normalem]{ulem}   %%%%% ДЛЯ КОЛОНТИТ. 

    \includeonly{
    pr,
    ch0,
    ch1,
    ch2,
    ch3,
    ch4,
    ch5
    }
    \newtheorem{ex}{\hspace*{\parindent}Пример}[section]

    \renewcommand{\baselinestretch}{0.8} %%%% !!!!!!!!!!!!!!!!!!!!!

    \usepackage{fancyhdr}
    \pagestyle{fancy}
    \fancyhf{}
    \fancyhead[LE]{\emph\textit{\nouppercase{\leftmark}}}
    \fancyhead[RO]{\emph\textit{\nouppercase{\rightmark} \hfill \thepage}}
    \lfoot{}
    \rfoot{}

I'm trying to stretch a block of a page so that it is stretched nicely to fill the page completely.

    %%%% ==== a block of ch4.tex =======
    \begin{ex} $\!\!$ {\bf (``шахматный город'').}
    Рассмотрим   прямоугольную сетку квадратов --- ``шахматный город'',
    состоящий из $m\times n$  квадратных кварталов, разделенных $n-1$
    ``горизонтальными'' и $m-1$ ``вертикальными'' улицами $($см. рис. $\ref{net})$.
    Сколько существует на этой сетке различных кратчайших путей, ведущих из
    левого нижнего  угла $($точки  $(0,0)$$)$ в правый верхний угол $($точку
    $(m,n)$$)$?
    \end{ex}

    \begin{figure}[H]
    \centering
    \includegraphics{PICS/Anya/4_3_1.eps}
    \caption{\label{net} ``Шахматный город'' }
    \end{figure}

    %%%% ET 
    \renewcommand{\baselinestretch}{1.9} 
    %%%% ==TRYING TO CHANGE LINE SPACING ==
    Р\,е\,ш\,е\,н\,и\,е.
    Обозначим  буквой ``Г''  горизонтальный
    отрезок пути, буквой ``В'' --- вертикальный. Каждый  
    кратчайший путь из $(0,0)$ в $(m,n)$ состоит из $n$ 
    вертикальных отрезков и $m$ горизонтальных. Он полностью 
    задается LOREM IPSUM LOREM IPSUM  .....................  



    \renewcommand{\baselinestretch}{0.8} %%% STANDARD linestretch 
    \newpage

But the piece between \renewcommand{\baselinestretch}{1.9} and \renewcommand{\baselinestretch}{0.8} refuses to stretch! What should I do?

I'd prefer to solve the problem without extra packages. But if this is hard, does the code \usepackage{setspace}\setstretch{<factor>} give the same factor as \renewcommand{\baselinestretch}{<factor>} ? I.e., is \setstretch{1.2} equivalent to 1.2 factor of \baselinestretch?

  • 1
    Welcome! Why do you want to avoid setspace? It's the recommended way to do this. – cfr Jun 14 '18 at 17:56
  • From the package: \newcommand{\setstretch}[1]{% \def\baselinestretch{#1}% \@currsize }, so you can see that \setstretch passes the argument straight through to redefine \baselinestretch. – cfr Jun 14 '18 at 18:01
  • Please provide code which people can compile to reproduce the problem. Right now, nobody but you can see what you're seeing as we've just got a fragment and no way to complete it. – cfr Jun 14 '18 at 18:02
3

You need a font change/selection to reset the baselineskip:

\documentclass{article}


\begin{document}
some text\\ some text

\renewcommand{\baselinestretch}{1.9} 
some text\\ some text %here no change

\selectfont %now it works
some text\\ some text


\end{document}

enter image description here

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.