I'm writing a series of notes, and I've begun to see the vertical (line) spacing of certain paragraphs to substantially decrease compared to others. I've attached a photo to describe what I mean. The text immediately following Exercise 6.12 and the stars is much more scrunched up than the text in the paragraph following the verbatim environment. Does anyone know why, and how I can prevent it? Note that the exercise command just receives a number, the chapter identifier, and the text-to-use.
\newcommand{\exercise}[3]
{\noindent\textbf{Exercise {~\ref{#2}}.\theexcounter.} (\repeatstar{#1}) \\
{#3} \stepcounter{excounter}}
...
\exercise{3}{chapter-advanced-oop}{This exercise involves the interpreter we wrote in the chapter.}
Data structures are a core and fundamental feature of programming languages. A language without them, or at least one to build others on top of, suffers severely in terms of usability. We will implement a \textit{cons}-like data structure for our interpreter. In functional programming, we often use three operations to act on data structures akin to linked lists: \textit{cons}, \textit{first}, and \textit{rest}, to construct a new list, retrieve the first element, and retrieve the rest of the list respectively. We can inductively define a cons list as follows:
\begin{footnotesize}
\begin{verbatim}
A ConsList is one of:
- new ConsList()
- new ConsList(x, ConsList)
\end{verbatim}
\end{footnotesize}
Implement the cons data structure into your interpreter. This should involve designing the \ttt{ConsNode} class that conforms to the aforementioned data definition. Moreover, you will need to update \ttt{PrimNode} to account for the \ttt{first} and \ttt{rest} primitive operations, as well as an \ttt{empty?} predicate, which returns whether or not the cons list is empty. Finally, update the \ttt{Lvalue} class to print a stringified representation of a \ttt{ConsNode}, which amounts to printing each element, separated by spaces, inside of brackets, e.g., \ttt{[$l_0, l_1, ..., l_{n-1}]$}.

\footnotesizeisn't intended to be an enviornment, you can use it that way but always make sure there is a blank line before the\endand before the\begin– David Carlisle Nov 29 '23 at 00:41\footnotesizealters not only the size of the font, but the spacing of lines. Line-spacing is applied to paragraphs. So you have effectively reduced the line spacing for the entire paragraph. Theverbatimenvironment inserts a paragraph break, so the line spacing reverts to normal. – cfr Nov 29 '23 at 00:54\smallto resize a math display affects the baseline stretch of the preceding paragraph – barbara beeton Nov 29 '23 at 01:03\parafterverbatimwill do nothing) – David Carlisle Nov 29 '23 at 01:23