[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6111] add @findex entries for all commands lacking them; check consiste
From: |
karl |
Subject: |
[6111] add @findex entries for all commands lacking them; check consistency |
Date: |
Tue, 10 Feb 2015 01:11:02 +0000 |
Revision: 6111
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6111
Author: karl
Date: 2015-02-10 01:11:00 +0000 (Tue, 10 Feb 2015)
Log Message:
-----------
add @findex entries for all commands lacking them; check consistency
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/refcard/txicmdcheck
trunk/doc/texinfo.texi
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-02-09 19:25:17 UTC (rev 6110)
+++ trunk/ChangeLog 2015-02-10 01:11:00 UTC (rev 6111)
@@ -1,5 +1,8 @@
2015-02-09 Karl Berry <address@hidden>
+ * doc/refcard/txicmdcheck: check @findex entries in texinfo.texi too.
+ * doc/texinfo.texi: add some missing entries.
+
* doc/texinfo.texi (Hardcopy): update whole chapter.
(Formatting Partial Documents, Details of @t{texindex}):
new nodes, mostly to mention the temporary need for
Modified: trunk/doc/refcard/txicmdcheck
===================================================================
--- trunk/doc/refcard/txicmdcheck 2015-02-09 19:25:17 UTC (rev 6110)
+++ trunk/doc/refcard/txicmdcheck 2015-02-10 01:11:00 UTC (rev 6111)
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
# $Id$
-# Copyright 2008, 2011, 2012, 2013 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
+# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,22 +26,20 @@
sub main {
my $no_common = $ARGV[0] eq "--no-common";
- my @card_cmds = &read_refcard ("txirefcard.tex");
- my @man_cmds = &read_refman ("../texinfo.texi");
- my @tp_cmds = &read_tp ("../../util/txicmdlist");
- # perhaps we should check against the manual's fnindex too.
+ my %card_cmds = &read_refcard ("txirefcard.tex");
+ my %idx_cmds = &read_refidx ("../texinfo.texi");
+ my %man_cmds = &read_refman ("../texinfo.texi");
+ my %tp_cmds = &read_tp ("../../util/txicmdlist");
- my (%card_cmds, %man_cmds, %tp_cmds);
- @address@hidden = ();
- @address@hidden = ();
- @address@hidden = ();
-
my @found = ();
- for my $cc (@card_cmds) {
- if (exists $man_cmds{$cc} && exists $tp_cmds{$cc}) {
+ for my $cc (keys %card_cmds) {
+ if (exists $idx_cmds{$cc}
+ && exists $man_cmds{$cc}
+ && exists $tp_cmds{$cc}) {
push (@found, $cc);
+ delete $card_cmds{$cc};
+ delete $idx_cmds{$cc};
delete $man_cmds{$cc};
- delete $card_cmds{$cc};
delete $tp_cmds{$cc};
}
}
@@ -51,6 +50,10 @@
my @card_only = keys %card_cmds;
printf "refcard only %s: @{[sort @card_only]}\n", @card_only + 0;
+ # there are numerous @findex entries that are not @-commands.
+ #my @idx_only = keys %idx_cmds;
+ #printf "findex only %s: @{[sort @idx_only]}\n", @idx_only + 0;
+
my @man_only = keys %man_cmds;
printf "refman only %s: @{[sort @man_only]}\n", @man_only + 0;
@@ -61,7 +64,10 @@
}
-# Return command names from the reference card.
+# Return command names from the reference card as the keys of a hash
+# (with empty values). In principle it's a list, but as a practical
+# matter we want to work with a hash anyway, so we might as well return
+# it that way in the first place. (Ditto for the other functions.)
#
sub read_refcard {
my ($fname) = @_;
@@ -111,13 +117,42 @@
push (@ret, '@,'); # our non-parsing above lost these
push (@ret, qw(@atchar @lbracechar @rbracechar @backslashchar));
close (FILE) || warn "close($FILE) failed: $!";
- return @ret;
+
+ my %ret; @address@hidden = ();
+ return %ret;
}
-# Return command names from the @-Command List
-# node in the reference manual.
+# Return command names from @findex entries in the reference manual as
+# the keys of a hash (empty values).
#
+sub read_refidx {
+ my ($fname) = @_;
+ my @ret = ();
+
+ local *FILE;
+ $FILE = $fname;
+ open (FILE) || die "open($FILE) failed: $!";
+ while (<FILE>) {
+ next unless s/address@hidden//; # only consider @findex lines
+ chomp;
+ s/address@hidden//;# if /^[^a-zA-Z]/; # remove comment
+ s/address@hidden@\}//; # remove @address@hidden used in atchar,
etc.
+ s/<colon>/:/; # @:
+ s/<newline>/var{whitespace}/; # special generic entry: @var{whitespace}
+ s/^/\@/ unless /^\@/; # prepend @ unless already there (@@ @{ @})
+ push (@ret, $_);
+ }
+ close (FILE) || warn "close($FILE) failed: $!";
+
+ my %ret; @address@hidden = ();
+ return %ret;
+}
+
+
+# Return command names from the @-Command List node in the reference
+# manual as the keys of a hash (empty values).
+#
sub read_refman {
my ($fname) = @_;
my @ret = ();
@@ -139,14 +174,16 @@
push (@ret, $_);
}
push (@ret, '@{'); # our non-parsing above fails on this one
-
close (FILE) || warn "close($FILE) failed: $!";
- return @ret;
+
+ my %ret; @address@hidden = ();
+ return %ret;
}
-# Return command names implemented in the general parser.
-# The argument is the command to run to return the list.
+# Return command names implemented in the general parser as the keys of
+# a hash (empty values). The argument is the command to run to return
+# the list.
#
sub read_tp {
my ($prog) = @_;
@@ -177,5 +214,6 @@
push (@ret, '@var{whitespace}');
- return @ret;
+ my %ret; @address@hidden = ();
+ return %ret;
}
Modified: trunk/doc/texinfo.texi
===================================================================
--- trunk/doc/texinfo.texi 2015-02-09 19:25:17 UTC (rev 6110)
+++ trunk/doc/texinfo.texi 2015-02-10 01:11:00 UTC (rev 6111)
@@ -6947,7 +6947,8 @@
indicate a url without creating a link people can follow, use
@code{@@indicateurl}, @address@hidden@@indicateurl}}.)
address@hidden @code{@@url} is a synonym for @code{@@uref}.
address@hidden url
address@hidden@code{@@url} is a synonym for @code{@@uref}.
(Originally, @code{@@url} had the meaning of @code{@@indicateurl}, but
in practice it was almost always misused. So we've changed the
meaning.)
@@ -10937,7 +10938,7 @@
@node Inserting a Backslash
@subsection Inserting `\' with @code{@@address@hidden@}}
address@hidden backslash
address@hidden backslashchar
@cindex Backslash, inserting
Ordinarily, a backslash `\' is a normal character in Texinfo that can
@@ -10957,6 +10958,7 @@
@@address@hidden argument@@address@hidden@} with a address@hidden
@end example
address@hidden \backslash
Texinfo documents may also use \ as a command character inside
@code{@@math} (@pxref{Inserting Math}). In this case, @code{@@\} or
@code{\backslash} produces a ``math'' backslash (from the math symbol
@@ -11036,7 +11038,7 @@
@set txicodequoteundirected off
@item @@codequotebacktick @var{on-off}
address@hidden codequoteundirected
address@hidden codequotebacktick
@cindex backtick
@cindex grave accent, standalone
causes the output for the @code{`} character in code environments to
@@ -11189,7 +11191,7 @@
@cindex Ending a Sentence
@cindex Sentence ending punctuation
address@hidden . @r{(end of sentence)}
address@hidden . @r{(end of sentence)}
@findex ! @r{(end of sentence)}
@findex ? @r{(end of sentence)}
@cindex Spacing, at ends of sentences
@@ -13069,6 +13071,25 @@
These two search commands are similar except @dots{}
@end deffn
address@hidden defcvx
address@hidden defivarx
address@hidden defmacx
address@hidden defmethodx
address@hidden defoptx
address@hidden defopx
address@hidden defspecx
address@hidden deftpx
address@hidden deftypecvx
address@hidden deftypefnx
address@hidden deftypefunx
address@hidden deftypeivarx
address@hidden deftypemethodx
address@hidden deftypeopx
address@hidden deftypevarx
address@hidden deftypevrx
address@hidden defunx
address@hidden defvarx
address@hidden defvrx
Each definition command has an `x' form: @code{@@defunx},
@code{@@defvrx}, @code{@@deftypefunx}, etc.
@@ -13759,7 +13780,7 @@
@code{@@defmethod} creates an entry in the index of functions.
@item @@deftypemethod @var{class} @var{data-type} @var{name} @address@hidden
address@hidden defmethod
address@hidden deftypemethod
The @code{@@deftypemethod} command is the definition command for methods
in object-oriented typed languages, such as C++ and Java. It is similar
to the @code{@@defmethod} command with the addition of the
@@ -14830,6 +14851,8 @@
@cindex Commands, testing for Texinfo
@cindex Versions of Texinfo, adapting to
@cindex Features of Texinfo, adapting to
address@hidden ifcommanddefined
address@hidden ifcommandnotdefined
Occasionally, you may want to arrange for your manual to test if a
given Texinfo command is available and (presumably) do some sort of
@@ -16880,6 +16903,7 @@
@cindex Paper size, A4
@cindex European A4 paper
@findex afourpaper
address@hidden afivepaper
You can tell @TeX{} to format a document for printing on European size
A4 paper (or A5) with the @code{@@afourpaper} (or @code{@@afivepaper})
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6111] add @findex entries for all commands lacking them; check consistency,
karl <=