[PATCH -perfbook 1/2] defer/whichtochoose: Use parnotes for footnote in tabularx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux