[PATCH -perfbook 1/4] ebook: Allocate enough width for four-digit page counts in TOC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Width of page counts in TOC is maintained as a LaTeX command named
\@pnumwidth (defined and referenced in book.cls) with the default
width of 1.55em.

1.55em can cover up to three-digit (< 1000) pages.

In ebook-sized builds, the page count exceeds 1000.
Four-digit pages can be covered by 2.2em (for the slightly wider
sans-serif font).

Conditionally redefine \@pnumwidth in "eb" builds.

Note:
  Final page count of 1c build is 914 now.
  When it exceeds 1000, \IfTwoColumn should be used instead for
  the conditional.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 perfbook-lt.tex | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index e8acf779..eb5c31d6 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -151,6 +151,13 @@
 \setboolean{indexhier}{true}
 \newcommand{\IfIndexHier}[2]{\ifthenelse{\boolean{indexhier}}{#1}{#2}}
 
+% Widen pnumwidth in TOC for ebook size build (more than 1000 pages)
+\makeatletter
+\IfEbookSize{
+\renewcommand*\@pnumwidth{2.2em}
+}{}
+\makeatother
+
 \IfEbookSize{
 \usepackage[section]{placeins}
 }{
-- 
2.17.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux