Split "Index of People" from general "Index"
cover Split "Index of People" from general "Index"
Hi Paul,
Mixed list of technical terms and people's names in the Index pages doesn't look great, especially with the growing numbers of people's names.
Patch 2/2 splits people's names from existing general index pages into "Index of People".
Patch 1/2 is an independent fix of a minor issue in single-level index pages.
Thanks, Akira
--
Akira Yokosawa (2):
Fix \IXhmr and \IXalthmr for single-level index mode Split "Index of People" from general "Index"
perfbook-lt.tex | 21 +++++++++++++-------- utilities/runlatex.sh | 3 ++- 2 files changed, 15 insertions(+), 9 deletions(-)
base-commit: 6e66e280e548545c69dde85f8eeee400f66b4bfc
Signature · 1 line
2.34.1
PATCH 1/2 Fix \IXhmr and \IXalthmr for single-level index mode
In single-level Index pages, "RCU Read-Side critical section" and "RCU read-side critical section" are listed separately.
This is because helper macros \indexhr and \indexhmr uses #1, which is the term to be printed in the main text.
Instead, use "#3 #2" without any uppercasing.
--- perfbook-lt.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
perfbook-lt.tex +2 -2
@@ -220,8 +220,8 @@ }{ \newcommand{\indexh}[3]{\ucindex{#3 #2}} \newcommand{\indexhy}[3]{\ucindex{#3#2}} -\newcommand{\indexhr}[3]{\index{#1}} -\newcommand{\indexhmr}[3]{\index{#1}} +\newcommand{\indexhr}[3]{\index{#3 #2}} +\newcommand{\indexhmr}[3]{\index{#3 #2}} } \newcommand{\IX}[1]{\ucindex{#1}\hlindex{#1}} % put with first letter capitalized into general index
Signature · 1 line
2.34.1
PATCH 2/2 Split "Index of People" from general "Index"
For more readable Index pages, move people's names into "Index of People".
Existing index markers are ready for the split. Just tweaking their definitions in the preamble and adding a makeindex command in utilities/runlatex.sh should suffice.
Change titles of Index pages as follows:
- Index of Terms
- Index of People
- Index of APIs
--- perfbook-lt.tex | 17 +++++++++++------ utilities/runlatex.sh | 3 ++- 2 files changed, 13 insertions(+), 7 deletions(-)
perfbook-lt.tex +11 -6
@@ -187,8 +187,9 @@ \usepackage{placeins} } % Custom commands for index -\newindex[API Index]{api} % index for API -\newindex[People Name Index]{ppl} % index for People Name +\renewcommand{\indexname}{Index of Terms} +\newindex[Index of APIs]{api} % index for API +\newindex[Index of People]{ppl} % index for People Name \newcommand{\categapi}[1]{~{\scriptsize (#1)}} \IfIndexHl{ \newcommand{\hlindex}[1]{\textcolor{DarkGreen}{#1}}
@@ -294,10 +295,10 @@ \newcommand{\apialtc}[2]{\hlindex{\co{#1}}\sindex[api]{#2@\co{#2}\categapi{c}}} \newcommand{\apialtg}[2]{\hlindex{\co{#1}}\sindex[api]{#2@\co{#2}\categapi{g}}} \newcommand{\apialtk}[2]{\hlindex{\co{#1}}\sindex[api]{#2@\co{#2}\categapi{k}}} -\newcommand{\ppl}[2]{\hlindex{#1 #2}\index{#2, #1}} % forename surname in text, "surname, forename" into ppl index -\newcommand{\pplmdl}[2]{\hlindex{#1~#2}\index{#2, #1}} % for abbreviated middle name -\newcommand{\pplsur}[2]{\hlindex{#2}\index{#2, #1}} % surname in text, "surname, givenname" into ppl index -\newcommand{\pplalt}[2]{\hlindex{#1}\index{#2}} % put 1st arg in text, put 2nd arg into ppl index +\newcommand{\ppl}[2]{\hlindex{#1 #2}\sindex[ppl]{#2, #1}} % forename surname in text, "surname, forename" into ppl index +\newcommand{\pplmdl}[2]{\hlindex{#1~#2}\sindex[ppl]{#2, #1}} % for abbreviated middle name +\newcommand{\pplsur}[2]{\hlindex{#2}\sindex[ppl]{#2, #1}} % surname in text, "surname, givenname" into ppl index +\newcommand{\pplalt}[2]{\hlindex{#1}\sindex[ppl]{#2}} % put 1st arg in text, put 2nd arg into ppl index \IfTwoColumn{}{ \setboolean{colorlinks}{true}
@@ -748,6 +749,10 @@ } \printindex \phantomsection +\setindexprenote{% empty for now +} +\printindex[ppl] +\phantomsection \setindexprenote{% \hfill\begin{minipage}{2.6in} \footnotesize (c):~Cxx standard, (g):~GCC extension,
utilities/runlatex.sh +2 -1
@@ -69,8 +69,9 @@ iterate_latex () { perl utilities/adjustindexformat.pl $basename.idx > $basename-adjust.idx cp -f $basename-adjust.idx $basename.idx makeindex $basename.idx > /dev/null 2>&1 + makeindex $basename-ppl.idx > /dev/null 2>&1 makeindex $basename-api.idx > /dev/null 2>&1 - if grep -q '## Warning' $basename.ilg $basename-api.ilg + if grep -q '## Warning' $basename.ilg $basename-ppl.ilg $basename-api.ilg then echo "----- Warning in makeindex, see .ilg log files. -----" exit 1
Signature · 1 line
2.34.1
Quoted 6 lines · Akira Yokosawa
Hi Paul,
Mixed list of technical terms and people's names in the Index pages doesn't look great, especially with the growing numbers of people's names.
Quoted 7 lines
Patch 2/2 splits people's names from existing general index pages into "Index of People".
Patch 1/2 is an independent fix of a minor issue in single-level index pages.
Thanks, Akira
Nice, thank you, and I have queued this.
After building perfbook.pdf twice, I have "Index of Terms" in the table of contents, but not "Index of People". Which is fine from my viewpoint, but thought I should check.
Thanx, Paul
Quoted 14 lines
--
Akira Yokosawa (2):
Fix \IXhmr and \IXalthmr for single-level index mode Split "Index of People" from general "Index"perfbook-lt.tex | 21 +++++++++++++-------- utilities/runlatex.sh | 3 ++- 2 files changed, 15 insertions(+), 9 deletions(-)base-commit:
6e66e280e548545c69dde85f8eeee400f66b4bfcSignature · 1 line
2.34.1
Quoted 13 lines · Paul E. McKenney
Quoted 12 lines · Akira Yokosawa
Hi Paul,
Mixed list of technical terms and people's names in the Index pages doesn't look great, especially with the growing numbers of people's names.
Patch 2/2 splits people's names from existing general index pages into "Index of People".
Patch 1/2 is an independent fix of a minor issue in single-level index pages.
Quoted 7 lines
Quoted 1 line
Thanks, Akira
Nice, thank you, and I have queued this.
After building perfbook.pdf twice, I have "Index of Terms" in the table of contents, but not "Index of People". Which is fine from my viewpoint, but thought I should check.
Strange.
I have pushed my local branch at:
https://github.com/akiyks/perfbook/tree/test-split-index-of-people
Appended is the screenshot of TOC in my build.
Running "make clean" might help.
Thanks, Akira
Quoted 17 lines
Thanx, Paul
Quoted 14 lines
--
Akira Yokosawa (2):
Fix \IXhmr and \IXalthmr for single-level index mode Split "Index of People" from general "Index"perfbook-lt.tex | 21 +++++++++++++-------- utilities/runlatex.sh | 3 ++- 2 files changed, 15 insertions(+), 9 deletions(-)base-commit:
6e66e280e548545c69dde85f8eeee400f66b4bfcSignature · 1 line
2.34.1
Quoted 24 lines · Akira Yokosawa
Quoted 13 lines · Paul E. McKenney
Quoted 12 lines · Akira Yokosawa
Hi Paul,
Mixed list of technical terms and people's names in the Index pages doesn't look great, especially with the growing numbers of people's names.
Patch 2/2 splits people's names from existing general index pages into "Index of People".
Patch 1/2 is an independent fix of a minor issue in single-level index pages.
Quoted 7 lines
Quoted 1 line
Thanks, Akira
Nice, thank you, and I have queued this.
After building perfbook.pdf twice, I have "Index of Terms" in the table of contents, but not "Index of People". Which is fine from my viewpoint, but thought I should check.
Strange.
Quoted 7 lines
I have pushed my local branch at:
https://github.com/akiyks/perfbook/tree/test-split-index-of-people
Appended is the screenshot of TOC in my build.
Running "make clean" might help.
And "make clean" did the trick! I should have thought of that, and thank you for bearing with me on this one. I have pushed them out.
Thanx, Paul
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
--
Akira Yokosawa (2):
Fix \IXhmr and \IXalthmr for single-level index mode Split "Index of People" from general "Index"perfbook-lt.tex | 21 +++++++++++++-------- utilities/runlatex.sh | 3 ++- 2 files changed, 15 insertions(+), 9 deletions(-)base-commit:
6e66e280e548545c69dde85f8eeee400f66b4bfcSignature · 1 line
2.34.1