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 6/7] Tweak TOC width params
Date: Sun, 30 Apr 2023 08:22:29 +0900	[thread overview]
Message-ID: <94bb1aaa-3a0c-3dfc-a698-86d96be68dbc@gmail.com> (raw)
In-Reply-To: <2403fec1-1f05-c8ee-92cd-0350f9714f18@gmail.com>

We now have Section 15.5.10, (five digits + two periods).
Default of the book class can not afford that much digits in
subsection count.
Increase width parameters to accomodate it.

Also, as for -sf builds, the Helvetica clone font needs slightly
wider spaces in the "em" unit.  Add settings for -sf builds.

Mention default widths in the comment block for future reference.

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

diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index cdac9d495a3a..af5e0bf30032 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -158,11 +158,28 @@
 \setboolean{indexhier}{true}
 \newcommand{\IfIndexHier}[2]{\ifthenelse{\boolean{indexhier}}{#1}{#2}}
 
-% Widen pnumwidth in TOC for ebook size build (more than 1000 pages)
+% Tweak width params of TOC
 \makeatletter
-\IfEbookSize{
+\IfEbookSize{ % for ebook size build (more than 1000 pages)
 \renewcommand*\@pnumwidth{2.2em}
 }{}
+% default params defined in book.sty:
+%  width of chapter (two digits):			1.5em
+%  indent of section:					1.5em
+%  width of section (three digits + one periods):	2.3em
+%  indent of subsection:	  			3.8em
+%  width of subsection (four digits + two periods):	3.2em
+\IfSansSerif{	% sans serif (Helvetica clone)
+		%  to cover section "E.10" and subsection "15.5.10",
+		%  width of section:      2.4em
+		%  width of subsection:   3.7em
+\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.4em}}
+\renewcommand*\l@subsection{\@dottedtocline{2}{3.9em}{3.7em}}
+}{		% serif (Times Roman clone)
+		%  to cover subsection "15.5.10",
+		%  width of subsection:   3.4em
+\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.4em}}
+}
 \makeatother
 
 \IfEbookSize{
-- 
2.25.1



  parent reply	other threads:[~2023-04-29 23:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-29 23:01 [PATCH -perfbook 0/7] Collection of minor fixes and updates Akira Yokosawa
2023-04-29 23:05 ` [PATCH -perfbook 1/7] formal/spinhint: Don't use \qco{} for long message Akira Yokosawa
2023-04-29 23:40   ` SeongJae Park
2023-04-29 23:07 ` [PATCH -perfbook 2/7] formal/ppcmem: Use \qco{} as intended Akira Yokosawa
2023-04-29 23:41   ` SeongJae Park
2023-04-30  0:26     ` Paul E. McKenney
2023-04-29 23:08 ` [PATCH -perfbook 3/7] Add acronyms of LKMM and KCSAN Akira Yokosawa
2023-04-29 23:13 ` [PATCH -perfbook 4/7] CodeSamples/count: Adjust coding style Akira Yokosawa
2023-04-29 23:16 ` [PATCH -perfbook 5/7] count: Adjust scaling factor of Listing 5.18 Akira Yokosawa
2023-04-29 23:22 ` Akira Yokosawa [this message]
2023-04-30  0:30   ` [PATCH -perfbook 6/7] Tweak TOC width params Paul E. McKenney
2023-04-29 23:23 ` [PATCH -perfbook 7/7] precheck.sh: Export LC_TIME Akira Yokosawa

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=94bb1aaa-3a0c-3dfc-a698-86d96be68dbc@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.