All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -perfbook 00/11] Break and capitalize after colon, take four
@ 2021-08-17 10:14 Akira Yokosawa
  2021-08-17 10:16 ` [PATCH -perfbook 01/11] appendix, glossary: Break and capitalize after colon Akira Yokosawa
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:14 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Hi Paul,

This is the final round of colon-related fixes.

Patch 1/11 does the same changes in appendices and glossary as before.
Patch 2/11 fixes a trivial-looking typo.
Patch 3/11 fixes remaining violations detected by the updated scripts.
Patch 4/11 improves definition of \IfEbookSize and \IfSansSerif so that
they are safe to be used in the middle of a paragraph.
Patch 5/11 fixes inline-enumerate list containing \co{}.
This is similar to the issue of \co{} inside tabular cells.

Patches 6/11--10/11 are updates of check scripts.
(Please refer to change logs for what they are after.)
Patch 11/11 renames make target "periodcheck" to "punctcheck"
as it checks punctuation-related conventions not limited to
periods. 

        Thanks, Akira

--
Akira Yokosawa (11):
  appendix, glossary: Break and capitalize after colon
  glossary: Put missing question mark
  treewide: Adjust punctuation convention
  Add \ignorespaces command to \IfEbookSize and \IfSansSerif
  datastruct: Use \tco{} inside inline enumerate list
  periodcheck: Add colon-related checks
  cleverefcheck: Check lower-case word after \item
  periodcheck: Improve regex
  periodcheck: Use counter to prevent false negatives
  cleverefcheck: Add pattern to catch missing '\' in indexing macros
  Makefile: Rename periodcheck --> punctcheck

 Makefile                                    | 14 +++--
 SMPdesign/beyond.tex                        |  5 +-
 appendix/questions/after.tex                |  2 +-
 appendix/styleguide/styleguide.tex          |  5 +-
 appendix/toyrcu/toyrcu.tex                  | 11 ++--
 appendix/whymb/whymemorybarriers.tex        | 24 ++++----
 count/count.tex                             |  2 +-
 datastruct/datastruct.tex                   | 19 +++---
 defer/rcufundamental.tex                    |  4 +-
 future/formalregress.tex                    |  2 +-
 glossary.tex                                | 14 +++--
 perfbook-lt.tex                             |  6 +-
 utilities/cleverefcheck.pl                  | 65 ++++++++++++++-------
 utilities/{periodcheck.pl => punctcheck.pl} | 65 ++++++++++++---------
 utilities/{periodcheck.sh => punctcheck.sh} |  3 +-
 15 files changed, 143 insertions(+), 98 deletions(-)
 rename utilities/{periodcheck.pl => punctcheck.pl} (52%)
 rename utilities/{periodcheck.sh => punctcheck.sh} (87%)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 01/11] appendix, glossary: Break and capitalize after colon
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
@ 2021-08-17 10:16 ` Akira Yokosawa
  2021-08-17 10:18 ` [PATCH -perfbook 02/11] glossary: Put missing question mark Akira Yokosawa
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:16 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/questions/after.tex         |  2 +-
 appendix/toyrcu/toyrcu.tex           | 11 ++++++-----
 appendix/whymb/whymemorybarriers.tex | 24 ++++++++++++------------
 glossary.tex                         | 14 ++++++++------
 4 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/appendix/questions/after.tex b/appendix/questions/after.tex
index 195179d9..bd7c46b5 100644
--- a/appendix/questions/after.tex
+++ b/appendix/questions/after.tex
@@ -130,7 +130,7 @@ These locks cause the code segments in
 each other, in other words, to run atomically with respect to each other.
 This is represented in
 \cref{fig:app:questions:Effect of Locking on Snapshot Collection}:
-the locking prevents any of the boxes of code from overlapping in time, so
+The locking prevents any of the boxes of code from overlapping in time, so
 that the consumer's timestamp must be collected after the prior
 producer's timestamp.
 The segments of code in each box in this figure are termed
diff --git a/appendix/toyrcu/toyrcu.tex b/appendix/toyrcu/toyrcu.tex
index fd3f8c6d..b84755e3 100644
--- a/appendix/toyrcu/toyrcu.tex
+++ b/appendix/toyrcu/toyrcu.tex
@@ -533,8 +533,9 @@ checking of \co{rcu_refcnt}.
 	read-side critical section to see the recently removed
 	data element.
 
-	Exercise for the reader: use a tool such as Promela/spin
-	to determine which (if any) of the memory barriers in
+	Exercise for the reader:
+	Use a tool such as Promela/spin to determine which (if any) of
+	the memory barriers in
 	\cref{lst:app:toyrcu:RCU Update Using Global Reference-Count Pair}
 	are really needed.
 	See \cref{chp:Formal Verification}
@@ -590,9 +591,9 @@ checking of \co{rcu_refcnt}.
 		section was still referencing.
 	\end{sequence}
 
-	Exercise for the reader: What happens if \co{rcu_read_lock()}
-	is preempted for a very long time (hours!\@) just after
-	\clnref{r:lock:cur:b}?
+	Exercise for the reader:
+	What happens if \co{rcu_read_lock()} is preempted for a very long
+	time (hours!\@) just after \clnref{r:lock:cur:b}?
 	Does this implementation operate correctly in that case?
 	Why or why not?
 	The first correct and complete response will be credited.
diff --git a/appendix/whymb/whymemorybarriers.tex b/appendix/whymb/whymemorybarriers.tex
index c476730e..25d2c8f5 100644
--- a/appendix/whymb/whymemorybarriers.tex
+++ b/appendix/whymb/whymemorybarriers.tex
@@ -21,10 +21,10 @@ of how CPU caches work, and especially what is required to make
 caches really work well.
 The following sections:
 \begin{enumerate}
-\item	present the structure of a cache,
-\item	describe how cache-coherency protocols ensure that CPUs agree
+\item	Present the structure of a cache,
+\item	Describe how cache-coherency protocols ensure that CPUs agree
 	on the value of each location in memory, and, finally,
-\item	outline how store buffers and invalidate queues help
+\item	Outline how store buffers and invalidate queues help
 	caches and cache-coherency protocols achieve high performance.
 \end{enumerate}
 We will see that memory barriers are a necessary evil that is required
@@ -99,7 +99,8 @@ The size (32 cache lines in this case) and the
 this case) are collectively called the cache's
 ``\IXalt{geometry}{cache geometry}''.
 Since this cache is implemented in hardware, the hash function is
-extremely simple: extract four bits from the memory address.
+extremely simple:
+Extract four bits from the memory address.
 
 \begin{figure}
 \centering
@@ -385,11 +386,10 @@ levels of the system architecture.
 	What happens if two CPUs attempt to invalidate the
 	same cache line concurrently?
 }\QuickQuizAnswerB{
-	One of the CPUs gains access
-	to the shared bus first,
-	and that CPU ``wins''.  The other CPU must invalidate its copy of the
-	cache line and transmit an ``invalidate acknowledge'' message
-	to the other CPU\@.
+	One of the CPUs gains access to the shared bus first,
+	and that CPU ``wins''.
+	The other CPU must invalidate its copy of the cache line and
+	transmit an ``invalidate acknowledge'' message to the other CPU\@.
 
 	Of course, the losing CPU can be expected to immediately issue a
 	``read invalidate'' transaction, so the winning CPU's victory will
@@ -1436,9 +1436,9 @@ the assertion.
 	CPU~1's accesses, so the assertion could still fail.
 	However, all mainstream computer systems provide one mechanism
 	or another to provide ``transitivity'', which provides
-	intuitive causal ordering: if B saw the effects of A's accesses,
-	and C saw the effects of B's accesses, then C must also see
-	the effects of A's accesses.
+	intuitive causal ordering:
+	If B saw the effects of A's accesses, and C saw the effects of
+	B's accesses, then C must also see the effects of A's accesses.
 	In short, hardware designers have taken at least a little pity
 	on software developers.
 }\QuickQuizEnd
diff --git a/glossary.tex b/glossary.tex
index 60993be2..12dc7529 100644
--- a/glossary.tex
+++ b/glossary.tex
@@ -106,23 +106,25 @@
 	that CPU's cache.
 	The data might be missing because of a number of reasons,
 	including:
-	(1) this CPU has never accessed the data before
+	\begin{enumerate*}[(1)]
+	\item This CPU has never accessed the data before
 	(``startup'' or ``warmup'' miss),
-	(2) this CPU has recently accessed more
+	\item This CPU has recently accessed more
 	data than would fit in its cache, so that some of the older
 	data had to be removed (``capacity'' miss),
-	(3) this CPU
+	\item This CPU
 	has recently accessed more data in a given set\footnote{
 		In hardware-cache terminology, the word ``set''
 		is used in the same way that the word ``bucket''
 		is used when discussing software caches.}
 	than that set could hold (``associativity'' miss),
-	(4) some other CPU has written to the data (or some other
+	\item Some other CPU has written to the data (or some other
 	data in the same cache line) since this CPU has accessed it
 	(``communication miss''), or
-	(5) this CPU attempted to write to a cache line that is
+	\item This CPU attempted to write to a cache line that is
 	currently read-only, possibly due to that line being replicated
 	in other CPUs' caches.
+	\end{enumerate*}
 \item[\IXalth{Capacity Miss}{capacity}{cache miss}:]
 	A cache miss incurred because the corresponding CPU has recently
 	accessed more data than will fit into the cache.
@@ -462,7 +464,7 @@
 	is a pre-existing writer, any threads attempting to write must
 	wait for the writer to release the lock.
 	A key concern for reader-writer locks is ``fairness'':
-	can an unending stream of readers starve a writer or vice versa.
+	Can an unending stream of readers starve a writer or vice versa.
 \item[\IX{Real Time}:]
 	A situation in which getting the correct result is not sufficient,
 	but where this result must also be obtained within a given amount
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 02/11] glossary: Put missing question mark
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
  2021-08-17 10:16 ` [PATCH -perfbook 01/11] appendix, glossary: Break and capitalize after colon Akira Yokosawa
