Skip to content

Commit ed6e1b5

Browse files
jensmaurertkoeppe
authored andcommitted
[index] Fix dangling 'see' references
Also update the automatic check script to prevent further occurrences.
1 parent 04e0ea7 commit ed6e1b5

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

source/lex.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@
357357
the value of such a code unit can be the same as
358358
that of a code unit for an element of the basic literal character set.
359359
\end{note}
360+
\indextext{character!null}%
361+
\indextext{wide-character!null}%
360362
The U+0000 NULL character is encoded as the value \tcode{0}.
361363
No other element of the translation character set
362364
is encoded with a code unit of value \tcode{0}.

source/numerics.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10183,7 +10183,7 @@
1018310183
\indexlibraryglobal{beta}%
1018410184
\indexlibraryglobal{betaf}%
1018510185
\indexlibraryglobal{betal}%
10186-
\indextext{Eulerian integral of the first kind|see{\tcode{beta}}}%
10186+
\indextext{Eulerian integral of the first kind|see{beta functions $\mathsf{B}$}}%
1018710187
\indextext{beta functions $\mathsf{B}$}%
1018810188
\begin{itemdecl}
1018910189
double beta(double x, double y);

source/overloading.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3352,6 +3352,7 @@
33523352
\indextext{postfix ++ and -{-} overloading@postfix \tcode{++} and \tcode{--}!overloading}%
33533353

33543354
\pnum
3355+
\indextext{overloading!increment operator}%
33553356
An \defnadj{increment}{operator function}
33563357
is a function named \tcode{\keyword{operator}++}.
33573358
If this function is a non-static member function with no non-object parameters, or a non-member
@@ -3408,6 +3409,7 @@
34083409
\end{example}
34093410

34103411
\pnum
3412+
\indextext{overloading!decrement operator}%
34113413
A \defnadj{decrement}{operator function}
34123414
is a function named \tcode{\keyword{operator}--}
34133415
and is handled analogously to an increment operator function.

tools/check-output.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ sed -n '/\.tex/{s/^.*\/\([-a-z0-9]\+\.tex\).*$/\1/;h};
1717
/Overfull [\\][hv]box\|LaTeX Warning..Reference/{x;p;x;p}' std.log |
1818
sed '/^.\+\.tex$/{N;s/\n/:/}' | fail || failed=1
1919

20+
# Check for dangling "see" in general index (does not work with formatting)
21+
grep item < std-generalindex.ind | sed 's/,.*$//;s/\\[sub]*item //' |
22+
awk '/^ [^ ]/ { item=$0; print $0 } /^ [^ ]/ { subitem=$0; print item ", " $0 } /^ [^ ]/ { print item ", " subitem ", " $0 }' |
23+
sed 's/^ *//;s/ */ /g' | sort > tmp.txt
24+
25+
grep -o '\\see{[^}]*}' < std-generalindex.ind |
26+
sed 's/^\\see{//;s/}$//;s/\\-//' |
27+
grep -v "leavevmode\|texttt\|textsc\|kern" |
28+
while read see; do
29+
if grep -q "$see" tmp.txt; then
30+
:
31+
else
32+
grep -n "see{$see}" *.tex | sed 's/$/ is dangling/'
33+
fi
34+
done | fail || failed=1
35+
rm -f tmp.txt
2036

2137
# Cross references since the previous standard.
2238
function indexentries() { sed 's,\\glossaryentry{\(.*\)@.*,\1,' "$1" | LANG=C sort; }

0 commit comments

Comments
 (0)