Re: [PATCH -perfbook 1/2] Define macros for multi-part listings in preamble

"Paul E. McKenney" <[email protected]> Fri, 26 Jun 2026 10:59:03 -0700
Newsgroups org.kernel.vger.perfbook
Message-ID <1751fd6b-2c9c-43d3-a4eb-f12513f69cbc@paulmck-laptop>
On Fri, Jun 26, 2026 at 08:34:47PM +0900, Akira Yokosawa wrote:
> Paul said he has a plan to add listings similar to Listings 9.13
> and 9.14 [1].
> 
> Move local definitions in rcuintro.tex for such multi-part listings
> into preamble so that they can be used elsewhere.  Note that
> "VerbatimT" and "adjustwidth" envs have vertical spacing tweaks
> applied.

Queued, thank you very much!!!

I queued the following commit on top of these two in order to create
the first Tools of the Trade triple listing.  Does this make sense,
or is there a better way?

							Thanx, Paul

------------------------------------------------------------------------

commit 72f863e04bf56ec4e95e90a789570a2434caf61e
Author: Paul E. McKenney <[email protected]>
Date:   Fri Jun 26 10:44:49 2026 -0700

    Add definitions of \adjvspace{above,below,bottom}
    
    Signed-off-by: Paul E. McKenney <[email protected]>

diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index f6d6efc2..3c1e15f1 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -407,6 +407,9 @@
 \newcommand{\myfvline}{\arabic{FancyVerbLine}} % redefine on-the-fly
 \AtBeginEnvironment{VerbatimT}{%
   \renewcommand{\theFancyVerbLine}{\rmfamily\tiny \myfvline}}
+\newcommand{\adjvspaceabove}{\vspace*{2pt}}
+\newcommand{\adjvspacebelow}{\vspace*{-1pt}}
+\newcommand{\adjvspacebottom}{\vspace*{-2pt}}
 
 \IfLmttForCode{
 \AtBeginEnvironment{verbatim}{\renewcommand{\ttdefault}{lmtt}}