@ 2021-08-17 10:18 ` Akira Yokosawa
  2021-08-17 10:19 ` [PATCH -perfbook 03/11] treewide: Adjust punctuation convention Akira Yokosawa
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:18 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 glossary.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glossary.tex b/glossary.tex
index 12dc7529..ee1471bd 100644
--- a/glossary.tex
+++ b/glossary.tex
@@ -464,7 +464,7 @@
 	is a pre-existing writer, any threads attempting to write must
 	wait for the writer to release the lock.
 	A key concern for reader-writer locks is ``fairness'':
-	Can an unending stream of readers starve a writer or vice versa.
+	Can an unending stream of readers starve a writer or vice versa?
 \item[\IX{Real Time}:]
 	A situation in which getting the correct result is not sufficient,
 	but where this result must also be obtained within a given amount
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 03/11] treewide: Adjust punctuation convention
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
  2021-08-17 10:16 ` [PATCH -perfbook 01/11] appendix, glossary: Break and capitalize after colon Akira Yokosawa
  2021-08-17 10:18 ` [PATCH -perfbook 02/11] glossary: Put missing question mark Akira Yokosawa
@ 2021-08-17 10:19 ` Akira Yokosawa
  2021-08-17 10:21 ` [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif Akira Yokosawa
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:19 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Fix violations of punctuation convention flagged by the
to-be-updated check scripts.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 SMPdesign/beyond.tex      |  5 +++--
 count/count.tex           |  2 +-
 datastruct/datastruct.tex | 19 ++++++++++++-------
 defer/rcufundamental.tex  |  4 ++--
 future/formalregress.tex  |  2 +-
 5 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/SMPdesign/beyond.tex b/SMPdesign/beyond.tex
index 60aeed12..9c35de62 100644
--- a/SMPdesign/beyond.tex
+++ b/SMPdesign/beyond.tex
@@ -204,11 +204,12 @@ The parallel work-queue solver is a straightforward parallelization
 of the algorithm shown in
 \cref{lst:SMPdesign:SEQ Pseudocode,lst:SMPdesign:SEQ Helper Pseudocode}.
 \begin{fcvref}[ln:SMPdesign:SEQ Pseudocode]
-\Clnref{ifge} of Listing~\ref{lst:SMPdesign:SEQ Pseudocode} must use fetch-and-add,
+\Clnref{ifge} of \cref{lst:SMPdesign:SEQ Pseudocode} must use fetch-and-add,
 and the local variable \co{vi} must be shared among the various threads.
 \end{fcvref}
 \begin{fcvref}[ln:SMPdesign:SEQ Helper Pseudocode:try]
-\Clnref{chk:not:visited,mark:visited} of Listing~\ref{lst:SMPdesign:SEQ Helper Pseudocode} must be
+\Clnref{chk:not:visited,mark:visited} of
+\cref{lst:SMPdesign:SEQ Helper Pseudocode} must be
 combined into a CAS loop, with CAS failure indicating a loop in the
 maze.
 \Clnrefrange{recordnext}{next:visited} of this listing must use
diff --git a/count/count.tex b/count/count.tex
index c61a9fce..14ae9a36 100644
--- a/count/count.tex
+++ b/count/count.tex
@@ -2301,7 +2301,7 @@ The state machine starts out in the IDLE state, and when \co{add_count()}
 or \co{sub_count()} find that the combination of the local thread's count
 and the global count cannot accommodate the request, the corresponding
 slowpath sets each thread's \co{theft} state to REQ (unless that thread
-has no count, in which case it transitions directly to READY).
+has no count, in which case it transitions directly to READY)\@.
 Only the slowpath, which holds the \co{gblcnt_mutex} lock, is permitted to
 transition from the IDLE state, as indicated by the green color.\footnote{
 	For those with black-and-white versions of this book,
diff --git a/datastruct/datastruct.tex b/datastruct/datastruct.tex
index f9746e7c..6363ef33 100644
--- a/datastruct/datastruct.tex
+++ b/datastruct/datastruct.tex
@@ -182,7 +182,8 @@ shows mapping and locking functions.
 \Clnref{b,e}
 show the macro \co{HASH2BKT()}, which maps from a hash value
 to the corresponding \co{ht_bucket} structure.
-This macro uses a simple modulus: if more aggressive hashing is required,
+This macro uses a simple modulus:
+If more aggressive hashing is required,
 the caller needs to implement it when mapping from key to hash value.
 The remaining two functions acquire and release the \co{->htb_lock}
 corresponding to the specified hash value.
@@ -318,8 +319,8 @@ on two or more CPUs.
 
 And things only get worse with more CPUs, as can be seen in
 \cref{fig:datastruct:Read-Only Hash-Table Performance For Schroedinger's Zoo; 448 CPUs}.
-We do not need to show ideal performance: The performance for 29~CPUs
-and beyond is all too clearly worse than abysmal.
+We do not need to show ideal performance:
+The performance for 29~CPUs and beyond is all too clearly worse than abysmal.
 This clearly underscores the dangers of extrapolating performance from a
 modest number of CPUs.
 
@@ -1754,8 +1755,9 @@ splits and combines corresponding hash chains so that readers always
 see valid hash chains at all points during the resizing operation.
 This incremental splitting and combining relies on the fact that it
 is harmless for a reader to see a data element that should be in some
-other hash chain: When this happens, the reader will simply ignore the
-extraneous data element due to key mismatches.
+other hash chain:
+When this happens, the reader will simply ignore the extraneous data
+element due to key mismatches.
 
 \begin{figure}
 \centering
@@ -2074,8 +2076,11 @@ However, the resizable hash table's \co{ht} structure is not all that
 highly replicated.
 It is instead the \co{ht_bucket} structures we should focus on.
 There are two major opportunities for shrinking the \co{ht_bucket} structure:
-(1)~Placing the \co{->htb_lock} field in a low-order bit of one of the
-\co{->htb_head} pointers and (2)~Reducing the number of pointers required.
+\begin{enumerate*}[(1)]
+\item Placing the \co{->htb_lock} field in a low-order bit of one of the
+\co{->htb_head} pointers and
+\item Reducing the number of pointers required.
+\end{enumerate*}
 
 The first opportunity might make use of bit-spinlocks in the Linux
 kernel, which are provided by the \path{include/linux/bit_spinlock.h}
diff --git a/defer/rcufundamental.tex b/defer/rcufundamental.tex
index 054512e0..4ee37d87 100644
--- a/defer/rcufundamental.tex
+++ b/defer/rcufundamental.tex
@@ -296,7 +296,7 @@ However, it cannot be the case that \co{r1}'s final value is 0 and \co{r2}'s
 final value is 1.
 This would mean that an RCU read-side critical section had completely
 overlapped a grace period, which is forbidden (or at the very least
-constitutes a bug in RCU).
+constitutes a bug in RCU)\@.
 RCU's wait-for-readers guarantee therefore has two parts:
 \begin{enumerate*}[(1)]
 \item If any part of a given RCU read-side critical section precedes
@@ -484,7 +484,7 @@ One way to resolve this strange situation is via weaker semanitics.
 A reader traversal must encounter any data item that was present
 during the full traversal (B, C, and~D), and might or might not
 encounter data items that were present for only part of the
-traversal (A and~E).
+traversal (A and~E)\@.
 Therefore, in this particular case, it is perfectly legitimate for
 the reader traveral to encounter all five elements.
 If this outcome is problematic, another way to resolve this situation is
diff --git a/future/formalregress.tex b/future/formalregress.tex
index 60a0fdb0..789e1636 100644
--- a/future/formalregress.tex
+++ b/future/formalregress.tex
@@ -114,7 +114,7 @@ project~\cite{ThomasSewell2013L4binaryVerification}.
 	And although SEL4 has gained multi-processor
 	capabilities, it is currently using very coarse-grained
 	locking that is similar to the Linux kernel's old
-	Big Kernel Lock (BKL).
+	Big Kernel Lock (BKL)\@.
 	There will hopefully come a day when it makes sense to add
 	SEL4's verifiers to a book on parallel programming, but
 	this is not yet that day.
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
                   ` (2 preceding siblings ...)
  2021-08-17 10:19 ` [PATCH -perfbook 03/11] treewide: Adjust punctuation convention Akira Yokosawa
@ 2021-08-17 10:21 ` Akira Yokosawa
  2021-08-17 18:29   ` Paul E. McKenney
  2021-08-17 10:23 ` [PATCH -perfbook 05/11] datastruct: Use \tco{} inside inline enumerate list Akira Yokosawa
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:21 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Using \IfEbookSize or \IfSansSerif macro in the middle of a paragraph
can cause extra white spaces around it.
Fix this by adding the \ignorespaces command in their definitions.

Also update the conditional text in styleguide.

As the other conditional macros aren't used in this manner, they are
not modified for the moment.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/styleguide.tex | 5 +++--
 perfbook-lt.tex                    | 6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index 9bb9683f..24e891a3 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -1013,8 +1013,9 @@ namely \qco{$-$}.\footnote{This rule assumes that math mode uses the
   same upright glyph as text mode.
   Our default font choice meets the assumption.
 \IfSansSerif{
-  One of the experimental targets ``1csf'' \emph{does} use a differnt font
-  for math mode figures as of October 2017.}{}
+  Experimental targets with sans-serif fonts such as
+  ``1csf'' and ``ebsf'' \emph{do} use a differnt font
+  for math mode figures as of August 2021.}{}
 }
 For example,
 
diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index 62959e04..b1c4f780 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -117,13 +117,15 @@
 \newcommand{\IfHardCover}[2]{\ifthenelse{\boolean{hardcover}}{#1}{#2}}
 \newboolean{ebooksize}
 \setboolean{ebooksize}{false}
-\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}{#1}{#2}}
+\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}%
+  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
 \newboolean{afourpaper}
 \setboolean{afourpaper}{false}
 \newcommand{\IfAfourPaper}[2]{\ifthenelse{\boolean{afourpaper}}{#1}{#2}}
 \newboolean{sansserif}
 \setboolean{sansserif}{false}
-\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}{#1}{#2}}
+\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}%
+  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
 \newboolean{lmttforcode}
 \setboolean{lmttforcode}{true}
 \newcommand{\IfLmttForCode}[2]{\ifthenelse{\boolean{lmttforcode}}{#1}{#2}}
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 05/11] datastruct: Use \tco{} inside inline enumerate list
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
                   ` (3 preceding siblings ...)
  2021-08-17 10:21 ` [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif Akira Yokosawa
@ 2021-08-17 10:23 ` Akira Yokosawa
  2021-08-17 10:29 ` [PATCH -perfbook 06/11] periodcheck: Add colon-related checks Akira Yokosawa
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:23 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Inline enumerate lists (enumerate*) are confused by \co{} commands
which have breakable symbols in their argument.
\tco{} is a workaround in this case (as is the case in tabular
cells).

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 datastruct/datastruct.tex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/datastruct/datastruct.tex b/datastruct/datastruct.tex
index 6363ef33..adb102d4 100644
--- a/datastruct/datastruct.tex
+++ b/datastruct/datastruct.tex
@@ -2077,8 +2077,8 @@ highly replicated.
 It is instead the \co{ht_bucket} structures we should focus on.
 There are two major opportunities for shrinking the \co{ht_bucket} structure:
 \begin{enumerate*}[(1)]
-\item Placing the \co{->htb_lock} field in a low-order bit of one of the
-\co{->htb_head} pointers and
+\item Placing the \tco{->htb_lock} field in a low-order bit of one of the
+\tco{->htb_head} pointers and
 \item Reducing the number of pointers required.
 \end{enumerate*}
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 06/11] periodcheck: Add colon-related checks
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
                   ` (4 preceding siblings ...)
  2021-08-17 10:23 ` [PATCH -perfbook 05/11] datastruct: Use \tco{} inside inline enumerate list Akira Yokosawa
@ 2021-08-17 10:29 ` Akira Yokosawa
  2021-08-17 10:33 ` [PATCH -perfbook 07/11] cleverefcheck: Check lower-case word after \item Akira Yokosawa
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:29 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Excerpt of Paul's message:

    > If you have some preference, I can update the scripts to enforce
    > it.

    In this case, I prefer the simple British approach to that of my
    homeland, so please unconditionally capitalize after a colon.

    (Instead of the American approach of doing so only if the word following
    the colon begins a complete sentence, which is not something I want to
    be checking manually, let alone via a script!)

This means colons should always come at the end of LaTeX source lines.
Adding ":" to the existing regex in the check scripts can catch
violations to this convention.

As colons can lead a numbered list of sentences/clauses/phrases,
a colon-specific pattern is also added in cleverefcheck.pl.

Also add a couple of filters to ignore arguments of LaTeX macros
such as \caption{}, \paragraph{}, and \co{}.
Also add a pattern to ignore arguments of \QuickQuizChapter and
\OriginalPublished as these macros can't be broken in-between.

Suggested-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 utilities/cleverefcheck.pl | 25 +++++++++++++++++------
 utilities/periodcheck.pl   | 42 +++++++++++++++++++++-----------------
 2 files changed, 42 insertions(+), 25 deletions(-)

diff --git a/utilities/cleverefcheck.pl b/utilities/cleverefcheck.pl
index 87b373f2..c59e42d1 100755
--- a/utilities/cleverefcheck.pl
+++ b/utilities/cleverefcheck.pl
@@ -36,6 +36,13 @@ sub check_line {
 	    $line =~ s/$quoted_2//;
 	}
     }
+    if ($line =~ /\\[tq]?co\{([^\}]+)\}/) {# remove \co{} argument
+	while ($line && $line =~ /((\\[tq]?co\{)[^\}]+)\}/) {
+	    my $quoted_1 = quotemeta $1;
+	    my $quoted_2 = quotemeta $2;
+	    $line =~ s/$quoted_1/$quoted_2/;
+	}
+    }
     unless ($skip) {
 	$safe = 1;
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*\\ref\{/ ||
@@ -54,9 +61,9 @@ sub check_line {
 	}
 	if ($line =~ /^\s*\\Cref/ || $line =~ /^\s*\\Cpageref/ ||
 	    $line =~ /^\s*\\Clnref/) {
-	    if ($new_sentence) {
+	    if ($new_sentence == 1) {
 		$safe = 1;
-	    } else {
+	    } elsif ($new_sentence == 0) {
 		$safe = 0;
 	    }
 	}
@@ -68,8 +75,14 @@ sub check_line {
 		$safe = 1;
 	    }
 	}
-	if ($new_sentence == 1) {
-	    if ($line =~ /^\s*[a-z]/ ) {
+	if ($new_sentence) {
+	    if ($line =~ /^\s*`*[a-z]/ || $line =~ /^\s*\\acr/ ||
+		$line =~ /^\s*\\IX[^A\{]*\{[a-z]/ ) {
+		$safe = 0;
+	    }
+	}
+	if ($new_sentence == 2) { # after colon
+	    if ($line =~ /^\s*\([0-9a-z]\)[\s~][a-z]/ ) {
 		$safe = 0;
 	    }
 	}
@@ -87,14 +100,14 @@ sub check_line {
 	unless ($line =~ /\\begin\{fcvref\}/ || $line =~ /\\end\{fcvref\}/ ||
 		$line =~ /^\s*\}\s*$/ || $line =~ /^\s*%/) {
 	    if ($line =~ /^(?=[\s]*+[^%])[^%]*[\.\?!]\s*[\)\}\']*\s*(%.*)?$/ ||
-		$line =~ /^\s*$/ ||
+		$line =~ /^\s*$/ || $line =~ /\\begin\{quote\}/ ||
 		$line =~ /^\\E?QuickQuiz[BEM]?\{/ ||
 		$line =~ /\\E?QuickQuizAnswer[BEM]?\{/ ) {
 		$new_sentence = 1;
 	    } else {
 		$new_sentence = 0;
 		if ($line =~ /^(?=[\s]*+[^%])[^%]*:\s*[\)\}\']*\s*(%.*)?$/ ) {
-		    $new_sentence = 2;  # don't care
+		    $new_sentence = 2;  # colon
 		}
 	    }
 	}
diff --git a/utilities/periodcheck.pl b/utilities/periodcheck.pl
index 6ad90dcb..f46052c5 100755
--- a/utilities/periodcheck.pl
+++ b/utilities/periodcheck.pl
@@ -27,10 +27,8 @@ my $next_line;
 my $line_num = 0;
 my $skip = 0;
 my $safe = 0;
-my $Verbatim_begin = qr/\\begin\{Verbatim/ ;
-my $Verbatim_end = qr/\\end\{Verbatim/ ;
-my $tabular_begin = qr/\\begin\{tabula/ ;
-my $tabular_end = qr/\\end\{tabula/ ;
+my $Verbatim_begin = qr/\\begin\{(Verbatim|tabula|equation)/ ;
+my $Verbatim_end = qr/\\end\{(Verbatim|tabular|equation)/ ;
 my $label_ptn = qr/(^\s*|\{)(,?[a-z]{3,4}:([a-zMPS]+:)?[^\},]+)(\}|,)/ ;
 
 sub check_line {
@@ -42,23 +40,29 @@ sub check_line {
 	    $line =~ s/$quoted_2//;
 	}
     }
-    if ($line =~ /section\{([^\}]*)\}/ ) {
-	my $quoted_1 = quotemeta $1;
-	$line =~ s/$quoted_1//;
+    if ($line =~ /\\[tq]?co\{([^\}]*)\}/ ) {
+	while ($line && $line =~ /((\\[tq]?co\{)[^\}]+)\}/) {
+	    my $quoted_1 = quotemeta $1;
+	    my $quoted_2 = quotemeta $2;
+	    $line =~ s/$quoted_1/$quoted_2/;
+	}
+    }
+    # \QuickQuizChapter and \OriginalPublished don't allow line breaks in their
+    # arguments.
+    if ($line =~ /\\QuickQuizChapter\{/ ) {
+	$line = '\\QuickQuizChapter\{\}\{\}\{\}';
     }
-    if ($line =~ /caption\{([^\}]*)\}/ ) {
-	my $quoted_1 = quotemeta $1;
-	$line =~ s/$quoted_1//;
+    if ($line =~ /\\OriginallyPublished\{/ ) {
+	$line = '\\OriginallyPublised\{\}\{\}\{\}\{\}';
     }
-    if ($line =~ /$Verbatim_begin/ ||
-	$line =~ /$tabular_begin/) {  # exception (verbatim and tabular)
+    if ($line =~ /$Verbatim_begin/ ) {  # exception (verbatim ,tabular, equation)
 	$skip = 1;
     }
     unless ($skip) {
 	$safe = 1;
-	if ($line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\.\?\!][\)\}\']*$/ ||
-	    $line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\.\?\!]\\footnote/ ||
-	    $line =~ /^(?=[\s]*+[^%])[^%]*[Aa]crm?\{.+\}[\.\?\!][\)\}\']*$/ ) {
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\.\?\!\:][\)\}\']*$/ ||
+	    $line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\.\?\!\:]\\footnote/ ||
+	    $line =~ /^(?=[\s]*+[^%])[^%]*[Aa]crm?\{.+\}[\.\?\!\:][\)\}\']*$/ ) {
 	    $safe = 0;
 	    if ($next_line =~ /^\s*$/ || $next_line =~ /^\s*%/ ||
 		$next_line =~ /\\item/ ||
@@ -68,7 +72,8 @@ sub check_line {
 		$safe = 1;
 	    }
 	}
-	if ($line =~ /^(?=[\s]*+[^%])[^%]*[a-z\}][\.\?\!][\)\}\']*\s[^\\]+/) {
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*[a-z\}][\.\?\!][\)\}\']*\s[^\\]+/ ||
+	    $line =~ /^(?=[\s]*+[^%])[^%]*.*:[\)\}\']*\s[^\\]+/) {
 	    $safe = 0;
 	}
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*[^~]\\cite/) {
@@ -77,15 +82,14 @@ sub check_line {
 		$safe = 1;
 	    }
 	}
