Misc updates (a2ping vs Ghostscript, appendix/ack, Style Guide)
cover Misc updates (a2ping vs Ghostscript, appendix/ack, Style Guide)
Hi Paul,
This patch set is the collection of updates I've made over the weekend.
Patches #1 and #2 result from a compatibility-breaking change in Ghostscript 9.50. I noticed it while testing Ghostscript 9.50 on Fedora 31 as a workaround of Ghostscript 9.27's bounding-box regression. a2ping 2.83p no longer works with gs 9.50. I asked a2ping's maintainer for an update, and 2,84p has been released recently.
Patches #3 and #4 fix a typo and make use of \Cref{} macro in the reviewers' list.
Patch #5 is a response to your addition of newline-after-sentence rule. The rule talks about coding style in LaTeX source. OTOH, the other conventions talk about the result of typesetting. So I made it an individual itemize list.
Patch #6 updates the way we call the new (current) snippets.
Thanks, Akira
PS (Reminder to Paul):
Info on the frontpage needs updates (email address, where you work at).
--
Akira Yokosawa (6):
Makefile: Add compatibility check of Ghostscript and a2ping (9.50 vs 2.84p)
FAQ-BUILD: Add a workaround for Fedora's Ghostscript regression appendix/ack: Fill in missing ')'
appendix/ack: Use \Cref{} for cross references in reviewers list.
styleguide: Clarify newline-after-sentence rule is for LaTeX source
styleguide: Treat current snippet scheme as 'the scheme'
FAQ-BUILD.txt | 24 +++++++++----------- Makefile | 23 +++++++++++++------ appendix/ack/ack.tex | 36 +++++++++++++++--------------- appendix/styleguide/styleguide.tex | 11 ++++++--- 4 files changed, 53 insertions(+), 41 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/6 Makefile: Add compatibility check of Ghostscript and a2ping (9.50 vs 2.84p)
From b7b414dc76b7852a77410d1812afbb79b76ca67d Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Wed, 27 Nov 2019 00:38:12 +0900
Subject: [PATCH 1/6] Makefile: Add compatibility check of Ghostscript and a2ping (9.50 vs 2.84p)
Ghostscript 9.50 changed the default behavior regarding SAFER mode. Prior to 9.50, -dNOSAFER was assumed by default. 9.50 has made -dSAFER the default. To override this change, a2ping 2.84p now explicitly adds the option -dNOSAFER when it invokes "gs" internally.
Add the compatibility check of a2ping and Ghostscript in Makefile and update FAQ-BUILD.txt accordingly.
--- FAQ-BUILD.txt | 8 +++++--- Makefile | 23 ++++++++++++++++------- 2 files changed, 21 insertions(+), 10 deletions(-)
FAQ-BUILD.txt +5 -3
@@ -94,14 +94,16 @@ A. a2ping 2.77p has become incompatible with up-to-date Ghostscript on most Linux distributions since September 2018 due to security fixes backported from Ghostscript - 9.22 and later. A compatible a2ping (2.83p) is available - at: + 9.22 and later. a2ping 2.83p has lost compatibility with + Ghostscript 9.50 due to a change in default behavior. + A compatible a2ping (2.84p) is available at: + https://www.ctan.org/pkg/a2ping Copy "a2ping.pl" as "a2ping" into a directory which precedes /usr/bin in your PATH setting. - a2ping 2.83p is included in TeX Live 2018 or later. + a2ping 2.84p should be available in TeX Live 2020 or later. 8. When I try to build perfbook, it hangs after printing a line reading "pdflatex 1". How can I fix this?
Makefile +16 -7
@@ -96,14 +96,23 @@ endif STEELFONTID := $(shell fc-list | grep -i steel | grep -c Steel) ifdef A2PING -A2PING_277P := $(shell a2ping --help 2>&1 | grep -c "2.77p,") -ifeq ($(A2PING_277P),1) -A2PING_GSCNFL := 1 -else -A2PING_GSCNFL := 0 -endif + GS_950_OR_LATER := $(shell gs --version | grep -c -E "9\.[5-9].?") + A2PING_277P := $(shell a2ping --help 2>&1 | grep -c "2.77p,") + A2PING_283P := $(shell a2ping --help 2>&1 | grep -c "2.83p,") + ifeq ($(A2PING_277P),1) + A2PING_GSCNFL := 1 + else + ifeq ($(A2PING_283P),1) + ifeq ($(GS_950_OR_LATER),1) + A2PING_GSCNFL := 1 + else + A2PING_GSCNFL := 0 + endif + else + A2PING_GSCNFL := 0 + endif + endif endif - SOURCES_OF_SNIPPET_ALL := $(shell grep -R -l -F '\begin{snippet}' CodeSamples) SOURCES_OF_LITMUS := $(shell grep -R -l -F '\begin[snippet]' CodeSamples) SOURCES_OF_LTMS := $(patsubst %.litmus,%.ltms,$(SOURCES_OF_LITMUS))
Signature · 1 line
2.17.1
PATCH 2/6 FAQ-BUILD: Add a workaround for Fedora's Ghostscript regression
In reply to Akira YokosawaFrom d32b51f730834673c78d33beb2705fbc10ae3bcf Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sat, 30 Nov 2019 19:15:41 +0900
Subject: [PATCH 2/6] FAQ-BUILD: Add a workaround for Fedora's Ghostscript regression
Now that Fedora 31 has restored gedit-plugin-synctex, remove the note on the issue along the way.
--- FAQ-BUILD.txt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
FAQ-BUILD.txt +6 -10
@@ -232,16 +232,6 @@ Please make sure to revert the changes before doing "git commit" of the other updates you've made. - Note on Fedora 31: - Fedora 31 picked up a version of gedit-plugins which - doesn't contain the synctex plugin. It was fixed soon - after in the upstream gnome repository. See: - - https://gitlab.gnome.org/GNOME/gedit-plugins/issues/6 - - Until Fedora 31 catches up, you might want to install - the plugin manually. - 12. Figures of gnuplot in perfbook I built have their upper end trimmed. What am I missing?
@@ -253,3 +243,9 @@ https://bugs.ghostscript.com/show_bug.cgi?id=700988 Let's hope Fedora will catch up soon. + + Installing upstream Ghostscript 9.50 (or later) should + work with you, but see #7 above to get a compatible a2ping. + + "make neatfreak; make" will rebuild all the figures. + The "-jN" option should accelerate the rebuild.
Signature · 1 line
2.17.1
PATCH 3/6 appendix/ack: Fill in missing ')'
In reply to Akira YokosawaFrom 484eca4e57909f9f47f8ce0e14cf2f38a33e9e78 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sat, 30 Nov 2019 23:32:02 +0900
Subject: [PATCH 3/6] appendix/ack: Fill in missing ')'
--- appendix/ack/ack.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
appendix/ack/ack.tex +1 -1
@@ -31,7 +31,7 @@ changes and automatically determining which source files are present. \section{Reviewers} \begin{itemize} -\item Alan Stern (Chapter~\ref{chp:Advanced Synchronization: Memory Ordering}. +\item Alan Stern (Chapter~\ref{chp:Advanced Synchronization: Memory Ordering}). \item Andy Whitcroft (Section~\ref{sec:defer:RCU Fundamentals}, Section~\ref{sec:defer:RCU Linux-Kernel API}). \item Artem Bityutskiy (Chapter~\ref{chp:Advanced Synchronization: Memory Ordering},
Signature · 1 line
2.17.1
PATCH 4/6 appendix/ack: Use \Cref{} for cross references in reviewers list
In reply to Akira YokosawaFrom 82ef05b1df7feaf48f2eac9d6555126a27c3fce1 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sat, 30 Nov 2019 23:34:42 +0900
Subject: [PATCH 4/6] appendix/ack: Use \Cref{} for cross references in reviewers list
--- appendix/ack/ack.tex | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
appendix/ack/ack.tex +18 -18
@@ -31,27 +31,27 @@ changes and automatically determining which source files are present. \section{Reviewers} \begin{itemize} -\item Alan Stern (Chapter~\ref{chp:Advanced Synchronization: Memory Ordering}). -\item Andy Whitcroft (Section~\ref{sec:defer:RCU Fundamentals}, - Section~\ref{sec:defer:RCU Linux-Kernel API}). -\item Artem Bityutskiy (Chapter~\ref{chp:Advanced Synchronization: Memory Ordering}, - Appendix~\ref{chp:app:whymb:Why Memory Barriers?}). -\item Dave Keck (Appendix~\ref{chp:app:whymb:Why Memory Barriers?}). +\item Alan Stern (\Cref{chp:Advanced Synchronization: Memory Ordering}). +\item Andy Whitcroft (\Cref{sec:defer:RCU Fundamentals}, + \Cref{sec:defer:RCU Linux-Kernel API}). +\item Artem Bityutskiy (\Cref{chp:Advanced Synchronization: Memory Ordering}, + \Cref{chp:app:whymb:Why Memory Barriers?}). +\item Dave Keck (\Cref{chp:app:whymb:Why Memory Barriers?}). \item David S. Horner - (Section~\ref{sec:formal:Promela Parable: dynticks and Preemptible RCU}). -\item Gautham Shenoy (Section~\ref{sec:defer:RCU Fundamentals}, - Section~\ref{sec:defer:RCU Linux-Kernel API}). -\item ``jarkao2'', AKA LWN guest \#41960 (Section~\ref{sec:defer:RCU Linux-Kernel API}). -\item Jonathan Walpole (Section~\ref{sec:defer:RCU Linux-Kernel API}). -\item Josh Triplett (Chapter~\ref{chp:Formal Verification}). -\item Michael Factor (Section~\ref{sec:future:Transactional Memory}). -\item Mike Fulton (Section~\ref{sec:defer:RCU Fundamentals}). + (\Cref{sec:formal:Promela Parable: dynticks and Preemptible RCU}). +\item Gautham Shenoy (\Cref{sec:defer:RCU Fundamentals}, + \Cref{sec:defer:RCU Linux-Kernel API}). +\item ``jarkao2'', AKA LWN guest \#41960 (\Cref{sec:defer:RCU Linux-Kernel API}). +\item Jonathan Walpole (\Cref{sec:defer:RCU Linux-Kernel API}). +\item Josh Triplett (\Cref{chp:Formal Verification}). +\item Michael Factor (\Cref{sec:future:Transactional Memory}). +\item Mike Fulton (\Cref{sec:defer:RCU Fundamentals}). \item Peter Zijlstra - (Section~\ref{sec:defer:RCU Usage}). % Lanin and Shasha citation. -\item Richard Woodruff (Appendix~\ref{chp:app:whymb:Why Memory Barriers?}). -\item Suparna Bhattacharya (Chapter~\ref{chp:Formal Verification}). + (\Cref{sec:defer:RCU Usage}). % Lanin and Shasha citation. +\item Richard Woodruff (\Cref{chp:app:whymb:Why Memory Barriers?}). +\item Suparna Bhattacharya (\Cref{chp:Formal Verification}). \item Vara Prasad - (Section~\ref{sec:formal:Promela Parable: dynticks and Preemptible RCU}). + (\Cref{sec:formal:Promela Parable: dynticks and Preemptible RCU}). \end{itemize} Reviewers whose feedback took the extremely welcome form of a patch
Signature · 1 line
2.17.1
PATCH 5/6 styleguide: Clarify newline-after-sentence rule is for LaTeX source
In reply to Akira YokosawaFrom 5bb205a33cbd134f7d153c19efdf12fe2861c1c1 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Mon, 2 Dec 2019 21:09:53 +0900
Subject: [PATCH 5/6] styleguide: Clarify newline-after-sentence rule is for LaTeX source
--- appendix/styleguide/styleguide.tex | 5 +++++ 1 file changed, 5 insertions(+)
appendix/styleguide/styleguide.tex +5 -0
@@ -76,6 +76,11 @@ answers to Akira's questions regarding perfbook's punctuation policy. use it if doing so prevents a line break in that heading. \item When mentioning words, I use quotations. When introducing a new word, I use \verb|\emph{}|. +\end{itemize} + +Following is a convention regarding punctuation in \LaTeX\ sources. + +\begin{itemize} \item Place a newline after a colon (\co{:}) and the end of a sentence. This avoids the whole one-space/two-space food fight and also has the advantage of more clearly showing changes to single sentences
Signature · 1 line
2.17.1
PATCH 6/6 styleguide: Treat current snippet scheme as 'the scheme'
In reply to Akira YokosawaFrom 6dcdd57af3b2afa72635dc544064c789ddd1d391 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Mon, 2 Dec 2019 21:17:35 +0900
Subject: [PATCH 6/6] styleguide: Treat current snippet scheme as 'the scheme'
Now that conversion of code snippets to the current scheme has completed, we can call it "the scheme".
--- appendix/styleguide/styleguide.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
appendix/styleguide/styleguide.tex +3 -3
@@ -333,10 +333,10 @@ This section explains the use cases of such macros and environments. \label{sec:app:styleguide:Code Snippet} Because the \qco{verbatim} environment is a primitive way to include -listings, we are transitioning to a new scheme which uses +listings, we have transitioned to a scheme which uses the \qco{fancyvrb} package for code snippets. -The goal of the new scheme is to extract \LaTeX\ sources of +The goal of the scheme is to extract \LaTeX\ sources of code snippets directly from code samples under \path{CodeSamples} directory. It also makes it possible to embed line labels in the code samples,
@@ -355,7 +355,7 @@ by the \qco{verbatimbox} package. \co{verbbox} can automatically generate line numbers, but those line numbers cannot be referenced within the \LaTeX\ sources. -Let's start by looking at how code snippets are coded in the new scheme. +Let's start by looking at how code snippets are coded in the current scheme. There are three customized environments of \qco{Verbatim}. \qco{VerbatimL} is for floating snippets within the \qco{listing} environment. \qco{VerbatimN} is for inline snippets with line count
Signature · 1 line
2.17.1
Paul E. McKenney
AppliedQuoted 14 lines · Akira Yokosawa
Hi Paul,
This patch set is the collection of updates I've made over the weekend.
Patches #1 and #2 result from a compatibility-breaking change in Ghostscript 9.50. I noticed it while testing Ghostscript 9.50 on Fedora 31 as a workaround of Ghostscript 9.27's bounding-box regression. a2ping 2.83p no longer works with gs 9.50. I asked a2ping's maintainer for an update, and 2,84p has been released recently.
Patches #3 and #4 fix a typo and make use of \Cref{} macro in the reviewers' list.
Quoted 6 lines
Patch #5 is a response to your addition of newline-after-sentence rule. The rule talks about coding style in LaTeX source. OTOH, the other conventions talk about the result of typesetting. So I made it an individual itemize list.
Patch #6 updates the way we call the new (current) snippets.
Queued and pushed, thank you!
Quoted 5 lines
Thanks, Akira
PS (Reminder to Paul):
Info on the frontpage needs updates (email address, where you work at).
Good point! I have queued and pushed treewide updates for both my email address and my employer.
Thanx, Paul
Quoted 18 lines
--
Akira Yokosawa (6):
Makefile: Add compatibility check of Ghostscript and a2ping (9.50 vs 2.84p)
FAQ-BUILD: Add a workaround for Fedora's Ghostscript regression appendix/ack: Fill in missing ')'
appendix/ack: Use \Cref{} for cross references in reviewers list.
styleguide: Clarify newline-after-sentence rule is for LaTeX source
styleguide: Treat current snippet scheme as 'the scheme'FAQ-BUILD.txt | 24 +++++++++----------- Makefile | 23 +++++++++++++------ appendix/ack/ack.tex | 36 +++++++++++++++--------------- appendix/styleguide/styleguide.tex | 11 ++++++--- 4 files changed, 53 insertions(+), 41 deletions(-)Signature · 1 line
2.17.1