Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3bd13cb

Browse filesBrowse files
committed
Create index for macro names
1 parent f72d8a1 commit 3bd13cb
Copy full SHA for 3bd13cb

File tree

3 files changed

+18
-0
lines changed
Filter options

3 files changed

+18
-0
lines changed

‎source/back.tex

Copy file name to clipboardExpand all lines: source/back.tex
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@
158158
\printindex[conceptindex]
159159
}
160160

161+
\clearpage
162+
\renewcommand{\preindexhook}{The bold page number for each entry is the page
163+
where the macro is defined.
164+
Other page numbers refer to pages where the macro is mentioned in the general text.\\}
165+
{
166+
\raggedright
167+
\printindex[macroindex]
168+
}
169+
161170
\clearpage
162171
\renewcommand{\preindexhook}{The entries in this index are rough descriptions; exact
163172
specifications are at the indicated page in the general text.\\}

‎source/macros.tex

Copy file name to clipboardExpand all lines: source/macros.tex
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138
\newcommand{\indexhdr}[1]{\index[headerindex]{\idxhdr{#1}}}
139139
\newcommand{\indexconcept}[1]{\index[conceptindex]{#1}}
140140
\newcommand{\indexgram}[1]{\index[grammarindex]{#1}}
141+
\newcommand{\indexmacro}[1]{\index[macroindex]{#1}}
141142

142143
% Collation helper: When building an index key, replace all macro definitions
143144
% in the key argument with a no-op for purposes of collation.
@@ -192,6 +193,7 @@
192193
\newcommand{\idxcode}[1]{#1@\CodeStylex{#1}}
193194
\newcommand{\idxconcept}[1]{#1@\CodeStylex{#1}}
194195
\newcommand{\idxexposconcept}[1]{#1@\CodeStylex{\placeholder{#1}}}
196+
\newcommand{\idxmacro}[1]{#1@\CodeStylex{#1}}
195197
\newcommand{\idxhdr}[1]{#1@\CodeStylex{<#1>}}
196198
\newcommand{\idxgram}[1]{#1@\gterm{#1}}
197199
\newcommand{\idxterm}[1]{#1@\term{#1}}
@@ -504,6 +506,12 @@
504506
\newcommand{\defexposconcept}[1]{\ecname{#1}\indexconcept{\idxexposconcept{#1}|idxbfpage}} % macro length: 16
505507
\newcommand{\defexposconceptnc}[1]{\ecname{#1}\indexconcept{\idxexposconcept{#1}|idxbfpage}\itcorr[-1]} % macro length: 18
506508

509+
%% Macros
510+
\newcommand{\macroname}[1]{\tcode{#1}}
511+
\newcommand{\stdmacrox}[2]{\macroname{#1}\indexmacro{\idxmacro{#2}}}
512+
\newcommand{\stdmacro}[1]{\stdmacrox{#1}{#1}}
513+
\newcommand{\defstdmacro}[1]{\macroname{#1}\indexmacro{\idxmacro{#1}}\indexmacro{\idxmacro{#1}|idxbfpage}}
514+
507515
%% Ranges
508516
\newcommand{\Range}[4]{\ensuremath{#1}\tcode{#3}\ensuremath{,}\,\penalty2000{}\tcode{#4}\ensuremath{#2}}
509517
\newcommand{\crange}[2]{\Range{[}{]}{#1}{#2}}

‎source/std.tex

Copy file name to clipboardExpand all lines: source/std.tex
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
\makeindex[name=headerindex,title=Index of library headers]
6868
\makeindex[name=libraryindex,options=-s libraryindex.ist,title=Index of library names]
6969
\makeindex[name=conceptindex,title=Index of library concepts]
70+
\makeindex[name=macroindex,title=Index of macro names]
7071
\makeindex[name=impldefindex,title=Index of implementation-defined behavior]
7172
\makeglossary[xrefindex]
7273
\makeglossary[xrefdelta]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.