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 2/4] ebook: Print page counts on upper-right edge of page
Date: Tue, 28 Dec 2021 23:29:20 +0900	[thread overview]
Message-ID: <a4c9cdf2-e80f-80c1-fa4a-c75d1e638746@gmail.com> (raw)
In-Reply-To: <4fde622a-0aa3-e6df-1b20-1469ed676813@gmail.com>

Page counts at the header area are invisible due to the narrow
margin of 0.2in.

Use fancyhdr package and print page counts close to the top edge of
paper.  Print them in "Grey" color and scriptsize font so that they
won't distract readers too much.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 perfbook-lt.tex | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index eb5c31d6..ec3e38e1 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -401,9 +401,17 @@
   \setlength{\twocolumnwidth}{3.125in}
   \IfEbookSize {
     % From https://tex.stackexchange.com/questions/16735/latex-options-for-kindle
-    \usepackage[papersize={4.5in,6.3in},margin=0.2in,onecolumn,twoside=false]{geometry}
+    \usepackage[papersize={4.5in,6.3in},margin=0.2in,footskip=0.2in,
+      headsep=0.05in,headheight=0.15in,onecolumn,twoside=false]{geometry}
     \sloppy
     \setlength{\onecolumntextwidth}{4.1in}
+    \usepackage{fancyhdr}
+    \fancypagestyle{plain}{%
+      \fancyhf{} % clear all header and footer fields
+      \renewcommand{\headrulewidth}{0pt}
+      \rhead{\textcolor{Grey}{\scriptsize\thepage}}
+    }
+    \pagestyle{plain}
     %\pagestyle{empty}
     %\usepackage[scaled]{helvet}
     %\renewcommand{\familydefault}{\sfdefault}
-- 
2.17.1



  parent reply	other threads:[~2021-12-28 14:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28 14:25 [PATCH -perfbook 0/4] ebook: Improve overall page layout Akira Yokosawa
2021-12-28 14:27 ` [PATCH -perfbook 1/4] ebook: Allocate enough width for four-digit page counts in TOC Akira Yokosawa
2021-12-28 14:29 ` Akira Yokosawa [this message]
2021-12-28 14:31 ` [PATCH -perfbook 3/4] ebook: Use normal epigraph for chapter headings Akira Yokosawa
2021-12-28 14:33 ` [PATCH -perfbook 4/4] ebook: Reduce chapter heading's font size and spaces Akira Yokosawa
2021-12-28 17:06 ` [PATCH -perfbook 0/4] ebook: Improve overall page layout 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=a4c9cdf2-e80f-80c1-fa4a-c75d1e638746@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.