Skip to content

Commit 580118f

Browse files
committed
[xref] Fix missing glossary entries for 'string.op!=' and 'reverse.iter.op!='.
Automatically escape ! within these glossary entries.
1 parent 95cbc03 commit 580118f

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

source/macros.tex

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,17 @@
4848
}
4949
\makeatother
5050

51+
%%--------------------------------------------------
52+
% Escaping for index entries. Replaces ! with "! throughout its argument.
53+
\def\indexescape#1{\doindexescape#1\stopindexescape!\doneindexescape}
54+
\def\doindexescape#1!{#1"!\doindexescape}
55+
\def\stopindexescape#1\doneindexescape{}
56+
5157
%%--------------------------------------------------
5258
%% Cross references.
53-
\newcommand{\addxref}[1]{\glossary[xrefindex]{#1}{(\ref{#1})}}
59+
\newcommand{\addxref}[1]{%
60+
\glossary[xrefindex]{\indexescape{#1}}{(\ref{\indexescape{#1}})}%
61+
}
5462

5563
%%--------------------------------------------------
5664
%% Sectioning macros.

source/xrefdelta.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
%!TEX root = std.tex
22

3-
\newcommand{\secref}[1]{\hyperref[#1]{#1}}
3+
\newcommand{\secref}[1]{\hyperref[\indexescape{#1}]{\indexescape{#1}}}
44

55
% Turn off page numbers for this glossary, they're not useful.
66
\newcommand{\swallow}[1]{}
77
\changeglossnumformat[xrefdelta]{|swallow}
88

9-
\newcommand{\oldxref}[2]{\glossary[xrefdelta]{#1}{#2}}
9+
\newcommand{\oldxref}[2]{\glossary[xrefdelta]{\indexescape{#1}}{#2}}
1010
\newcommand{\removedxref}[1]{\oldxref{#1}{\textit{removed}}}
1111
\newcommand{\movedxrefs}[2]{\oldxref{#1}{\textit{see} #2}}
1212
\newcommand{\movedxref}[2]{\movedxrefs{#1}{\secref{#2}}}
@@ -97,7 +97,7 @@
9797
\movedxref{string::op<=}{string.op<=}
9898
\movedxref{string::op>}{string.op>}
9999
\movedxref{string::op>=}{string.op>=}
100-
\movedxref{string::op"!=}{string.op"!=}
100+
\movedxref{string::op!=}{string.op!=}
101101
\movedxref{string::op+}{string.op+}
102102
\movedxref{string::op+=}{string.op+=}
103103
\movedxref{string::operator==}{string.operator==}
@@ -112,4 +112,4 @@
112112
\movedxref{istreambuf.iterator::op++}{istreambuf.iterator.ops}
113113
\movedxref{istreambuf.iterator::equal}{istreambuf.iterator.ops}
114114
\movedxref{istreambuf.iterator::op==}{istreambuf.iterator.ops}
115-
\movedxref{istreambuf.iterator::op"!=}{istreambuf.iterator.ops}
115+
\movedxref{istreambuf.iterator::op!=}{istreambuf.iterator.ops}

0 commit comments

Comments
 (0)