All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: perfbook@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH -perfbook 5/7] Adjust page header/footer widths for tweaked textwidths
Date: Mon, 2 Mar 2026 18:23:21 +0900	[thread overview]
Message-ID: <73f4d3ff-7fcd-4888-92c2-e39f4d1bd156@gmail.com> (raw)
In-Reply-To: <28c46b77-ceb8-4b4f-9f8e-d56ef6b2711d@gmail.com>

In 2c builds, Legal and TOC pages are temporarily switched to
1c mode, without adjusting header/footer width.

I was lazy in commit 114e330a528a ("Narrow textwidth of legal and
TOB pages in 2c build") and failed to investigate other approaches.

It turns out that the "geometry" package provides useful macros for
similar purposes with the bonus of natural adjustment of header/footer
widths.

Let's apply the "geometry" way of switching between 2c/1c layouts.

For bibliography pages, use slightly wider textwidth than that of
-1c builds for non-ebook size builds.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 perfbook-lt.tex | 31 ++++++++++++-------------------
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index 724e1b83..78a26c21 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -666,21 +666,17 @@
 \newenvironment{fcvref}[1][]{\renewcommand{\lnrefbase}{#1}%
 \ignorespaces}{\ignorespacesafterend}
 
+\IfTwoColumn{\newgeometry{body={4.75in,8.25in},centering=true,onecolumn}}{}
+
 \frontmatter
 
 \IfEbookSize{\hypersetup{pageanchor=false}}{}
 \maketitle
 \IfEbookSize{\hypersetup{pageanchor=true}}{}
 
-\IfTwoColumn{
-  \onecolumn\begin{adjustwidth*}{.95in}{.8in}
-  \addtolength{\parindent}{6pt}
-}{}
 \input{legal}
 \tableofcontents
-\IfTwoColumn{
-  \end{adjustwidth*}\twocolumn
-}{}
+\IfTwoColumn{\restoregeometry}{}
 
 \mainmatter
 
@@ -715,24 +711,21 @@
 \input{glossary.tex}
 
 % Bibliograpy
-\IfTwoColumn{
-  \onecolumn\begin{adjustwidth*}{.8in}{.7in}
-  %\bibliographystyle{alpha}   % Use genuine alpha style (In case of build failure, use this instead)
-  \bibliographystyle{alphapf} % Use alpha style customized by urlbst with --inlinelinks option
+%\bibliographystyle{alpha}   % Use genuine alpha style (In case of build failure, use this instead)
+\bibliographystyle{alphapf} % Use alpha style customized by urlbst with --inlinelinks option
+\IfEbookSize{
+  % no geometry change for bibliography pages
 }{
-  \bibliographystyle{alphapf} % Use alpha style customized by urlbst with --inlinelinks option
+  % slightly wider than textwidth of -1c builds
+  \newgeometry{body={5.2in,8.25in},centering=true,onecolumn}
 }
+\begingroup
 \IfColorLinks{}{
   \hypersetup{pdfborder=0 0 1,urlbordercolor=0 0 0,pdfborderstyle=/S/U/W .2}
 }
 \bibliography{bib/RCU,bib/WFS,bib/hw,bib/os,bib/parallelsys,bib/patterns,bib/perfmeas,bib/refs,bib/syncrefs,bib/search,bib/swtools,bib/realtime,bib/TM,bib/standards,bib/OSS,bib/maze,bib/energy,bib/QC,bib/NP,bib/memorymodel}
-\IfColorLinks{}{
-  \hypersetup{pdfborder=0 0 0}
-}
-\IfTwoColumn{
-  \end{adjustwidth*}\twocolumn
-}{
-}
+\endgroup
+\IfEbookSize{}{\restoregeometry}
 
 % Credits
 \setcounter{secnumdepth}{-1} % surpress section numbering in backmatter
-- 
2.43.0



  parent reply	other threads:[~2026-03-02  9:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02  9:16 [PATCH -perfbook 0/7] 2026 March updates Akira Yokosawa
2026-03-02  9:17 ` [PATCH -perfbook 1/7] CodeSamples/formal: Update rcu-test.dat for v6.19 Akira Yokosawa
2026-03-02  9:19 ` [PATCH -perfbook 2/7] formal: rcu-test-ratio: Adjust legends' position Akira Yokosawa
2026-03-02  9:20 ` [PATCH -perfbook 3/7] Give page number counts room on TOC pages in -1c builds Akira Yokosawa
2026-03-02  9:21 ` [PATCH -perfbook 4/7] defer/rcuapi: Tweak column widths for long APIs Akira Yokosawa
2026-03-02  9:23 ` Akira Yokosawa [this message]
2026-03-02  9:24 ` [PATCH -perfbook 6/7] Define pagestyle (of titlesec) for section-less appendix Akira Yokosawa
2026-03-02  9:28 ` [PATCH -perfbook 7/7] intro/coarsen.svg: Tweak size of squares and use nuanced colors Akira Yokosawa
2026-03-02 18:19 ` [PATCH -perfbook 0/7] 2026 March updates Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73f4d3ff-7fcd-4888-92c2-e39f4d1bd156@gmail.com \
    --to=akiyks@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=perfbook@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.