Skip to contentSkip to conversation

Misc updates and fixes including 'make help' improvement

PATCH In review Akira Yokosawa 2 participants 6 messages Mar 27, 2020 – Mar 28, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Misc updates and fixes including 'make help' improvement

Hi Paul,

This is a set of misc patches.

Patch 1/4 adds an entry in FAQ-BUILD on an issue of Fedora 31.

Patch 2/4 fixes the paper size issue in -hb build using the "geometry" package. At least we now know how to add a custom paper size without modifying book.cls.
The tweaks of margins look somewhat ad hoc, and they are the result of a few tries and errors on my side.

Patch 3/4 is a trivial typo fix.

Patch 4/4 is the update of "make help" you suggested yesterday.

Thanks, Akira
--
Akira Yokosawa (4):
FAQ-BUILD: Add entry on recent breakage in texlive update on F31 Fix paper size of -hb build
toolsoftrade: Fix trivial typo (api-pthreads.h)
Makefile: Show only official targets in 'make help'

 FAQ-BUILD.txt                 | 16 +++++++++++++++-
 Makefile                      | 24 +++++++++++++++---------
 perfbook.tex                  | 12 +++++++++---
 pfbook.cls                    |  9 ++-------
 toolsoftrade/toolsoftrade.tex |  2 +-
 5 files changed, 42 insertions(+), 21 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/4 FAQ-BUILD: Add entry on recent breakage in texlive update on F31

From e34b39b60dcca460338cb310e38dbc13aa39c01a Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Mon, 23 Mar 2020 12:20:20 +0900
Subject: [PATCH 1/4] FAQ-BUILD: Add entry on recent breakage in texlive update on F31

This workaround was suggested in [1].

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1796550#c11

---
 FAQ-BUILD.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)
FAQ-BUILD.txt +13 -0
index b8ad20d8..6a1acff1 100644
@@ -257,3 +257,16 @@
 
 		"make neatfreak; make" will rebuild all the figures.
 		The "-jN" option should accelerate the rebuild.
+
+13.	After updating texlive packages on Fedora 31, build fails with
+	the message from bibtex saying:
+
+		I found no \bibdata command---while reading file perfbook.aux
+		I found no \bibstyle command---while reading file perfbook.aux
+
+	Is there any workaround?
+
+	A.	Try rebuilding database files by the following commands:
+
+		    sudo updmap-sys --syncwithtrees --force
+		    sudo updmap-sys
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/4 Fix paper size of -hb build

In reply to Akira Yokosawa

From 4baaa6cf18f4bec4bd4e59fe0a07152c4c4ad885 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Thu, 26 Mar 2020 22:49:51 +0900
Subject: [PATCH 2/4] Fix paper size of -hb build

The change made in commit 648af1774e3a ("Stop using modified book.cls") back in April 2018 caused pdflatex to output PDF with a default paper size determined at installation time of TeX Live, normally letterpaper.

As a workaround, use "geometry" package with the custom paper-size options for -hb build.

Add the letterpaper option to \documentclass{} to make sure the resulting PDF is of US letterpaper as well.

(Default paper size might be a4paper depending on the installation option.)

Also remove definition of unused option "letterpaperhb" from pfbook.cls.

---
 Makefile     |  2 +-
 perfbook.tex | 12 +++++++++---
 pfbook.cls   |  9 ++-------
 3 files changed, 12 insertions(+), 11 deletions(-)
Makefile +1 -1
index d1f4dff6..c65bd786 100644
@@ -238,7 +238,7 @@ perfbook-1c.tex: perfbook.tex
 	sed -e 's/,twocolumn//' -e 's/setboolean{twocolumn}{true}/setboolean{twocolumn}{false}/' < $< > $@
 
 perfbook-hb.tex: perfbook.tex
-	sed -e 's/,twocolumn/&,letterpaperhb/' -e 's/setboolean{hardcover}{false}/setboolean{hardcover}{true}/' < $< > $@
+	sed -e 's/setboolean{hardcover}{false}/setboolean{hardcover}{true}/' < $< > $@
 
 perfbook-msns.tex: perfbook.tex
 	sed -e 's/%msfontstub/\\usepackage{courier}/' < $< > $@
perfbook.tex +9 -3
index 2b88bf88..8141b15e 100644
@@ -1,4 +1,4 @@
-\documentclass[10pt,twocolumn]{pfbook} % book class customized for perfbook
+\documentclass[10pt,twocolumn,letterpaper]{pfbook} % book class customized for perfbook
 % For arxiv.org, must be on or before line 5:
 \pdfoutput=1
 