-	if ($line =~ /^(?=[\s]*+[^%])[^%]*\\\@[\.\?\!][\)\}\']*\s+[^\s%]+/){
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*\\\@[\.\?\!\:][\)\}\']*\s+[^\s%]+/){
 	    $safe = 0;
 	}
 	unless ($safe) {
 	    print $ARGV[0], ':', $line_num, ':', $line_raw;
 	}
     }
-    if ($line =~ /$Verbatim_end/ ||
-	$line =~ /$tabular_end/) {
+    if ($line =~ /$Verbatim_end/ ) {
 	$skip = 0;
     }
 }
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 07/11] cleverefcheck: Check lower-case word after \item
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
                   ` (5 preceding siblings ...)
  2021-08-17 10:29 ` [PATCH -perfbook 06/11] periodcheck: Add colon-related checks Akira Yokosawa
@ 2021-08-17 10:33 ` Akira Yokosawa
  2021-08-17 10:35 ` [PATCH -perfbook 08/11] periodcheck: Improve regex Akira Yokosawa
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:33 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Also detect raw "(1)" or "(a)" comes after a colon.
Inline enumerate list should be used instead.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 utilities/cleverefcheck.pl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/utilities/cleverefcheck.pl b/utilities/cleverefcheck.pl
index c59e42d1..06d4928a 100755
--- a/utilities/cleverefcheck.pl
+++ b/utilities/cleverefcheck.pl
@@ -75,6 +75,9 @@ sub check_line {
 		$safe = 1;
 	    }
 	}
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*^\s*\\item\s+[a-z]/ ) {
+	    $safe = 0;
+	}
 	if ($new_sentence) {
 	    if ($line =~ /^\s*`*[a-z]/ || $line =~ /^\s*\\acr/ ||
 		$line =~ /^\s*\\IX[^A\{]*\{[a-z]/ ) {
@@ -82,7 +85,7 @@ sub check_line {
 	    }
 	}
 	if ($new_sentence == 2) { # after colon
-	    if ($line =~ /^\s*\([0-9a-z]\)[\s~][a-z]/ ) {
+	    if ($line =~ /^\s*\([0-9a-z]+\)/ ) {
 		$safe = 0;
 	    }
 	}
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 08/11] periodcheck: Improve regex
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
                   ` (6 preceding siblings ...)
  2021-08-17 10:33 ` [PATCH -perfbook 07/11] cleverefcheck: Check lower-case word after \item Akira Yokosawa
@ 2021-08-17 10:35 ` Akira Yokosawa
  2021-08-17 10:37 ` [PATCH -perfbook 09/11] periodcheck: Use counter to prevent false negatives Akira Yokosawa
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:35 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Add patterns to catch end-of-sentence punctuation marks in front
of quotation marks and/or parentheses.

Also add patterns to treat lines ending with "\\" as exceptions.

Add autodate.tex to the exception list in periodcheck.sh.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 utilities/periodcheck.pl | 17 +++++++++++------
 utilities/periodcheck.sh |  1 +
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/utilities/periodcheck.pl b/utilities/periodcheck.pl
index f46052c5..9d1985d1 100755
--- a/utilities/periodcheck.pl
+++ b/utilities/periodcheck.pl
@@ -60,9 +60,9 @@ sub check_line {
     }
     unless ($skip) {
 	$safe = 1;
-	if ($line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\.\?\!\:][\)\}\']*$/ ||
-	    $line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\.\?\!\:]\\footnote/ ||
-	    $line =~ /^(?=[\s]*+[^%])[^%]*[Aa]crm?\{.+\}[\.\?\!\:][\)\}\']*$/ ) {
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\)\']*[\.\?\!\:][\)\}\']*$/ ||
+	    $line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\)\']*[\.\?\!\:]\\footnote/ ||
+	    $line =~ /^(?=[\s]*+[^%])[^%]*[Aa]crm?\{.+\}[\)\']*[\.\?\!\:][\)\}\']*$/ ) {
 	    $safe = 0;
 	    if ($next_line =~ /^\s*$/ || $next_line =~ /^\s*%/ ||
 		$next_line =~ /\\item/ ||
@@ -72,9 +72,14 @@ sub check_line {
 		$safe = 1;
 	    }
 	}
-	if ($line =~ /^(?=[\s]*+[^%])[^%]*[a-z\}][\.\?\!][\)\}\']*\s[^\\]+/ ||
-	    $line =~ /^(?=[\s]*+[^%])[^%]*.*:[\)\}\']*\s[^\\]+/) {
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*[a-z][\)\}\']*[\.\?\!][\)\}\']*\s+[^%]/ ||
+#	    $line =~ /^(?=[\s]*+[^%])[^%]*.*\.[\)\}\']*\s+[^%]/ ||  # Uncomment for full check
+	    $line =~ /^(?=[\s]*+[^%])[^%]*.*:[\)\}\']*\s+[^%]/ ) {
 	    $safe = 0;
+	    if ($line =~ /^(?=[\s]*+[^%])[^%]*[a-z][\)\}\']*[\.\?\!][\)\}\']*\s+\\\\/ ||
+		$line =~ /^(?=[\s]*+[^%])[^%]*.*[\.:][\)\}\']*\s+\\\\/ ) {
+		$safe = 1;
+	    }
 	}
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*[^~]\\cite/) {
 	    $safe = 0;
@@ -82,7 +87,7 @@ sub check_line {
 		$safe = 1;
 	    }
 	}
-	if ($line =~ /^(?=[\s]*+[^%])[^%]*\\\@[\.\?\!\:][\)\}\']*\s+[^\s%]+/){
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*\\\@[\.\?\!\:][\)\}\']*\s+[^%]/){
 	    $safe = 0;
 	}
 	unless ($safe) {
diff --git a/utilities/periodcheck.sh b/utilities/periodcheck.sh
index d6cd7510..4fff091b 100755
--- a/utilities/periodcheck.sh
+++ b/utilities/periodcheck.sh
@@ -11,6 +11,7 @@ do
 	./glsdict.tex) ;;
 	./origpub.tex) ;;
 	./contrib.tex) ;;
+	./autodate.tex) ;;
 	./future/HTMtable*) ;;
 	./appendix/styleguide*) ;;
 	*) tex_sources="$tex_sources $f" ;;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 09/11] periodcheck: Use counter to prevent false negatives
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
                   ` (7 preceding siblings ...)
  2021-08-17 10:35 ` [PATCH -perfbook 08/11] periodcheck: Improve regex Akira Yokosawa
@ 2021-08-17 10:37 ` Akira Yokosawa
  2021-08-17 10:39 ` [PATCH -perfbook 10/11] cleverefcheck: Add pattern to catch typo in indexing macros Akira Yokosawa
  2021-08-17 10:40 ` [PATCH -perfbook 11/11] Makefile: Rename periodcheck --> punctcheck Akira Yokosawa
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:37 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Assigning 1 to $safe in one rule can cause a false negative when there
is earlier match(es) to violation pattern(s) on the same input line.

By using a counter and incrementing/decrementing it on a particular
pattern-match, such false negatives can be prevented.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 utilities/cleverefcheck.pl | 37 +++++++++++++++++--------------------
 utilities/periodcheck.pl   | 22 +++++++++++-----------
 2 files changed, 28 insertions(+), 31 deletions(-)

diff --git a/utilities/cleverefcheck.pl b/utilities/cleverefcheck.pl
index 06d4928a..69497893 100755
--- a/utilities/cleverefcheck.pl
+++ b/utilities/cleverefcheck.pl
@@ -17,7 +17,7 @@ my $line;
 my $new_sentence = 1;
 my $line_num = 0;
 my $skip = 0;
-my $safe = 0;
+my $ng = 0;
 my $Verbatim_begin = qr/\\begin\{(Verbatim|tabula|equation|SaveVerb|verbbox)/ ;
 my $Verbatim_end = qr/\\end\{(Verbatim|tabula|equation|SaveVerb|verbbox)/ ;
 my $label_ptn = qr/(^\s*|\{)(,?[a-z]{3,4}:([a-zMPS]+:)?[^\},]+)(\}|,)/ ;
@@ -44,56 +44,53 @@ sub check_line {
 	}
     }
     unless ($skip) {
-	$safe = 1;
+	$ng = 0;
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*\\ref\{/ ||
 	    $line =~ /^(?=[\s]*+[^%])[^%]*\\pageref\{/ ||
 	    $line =~ /^(?=[\s]*+[^%])[^%]*\\lnref\{/) {
-	    $safe = 0;
+	    $ng += 1;
 	    if ($line =~ /or~\\lnref\{/ ||
 		$line =~ /item~\\ref\{/) {
-		$safe = 1;
+		$ng -= 1;
 	    }
 	}
-	if ($new_sentence == 1 &&
+	if ($new_sentence != 0 &&
 	    ($line =~ /^\s*\\cref/ || $line =~ /^\s*\\cpageref/ ||
 	     $line =~ /^\s*\\clnref/)) {
-	    $safe = 0;
+	    $ng += 1;
 	}
-	if ($line =~ /^\s*\\Cref/ || $line =~ /^\s*\\Cpageref/ ||
-	    $line =~ /^\s*\\Clnref/) {
-	    if ($new_sentence == 1) {
-		$safe = 1;
-	    } elsif ($new_sentence == 0) {
-		$safe = 0;
-	    }
+	if ($new_sentence == 0 &&
+	    ($line =~ /^\s*\\Cref/ || $line =~ /^\s*\\Cpageref/ ||
+	     $line =~ /^\s*\\Clnref/)) {
+	    $ng += 1;
 	}
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*[^\s]+\s*\\Cref/ ||
 	    $line =~ /^(?=[\s]*+[^%])[^%]*[^\s]+\s*\\Cpageref/ ||
 	    $line =~ /^(?=[\s]*+[^%])[^%]*[^\s]+\s*\\Clnref/) {
-	    $safe = 0;
+	    $ng += 1;
 	    if ($line =~ /^(?=[\s]*+[^%])[^%]*^\s*\\item\s+\\C/ ) {
-		$safe = 1;
+		$ng -= 1;
 	    }
 	}
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*^\s*\\item\s+[a-z]/ ) {
-	    $safe = 0;
+	    $ng += 1;
 	}
 	if ($new_sentence) {
 	    if ($line =~ /^\s*`*[a-z]/ || $line =~ /^\s*\\acr/ ||
 		$line =~ /^\s*\\IX[^A\{]*\{[a-z]/ ) {
-		$safe = 0;
+		$ng += 1;
 	    }
 	}
 	if ($new_sentence == 2) { # after colon
 	    if ($line =~ /^\s*\([0-9a-z]+\)/ ) {
-		$safe = 0;
+		$ng += 1;
 	    }
 	}
 	if ($line =~ /^[ ]{8}/ ||  # indent by white speces (should be TAB)
 	    $line =~ /^(?=[\s]*+[^%])[^%][ ]+\t/) { # TAB after white space
-	    $safe = 0;
+	    $ng += 1;
 	}
-	unless ($safe) {
+	if ($ng) {
 	    print $ARGV[0], ':', $line_num, ':', $raw_line;
 	}
     }
diff --git a/utilities/periodcheck.pl b/utilities/periodcheck.pl
index 9d1985d1..88fd59c0 100755
--- a/utilities/periodcheck.pl
+++ b/utilities/periodcheck.pl
@@ -26,7 +26,7 @@ my $line;
 my $next_line;
 my $line_num = 0;
 my $skip = 0;
-my $safe = 0;
+my $ng;
 my $Verbatim_begin = qr/\\begin\{(Verbatim|tabula|equation)/ ;
 my $Verbatim_end = qr/\\end\{(Verbatim|tabular|equation)/ ;
 my $label_ptn = qr/(^\s*|\{)(,?[a-z]{3,4}:([a-zMPS]+:)?[^\},]+)(\}|,)/ ;
@@ -59,38 +59,38 @@ sub check_line {
 	$skip = 1;
     }
     unless ($skip) {
-	$safe = 1;
+	$ng = 0;
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\)\']*[\.\?\!\:][\)\}\']*$/ ||
 	    $line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\)\']*[\.\?\!\:]\\footnote/ ||
-	    $line =~ /^(?=[\s]*+[^%])[^%]*[Aa]crm?\{.+\}[\)\']*[\.\?\!\:][\)\}\']*$/ ) {
-	    $safe = 0;
+	    $line =~ /^(?=[\s]*+[^%])[^%]*[Aa]crm?(f|fst)?\{.+\}[\)\']*[\.\?\!\:][\)\}\']*$/ ) {
+	    $ng += 1;
 	    if ($next_line =~ /^\s*$/ || $next_line =~ /^\s*%/ ||
 		$next_line =~ /\\item/ ||
 		$next_line =~ /\\E?QuickQuizAnswer[BEM]?\{/ ||
 		$next_line =~ /\\E?QuickQuizEnd[BEM]?/ ||
 		$next_line =~ /\\end\{(quot|enum|item|sequ)/ ) {
-		$safe = 1;
+		$ng -= 1;
 	    }
 	}
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*[a-z][\)\}\']*[\.\?\!][\)\}\']*\s+[^%]/ ||
 #	    $line =~ /^(?=[\s]*+[^%])[^%]*.*\.[\)\}\']*\s+[^%]/ ||  # Uncomment for full check
 	    $line =~ /^(?=[\s]*+[^%])[^%]*.*:[\)\}\']*\s+[^%]/ ) {
-	    $safe = 0;
+	    $ng += 1;
 	    if ($line =~ /^(?=[\s]*+[^%])[^%]*[a-z][\)\}\']*[\.\?\!][\)\}\']*\s+\\\\/ ||
 		$line =~ /^(?=[\s]*+[^%])[^%]*.*[\.:][\)\}\']*\s+\\\\/ ) {
-		$safe = 1;
+		$ng -= 1;
 	    }
 	}
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*[^~]\\cite/) {
-	    $safe = 0;
+	    $ng += 1;
 	    if ($line =~ /^(?=[\s]*+[^%])[^%]*~\(\\cite/) {
-		$safe = 1;
+		$ng -= 1;
 	    }
 	}
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*\\\@[\.\?\!\:][\)\}\']*\s+[^%]/){
-	    $safe = 0;
+	    $ng += 1;
 	}
-	unless ($safe) {
+	if ($ng) {
 	    print $ARGV[0], ':', $line_num, ':', $line_raw;
 	}
     }
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 10/11] cleverefcheck: Add pattern to catch typo in indexing macros
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
                   ` (8 preceding siblings ...)
  2021-08-17 10:37 ` [PATCH -perfbook 09/11] periodcheck: Use counter to prevent false negatives Akira Yokosawa
@ 2021-08-17 10:39 ` Akira Yokosawa
  2021-08-17 10:40 ` [PATCH -perfbook 11/11] Makefile: Rename periodcheck --> punctcheck Akira Yokosawa
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:39 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

There were cases where custom macros for indexing such as \IX, \Acr,
\IXacr, etc. lacked the "\" leading them.
Add patterns to catch such typo.
They rely on the leading parts of those macros are spelled right.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 utilities/cleverefcheck.pl | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/utilities/cleverefcheck.pl b/utilities/cleverefcheck.pl
index 69497893..0085fdb5 100755
--- a/utilities/cleverefcheck.pl
+++ b/utilities/cleverefcheck.pl
@@ -21,6 +21,10 @@ my $ng = 0;
 my $Verbatim_begin = qr/\\begin\{(Verbatim|tabula|equation|SaveVerb|verbbox)/ ;
 my $Verbatim_end = qr/\\end\{(Verbatim|tabula|equation|SaveVerb|verbbox)/ ;
 my $label_ptn = qr/(^\s*|\{)(,?[a-z]{3,4}:([a-zMPS]+:)?[^\},]+)(\}|,)/ ;
+my $IX_ptn = qr/(^|\s+)IX[^\s\{]*{/ ;
+my $api_ptn = qr/(^|\s+)api[^\s\{]*{/ ;
+my $ppl_ptn = qr/(^|\s+)ppl[^\s\{]*{/ ;
+my $acr_ptn = qr/(^|\s+)[aA]cr[^\s\{]*{/ ;
 my $in_footnote = 0 ;
 my $footnote_save = 0;
 
@@ -90,6 +94,10 @@ sub check_line {
 	    $line =~ /^(?=[\s]*+[^%])[^%][ ]+\t/) { # TAB after white space
 	    $ng += 1;
 	}
+	if ($line =~ /$IX_ptn/ || $line =~ /$api_ptn/ ||
+	    $line =~ /$ppl_ptn/ || $line =~ /$acr_ptn/ ) {
+	    $ng += 1;
+	}
 	if ($ng) {
 	    print $ARGV[0], ':', $line_num, ':', $raw_line;
 	}
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH -perfbook 11/11] Makefile: Rename periodcheck --> punctcheck
  2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
                   ` (9 preceding siblings ...)
  2021-08-17 10:39 ` [PATCH -perfbook 10/11] cleverefcheck: Add pattern to catch typo in indexing macros Akira Yokosawa
@ 2021-08-17 10:40 ` Akira Yokosawa
  10 siblings, 0 replies; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 10:40 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Now that periodcheck checks punctuation marks not limited to periods,
rename it and use the name "punctcheck".

Note: "make periodcheck" is now an alias of "make punctcheck".

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 Makefile                                    | 14 ++++++++------
 utilities/{periodcheck.pl => punctcheck.pl} |  0
 utilities/{periodcheck.sh => punctcheck.sh} |  2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)
 rename utilities/{periodcheck.pl => punctcheck.pl} (100%)
 rename utilities/{periodcheck.sh => punctcheck.sh} (92%)

diff --git a/Makefile b/Makefile
index 3e604c53..3df1810e 100644
--- a/Makefile
+++ b/Makefile
@@ -191,9 +191,9 @@ BASE_DEPENDS := perfbook.tex $(foreach v,tcb 1c msns mss mstx msr msn msnt sf nq
 .PHONY: qq perfbook-qq.pdf qqmsg
 .PHONY: help help-official help-full help-semiofficial help-paper help-draft
 .PHONY: help-experimental help-prefixed
-.PHONY: paper-clean periodcheck periodcheck-auto
+.PHONY: paper-clean periodcheck punctcheck punctcheck-auto
 
-all: periodcheck-auto
+all: punctcheck-auto
 
 ifeq ($(MAKECMDGOALS),clean)
 else ifeq ($(MAKECMDGOALS),distclean)
@@ -610,13 +610,15 @@ ls-unused:
 neatfreak: distclean
 	find . -name '*.pdf' | xargs rm -f
 
-periodcheck:
-	utilities/periodcheck.sh
+punctcheck:
+	utilities/punctcheck.sh
 	utilities/cleverefcheck.sh
 
-periodcheck-auto: $(targ)
-	utilities/periodcheck.sh
+punctcheck-auto: $(targ)
+	utilities/punctcheck.sh
 	utilities/cleverefcheck.sh
 
+periodcheck: punctcheck
+
 .SECONDEXPANSION:
 $(ABBREVTARGETS): %: perfbook-$$@.pdf
diff --git a/utilities/periodcheck.pl b/utilities/punctcheck.pl
similarity index 100%
rename from utilities/periodcheck.pl
rename to utilities/punctcheck.pl
diff --git a/utilities/periodcheck.sh b/utilities/punctcheck.sh
similarity index 92%
rename from utilities/periodcheck.sh
rename to utilities/punctcheck.sh
index 4fff091b..d0ade754 100755
--- a/utilities/periodcheck.sh
+++ b/utilities/punctcheck.sh
@@ -20,5 +20,5 @@ done
 
 for g in $tex_sources
 do
-	utilities/periodcheck.pl $g
+	utilities/punctcheck.pl $g
 done
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif
  2021-08-17 10:21 ` [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif Akira Yokosawa
@ 2021-08-17 18:29   ` Paul E. McKenney
  2021-08-17 20:22     ` Paul E. McKenney
  2021-08-17 23:31     ` Akira Yokosawa
  0 siblings, 2 replies; 16+ messages in thread
From: Paul E. McKenney @ 2021-08-17 18:29 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Tue, Aug 17, 2021 at 07:21:27PM +0900, Akira Yokosawa wrote:
> Using \IfEbookSize or \IfSansSerif macro in the middle of a paragraph
> can cause extra white spaces around it.
> Fix this by adding the \ignorespaces command in their definitions.
> 
> Also update the conditional text in styleguide.
> 
> As the other conditional macros aren't used in this manner, they are
> not modified for the moment.
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> ---
>  appendix/styleguide/styleguide.tex | 5 +++--
>  perfbook-lt.tex                    | 6 ++++--
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
> index 9bb9683f..24e891a3 100644
> --- a/appendix/styleguide/styleguide.tex
> +++ b/appendix/styleguide/styleguide.tex
> @@ -1013,8 +1013,9 @@ namely \qco{$-$}.\footnote{This rule assumes that math mode uses the
>    same upright glyph as text mode.
>    Our default font choice meets the assumption.
>  \IfSansSerif{
> -  One of the experimental targets ``1csf'' \emph{does} use a differnt font
> -  for math mode figures as of October 2017.}{}
> +  Experimental targets with sans-serif fonts such as
> +  ``1csf'' and ``ebsf'' \emph{do} use a differnt font

I did s/differnt/different/ here.  This looks like the sort of typo
that I would make!  ;-)

							Thanx, Paul

> +  for math mode figures as of August 2021.}{}
>  }
>  For example,
>  
> diff --git a/perfbook-lt.tex b/perfbook-lt.tex
> index 62959e04..b1c4f780 100644
> --- a/perfbook-lt.tex
> +++ b/perfbook-lt.tex
> @@ -117,13 +117,15 @@
>  \newcommand{\IfHardCover}[2]{\ifthenelse{\boolean{hardcover}}{#1}{#2}}
>  \newboolean{ebooksize}
>  \setboolean{ebooksize}{false}
> -\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}{#1}{#2}}
> +\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}%
> +  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
>  \newboolean{afourpaper}
>  \setboolean{afourpaper}{false}
>  \newcommand{\IfAfourPaper}[2]{\ifthenelse{\boolean{afourpaper}}{#1}{#2}}
>  \newboolean{sansserif}
>  \setboolean{sansserif}{false}
> -\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}{#1}{#2}}
> +\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}%
> +  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
>  \newboolean{lmttforcode}
>  \setboolean{lmttforcode}{true}
>  \newcommand{\IfLmttForCode}[2]{\ifthenelse{\boolean{lmttforcode}}{#1}{#2}}
> -- 
> 2.17.1
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif
  2021-08-17 18:29   ` Paul E. McKenney
@ 2021-08-17 20:22     ` Paul E. McKenney
  2021-08-17 23:31     ` Akira Yokosawa
  1 sibling, 0 replies; 16+ messages in thread
From: Paul E. McKenney @ 2021-08-17 20:22 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Tue, Aug 17, 2021 at 11:29:51AM -0700, Paul E. McKenney wrote:
> On Tue, Aug 17, 2021 at 07:21:27PM +0900, Akira Yokosawa wrote:
> > Using \IfEbookSize or \IfSansSerif macro in the middle of a paragraph
> > can cause extra white spaces around it.
> > Fix this by adding the \ignorespaces command in their definitions.
> > 
> > Also update the conditional text in styleguide.
> > 
> > As the other conditional macros aren't used in this manner, they are
> > not modified for the moment.
> > 
> > Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> > ---
> >  appendix/styleguide/styleguide.tex | 5 +++--
> >  perfbook-lt.tex                    | 6 ++++--
> >  2 files changed, 7 insertions(+), 4 deletions(-)
> > 
> > diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
> > index 9bb9683f..24e891a3 100644
> > --- a/appendix/styleguide/styleguide.tex
> > +++ b/appendix/styleguide/styleguide.tex
> > @@ -1013,8 +1013,9 @@ namely \qco{$-$}.\footnote{This rule assumes that math mode uses the
> >    same upright glyph as text mode.
> >    Our default font choice meets the assumption.
> >  \IfSansSerif{
> > -  One of the experimental targets ``1csf'' \emph{does} use a differnt font
> > -  for math mode figures as of October 2017.}{}
> > +  Experimental targets with sans-serif fonts such as
> > +  ``1csf'' and ``ebsf'' \emph{do} use a differnt font
> 
> I did s/differnt/different/ here.  This looks like the sort of typo
> that I would make!  ;-)

Other than that, all queued and pushed, thank you!

							Thanx, Paul

> > +  for math mode figures as of August 2021.}{}
> >  }
> >  For example,
> >  
> > diff --git a/perfbook-lt.tex b/perfbook-lt.tex
> > index 62959e04..b1c4f780 100644
> > --- a/perfbook-lt.tex
> > +++ b/perfbook-lt.tex
> > @@ -117,13 +117,15 @@
> >  \newcommand{\IfHardCover}[2]{\ifthenelse{\boolean{hardcover}}{#1}{#2}}
> >  \newboolean{ebooksize}
> >  \setboolean{ebooksize}{false}
> > -\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}{#1}{#2}}
> > +\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}%
> > +  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
> >  \newboolean{afourpaper}
> >  \setboolean{afourpaper}{false}
> >  \newcommand{\IfAfourPaper}[2]{\ifthenelse{\boolean{afourpaper}}{#1}{#2}}
> >  \newboolean{sansserif}
> >  \setboolean{sansserif}{false}
> > -\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}{#1}{#2}}
> > +\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}%
> > +  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
> >  \newboolean{lmttforcode}
> >  \setboolean{lmttforcode}{true}
> >  \newcommand{\IfLmttForCode}[2]{\ifthenelse{\boolean{lmttforcode}}{#1}{#2}}
> > -- 
> > 2.17.1
> > 
> > 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif
  2021-08-17 18:29   ` Paul E. McKenney
  2021-08-17 20:22     ` Paul E. McKenney
@ 2021-08-17 23:31     ` Akira Yokosawa
  2021-08-17 23:50       ` Paul E. McKenney
  1 sibling, 1 reply; 16+ messages in thread
From: Akira Yokosawa @ 2021-08-17 23:31 UTC (permalink / raw)
  To: paulmck; +Cc: perfbook, Akira Yokosawa

On Tue, 17 Aug 2021 11:29:51 -0700, Paul E. McKenney wrote:
> On Tue, Aug 17, 2021 at 07:21:27PM +0900, Akira Yokosawa wrote:
>> Using \IfEbookSize or \IfSansSerif macro in the middle of a paragraph
>> can cause extra white spaces around it.
>> Fix this by adding the \ignorespaces command in their definitions.
>>
>> Also update the conditional text in styleguide.
>>
>> As the other conditional macros aren't used in this manner, they are
>> not modified for the moment.
>>
>> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
>> ---
>>  appendix/styleguide/styleguide.tex | 5 +++--
>>  perfbook-lt.tex                    | 6 ++++--
>>  2 files changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
>> index 9bb9683f..24e891a3 100644
>> --- a/appendix/styleguide/styleguide.tex
>> +++ b/appendix/styleguide/styleguide.tex
>> @@ -1013,8 +1013,9 @@ namely \qco{$-$}.\footnote{This rule assumes that math mode uses the
>>    same upright glyph as text mode.
>>    Our default font choice meets the assumption.
>>  \IfSansSerif{
>> -  One of the experimental targets ``1csf'' \emph{does} use a differnt font
>> -  for math mode figures as of October 2017.}{}
>> +  Experimental targets with sans-serif fonts such as
>> +  ``1csf'' and ``ebsf'' \emph{do} use a differnt font
> 
> I did s/differnt/different/ here.  This looks like the sort of typo
> that I would make!  ;-)

So, I made the typo way back in 2017.
A typo in a footnote in Style Guide is unlikely to be caught. ;-)

        Thanks, Akira

> 
> 							Thanx, Paul
> 
>> +  for math mode figures as of August 2021.}{}
>>  }
>>  For example,
>>  
>> diff --git a/perfbook-lt.tex b/perfbook-lt.tex
>> index 62959e04..b1c4f780 100644
>> --- a/perfbook-lt.tex
>> +++ b/perfbook-lt.tex
>> @@ -117,13 +117,15 @@
>>  \newcommand{\IfHardCover}[2]{\ifthenelse{\boolean{hardcover}}{#1}{#2}}
>>  \newboolean{ebooksize}
>>  \setboolean{ebooksize}{false}
>> -\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}{#1}{#2}}
>> +\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}%
>> +  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
>>  \newboolean{afourpaper}
>>  \setboolean{afourpaper}{false}
>>  \newcommand{\IfAfourPaper}[2]{\ifthenelse{\boolean{afourpaper}}{#1}{#2}}
>>  \newboolean{sansserif}
>>  \setboolean{sansserif}{false}
>> -\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}{#1}{#2}}
>> +\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}%
>> +  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
>>  \newboolean{lmttforcode}
>>  \setboolean{lmttforcode}{true}
>>  \newcommand{\IfLmttForCode}[2]{\ifthenelse{\boolean{lmttforcode}}{#1}{#2}}
>> -- 
>> 2.17.1
>>
>>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif
  2021-08-17 23:31     ` Akira Yokosawa
@ 2021-08-17 23:50       ` Paul E. McKenney
  0 siblings, 0 replies; 16+ messages in thread
From: Paul E. McKenney @ 2021-08-17 23:50 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Wed, Aug 18, 2021 at 08:31:05AM +0900, Akira Yokosawa wrote:
> On Tue, 17 Aug 2021 11:29:51 -0700, Paul E. McKenney wrote:
> > On Tue, Aug 17, 2021 at 07:21:27PM +0900, Akira Yokosawa wrote:
> >> Using \IfEbookSize or \IfSansSerif macro in the middle of a paragraph
> >> can cause extra white spaces around it.
> >> Fix this by adding the \ignorespaces command in their definitions.
> >>
> >> Also update the conditional text in styleguide.
> >>
> >> As the other conditional macros aren't used in this manner, they are
> >> not modified for the moment.
> >>
> >> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> >> ---
> >>  appendix/styleguide/styleguide.tex | 5 +++--
> >>  perfbook-lt.tex                    | 6 ++++--
> >>  2 files changed, 7 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
> >> index 9bb9683f..24e891a3 100644
> >> --- a/appendix/styleguide/styleguide.tex
> >> +++ b/appendix/styleguide/styleguide.tex
> >> @@ -1013,8 +1013,9 @@ namely \qco{$-$}.\footnote{This rule assumes that math mode uses the
> >>    same upright glyph as text mode.
> >>    Our default font choice meets the assumption.
> >>  \IfSansSerif{
> >> -  One of the experimental targets ``1csf'' \emph{does} use a differnt font
> >> -  for math mode figures as of October 2017.}{}
> >> +  Experimental targets with sans-serif fonts such as
> >> +  ``1csf'' and ``ebsf'' \emph{do} use a differnt font
> > 
> > I did s/differnt/different/ here.  This looks like the sort of typo
> > that I would make!  ;-)
> 
> So, I made the typo way back in 2017.
> A typo in a footnote in Style Guide is unlikely to be caught. ;-)

To your point, I most certainly did not catch it!  ;-)

But yes, I should have checked for the typo in the old line as well
as the new line.

							Thanx, Paul

> >> +  for math mode figures as of August 2021.}{}
> >>  }
> >>  For example,
> >>  
> >> diff --git a/perfbook-lt.tex b/perfbook-lt.tex
> >> index 62959e04..b1c4f780 100644
> >> --- a/perfbook-lt.tex
> >> +++ b/perfbook-lt.tex
> >> @@ -117,13 +117,15 @@
> >>  \newcommand{\IfHardCover}[2]{\ifthenelse{\boolean{hardcover}}{#1}{#2}}
> >>  \newboolean{ebooksize}
> >>  \setboolean{ebooksize}{false}
> >> -\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}{#1}{#2}}
> >> +\newcommand{\IfEbookSize}[2]{\ifthenelse{\boolean{ebooksize}}%
> >> +  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
> >>  \newboolean{afourpaper}
> >>  \setboolean{afourpaper}{false}
> >>  \newcommand{\IfAfourPaper}[2]{\ifthenelse{\boolean{afourpaper}}{#1}{#2}}
> >>  \newboolean{sansserif}
> >>  \setboolean{sansserif}{false}
> >> -\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}{#1}{#2}}
> >> +\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}%
> >> +  {\ignorespaces#1\ignorespaces}{\ignorespaces#2\ignorespaces}}
> >>  \newboolean{lmttforcode}
> >>  \setboolean{lmttforcode}{true}
> >>  \newcommand{\IfLmttForCode}[2]{\ifthenelse{\boolean{lmttforcode}}{#1}{#2}}
> >> -- 
> >> 2.17.1
> >>
> >>

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-08-17 23:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
2021-08-17 10:16 ` [PATCH -perfbook 01/11] appendix, glossary: Break and capitalize after colon Akira Yokosawa
2021-08-17 10:18 ` [PATCH -perfbook 02/11] glossary: Put missing question mark Akira Yokosawa
2021-08-17 10:19 ` [PATCH -perfbook 03/11] treewide: Adjust punctuation convention Akira Yokosawa
2021-08-17 10:21 ` [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif Akira Yokosawa
2021-08-17 18:29   ` Paul E. McKenney
2021-08-17 20:22     ` Paul E. McKenney
2021-08-17 23:31     ` Akira Yokosawa
2021-08-17 23:50       ` Paul E. McKenney
2021-08-17 10:23 ` [PATCH -perfbook 05/11] datastruct: Use \tco{} inside inline enumerate list Akira Yokosawa
2021-08-17 10:29 ` [PATCH -perfbook 06/11] periodcheck: Add colon-related checks Akira Yokosawa
2021-08-17 10:33 ` [PATCH -perfbook 07/11] cleverefcheck: Check lower-case word after \item Akira Yokosawa
2021-08-17 10:35 ` [PATCH -perfbook 08/11] periodcheck: Improve regex Akira Yokosawa
2021-08-17 10:37 ` [PATCH -perfbook 09/11] periodcheck: Use counter to prevent false negatives Akira Yokosawa
2021-08-17 10:39 ` [PATCH -perfbook 10/11] cleverefcheck: Add pattern to catch typo in indexing macros Akira Yokosawa
2021-08-17 10:40 ` [PATCH -perfbook 11/11] Makefile: Rename periodcheck --> punctcheck Akira Yokosawa

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.