Skip to contentSkip to conversation

intro, cpu: Use inline enumerate list

RFC PATCH In review Akira Yokosawa 2 participants 2 messages Jun 17, 2021

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 intro, cpu: Use inline enumerate list

The "enumitem" package provides inline list option. Inline enumerate list can be applied to the pattern of:

... two basic reasons:
(1)~The finite speed of light and
(2)~The atomic nature of matter ...

as follows:

... two basic reasons:
\begin{enumerate*}[(1)]
\item The finite speed of light and
\item The atomic nature of matter ...
\end{enumerate*}

Violation to this pattern can be caught by a perl regex for:

o A lower-case word appears behind "\item".

The check script will be updated in a later patch.

---
Hi Paul,

I said earlier:

Quoted 10 lines
Quoted 9 lines

Review

Quoted 6 lines

Stephen Hawking is said to have claimed that semiconductor manufacturers

(quoted diff) +3 -2
-have but two fundamental problems: (1) the finite speed of light and
-(2) the atomic nature of matter~\cite{BryanGardiner2007}.
+have but two fundamental problems:
+(1)~The finite speed of light and
+(2)~the atomic nature of matter~\cite{BryanGardiner2007}.

I should have capitalized the "the" in this last line. I did so before applying your patch.

Quoted 2 lines

Well, I'm afraid this pattern is well beyond the capability of the dumb perl script. (Hint: It only looks at the next input line of colon.)

, but it turned out that it is possible to detect if we use the inline enumerate list instead.

Does this change look reasonable to you?
It won't affect the look of the resulting PDF.

Thanks, Akira
--

 cpu/hwfreelunch.tex | 6 ++++--
 intro/intro.tex     | 8 +++++---
 perfbook-lt.tex     | 4 +++-
 3 files changed, 12 insertions(+), 6 deletions(-)
cpu/hwfreelunch.tex +4 -2
index 59079a9d..b0d91758 100644
@@ -168,8 +168,10 @@ That said, they may be necessary steps on the path to the late Jim Gray's
 
 Stephen Hawking is said to have claimed that semiconductor manufacturers
 have but two fundamental problems:
-(1)~The finite speed of light and
-(2)~The atomic nature of matter~\cite{BryanGardiner2007}.
+\begin{enumerate*}[(1)]
+\item The finite speed of light and
+\item The atomic nature of matter~\cite{BryanGardiner2007}.
+\end{enumerate*}
 It is possible that semiconductor manufacturers are approaching these
 limits, but there are nevertheless a few avenues of research and
 development focused on working around these fundamental limits.
intro/intro.tex +5 -3
index 28c0bf50..93d78dd9 100644
@@ -24,11 +24,13 @@ invariably become easier over time.
 For example, the once-rare ability to drive a car is now
 commonplace in many countries.
 This dramatic change came about for two basic reasons:
-(1)~Cars became cheaper and more readily available, so that
-more people had the opportunity to learn to drive,
-and (2)~Cars became easier to operate due to automatic transmissions,
+\begin{enumerate*}[(1)]
+\item Cars became cheaper and more readily available, so that
+more people had the opportunity to learn to drive, and
+\item Cars became easier to operate due to automatic transmissions,
 automatic chokes, automatic starters, greatly improved reliability,
 and a host of other technological improvements.
+\end{enumerate*}
 
 The same is true for many other technologies, including computers.
 It is no longer necessary to operate a keypunch in order to program.
perfbook-lt.tex +3 -1
index 9e30a1a4..62959e04 100644
@@ -39,7 +39,7 @@
 \usepackage{graphicx}
 \usepackage{rotating}
 \usepackage{setspace}
-\usepackage[shortlabels]{enumitem}
+\usepackage[shortlabels,inline]{enumitem}
 \setlist[description]{style=unboxed}
 \newlist{sequence}{enumerate}{10}
 \setlist[sequence]{label*=\arabic*}
@@ -308,6 +308,8 @@
 \crefname{sublisting}{Listing}{Listings}
 \crefname{sequencei}{step}{steps}
 \Crefname{sequencei}{Step}{Steps}
