From b7746365d3f95a6707ebc9c0b6e1407b34e3bcf9 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sat, 25 Oct 2025 12:34:13 +0200 Subject: [PATCH] Refine code listing font and split example to fit the text on the slide in 02-cmake --- 02-cmake/02-cmake.tex | 10 ++++++++-- 02-cmake/02-cmake.toc | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/02-cmake/02-cmake.tex b/02-cmake/02-cmake.tex index 832e435..58f8a81 100644 --- a/02-cmake/02-cmake.tex +++ b/02-cmake/02-cmake.tex @@ -12,7 +12,7 @@ \lstdefinestyle{CStyle}{ language=C, % Set the language to C - basicstyle=\ttfamily\footnotesize\linespread{0.9}\tiny, % Set font style and size + basicstyle=\ttfamily\scriptsize, % Set font style and size keywordstyle=\color{blue}, % Color of keywords commentstyle=\color{gray}, % Color of comments stringstyle=\color{red}, % Color of strings @@ -30,6 +30,8 @@ xrightmargin=15pt, % Add left padding (approx. 2.8mm or 10px) } +\lstset{basicstyle=\ttfamily\footnotesize, breaklines=true, breakatwhitespace=false, columns=fullflexible, keepspaces=true} + \title[CMake]{CMake} \author{Obolenskiy Arseniy, Nesterov Alexander} \institute{ITLab} @@ -115,7 +117,7 @@ \section{Building C++ projects} \end{itemize} \end{frame} -\begin{frame}[fragile]{Simple library example} +\begin{frame}[fragile]{Simple library example: library} Assuming there is a simple library that contains a function \texttt{add}: \lstset{style=CStyle, caption=add.h} @@ -136,6 +138,10 @@ \section{Building C++ projects} return x + y; } \end{lstlisting} +\end{frame} + +\begin{frame}[fragile]{Simple library example: main} + Usage of the library: \lstset{style=CStyle, caption=main.cpp} \begin{lstlisting} diff --git a/02-cmake/02-cmake.toc b/02-cmake/02-cmake.toc index 9465c69..7cef92b 100644 --- a/02-cmake/02-cmake.toc +++ b/02-cmake/02-cmake.toc @@ -1,3 +1,3 @@ \beamer@sectionintoc {1}{Building C++ projects}{3}{0}{1} -\beamer@sectionintoc {2}{Build systems history}{10}{0}{2} -\beamer@sectionintoc {3}{CMake}{19}{0}{3} +\beamer@sectionintoc {2}{Build systems history}{11}{0}{2} +\beamer@sectionintoc {3}{CMake}{20}{0}{3}