perfbook.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Akira Yokosawa <akys@qa2.so-net.ne.jp>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: perfbook@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH -perfbook 1/2] defer/whichtochoose: Use parnotes for footnote in tabularx
Date: Fri, 24 Jun 2022 23:26:54 +0900	[thread overview]
Message-ID: <6957b314-8f59-9671-4adb-37206fc3c693@qa2.so-net.ne.jp> (raw)

Due to conflict between LaTeX Packages hyperref and tabularx,
both of them attempt to tweak the internal code of \footnote{}
command, normal footnotes don't work in tabularx.

This made Paul use a primitive approach for the footnote added in
commit 1760abb74224 ("defer/whichtochoose: Note possibility of
membarrier() for hazptr").

Alternative way for footnotes inside tabularx is to use the
"parnotes" package, whose implementation is orthogonal to hyperref
and tabularx.

This commit employs this approach and uses the command \parnote in
tabularx, and encloses the footnote-printing \parnotes command in
a minipage to prevent the footnote text from centered.

As hyperref is not aware of parnotes, there is no crossref to the
footnote text.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
Hi Paul,

I'm not sure if you are happy with the addition of yet another
LaTeX package dependency, but I just wanted to show you this is
possible.  There might be other places where "parnotes" fits.

The trick of minipage for preventing centering should work in
your primitive approach.

It's up to you to take this one or not.

        Thanks, Akira
--
 defer/whichtochoose.tex | 13 +++++++------
 perfbook-lt.tex         |  1 +
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/defer/whichtochoose.tex b/defer/whichtochoose.tex
index 3c8cc2dccaef..95b355a1c471 100644
--- a/defer/whichtochoose.tex
+++ b/defer/whichtochoose.tex
@@ -217,7 +217,9 @@ But those wishing more detail should continue on to the next section.
 	Reader Per-Object Traversal Overhead
 		& Read-modify-write atomic operations, memory\-/barrier
 		  instructions, and cache misses
-			& \tco{smp_mb()} *
+			& \tco{smp_mb()}\parnote[*]{This \co{smp_mb()} can be
+				downgraded to a compiler \co{barrier()} by using
+				the Linux-kernel \co{membarrier()} system call.}
 				& None, but unsafe
 					& None (volatile accesses) \\
 	Reader Forward Progress Guarantee
@@ -253,11 +255,10 @@ But those wishing more detail should continue on to the next section.
 	\bottomrule
 \end{tabularx}
 }
-
-~
-
-* This \co{smp_mb()} can be downgraded to a compiler \co{barrier()} by
-using the Linux-kernel \co{membarrier()} system call.
+\begin{minipage}{\onecolumntextwidth}
+	\vspace*{1ex}
+	\parnotes
+\end{minipage}
 \caption{Which Deferred Technique to Choose?
 					     (Details)}
 \label{tab:defer:Which Deferred Technique to Choose?  (Details)}
diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index d70dde66f725..9cde2e4d42e5 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -75,6 +75,7 @@
 \usepackage[split,makeindex]{splitidx}
 \usepackage[nottoc]{tocbibind}
 \usepackage[columns=3,totoc,indentunit=12pt,justific=raggedright,font=small,columnsep=.15in]{idxlayout}
+\usepackage{parnotes} % for footnotes in tabularx
 \usepackage[bookmarks=true,bookmarksnumbered=true,pdfborder={0 0 0},linktoc=all]{hyperref}
 \usepackage{footnotebackref} % to enable cross-ref of footnote
 \usepackage[all]{hypcap} % for going to the top of figure and table

base-commit: 1760abb742247869ac06cee18289f0a36d4d973b
-- 
2.25.1


             reply	other threads:[~2022-06-24 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 14:26 Akira Yokosawa [this message]
2022-06-24 14:28 ` [PATCH -perfbook 2/2] defer/whichtochoose: Fix trivial typos Akira Yokosawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6957b314-8f59-9671-4adb-37206fc3c693@qa2.so-net.ne.jp \
    --to=akys@qa2.so-net.ne.jp \
    --cc=akiyks@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=perfbook@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).