+\crefname{enumi}{item}{items}
+\Crefname{enumi}{Item}{Items}
 \crefname{page}{page}{pages}
 \Crefname{page}{Page}{Pages}
 \Crefformat{equation}{Equation~#2#1#3}
Signature · 1 line
2.17.1
#1 lore raw
Quoted 15 lines · Akira Yokosawa

The "enumitem" package provides inline list option. Inline enumerate list can be applied to the pattern of:

... two basic reasons:
(1)~The finite speed of light and
(2)~The atomic nature of matter ...

as follows:

... two basic reasons:
\begin{enumerate*}[(1)]
\item The finite speed of light and
\item The atomic nature of matter ...
\end{enumerate*}

Quoted 7 lines

Violation to this pattern can be caught by a perl regex for:

o A lower-case word appears behind "\item".

The check script will be updated in a later patch.

This looks good, thank you! I have pulled it in.

Thanx, Paul

Quoted 94 lines

---
Hi Paul,

I said earlier:

Quoted 10 lines
Quoted 9 lines

Review

Quoted 6 lines

Stephen Hawking is said to have claimed that semiconductor manufacturers

(quoted diff) +3 -2
-have but two fundamental problems: (1) the finite speed of light and
-(2) the atomic nature of matter~\cite{BryanGardiner2007}.
+have but two fundamental problems:
+(1)~The finite speed of light and
+(2)~the atomic nature of matter~\cite{BryanGardiner2007}.

I should have capitalized the "the" in this last line. I did so before applying your patch.

Quoted 2 lines

Well, I'm afraid this pattern is well beyond the capability of the dumb perl script. (Hint: It only looks at the next input line of colon.)

, but it turned out that it is possible to detect if we use the inline enumerate list instead.

Does this change look reasonable to you?
It won't affect the look of the resulting PDF.

Thanks, Akira
--

 cpu/hwfreelunch.tex | 6 ++++--
 intro/intro.tex     | 8 +++++---
 perfbook-lt.tex     | 4 +++-
 3 files changed, 12 insertions(+), 6 deletions(-)
cpu/hwfreelunch.tex +4 -2
index 59079a9d..b0d91758 100644
@@ -168,8 +168,10 @@ That said, they may be necessary steps on the path to the late Jim Gray's
 
 Stephen Hawking is said to have claimed that semiconductor manufacturers
 have but two fundamental problems:
-(1)~The finite speed of light and
-(2)~The atomic nature of matter~\cite{BryanGardiner2007}.
+\begin{enumerate*}[(1)]
+\item The finite speed of light and
+\item The atomic nature of matter~\cite{BryanGardiner2007}.
+\end{enumerate*}
 It is possible that semiconductor manufacturers are approaching these
 limits, but there are nevertheless a few avenues of research and
 development focused on working around these fundamental limits.
intro/intro.tex +5 -3
index 28c0bf50..93d78dd9 100644
@@ -24,11 +24,13 @@ invariably become easier over time.
 For example, the once-rare ability to drive a car is now
 commonplace in many countries.
 This dramatic change came about for two basic reasons:
-(1)~Cars became cheaper and more readily available, so that
-more people had the opportunity to learn to drive,
-and (2)~Cars became easier to operate due to automatic transmissions,
+\begin{enumerate*}[(1)]
+\item Cars became cheaper and more readily available, so that
+more people had the opportunity to learn to drive, and
+\item Cars became easier to operate due to automatic transmissions,
 automatic chokes, automatic starters, greatly improved reliability,
 and a host of other technological improvements.
+\end{enumerate*}
 
 The same is true for many other technologies, including computers.
 It is no longer necessary to operate a keypunch in order to program.
perfbook-lt.tex +3 -1
index 9e30a1a4..62959e04 100644
@@ -39,7 +39,7 @@
 \usepackage{graphicx}
 \usepackage{rotating}
 \usepackage{setspace}
-\usepackage[shortlabels]{enumitem}
+\usepackage[shortlabels,inline]{enumitem}
 \setlist[description]{style=unboxed}
 \newlist{sequence}{enumerate}{10}
 \setlist[sequence]{label*=\arabic*}
@@ -308,6 +308,8 @@
 \crefname{sublisting}{Listing}{Listings}
 \crefname{sequencei}{step}{steps}
 \Crefname{sequencei}{Step}{Steps}
+\crefname{enumi}{item}{items}
+\Crefname{enumi}{Item}{Items}
 \crefname{page}{page}{pages}
 \Crefname{page}{Page}{Pages}
 \Crefformat{equation}{Equation~#2#1#3}
Signature · 1 line
2.17.1