@@ -254,6 +254,10 @@
 \newcommand{\pararef}[1]{Paragraph ``\nameref{#1}'' on Page~\pageref{#1}}
 \newcommand{\Pararef}[1]{Paragraph ``\nameref{#1}'' on Page~\pageref{#1}}
 
+\IfHardCover{
+\usepackage[paperheight=10.75in,paperwidth=8.25in]{geometry}
+}{}
+
 \begin{document}
 
 %%HTMLSKIP
@@ -331,8 +335,10 @@
 }
 
 \IfHardCover{
-\addtolength{\topmargin}{-0.25in}
-\addtolength{\evensidemargin}{-0.25in}
+\addtolength{\topmargin}{-0.125in}
+\addtolength{\oddsidemargin}{-0.05in}
+\addtolength{\evensidemargin}{-0.7in}
+\SetWatermarkVerCenter{.92\paperheight}
 }{}
 
 \setcounter{secnumdepth}{4} % Enable counter for paragraph
pfbook.cls +2 -7
index 9c1ef9f1..c27555cc 100644
@@ -4,14 +4,9 @@
 % Copyright (C) 2018 Akira Yokosawa
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
 \ProvidesClass{pfbook}
-              [2018/04/01 v1.4h-pem-ay
+              [2020/03/26 v1.4i-ay
  book class customized for perfbook]
-% (by Paul E. McKenney)
-% Add an option "letterpaperhb" in order to generate 10.75x8.25in pages
-% for hardcover books.
-\DeclareOption{letterpaperhb}
-   {\setlength\paperheight {10.75in}%
-    \setlength\paperwidth  {8.25in}}
+%
 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
 \ProcessOptions\relax
 \LoadClass{book}
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/4 toolsoftrade: Fix trivial typo (api-pthreads.h)

In reply to Akira Yokosawa

From 9ed9db213b9c687df6f0143e4eec93bfbecddd72 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Fri, 27 Mar 2020 00:19:24 +0900
Subject: [PATCH 3/4] toolsoftrade: Fix trivial typo (api-pthreads.h)

---
 toolsoftrade/toolsoftrade.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
toolsoftrade/toolsoftrade.tex +1 -1
index 8fdd2f52..8869a79d 100644
@@ -240,7 +240,7 @@ process.
 It is therefore customary to wrap \co{wait()} into a function similar
 to the \co{waitall()} function shown in
 Listing~\ref{lst:toolsoftrade:Using the wait() Primitive}
-(\path{api-pthread.h}),
+(\path{api-pthreads.h}),
 with this \co{waitall()} function having semantics similar to the
 shell-script \co{wait} command.
 Each pass through the loop spanning \clnrefrange{loopa}{loopb}
Signature · 1 line
2.17.1
#4 lore raw

PATCH 4/4 Makefile: Show only official targets in 'make help'

In reply to Akira Yokosawa

From a16de4dd9a42483064426c0b964263a552f2475e Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Fri, 27 Mar 2020 19:29:59 +0900
Subject: [PATCH 4/4] Makefile: Show only official targets in 'make help'

To prevent the most important info from scrolling away, divide the help text into two parts.

"make help" will show three official targets and a hint for "make help-full".
"make help-full" will show all the targets and further notes.

---
 FAQ-BUILD.txt |  3 ++-
 Makefile      | 22 ++++++++++++++--------
 2 files changed, 16 insertions(+), 9 deletions(-)
FAQ-BUILD.txt +2 -1
index 6a1acff1..ffb380f2 100644
@@ -17,7 +17,8 @@
 	A.	"make hb" will build perfbook-hb.pdf that is useful
 		for making hard-bound printouts.
 		"make 2c" will build perfbook.pdf.
-		"make help" will show you the full list of targets.
+		"make help" will show you the list of official targets.
+		"make help-full" will display all the available targets.
 
 4.	Isn't it possible to build perfbook-1c.pdf by just typing
 	"make"?
Makefile +14 -8
index c65bd786..b721eeae 100644
@@ -150,7 +150,7 @@ endif
 
 chkpagegroup = $(PERFBOOK_CHKPAGEGROUP)
 
-.PHONY: all touchsvg clean distclean neatfreak 2c ls-unused $(ABBREVTARGETS) mslm perfbook-mslm.pdf mslmmsg help
+.PHONY: all touchsvg clean distclean neatfreak 2c ls-unused $(ABBREVTARGETS) mslm perfbook-mslm.pdf mslmmsg help help-official help-full
 all: $(targ)
 
 ifeq ($(MAKECMDGOALS),clean)
@@ -403,26 +403,32 @@ $(FCVSNIPPETS_LTMS):
 	@echo "$< --> $@"
 	@utilities/reorder_ltms.pl $< > $@
 
-help:
+help-official:
 	@echo "Official targets (Latin Modern Typewriter for monospace font):"
 	@echo "  Full,              Abbr."
 	@echo "  perfbook.pdf,      2c:   (default) 2-column layout"
 	@echo "  perfbook-1c.pdf,   1c:   1-column layout"
 	@echo "  perfbook-hb.pdf,   hb:   For hardcover books (2-column)"
+
+help: help-official
+	@echo
+	@echo "\"make help-full\" will show the list of available targets."
+
+help-full: help-official
 	@echo
 	@echo "Experimental targets:"
 	@echo "  Full,              Abbr."
-	@echo "  perfbook-qq,       qq:   2c with framed Quick Quizzes"
-	@echo "  perfbook-1cqq,     1cqq: 1c with framed Quick Quizzes"
-	@echo "  perfbook-nq,       nq:   2c without inline Quick Quizzes"
-	@echo "  perfbook-1cnq,     1cnq: 1c without inline Quick Quizzes"
-	@echo "  perfbook-tcb,      tcb:  2c with table caption at bottom (prev default)"
+	@echo "  perfbook-qq.pdf,   qq:   2c with framed Quick Quizzez (1cqq for 1c)"
+	@echo "  perfbook-nq.pdf,   nq:   2c without inline Quick Quizzes (1cnq for 1c)"
 	@echo "  perfbook-msnt.pdf, msnt: 2c with newtxtt as monospace (non-slashed 0)"
 	@echo "  perfbook-mstx.pdf, mstx: 2c with txtt as monospace"
 	@echo "  perfbook-msr.pdf,  msr:  2c with regular thickness courier clone"
 	@echo "  perfbook-msn.pdf,  msn:  2c with narrow courier clone"
 
 	@echo "  perfbook-1csf.pdf, 1csf: 1c with sans serif font"
+	@echo
+	@echo "Historical targets:"
+	@echo "  perfbook-tcb.pdf,  tcb:  2c with table caption at bottom (prev default)"
 	@echo "  perfbook-msns.pdf, msns: 2c with non-scaled courier (orig default)"
 	@echo "  perfbook-mss.pdf,  mss:  2c with scaled courier (prev default)"
 	@echo
@@ -432,7 +438,7 @@ help:
 	@echo "  - \"msn\" doesn't cover bold face for monospace."
 	@echo "  - \"1csf\" requires \"newtxsf\"."
 	@echo "  - \"msnt\" and \"1csf\" have framed Quick Quizzes."
-	@echo "  - All targets except for \"msn\" use \"Latin Modern Typewriter\" font"
+	@echo "  - All the targets except for \"msn\" use \"Latin Modern Typewriter\" font"
 	@echo "    for code snippets."
 
 clean:
Signature · 1 line
2.17.1
#5 lore raw
In reply to Akira Yokosawa
Quoted 12 lines · Akira Yokosawa

Hi Paul,

This is a set of misc patches.

Patch 1/4 adds an entry in FAQ-BUILD on an issue of Fedora 31.

Patch 2/4 fixes the paper size issue in -hb build using the "geometry" package. At least we now know how to add a custom paper size without modifying book.cls.
The tweaks of margins look somewhat ad hoc, and they are the result of a few tries and errors on my side.

Quoted 3 lines

Patch 3/4 is a trivial typo fix.

Patch 4/4 is the update of "make help" you suggested yesterday.

Looks good, thank you! Queued and pushed.

Thanx, Paul

Quoted 18 lines

Thanks, Akira
--
Akira Yokosawa (4):
FAQ-BUILD: Add entry on recent breakage in texlive update on F31 Fix paper size of -hb build
toolsoftrade: Fix trivial typo (api-pthreads.h)
Makefile: Show only official targets in 'make help'

 FAQ-BUILD.txt                 | 16 +++++++++++++++-
 Makefile                      | 24 +++++++++++++++---------
 perfbook.tex                  | 12 +++++++++---
 pfbook.cls                    |  9 ++-------
 toolsoftrade/toolsoftrade.tex |  2 +-
 5 files changed, 42 insertions(+), 21 deletions(-)
Signature · 1 line
2.17.1