diff options
73 files changed, 14642 insertions, 2862 deletions
diff --git a/contrib/texinfo/COPYING b/contrib/texinfo/COPYING index eeb586b..d60c31a 100644 --- a/contrib/texinfo/COPYING +++ b/contrib/texinfo/COPYING @@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> + Copyright (C) <year> <name of author> 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 @@ -313,7 +313,7 @@ Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/contrib/texinfo/COPYING.DOC b/contrib/texinfo/COPYING.DOC new file mode 100644 index 0000000..b42936b --- /dev/null +++ b/contrib/texinfo/COPYING.DOC @@ -0,0 +1,355 @@ + GNU Free Documentation License + Version 1.1, March 2000 + + Copyright (C) 2000 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML produced by some word processors for output +purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/contrib/texinfo/ChangeLog b/contrib/texinfo/ChangeLog index 126d1fc..49cd802 100644 --- a/contrib/texinfo/ChangeLog +++ b/contrib/texinfo/ChangeLog @@ -1,9 +1,1335 @@ -1999-09-28 Karl Berry <karl@gnu.org> +2002-03-04 <karl@gnu.org> - * doc/texinfo.txi: New isbn. + * configure.ac: version 4.1. + * util/texi2dvi: version. + + * doc/texinfo.txi: @settitle is used in html output (from Eli), + various underfull hbox fixes. + +2002-03-02 <karl@gnu.org> + + * configure.ac: pretest 4.0k + + * info/info.c: declare add_file_to_directory to avoid warning. + + * doc/info-stnd.texi: info standalone so as not to collide with + `standards' in dir. + +2002-03-01 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/insertion.c (end_insertion): Insert the /td and /tr + directives in lower case. From Per Bothner <per@bothner.com>. + + * makeinfo/macro.c (cm_alias): Ignore whitespace around the alias + name, like the manual promises. + + * doc/texinfo.txi (Invoking Macros, Macro Details): Document that + commas in macro arguments don't work in TeX. Advise texi2dvi -e + when macros don't work with TeX. + + * doc/texinfo.txi (Node Line Requirements): Add restrictions about + parens and some punctuation characters in node names. + (Def Cmd Template): Document that macros are not expanded. + + The following two changes allow to say "info foo" if there's an + Info file `foo' somewhere along INFOPATH. + + * info/info.c (add_file_directory_to_path): New function, code + moved from `main'. + (main): Use add_file_directory_to_path. + + * info/session.c (info_follow_menus): If the first menu entry + couldn't be found as an item in DIR's menu, try it as a file name. + + 2001-06-19 Mark Montague <markmont@umich.edu> + + * info/filesys.c: Fix for sparc64 (offsets should be "long"s). + + * info/session.c: Fix typos in function calls. + + 2001-08-23 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/footnote.c (cm_footnote): Don't allow footnotes inside + footnotes. + (output_pending_notes): Increment already_outputting_pending_notes + in the HTML case as well, to protect execute_string from + recursively entering output_pending_notes. + +2002-03-01 <karl@gnu.org> + + * doc/texinfo.tex: fix mismatched $'s for sake of emacs font-lock. + From: Stephen Gildea <gildea@stop.mail-abuse.org>. + +2002-02-27 <karl@gnu.org> + + * configure.ac: pretest 4.0j. + + * info/infodoc.c: 1scroll-forward typo. + +2002-02-26 <karl@gnu.org> + + * lib/system.h [! ENABLE_NLS]: let's not go const. + +2002-02-26 Eli Zaretskii <eliz@is.elta.co.il> + + * djgpp/config.sed: Add tweaking of file names in "install-info" + and "uninstall-info" targets. + + * doc/inf-stnd.texi (Custom Key Bindings, Invoking infokey): + Add footnotes about DOS file names. + + * info/infokey.c (main) [__MSDOS__]: If HOME is not defined, + default to the current directory. + +2002-02-26 <karl@gnu.org> + + * lib/system.h (LC_MESSAGES) [! LC_MESSAGES]: need this after all. + +2002-02-25 <karl@gnu.org> + + * doc/info-stnd.texi: contents at top, avoid overfull hbox. + * lib/Makefile.am (libtxi_a_sources): include gettext.h. + + * lib/system.h (LC_MESSAGES): don't need conditional, Bruno says + that locale.h or libintl.h does so. + + * configure.ac: pretest 4.0i. + + * dir-example: infokey. + * doc/info-stnd.texi: invoking infokey. + * info/infokey.c (short_help): reorganize slightly. + + * lib/system.h: use "gettext.h" instead of <libintl.h> per gettext + 0.11 recommendation. + +2002-02-25 gettextize <bug-gnu-gettext@gnu.org> + + * Makefile.am (SUBDIRS): Add intl. + * configure.ac (AC_CONFIG_FILES): Add intl/Makefile. + +2002-02-25 <karl@gnu.org> + + * util/Makefile.am (LDADD): + * makeinfo/Makefile.am (LDADD): + * info/Makefile.am (LDADD): @LIBINTL@ per gettextize. + + * configure.ac: gettextize changes. + * Makefile.am: gettextize changes. + +2002-02-25 gettextize <bug-gnu-gettext@gnu.org> + + * Makefile.am (SUBDIRS): Add m4. + (SUBDIRS): Remove intl. + (ACLOCAL_AMFLAGS): New variable. + (EXTRA_DIST): Add config.rpath. + * configure.ac (AC_CONFIG_FILES): Add m4/Makefile. + (AC_CONFIG_FILES): Remove intl/Makefile. + +2002-02-23 <karl@gnu.org> + + * pretest 4.0h. + + * 2002-02-23 Eli Zaretskii <eliz@is.elta.co.il> + * doc/info-stnd.texi (Invoking Info): Add a reference to the + description of index-apropos and index-search. Document the + --raw-escapes option. + (Searching Commands): Describe index-search and index-apropos. + + * info/man.c (clean_manpage): If raw_escapes_p is not set, remove + ANSI escape sequences from the man page. + + * info/info.h: Declare raw_escapes_p. + + * info/info.c: <raw_escapes_p>: New variable. + New option --raw-escapes or -R. + (main): Handle it. + (info_short_help): Document it. + (main): Honor --output together with --usage, by dumping the node + we found to the named file. + + 2002-02-23 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/html.c (nodename_to_filename): Call + nodename_to_filename_1 with the last argument 1, not 0. + + * makeinfo/toc.c (shortcontents_update_html) + (contents_update_html): Don't omit the entry for the Top node. + + * 2002-01-30 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/node.c (cm_node): Don't condition splitting on + top_node_seen being non-zero. If current_node is NULL, use the + current output file name to get at the file name for the previous + node. Don't compute a new file name for a node if we didn't close + the current file. + + 2002-02-01 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/node.c (cm_node): Call html_output_head whenever we + create a new split-HTML file. + + * makeinfo/html.c (html_output_head): Make html_title static. + Compute it only once, and don't free it. Output the <h1> title + header only once per run. + + 2002-02-02 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/toc.c (contents_update_html): Fix the condition for + omitting duplicate TOC entries. Fix comparison with the TOC entry + for "Top". + +2002-02-14 <karl@gnu.org> + + * doc/Makefile.am (DISTCLEANFILES): use this variable instead of + the distclean-aminfo target, which apparently is no longer used. + + * pretest 4.0g. + + * doc/texinfo.tex (\appendixentry): new macro for typesetting + appendix toc entries. + (\appendixzzz, \summarycontents, \pdfoutlines): use it, instead of + usurping \chapentry. This allows the bookmarks in the pdf output + to come out right. Report from: Kurt Hornik + <Kurt.Hornik@ci.tuwien.ac.at>. + +2002-02-13 <karl@gnu.org> + + * configure.ac: ALL_LINGUAS is deprecated as of gettext 0.11. + * doc/texinfo.tex (\image): remove spurious \loggingall. + + * doc/texinfo.txi: @math now implies @tex. + * doc/texinfo.tex (\math): imply @tex. + +2002-02-11 <karl@gnu.org> + + * makeinfo/insertion.c (handle_verbatim_environment): save and + restore filling_enabled and inhibit_paragraph_indentation. Bug + report from: Alexandre Duret-Lutz <duret_g@lrde.epita.fr>. + + * makeinfo/makeinfo.c (reader_loop): don't worry about bare braces + inside @math. + +2002-02-08 <karl@gnu.org> + + * info/infodoc.c: keep underlines with the text they refer to, for + translation purposes. + Pointed out by Christian Rose <menthos@menthos.com>, 20 nov 2001. + + * doc/info.texi: recommend setting INFOPATH. + + * doc/Makefile.am (install-tex): need $(srcdir) for install. + From: istry <istry@mail.ru>. + + * doc/texinfo.tex: replace $$$ delimiter with $.$, for sake of + font-lock in Emacs 21.1. Suggestion from: Stephen Gildea + <gildea@stop.mail-abuse.org>. + + 2002-01-26 Eli Zaretskii <eliz@is.elta.co.il> + * info/infomap.c (default_emacs_like_info_keys) + (default_emacs_like_ea_keys, default_vi_like_info_keys) + (default_vi_like_ea_keys): Fix default keybindings to be + consistent with non-INFOKEY branch. Add bindings for Home, End, + and Delete keys. + + 2002-01-23 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/toc.h <TOC_ENTRY_ELT>: New member html_file. + + * makeinfo/toc.c (toc_add_entry): Compute and set the html_file + member. + (shortcontents_update_html): Produce the toc_* links correctly, + without duplicating the link text. Fix comparison with "Top". + Handle the case when there's @shortcontents, but no @contents. + (contents_update_html): Fix the way toc_* anchors are produced + from toc_entry_alist[i]->name: take only the node name from the + string in toc_entry_alist[i]->name. Fix comparison with "Top". + + * makeinfo/sectioning.c (sectioning_html): Take the toc_anchor + substring before closing the anchor with </a>. Fix the closing + </hN> tag--add 2 to level, not 1. Use sizeof instead of a magic + value of 9. + + * makeinfo/cmds.c: Make @summarycontents call cm_shortcontents, as + promised by the docs. + + 2002-01-19 Eli Zaretskii <eliz@is.elta.co.il> + * djgpp/config.sed: Fix a problem with AC_CONFIG_LINKS that + prevented building from a directory on another drive. + + * djgpp/config.bat: Fix problems with long --srcdir diectory names. + + * djgpp/README: Update. + +2002-01-31 <karl@gnu.org> + + * doc/texinfo.txi: mention dvips + +2002-01-28 <karl@gnu.org> + + * configure.ac (ALL_LINGUAS): add hr. + +2002-01-22 <karl@gnu.org> + + * makeinfo/defun.c (defun.c): only warn about ( immediately + following a defun name, since the groff manual needs other + characters there where whitespace is incorrect. + Reported by Werner Lemberg <wl@gnu.org>. + + * doc/info-stnd.texi: alphabetize variable list. + + * doc/texinfo.txi: no :'s in index entries, index @page/@group + some more. + + * makeinfo/index.c (index_add_arg): warn if index entry contains a + colon. From: Kenneth Lorber <keni@his.com>. + +2002-01-21 <karl@gnu.org> + + * makeinfo/insertion.c: </pre not /<pre, reported by Mike + Benefield <mike@duckbrain.com>. + +2002-01-18 <karl@gnu.org> + + * configure.ac: pretest 4.0f. + + * util/texindex.c: + * util/install-info.c: + * makeinfo/makeinfo.c: + * info/info.c: it's 2002. + + * info/session.c: pass right args to info_scroll_half_screen_up. + From Eli. + +2002-01-18 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/multi.c (multitable_item): Always return a value. + + * util/install-info.c (xmalloc, xrealloc, pfatal_with_name) + (open_possibly_compressed_file, parse_input): Call `fatal' with 3 + arguments, to avoid compiler warnings. + (main): Call `fatal', `error', and `warning' with the right number + of arguments. + + * makeinfo/makeinfo.c (main): Remove extraneous first arg of + usage(). + + * info/window.c (build_message_node): Supply a 4th argument to + build_message_buffer. + + +2002-01-18 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/sectioning.c (sectioning_html): End the anchor properly + with a </a>. + + * info/session.c (info_menu_or_ref_item): If we didn't find a + cross-reference on this line, try the one before. + + * info/infomap.c (fetch_user_maps): Provide two different + translations for ``file too small'' and ``file too big'' error. + + * info/info.c (info_short_help): Print the --speech-friendly + option together with the other options, not at the end of the help + screen. + +2002-01-18 Andreas Schwab <schwab@suse.de> + + * makeinfo/html.c (escape_string): When string is empty don't read + past end of it. + +2002-01-17 <karl@gnu.org> + + * doc/info-stnd.texi: overfull box in table. + +2002-01-16 <karl@gnu.org> + + * configure.ac: pretest 4.0e. + + * doc/info.texi: update from emacs. + +2002-01-03 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/makeinfo.c (file_line_error): New function. + + * makeinfo/insertion.c (discard_insertions): Call file_line_error + instead of changing global variables. + + * makeinfo/sectioning.c (cm_top): Ditto. + + * makeinfo/node.c (validate_file): Ditto. + + * makeinfo/makeinfo.c (discard_braces, handle_variable_internal): + Ditto. + + * makeinfo/macro.c (define_macro): Ditto. + + 2001-12-31 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/node.h (TAG_ENTRY): New struct member html_fname. + + * makeinfo/node.c (find_node_by_fname): New function. + (remember_node): Accept an additional argument FNAME, the node's + file name, and record it in the list of nodes; callers changed. + (cm_node): Call find_node_by_fname to see if this node's file name + clashes with another node or anchor. If it clashes with another + node, append the new node to the same file instead of erasing the + other node. If it clashes with an anchor, print an error message + and overwrite the anchor's file. + (cm_anchor): If this anchor's file name clashes with another + anchor or node, print an error message and ignore the anchor. + + * makeinfo/files.c (normalize_filename): New function. + + * makeinfo/files.h <normalize_filename>: Add declaration. + + * makeinfo/html.c (nodename_to_filename_1): Call + normalize_filename before returning the file name to the caller. + Disable the code which adds #Nodified-filename to the file name we + produce. + + * makeinfo/makeinfo.c (add_char): Don't replace whitespace with + if we are producing an HTML directive. + (add_html_elt): New function. + (cm_xref, cm_inforef, cm_uref, cm_email, cm_image): Use + add_html_elt instead of add_word, where appropriate. + + * makeinfo/html.c (add_link): Ditto. + + * makeinfo/footnote.c (cm_footnote): Ditto. + + * makeinfo/defun.c (defun_internal): Ditto. + + 2001-12-27 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/node.c (cm_node): Don't omit links to (DIR) from the + navigation bar, add_anchor_name will DTRT now. + + * makeinfo/makeinfo.c (cm_xref): Produce a split-HTML file name + from arg1, the node name, not from arg3 or arg2, which are the + reference name. Use arg2 or arg3 for the text to be displayed as + a link between ">" and "</a>". Use add_anchor_name instead of + add_nodename_to_filename. + (cm_inforef): Use add_anchor_name instead of + add_nodename_to_filename. Handle the case of a missing second + argument in @inforef. + + * makeinfo/html.c (add_anchor_name): Always add # and the anchor + name, even if we are splitting. If the node is "(dir)", treat it + as if it were "dir". + (nodename_to_filename_1): Don't append #Top for the Top node. + (add_link): Don't punt if nodename is "(dir)". Output "</a>" + after the link. + + 2001-12-25 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/makeinfo.c (cm_xref, cm_inforef): Output the target + file name via add_nodename_to_filename. + + 2001-12-20 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/html.c (nodename_to_filename_1): Make references to Top + to refer to index.html#Top. + (add_nodename_to_filename): Accept additional argument HREF; + callers changed. + + * makeinfo/toc.c (rewrite_top): If the filename to rewrite is + stdout or the null device, do nothing. + + * makeinfo/makeinfo.c (insert_toplevel_subdirectory): Use + FILENAME_CMP instead of strcmp. Search for a period forward, not + backward. Make index_name[] a static const array, and its len + computed at compile time. + (convert_from_loaded_file): If output_filename is the null device, + turn off HTML splitting. + (cm_xref): Use add_anchor_name, rather than add_escaped_anchor_name, + in the 5-argument case in HTML mode. + (cm_inforef): Fix external references in HTML mode. + + * makeinfo/node.c (cm_node): Use FILENAME_CMP instead of strcmp. + Don't open a new file if the new node's name is empty. Take the + directory part of split-HTML files from current_output_filename, + not from toplevel_output_filename (the latter doesn't include the + manual's subdirectory part). + + * makeinfo/html.c (nodename_to_filename_1): Use FILENAME_CMPN + instead of strncmp. Support *.inf files in references. + +2001-12-11 Eli Zaretskii <eliz@is.elta.co.il> + + * djgpp/config.bat, djgpp/config.sed, djgpp/config.site: Update + for Texinfo 4.0d. + + * makeinfo/makeinfo.c (insert_toplevel_subdirectory): Use IS_SLASH + instead of literal `/'. + (convert_from_loaded_file): Flush the output stream before + creating the TOC. + + +2002-01-14 <karl@gnu.org> + + * info/info.c: translate --speech-friendly (from Eli). + * makeinfo/index.c: formatting. + + 2001-12-24 Eli Zaretskii <eliz@is.elta.co.il> + * info/infomap.c (initialize_info_keymaps): Bind the user-defined + keys on top of the default ones, not the other way around. + +2002-01-11 <karl@gnu.org> + + * info/info.c: can't do #ifdef inside of printf any more. + From: Tyler <tyler@zerodivide.cx> + + * configure.ac (ALL_LINGUAS): add he, from Eli. + +2002-01-09 Eli Zaretskii <eliz@is.elta.co.il> + + * info/window.c (calculate_line_starts): Cast node->contents[i] to + unsigned char. + +2002-01-04 <karl@gnu.org> + + * doc/texinfo.tex (\footnotezzz): \noindent=\relax. + +2002-01-03 <karl@gnu.org> + + * doc/texinfo.tex (\imagexxx): handle pdf and dvi cases the same. + (\dopdfimage): need \immediate to avoid seg fault when including the + same image twice. + Bug reports from Alexandre Duret-Lutz <duret_g@lrde.epita.fr>. + +2001-12-31 <karl@gnu.org> + + * makeinfo/makeinfo.c (cm_image): check *ext_arg as well as + ext_arg when computing length of fullname. + + * makeinfo/defun.c: docbook changes. + * makeinfo/docbook.c (docbook_punctuation): remove deprecated + default: at end of statement. + + * makeinfo/docbook.c: initial. + * makeinfo/docbook.h: initial. + * makeinfo/Makefile.am (makeinfo_SOURCES): add docbook.[ch]. + * makeinfo/makeinfo.c (add_char): use in docbook case. + + * doc/texinfo.tex (\footnotezzz): use \everypar={\hang} instead of + just \hang in case a footnote extends for multiple paragraphs. + +2001-12-18 <karl@gnu.org> + + * info/Makefile.am (BUILT_SOURCES): include $(EXEEXT) on makedoc + dependency since automake doesn't do it. + + 2001-12-11 Eli Zaretskii <eliz@is.elta.co.il> + + * djgpp/config.bat, djgpp/config.sed, djgpp/config.site: Update + for Texinfo 4.0d. + + * info/infomap.c (fetch_user_maps): Initialize `filename' to NULL + and don't try to call `open' if `filename' is NULL. + [__MSDOS__]: Try the current directory if neither $INFOKEY nor + $HOME are defined. + + * makeinfo/makeinfo.c (insert_toplevel_subdirectory): Use IS_SLASH + instead of literal `/'. + (convert_from_loaded_file): Flush the output stream before + creating the TOC. + + 2001-12-10 Eli Zaretskii <eliz@is.elta.co.il> + + * info/infokey.c (main): Use FOPEN_WBIN instead of "w". + + * info/infokey.h (INFOKEY_SRCFILE, INFOKEY_FILE) [__MSDOS__]: + Special definitions for MS-DOS. + + 2001-12-09 Eli Zaretskii <eliz@is.elta.co.il> + + * lib/system.h: Condition inclusion of libintl.h on ENABLE_NLS. + (gettext, bindtextdomain, textdomain) [!ENABLE_NLS]: Provide + trivial definitions for when NLS is not used. + (LC_MESSAGES) [!ENABLE_NLS]: Define if undefined by locale.h. + +2001-12-18 Eli Zaretskii <eliz@is.elta.co.il> + + * info/infomap.c (decode_keys): Change the return type to int; + callers changed. Return zero if some of the special keys in SRC + are not defined by the terminal; return non-zero otherwise. + (section_to_keymaps): If decode_keys returns zero, don't bind the + key sequence. + +2001-12-18 Eli Zaretskii <eliz@is.elta.co.il> + + * makeinfo/xml.c (xml_insert_element_with_attribute) + (xml_insert_element): Rename the argument `element' to `elt'. + + * info/infokey.c (compile): Use \033 instead of (non-standard) \e. + +2001-12-17 <karl@gnu.org> + + 2001-12-16 Eli Zaretskii <eliz@is.elta.co.il> + + * info/pcterm.c (pc_initialize_terminal) [INFOKEY]: Store term_kh, + term_ke, term_ki, and term_kx sequences. + (DJGPP_keytab): Map Home, End, and Insert to escape sequences, not + to C-a, C-e, etc. + + * info/infomap.c (default_emacs_like_info_keys) + (default_emacs_like_ea_keys, default_vi_like_info_keys) + (default_vi_like_ea_keys): Add the leading suppress-default flag, + to be consistent with the table which comes from a file. + + * info/session.c (info_do_lowercase_version): Add a doc string. + + * info/infodoc.c (describe_key) [INFOKEY]: If keystroke is bound + to do-lowercase-version, but its lower-case variant is undefined, + say that keystroke is also undefined. + + +2001-12-12 <karl@gnu.org> + + * makeinfo/files.c (find_and_load): remove conditionals on + VMS|O_BINARY, always just read as many bytes as we can. + + 2001-12-11 Eli Zaretskii <eliz@is.elta.co.il> + * new files for djgpp/. + + 2001-09-09 Eli Zaretskii <eliz@is.elta.co.il> + * info/echo-area.c (build_completions): Look for a candidate + completion which matches user's request including the letter-case, + use that as the value of LCD_completion. + + 2001-12-06 Eli Zaretskii <eliz@is.elta.co.il> + * info/echo-area.c (build_completions): When looking for the best + completion candidate, only compare as much characters as the user + typed. + + +2001-12-04 <karl@gnu.org> + + * doc/texinfo.tex (\pdfmkpgn): remove trailing @ in link names + again. Also from Kurt. + + * doc/texinfo.tex (\image): need five commas to ignore additional + optional args to @image. From Kurt.Hornik@ci.tuwien.ac.at. + + * doc/texinfo.tex (\afourlatex): reset \globaldefs=0 explicitly. + From Trond Endrestøl <trond@ramstind.gtf.ol.no>. + +2001-12-01 <karl@gnu.org> + + * makeinfo/files.c (find_and_load): remove O_BINARY from open + call, this messes up under Windows. From eli. + +2001-11-20 <karl@gnu.org> + + * makeinfo/makeinfo.c (cm_image): reword error messages. + +2001-11-19 <karl@gnu.org> + + * Pretest 4.0d. + * doc/texinfo.txi: index ragged right/left. + + * info/window.c (build_message_buffer): handle %1$s as used in + ja.po. From Fumitoshi UKAI <ukai@debian.or.jp>. + + * configure.ac (ALL_LINGUAS): add sv. + +2001-11-16 <karl@gnu.org> + + * Makefile.am (EXTRA_DIST): add COPYING.DOC. + + 1999-10-30 Andrew Bettison <andrewb@zip.com.au> + + All these changes are to implement user-configurable key mapping + using the new 'infokey' program. For the time being, the new + code is conditional on [INFOKEY] and the old code is still there + in case we want to revert. + + * info/session.c (incremental_search): test for printable chars + _before_ isearch command keys -- makes a difference if the + isearch commands are bound to printable chars. + + * info/doc.h, + * info/infodoc.c, + * info/infomap.c, + * info/m-x.c, + * info/session.c: New typedef InfoCommand, plus a bunch of + supporting macros, to abstract a "command" away from being a + function pointer. + + * info/doc.h (pretty_keyseq), + * info/infodoc.c (pretty_keyseq), + * info/session.c (pretty_keyseq): Moved definition from + session.c into infodoc.c, and rewrote to recognise special + terminal sequences (PgUp, PgDn, etc.). + + * info/infodoc.c (create_internal_info_help_node, + replace_in_documentation, info_where_is), + * info/m-x.c (info_execute_command): Cleaned up references to + hardwired keystrokes. + + * info/infodoc.c (replace_in_documentation): + Extended the \\[foo] syntax to recognise \\%-X.Y[foo], which + causes the replacement text to be inserted using sprintf("%-X.Ys"). + + * info/session.c (_scroll_forward, _scroll_backward, + scroll_forward_page_only, scroll_backward_page_only, + scroll_forward_page_only_set_window, + scroll_backward_page_only_set_window): New functions, eliminating + need for SPC and DEL hack. + + * info/session.c (scroll_forward, scroll_backward, + scroll_forward_set_window, scroll_backward_set_window): Call + _scroll_forward and _scroll_backward to do all the work. + + * info/infomap.c (initialize_info_keymaps)[!INFOKEY]: set 'v' + and Control('v') key bindings to info_scroll_backward_page_only + and info_scroll_forward_page_only respectively. + + * info/Makefile.am (bin_PROGRAMS): Added new executable `infokey'. + (infokey_SOURCES): Defined. + (EXTRA_DIST): Added `sample_infokey'. + (BUILT_SOURCES): Added `key.c'. + + * info/infokey.h, + * info/infokey.c: Created, for new program `infokey' which + creates a $HOME/.info file by compiling a text source file with + syntax very similar to that used by `lesskey' in less 3.4.0. + + * info/makedoc.c: Generate new file `key.c' defining an array to + map command names to codes. + + * info/key.h: Created, to define contents of new `key.c' now + created by makedoc. + + * info/info.h (INFOKEY): Define, to enable all following changes. + (set_variable_to_value)[INFOKEY]: Declare new function. + + * info/makedoc.c [INFOKEY]: Write '#define A_' numeric command + code definitions into `funs.h' to support new key binding system. + + * info/session.c (info_dispatch_on_key, info_numeric_arg_digit_loop) + [INFOKEY], + * info/infomap.c [INFOKEY], + * info/infodoc.c (function_documentation, function_name, + describe_key, pretty_keyname, pretty_keyseq_internal, + where_is_internal)[INFOKEY], + * info/terminal.h (term_kh, term_ke, term_kx, term_ki)[INFOKEY], + * info/terminal.c (term_kh, term_ke, term_kx, term_ki, + terminal_initialize_terminal)[INFOKEY], + * info/variables.c (set_variable_to_value)[INFOKEY], + * info/sample_infokey: Added infokey functionality, copied more + or less wholesale from 'lesskey' in GNU Less 3.4.0. Added a new + typedef struct FUNCTION_KEYSEQ, and a new element `keys' to + typedef struct FUNCTION_DOC, to give the user some control over + the keystrokes that appear in the documentation node generated + by get-help-window, and to improve efficiency a little. + + * info/infodoc.c (info_internal_help_text, + create_internal_info_help_node)[INFOKEY]: Rewrote all code that + assumes fixed keystrokes, replacing %10s sequences with \\%10[foo] + sequences instead. + + * doc/info-stnd.texi: Documented above changes. + +2001-09-19 <karl@gnu.org> + + * makeinfo/cmds.c: </ not /<, duh :). From janneke. + +2001-09-12 <karl@gnu.org> + + * configure.ac (AC_SYS_POSIX_TERMIOS, AC_HEADER_TIOCGWINSZ): use + these new autoconf macros instead of the old automake ones. + + * info/terminal.c: remove unconditional include of sys/ioctl.h. + * info/termdep.h: <sys/ioctl.h> [GWINSZ_IN_SYS_IOCTL]: include outside of HAVE_TERMIOS_H, + per autoconf manual. + + * doc/Makefile.am (install-info-am): remove override of automake's + target, instead enable looking in . for info files within automake. + + * doc/info-stnd.texi: include separate version-stnd.texi + * configure.ac: autoconf 2.52, and rename to configure.ac. + +2001-09-11 <karl@gnu.org> + + * doc/texinfo.txi: recommend against using - and _ in @set names, + * and rearrange that section. + + * info/infodoc.c (replace_in_documentation): free fun_name to fix + memory leak. + From: "Art Haas" <ahaas@neosoft.com>, Sat, 4 Aug 2001 08:34:31 -0500. + + * makeinfo/lang.c: encoding support for info output from kama. + * makeinfo/lang.h: encoding support for info output from kama. + + * makeinfo/html.c: include document encoding code unless + no_encoding. + * makeinfo/insertion.c (cm_direntry): don't call begin_insertion + if ignoring. + (cm_documentdescription): moved here, and likewise. + (begin_insertion): don't need output format conditionals here. + + * makeinfo/cmds.c (cm_documentdescription): move to insertion.c. + * makeinfo/makeinfo.h (enable_encoding): new global. + * makeinfo/makeinfo.c: new option --enable-encoding, rearrange help. + + Sun Oct 31 18:44:24 UTC 1999 Karl Heinz Marbaise <kama@hippo.fido.de> + + - lang.{c,h}: + o added translation map between HTML markups and 8-Bit + (ISO-8859-1 codes; supplemental is Unicode for the future). + o added cm_search_iso_map: + search for characters based on HTML markup names for + translation 8-Bit code. + o recognizing of @documentencoding improved. + now we can recognize things like ISO-8859-{1...15} + + - makeinfo.{c,h}: + o added two command line switches. + + info-encoding to activate the encoding for info output + which is correctly shown by info. Default is NOT to + encode the output to be compatible with earlier versions. + + no-encoding to suppress encoding e.g. while producing + ASCII output (--no-headers) results in that you get + "A for Ä as before. + o help output changed to document the switches. + + - html.c: + charset encoding in html based on @documentencoding. + + +2001-07-31 <karl@gnu.org> + + * doc/texinfo.txi: mention pdfcolor.tex. + * doc/texinfo.tex: doc. + * doc/Makefile.am (install-tex): install pdfcolor.tex too. + * doc/pdfcolor.tex: new file, since Kurt.Hornik@ci.tuwien.ac.at + reports that not all pdftex installations include it. + +2001-07-25 <karl@gnu.org> + + * doc/texinfo.tex (\Etitlepage): need \HEADINGSon before the + \...aftertitlepage checks to get page numbers. Report from + 3diff@gnu.org. + +2001-07-06 <karl@gnu.org> + + * doc/texinfo.txi: mention http://docbook2X.sourceforge.net/. + +2001-06-29 <karl@gnu.org> + + * makeinfo/makeinfo.c: make output to stdout imply --no-split for + HTML, too. + + * makeinfo/html.c (html_output_head): use documentdescription if set. + * makeinfo/insertion.h (insertion_type): new case documentdescription. + * makeinfo/insertion.c (begin_insertion, end_insertion, + insertion_type_names): new case for documentdescription. + * makeinfo/cmds.c (cm_documentdescription): new fn. + * makeinfo/makeinfo.h (document_description): new global. + * doc/texinfo.txi: @documentdescription. + @documentdescription implementation from patches by Will Estes. + +2001-06-26 <karl@gnu.org> + + * doc/texinfo.txi: documentdescription + * doc/texinfo.tex: Ignore @documentdescription ... @end + documentdescription. + + * doc/texinfo.txi: document sequential punctuation in @footnote is + normal, suggested by rms. + +2001-06-21 <karl@gnu.org> + + * doc/texinfo.tex (\textfonts): call \setleading here, so that we can + switch font sizes back and forth inside @tex with \globaldefs=1 + and not lose the leading. + + * doc/texinfo.txi: allow @smallbook to run without overfull or + underfull boxes. + +2001-06-19 <karl@gnu.org> + + * doc/texinfo.tex (\imagexxx): ignore new optional args to @image. + + * makeinfo/html.c (html_output_head): include <h1>title</h1> at + beginning of document. + * makeinfo/sectioning.c (cm_top): don't include explicit links in + HTML output, the regular code for @node will do it. + (sectioning_html): use <h2> for chapter instead of <h1>, etc. + * makeinfo/node.c (cm_node): do not include code to output the + HTML <head>, we do that elsewhere now. + + 1999-11-26 W. L. Estes <will@fumblers.org> + * makeinfo/insertion.c (begin_insertion): add an explicit <br> + before beginning a <pre> block. for flushleft and flushright, use + <div> tag with an align attribute set. + * makeinfo/insertion.c (end_insertion): for flushleft and + flushright, end the </div> block. + + * makeinfo/makeinfo.c (cm_image): new variable, alt_arg now allows + user-supplied alt attribute value and + ext_arg allows user-supplied extension for image files. + + * makeinfo/toc.c (contents_update_html): add anchors at chapter + level entries + (shortcontents_update_html): hrefs in shortcontents point to the + above anchors in the detailed contents + + * doc/texinfo.txi: document changes to @image and the new behavior + of shortcontents entries + +2001-06-14 <karl@gnu.org> + + * makeinfo/node.c: no need for size_t. + +2001-06-13 <karl@gnu.org> + + * texinfo.tex (\pdfmkdest): \normalturnoffactive, so refs and + defs match. + (\xrefX): pdf link defs no longer use @, so link refs shouldn't use @ + either. (All xrefs in pdf were failing.) + (\mkpgn): remove redundant second definition. + + * texinfo.tex (\smallerfonts): new font size. + (\smallexample, et al.): use it, in all cases, not just @smallbook. + + 1999-11-30 Andreas Schwab <schwab@suse.de> + * doc/texinfo.tex (\xrefX): Turn off active characters when writing + out the link name for pdf. + +2001-06-13 <karl@gnu.org> + + * doc/texinfo.txi: document that @smallexample is smaller in all + page formats now. + +2001-06-11 <karl@gnu.org> + + * 4.0c. + * util/Makefile.am: Don't need automake patch any more, with + automake 1.4p4. + + * configure.in (AC_FUNC_SETVBUF_REVERSED): only needed on + pre-sysvr3 systems that nobody has anymore? Or so Russ Allbery + informs me ... + +2001-06-08 <karl@gnu.org> + + * makeinfo/Makefile.am (EXTRA_DIST): include texinfo.{dtd,xsl}. + + * util/Makefile.am: automake-1.4p3 now. + +2001-06-07 <karl@gnu.org> + + * util/texi2dvi: comment out conditional text, from Werner LEMBERG + <wl@gnu.org>. + + 2001-06-02 Eli Zaretskii <eliz@is.elta.co.il> + * info/echo-area.c (info_read_completing_internal): If there are + no completions, say that instead of "Not complete". + + * configure.in (ALL_LINGUAS): add da + + * makeinfo/Makefile.am (pkgdata_DATA): include texinfo.xsl. + + * configure.in: update for autoconf 2.50. + +2001-06-04 <karl@gnu.org> + + * util/Makefile.am (EXTRA_DIST): automake-14p2.patch now. + * util/automake-14p2.patch: rename from 14p1. + +2001-05-22 <karl@gnu.org> + + * changes from feloy for lowercase xml names, etc. + +2001-05-21 <karl@gnu.org> + + * util/Makefile.am (EXTRA_DIST): add automake-14p1.patch. + * makeinfo/Makefile.am (pkgdata_DATA): define to install + texinfo.dtd. + + 2001-05-17 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/makeinfo.c (cm_xref, cm_inforef): Don't allow empty + first arguments in cross references. + + * makeinfo/makeinfo.c: redo --help, basic patch from ke@suse.de. + +2001-05-03 <karl@gnu.org> + + * doc/info.texi: move help-cross to be subnode of cross-refs, + instead dangling out in space. + * doc/info.texi: update from eli + +2001-05-02 <karl@gnu.org> + + * makeinfo/xml.c (xml_push_current_element): need to select the + `name' member. + +2001-05-01 <karl@gnu.org> + + * configure.in: 4.0b + + * doc/info.texi (Help-Cross): subsection of Cross-refs. + + * lib/system.h (va_alist, etc.): moved from makeinfo.c. + * makeinfo/makeinfo.c (va_alist, etc.): move to system.h + + * makeinfo/xml.[ch]: new files from Philippe Martin <feloy@free.fr>. + * pretty much all files also modified for XML/DocBook output. + * doc/texinfo.txi: minimally mention --xml and --docbook. + * makeinfo/xml.c: convert to K&R until we can do ansi2knr. + + * util/texindex.c, + * util/install-info.c, + * info/info.c: it's 2001. + +2001-04-15 <karl@gnu.org> + + * doc/info.texi: major update from eli. + +2001-04-13 <karl@gnu.org> + + 1999-10-16 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/node.c (cm_node): Don't generate cross-references to + "(DIR)". + * makeinfo/html.c (add_link): Likewise. + + 1999-10-16 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/makeinfo.c (insert): Don't call html_output_head here. + (add_char): Call html_output_head here... + * makeinfo/cmds.c (cm_sp): ...and here... + * makeinfo/toc.c (cm_contents, cm_shortcontents): ...and here... + * makeinfo/node.c (cm_anchor): ...and here. + + * makeinfo/html.c (html_output_head): `free' html_title if + expanded. Make <head> and <body> stand out. + +2001-04-12 <karl@gnu.org> + + 1999-12-26 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/defun.c (defun_internal): Use execute_string instead + add_word_args to expand defined_name, type_name and category (in + HTML mode). + +2001-03-29 <karl@gnu.org> + + * Makefile.am: simple license. + +2001-02-27 <karl@gnu.org> + + 1999-12-17 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp> + * info/terminal.h, info/terminal.c (term_kh, term_ke, term_kD): + New variables to hold Home, End, Delete key sequences. + * info/infomap.c (initialize_emacs_like_keymaps, + initialize_vi_like_keymaps): Set them. + + * makeinfo/makeinfo.h, + * makeinfo/makeinfo.c: --split-size option from Yoshiki: + 1999-12-09 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp> + * makeinfo/makeinfo.h (split_size): New option. + * makeinfo/makeinfo.c (long_options): Add split_size. + (usage): Ditto. Suggested by Richard Y. Kim. + + * util/texi2dvi: -o support from Akim. + +2001-02-02 <karl@gnu.org> + + * dir-example: don't need zsh twice. + + From: Nishio Futoshi <fut_nis@d3.dion.ne.jp>, 02 Apr 2000. + * doc/texinfo.txi: capitalization fixes. + * doc/info.texi: up pointer fixes. + * doc/texinfo.txi: installing an info file. + + * makeinfo/makeinfo.c: --output is for split html, not non-split. + From: Karl Eichwalder <keichwa@gmx.net> + +2001-01-12 <karl@gnu.org> + + 1999-10-15 Eli Zaretskii <eliz@is.elta.co.il> + * makeinfo/cmds.c (cm_sc): Don't print the warning about + all-uppercase argument in menus under --no-headers. + + * makeinfo/files.c: pass O_BINARY flag to open, suggested by bfox. + +2001-01-11 <karl@gnu.org> + + * info/terminal.c [HAVE_TERMIOS_H && TCOON]: tcflow TCOOFF/TCCON + to resume output if user presses CTRL-S at the beginning of + things. + [HAVE_TERMIO_H && TCXONC]: ditto. + From Kevin Ryde <user42@zip.com.au>, 16jun2000; + cf. emacs/src/sysdep.c. + +2001-01-08 <karl@gnu.org> + + * makeinfo/cmds.c: afivepaper, afourwide, afourlatex. + * doc/texinfo.txi: afivepaper + +2001-01-05 <karl@gnu.org> + + * doc/info.texi: typo from: Martin Buchholz <martin@xemacs.org>. + * doc/info.texi: typo fixes from meyering. + +2001-01-02 <karl@gnu.org> + + * makeinfo/makeinfo.c (remember_brace_1): don't assume command is + non-null, an (erroneous) input line like \hbox to7in{ passes in a + null. + + * makeinfo/toc.c: fix from jan + * makeinfo/html.c: fix from jan for top-level references. + +2000-12-22 <karl@gnu.org> + + * makeinfo/makeinfo.c: --help changes. + * doc/texinfo.txi: -o means the directory name for HTML output. + +2000-12-21 <karl@gnu.org> + + * doc/texinfo.txi: switch to fdl + + * makeinfo/html.c: doc fix. + * makeinfo/insertion.c: no space after _ I guess. + * makeinfo/cmds.c: no space after _ I guess. + + * makeinfo/html.c (nodename_to_filename_1): fix up external + * top-node references. + +2000-12-20 <karl@gnu.org> + +* HTML table patch from Jan: + 2000-12-19 Jan Nieuwenhuizen <janneke@gnu.org> + + * makeinfo/multi.c (multitable_item), + (cm_tab): close html table columns. Also, align cell contents to + top, which is probably the most sensible thing to do for text. + + +2000-12-19 <karl@gnu.org> + + * makeinfo/makeinfo.c (insert_toplevel_subdirectory): try + name.html if just name doesn't work. + + * doc/texinfo.txi: document html output in .html directory + sometimes. + + * util/Makefile.am (EXTRA_DIST): add install-info-html. + + * util/texindex.c: 2000 + * util/install-info.c: 2000 + * info/info.c: 2000 + * configure.in: 4.0a + + * lib/system.h: include limits.h + + * Applied HTML splitting changes from Jan: + 2000-11-10 Jan Nieuwenhuizen <janneke@gnu.org> + + * makeinfo: removed code for numbered split HTML output, removed + SPLIT_JCN conditional. + + 2000-11-09 Jan Nieuwenhuizen <janneke@gnu.org> + + * makeinfo/html.c: prepared nodifying filename functions for + linking not non-spit HTML documents, by adding ``#anchor'' to + external refernces. + + * doc/texinfo.txi (Installing HTML info): updated doco for --html + option, added node Installing HTML info. + + * util/install-info-html.in: new script. The bare minimum + required for generating HTML index. + + * lib/system.h: compilation fix. + + 2000-11-08 Jan Nieuwenhuizen <janneke@gnu.org> + + * makeinfo/makeinfo.c (convert_from_loaded_file): [SPLIT_JCN]: + overloaded already way too hairy function with logic to put split + html output into subdirectory with basename of toplevel output + file. + + * makeinfo/html.c (fix_filename): new function. + + 2000-11-07 Jan Nieuwenhuizen <janneke@gnu.org> + + * toc.c (toc_add_entry): + (contents_update_html): + (shortcontents_update_html): [SPLIT_JCN]: use hrefs for nodename based + html files. + + * node.c (cm_node): [SPLIT_JCN]: create html filename based on + nodename (instead of a numbered node<num>.html filename). + + * makeinfo/makeinfo.c (main): [SPLIT_JCN]: enable splitting of + html output. + + * makeinfo/html.c + (add_url_name,add_nodename_to_filename,nodename_to_filename): new + functions. + +2000-12-15 <karl@gnu.org> + + * configure.in (AC_CHECK_HEADERS): add limits.h explicitly. + +2000-11-10 <karl@gnu.org> + + * dir-example: update + * info/nodes.c: doc fixes, etc. + + * incorporated verbatim patch from janneke: + 2000-04-14 <janneke@gnu.org> + + * applied texinfo-3.12s.jcn4 patch + + 1999-09-02 <janneke@gnu.org> + + * makeinfo/cmds.c, + * makeinfo/insertion.c: @verbatiminclude file + * doc/texinfo.tex: @verbatiminclude file + * doc/texinfo.txi: @vebatiminclude file doco + * NEWS: added @verbatiminclude to Language section + + 1999-09-01 <janneke@gnu.org> + + * makeinfo/makeinfo.c: bf: @exdent (urg6.texi) -- Rolled into 4.0 + * NEWS: added verb* to Language section + * doc/texinfo.txi: @verb, @verbatim doco + * doc/texinfo.tex: tricky tex-fix for @verb{<char>..<char>} + * doc/texinfo.tex: real tab expansion for @verbatim mode + * doc/texinfo.tex: proper start of environment, no indentation + + 1999-08-31 <janneke@gnu.org> + + * makeinfo/cmds.c: + * makeinfo/insertion.{c,h}, + * makeinfo/makeinfo.{c,h}: redo of @verbatim, @verb{<char>..<char>} + * doc/texinfo.tex: fixed @verb{<char>..<char>} + + 1999-08-30 Jan Nieuwenhuizen <janneke@gnu.org> + + * makeinfo/cmds.c, + * makeinfo/insertion.{c,h}, + * makeinfo/makeinfo.{c,h}: added @verbatim (and preliminary @verb) + support + * doc/texinfo.tex: added @verbatim (and preliminary @verb) support + + 1999-08-24 Jan Nieuwenhuizen <janneke@gnu.org> + + * bf: empty node: makeinfo/node.c:cm_node () -- Rolled into 4.0 + + +2000-10-18 <karl@gnu.org> + + * doc/info.texi: eli update + +2000-09-22 <karl@gnu.org> + + * makeinfo/defun.c: warn if non-whitespace follows @defun'd name + (suggestion from Akim). + + Installed some patches: + + 2000-08-04 Paul Eggert <eggert@twinsun.com> + * makeinfo/multi.c (find_template_width): + Don't access before start of *PARAMS. + + 2000-08-21 Eli Zaretskii <eliz@is.elta.co.il> + * info/filesys.c (info_file_in_path): Reject FILENAME if it is + empty, or ".", or "..". + + 2000-08-23 Eli Zaretskii <eliz@is.elta.co.il> + * info/session.c (info_menu_or_ref_item): If the user have chosen + menu item or xref that's identical to defentry's label, use + defentry instead of looking for its label. Otherwise, select the + entry whose position is the closest to the window's point, in + case there's more than a single entry with that label. + +2000-09-12 <karl@gnu.org> + + * doc/texinfo.txi: it's 2000 now. + * doc/texinfo.txi: document the only real (and rare) reason for not using implicit pointer + creation. + +2000-09-06 <karl@gnu.org> + + * configure.in: test all termcap variables for existence. From + andy@rz.uni-karlsruhe.de. + + * configure.in (ALL_LINGUAS): include ja. + * lib/system.h [HAVE_IO_H]: make #include <io.h> conditional for + BeOS. Reported by Dan Moore, dan@moore.cx. + * configure.in (AC_CHECK_HEADERS): add io.h. + +2000-06-05 <karl@gnu.org> + + * doc/texinfo.txi: forgot to escape {}. + +2000-05-30 <karl@gnu.org> + + * info/filesys.c (is_dir_name): check all info suffixes as well as + the compression suffixes. Fixes segmentation fault on a dir.info + file ending after the * Menu. + +2000-05-28 <karl@gnu.org> + + * doc/texinfo.txi: Forgot {arg} in @rmacro example. From Olaf B. + +2000-05-27 <karl@gnu.org> + + * doc/txi-cs.tex: update from: Stepan Kasal <kasal@suse.cz>. + + * doc/Makefile.am (install-data-local): reformat warning per + François to hopefully make it more noticeable. + + 2000-02-08 Eli Zaretskii <eliz@is.elta.co.il> + * info/session.c (incremental_search): Don't retain RET when + exiting isearch. Suggested by Hrvoje Niksic <hniksic@iskon.hr>. + +2000-05-22 <karl@gnu.org> + + * doc/texinfo.txi: pageparams -> pagesizes + +2000-05-18 <karl@gnu.org> + + * makeinfo/lang.c (cm_accent_tilde): need N in list. + From: kama@hippo.fido.de (Karl Heinz Marbaise) + + * makeinfo/files.c (find_and_load): read only the number of bytes + available in the buffer. Also, remove one-byte-at-a-time reading + in the WIN32 case. + From: "J. David Bryan" <dbryan@bcpl.net> + + * info/man.c: use eli's patch after all, we re-increment j at the + top of the loop. + +2000-05-16 <karl@gnu.org> + + * info/man.c (clean_manpage): don't write before the beginning of + newpage. + (based on patch from Eli). + +2000-02-03 <karl@gnu.org> + + * doc/texinfo.txi: remove spurious space. from kaja. + +1999-10-12 Karl Berry <karl@gnu.org> + + * doc/Makefile.am (install-tex): install all txi-?? files. + +1999-10-01 W. L. Estes <will@fumblers.org> + + * makeinfo/cmds.c: dont treat @center as separate paragraph, + use div element to output center + +1999-09-29 Eli Zaretskii <eliz@is.elta.co.il> + + * djgpp/README: Say `dir-example', not DIR. + + * lib/system.h (DEFAULT_INFOPATH) [__DJGPP__]: Define. + +1999-09-28 Karl Berry <karl@gnu.org> * configure.in, util/texi2dvi: version 4.0. + * doc/texinfo.txi: New isbn. 1999-09-24 Karl Berry <karl@gnu.org> @@ -6634,3 +7960,2531 @@ Sun Jun 26 18:46:16 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) * util/texindex.c (sort_in_core, sort_offline, parsefile): Give up on input file if any line doesn't start with backslash. + +/* changelog for texinfo.tex before 19jun01. */ + +2001-05-24 <karl@gnu.org> + + * texinfo.tex (\smallbreak, \medbreak, \bigbreak): add check for + \ifnum\lastpenalty to plain tex definitions, so that we won't + insert space right after a section title. + (\aboveenvbreak): similar check of \lastpenalty. + +2001-05-21 <karl@gnu.org> + + * texinfo.tex (\pdfurl): \let\value=\expandablevalue, so at least + some cases can be properly handled. + +2001-03-28 <karl@gnu.org> + + * texinfo.tex: Copyright. + + * texinfo.tex (\pdfmkdest): remove trailing @ in target names; + suggestion from: Reiner Schlotte <R.Schlotte@science-computing.de>. + (\imagexxx): call \normalturnoffactive so _ (among others) will be + allowed in filenames; report from arnold@skeeve.com. + +2001-02-02 <karl@gnu.org> + + * texinfo.tex (\secondary): handle pdf case. + (\dosubind): secondary index entry not written as separate arg for + texindex. + From: Trevin Beattie <trevin@eyring.com> + Date: Tue, 21 Mar 2000 13:04:06 -0700 + +2001-01-12 <karl@gnu.org> + + * texinfo.tex (\dopdfimage): different syntax for filename + inclusion (foo vs {foo}). From: <Kurt.Hornik@ci.tuwien.ac.at>, + 22dec99. + +2001-01-08 <karl@gnu.org> + + * texinfo.tex (\afivepaper): new command from Jose Romildo + Malaquias <romildo@urano.iceb.ufop.br>. + +2000-12-12 <karl@gnu.org> + + * texinfo.tex: oops, had outside page reversed. + +2000-12-11 <karl@gnu.org> + + * texinfo.tex (\inmargin): allow lefttext and righttext as args. + +2000-11-10 <karl@gnu.org> + + * texinfo.tex: implementation of new commands @verbatim, @verb, + and @verbatiminclude from janneke@gnu.org. + +2000-11-09 <karl@gnu.org> + + * texinfo.tex (\inmargin): rewrite to allow for placing the + material either in the right or left margin. + +2000-10-27 <karl@gnu.org> + + * texinfo.tex (\dosynindex): new macro subroutine, do not + \closeout twice the index being redirected. + (\synindex, \syncodeindex): call it. + +2000-10-18 <karl@gnu.org> + + * texinfo.tex (\inmargin): rewrite to allow argument to be vmode + material, such as a box from an image. + +2000-09-06 <karl@gnu.org> + + * texinfo.tex (\doublecolumnout): must subtract \ht\partialpage + here, not in \begindoublecolumns. Otherwise the \partialpage on + the first page of double columns affects every subsequent page, + e.g., if @setchapternewpage off. Reported by Aharon Robbins + <arnold@skeeve.com> for standards.texi. + +2000-05-28 <karl@gnu.org> + + * texinfo.tex (\linkcolor): replace Cyan with Blue. + (\output): do \pdfmkdest at top. + (\pdfmakeoutlines): set \_ to \normalunderscore. + From: Trevin Beattie <trevin@eyring.com>. + +2000-05-27 <karl@gnu.org> + + * texinfo.tex (\today): only define if undefined. + From: Stepan Kasal <kasal@suse.cz>. + +2000-05-16 <karl@gnu.org> + + * texinfo.tex (\deftypeivarheader): need defheaderxcond. From: + Marcel van der Boom <marcel@hsdev.com>. + +1999-10-01 Karl Berry <karl@gnu.org> + + * texinfo.tex (\afourwide): had hsize and vsize reversed. + From: Pascal Obry <pascal_obry@csi.com> + +1999-09-25 Karl Berry <karl@gnu.org> + + * texinfo.tex (\alias): fix from Andreas. + +1999-09-19 Karl Berry <karl@gnu.org> + + * texinfo.tex (\key): rename the \smallrm and \smallsy here. + + * texinfo.tex (\indexfonts): rename to \smallfonts, along with + \indrm, etc. + Define all the fonts, too. + (\footnotezzz): use \smallfonts. + + * texinfo.tex (\needx): get better leading; do nothing if @need + value is less than one linespace. From Arnold. + (\douref, \xrefX, \doemail [pdf]): make spaces normal again, so our + \ignorespaces commands are effective even in an @display. + + * texinfo.tex (\finishtitlepage): remove FINISH TITLE debugging + message. + + * texinfo.tex (\anchor): rewrite to always \ignorespaces. + Bug from esken. + + * texinfo.tex (\indexnofonts): dummy up \acronym. + From: Thomas Esken <esken@nmlab.informatik.fh-dortmund.de> + +1999-09-06 Karl Berry <karl@gnu.org> + + * texinfo.tex (\texinfoversion): update. + + * texinfo.tex: Avoid multiparagraph cells losing linespace between + paragraphs. From: Andreas Schwab <schwab@suse.de>. + Bug from: Lalo Martins <lalo@webcom.com>. + +1999-08-19 Karl Berry <karl@gnu.org> + + * texinfo.tex (\shortchaplabel): move computation of width of + "Appendix" inside, in case it's been changed by a language. + +Mon Aug 9 16:31:55 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex: pdf updates from Han. + +Fri Aug 6 13:48:22 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\charcode): remove unused counter. + From: Akira KAKUTO <kakuto@fsci.fuk.kindai.ac.jp>. + +Thu Jul 22 19:08:19 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex: Update from Han. + +Tue Jul 20 17:13:16 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex: More pdf improvements from Han. + +Mon Jul 19 16:33:31 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex: Better pdf support from: Han The Thanh + <thanh@informatics.muni.cz>. + +Sun Jul 18 14:21:03 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex: pdfimage takes braces. + +Tue Jul 6 19:40:14 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\deftypeop): New command. + +Mon Jul 5 17:17:33 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\contents): call \pdfmakeoutlines here instead of + inline (!). + (\pdfmakeoutlines): call \indexnofonts instead of making a separate + attempt at it. + +Tue May 25 06:16:06 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (time-stamp-format): use %02H. + + * texinfo.tex: Had PDF and DVI transposed. + +Sun Apr 25 15:30:00 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\appendixletter): restore \the, necessary for .toc. + +Thu Apr 22 19:22:12 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\emergencystretch): Increase to .15\hsize. + +Tue Apr 20 05:11:04 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\defunargs): use \tensl\hyphenchar\font to work + better with Gildea's PostScript version. + + * texinfo.tex (\tab): Change back to just &. + From: Nathan Sidwell <nathan@acm.org>. + + * texinfo.tex: No \fi. + +Mon Apr 19 17:38:54 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\pdflink) [!\ifpdf]: define to ignore arg. + + * texinfo.tex: Add pdf support. Merge from: Kurt Hornik + <Kurt.Hornik@ci.tuwien.ac.at>. + +Wed Mar 31 13:24:16 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\defopheader): missing word space before `on'. + Report from: Chris Hanson <cph@martigny.ai.mit.edu>. + +Fri Mar 26 17:00:41 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\imagexxx): Equalize space above and below if in + vmode. From rms. + +Thu Mar 25 20:00:00 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\deftypeivar): new command. + +Tue Mar 23 17:53:37 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (&): be sure active & is defined for @deftypefn + operator&. + Report from: Nathan Sidwell <nathan@acm.org>. + +Sat Mar 20 12:31:53 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\exampleindent): new command. From Yoshiki. + + * texinfo.tex: Changes from Andreas to use \sl\$ inside italics + and to avoid extra spaces around @anchor. + + * texinfo.tex (\image, \imagexx): move pdf test to imagexxx for + correct filename parsing. + +Mon Mar 15 16:51:20 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\imagexxx): reset catcode ^^M in case we're inside + in an example. Report from kama. + + * texinfo.tex (\putwordin): new macro for word `in'. + (\xrefX): use it. + Report from: "Alexey A. Nikiforov" <A.A.Nikiforov@inp.nsk.su> + +Sun Feb 21 16:47:28 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex: Expand tabs. + +Sun Feb 14 16:02:29 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\paragraphindent): implement. + Suggestion from: Paul DuBois <dubois@primate.wisc.edu>. + +Tue Feb 9 07:25:07 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\alias): use def rather than \let. + Change timestamp format to include hours. + + * texinfo.tex: New commands @alias and @definfoenclose. + From: "Eric S. Raymond" <esr@snark.thyrsus.com>. + +Mon Feb 8 14:46:56 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\scanmacro): Use \endinput to avoid spurious space, + and various other space fixes. From: Andreas Schwab + <schwab@ls5.informatik.uni-dortmund.de>. + +Thu Feb 4 15:24:40 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\uref): implement optional third arg. + + * texinfo.tex (\dosubind): Include index entry in third arg to + \entry instead of writing as bogus fourth arg. + Report from: kama@hippo.fido.de (Karl Heinz Marbaise). + + * texinfo.tex (\setemergencystretch): Increase somewhat. + + * texinfo.tex (\putwordof): rename from \putwordOf. + * texinfo.tex (defivarhead, \defcvarheader): Use \putwordof. + +Tue Feb 2 16:57:00 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\documentlanguage, \documentencoding): new + commands. \documentlanguage based on an implementation by kama. + +Sat Jan 30 17:23:45 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\putwordMMai): Should be MMay. From Trond. + +Fri Jan 29 17:52:16 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex: Fix @macro expansion inside @section. Patch from + Andreas: + + From: Andreas Schwab <schwab@ls5.informatik.uni-dortmund.de> + + The general idea is to construct a list a all defined macros in + the form \do\macro1\do\macro2..., then temporarily define + \do to something appropriate and execute the list to do + whatever is needed. Here is a patch, and i have also + fixed a few other bugs that i found while browsing through + the @macro implementation. Additionally i have added a + check to prevent the user from doing silly things like + @macro shipout. + +Sun Jan 24 09:59:42 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\obstexwarn): Don't use *** in message, it + interferes with make output parsing. + +Thu Jan 21 15:45:20 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex: Internationalization improvements from kama. + +Wed Jan 20 17:12:52 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\contents, \shortcontents): Run \contentspagealignmacro. + From: Trond Endrestol <trond@agamemnon.gtf.ol.no> + +Thu Jan 14 16:53:43 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\begindoublecolumns): Ship out \partialpage + immediately if it is nonvoid, instead of saving it. This avoids a + bug where the index could end up printing one line per page (see + the indexspread.tex test). + From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * texinfo.tex (\image): If running pdftex, do \pdfimage{imagefile.pdf}. + From: Samuel Tardieu <sam@inf.enst.fr> + + Also, update copyright year. + +Tue Jan 5 17:50:45 1999 Karl Berry <karl@gnu.org> + + * texinfo.tex (\enddoublecolumns): Move \pagegoal reset to after + the \endgroup so we get the restored single-column \vsize + as intended. + +Sun Dec 20 17:57:22 1998 Karl Berry <karl@gnu.org> + + * texinfo.tex (\indexdummies): Set \{ and \} to \mylbrace and + \mybrace to avoid braces in the index file, which + texindex can't handle. + +Sat Dec 19 18:13:16 1998 Karl Berry <karl@gnu.org> + + * texinfo.tex (\pickupwholefraction): Ignore whole-number part. + (\setuptable): Always pass whole-number part and decimal point. This + allows leading zeroes. + Suggestion from: Ben Bullock <ben@hayamasa.demon.co.uk>. + Date: Fri, 21 Aug 1998 14:06:50 +0100 (BST) + +Tue Dec 15 16:38:07 1998 Karl Berry <karl@gnu.org> + + * texinfo.tex (\indexdummies): set \{ and \} to \lbracecmd and + \rbracecmd to avoid lossage if @tex is active during \shipout. + Report from: "Peter Kabal" <Kabal@ece.mcgill.ca>. + +Sun Dec 6 17:11:17 1998 Karl Berry <karl@gnu.org> + + * texinfo.tex: Doc fix. + +1998-11-11 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * doc/texinfo.tex (\onepageout): Put the cropmarks in vboxes of + zero height so that they don't contribute space themselves. + Compensate for \topandbottommargin. + (\internalpagesizes): Advance \outervsize by 2\topandbottommargin, + not only 0.6in. + +Fri Nov 6 17:27:57 1998 Karl Berry <karl@gnu.org> + + * texinfo.tex: Use standard time-stamp.el package instead of + update-date.el. + +Sat Oct 31 19:23:02 1998 Karl Berry <karl@gnu.org> + + * texinfo.tex (\indexnofonts,\indexdummies): add \url and \uref to + list. + +Fri Oct 30 08:16:23 1998 Karl Berry <karl@gnu.org> + + * texinfo.tex (\expandablevalue): Delete spurious `v' character. + +Tue Oct 27 11:18:40 1998 Karl Berry <karl@gnu.org> + + * texinfo.tex (@env, @command, @option): Must disable for index + and xref commands. Also, \input plain if necessary before + using {} in the version number. + +Wed Sep 30 11:40:36 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: Use date as version number instead of RCS, and + update-date to update it. + +Thu Sep 17 13:22:44 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: Fix @macro expansion of @code with _ in the + argument. + From: Zack Weinberg <zack@rabi.columbia.edu>. + +Fri Aug 28 10:30:29 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\itemzzz): take \itemmargin into account when + unhboxing. Reported by Bob. + +Fri Aug 14 16:56:58 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: Change @defun environments so that right margin is + not changed, and instead the defun type label is outdented + into the margin. + +Thu Aug 13 13:31:41 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\smartslanted): define this separately from + \smartitalic. + (\emph, \i): use \smartitalic for true italics. + +Mon Aug 10 11:51:13 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\value): handle active _ or - in argument (happens + if called from @code). + Report from: Dave Love <d.love@dl.ac.uk>. + +Sun Jul 19 09:49:23 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\dosubind): Don't do \vskip to preserve \lastskip + unless we are in vertical mode. Otherwise we might end a + paragraph prematurely, and \folio won't get expanded by + \output. + Report from: "Richard E. Stone" <res@rstone.mn.org> + +Thu Jul 16 15:33:37 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: Keep track of how negative the page numbers have + gotten: + (\lastnegativepageno): New \count register. + (\startcontents): Use it. + (\contents, \summarycontents): set it. + +Mon Jul 13 16:58:11 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\imagexxx): Add some space around the image if it's + by itself. + +1998-07-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * texinfo.tex (chapterzzz): Put a space before the chapter number + in the message. + (appendixzzz): Use \putwordAppendix in the message. + +Thu Jul 9 08:39:53 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\macro): Globalize assignments since it's done + inside a group. From Zack. + +Mon Jul 6 17:21:25 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\comment): Speed up. + (\loggingall): Turn on eTeX's extended tracing. + More macro fixes. + Date: Sat, 04 Jul 1998 14:51:49 -0400 + From: Zack Weinberg <zack@rabi.phys.columbia.edu> + +Thu Jul 2 10:20:32 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\contents, \summarycontents, \startcontents): Use + roman numerals for toc, arabic outside, even when toc is + at the beginning. + +Mon Jun 29 10:05:28 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\anchor): New command @anchor. + (\xrefX): Avoid double space when xref to an @anchor or an @unnumbered. + + * texinfo.tex (\itemzzz): Use kerns and \unhbox when item text + fits in the space, so footnotes can work. + + * texinfo.tex (\setref): Take additional argument for the -snt + xref. Call \indexdummies. + (\donoderef, \appendixnoderef, \unnumbnoderef): Change \setref calls. + +Sat Jun 27 19:16:34 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\contents, \summarycontents): Must not be \outer. + +Fri Jun 26 16:15:14 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\writetocentry): New macro. + (\chapternofonts): No longer needed. + (\chapter, ..., \unnumberedsubsubsec): Change all the sectioning + commands to call \writetocentry instead of doing it inline. + Also, do not call \chapternofonts, we avoid expansion with + \the\toks instead. + (\opencontents): No longer needed, instead \writetocentry opens + the file when necessary. + (\setfilename): Don't call \opencontents. + (\ifsetcontentsaftertitlepage, \ifsetshortcontentsaftertitlepage): + New conditionals. + (\Etitlepage): Call \contents and/or \shortcontents if + conditionals are set. + + Global: use \nobreak instead of \penalty 10000 for epsilon efficiency. + +Thu Jun 25 08:29:32 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\option,\env,\command): New markup commands. + Suggested by arnold@gnu.org. + + * texinfo.tex (\afourpaper): More reasonable margins. + From: Wilhelm Mueller <muewi@hb.senbvs43.uni-bremen.de> + Date: Thu, 25 Jun 1998 10:48:13 +0200 (MET DST) + +Wed Jun 24 17:46:43 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\acronym): New Texinfo command. + +Tue Jun 23 17:36:39 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\dots, \enddots): Missing \leavevmode. + Report from: Thomas Esken <esken@nmlab.informatik.fh-dortmund.de> + Date: Tue, 23 Jun 1998 14:22:27 +0200 (MET DST) + +Mon Jun 22 16:00:53 1998 Karl Berry <karl@north> + + * texinfo.tex: Rewrite of index stuff to do better column breaking + and balancing. + The old code failed miserably when the index was just the wrong size, + e.g., the Autoconf manual with @afourpaper. + Bug report from: Wilhelm Mueller <muewi@hb.senbvs43.uni-bremen.de> + Date: Fri, 12 Jun 1998 16:34:49 +0200 (MET DST) + (\initial): Add more glue around the initial, and make it a + multiple of \baselineskip. + (\entry): Add glue before each entry so the columns can always be the + same height. + (\doublecolumnout): Available space no longer needs to handle + \partialpage specially. + (\pagesofar): Take \ht\partialpage into account with \vsize. + (\enddoublecolumns): Reset \output to avoid calling + \balancecolumns twice + (\balancecolumns): Format for readability. + (\initialskipamount): No longer needed, remove. + + (\hbadness): Increase a bit, boxes that are a little underfull look ok. + +Sun Jun 21 16:48:38 1998 Karl Berry <karl@north> + + * texinfo.tex (\ninettsl): cmsltt10 is not standard, so use + cmsltt10 scaled 900. + Date: Mon, 15 Jun 1998 12:35:41 +0200 (MET DST) + From: Werner Struckmann <struck@ips.cs.tu-bs.de>. + +Thu Jun 18 08:32:15 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: @macro fixes from Zack Weinberg + <zack@rabi.phys.columbia.edu>. + - @ifblah did not work inside @macro + - spaces in parameter lists in macro definitions caused errors + - leading spaces in parameter lists in macro invocations were + preserved inappropriately. + +Wed Jun 10 16:50:53 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\smallformatx, \smalldisplayx): New macros. + (\smallbook): Arrange to use them. + (\display, \flushleft, etc.): Rewrite to avoid duplication. + +Sun Jun 7 18:13:45 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\pagesizes): Rename to \internalpagesizes. + (\custompaper): Rename to \pagesizes. + +Sat Jun 6 13:16:32 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: Rewrite paper size definitions, add @custompaper. + + * texinfo.tex: Fix for macros in arguments to other commands. + From Zack. + +Thu Jun 4 11:21:07 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: Better @macro implementation. + From: Zack Weinberg <zack@rabi.phys.columbia.edu>. + +Tue May 26 17:43:21 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\imagexxx): Center image if it is not part of a + paragraph. + +Tue May 19 17:17:12 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: \linkstrue by default. + Also, first implementation of @macro; can only handle some cases, + but that is better than nothing. + From: Zack Weinberg <zack@rabi.phys.columbia.edu> + +Thu May 14 17:32:47 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: New command @novalidate along the lines of makeinfo + --no-validate. + Date: Sun, 26 Oct 1997 18:54:47 -0500 + From: Zack Weinberg <zack@rabi.phys.columbia.edu> + +Tue May 12 16:19:35 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\valuexxx): Split up into expandable and + non-expandable parts. + (\expandablevalue): New macro. + (\indexdummies): \let\value = \expandable value. + + * texinfo.tex: Doc fixes. + + * texinfo.tex (\doind): Just call \dosubind with empty third arg. + (\dosubind): Replace with \doind definition and suitable code to handle + possible third arg. And propagate glue past the whatsit from the + \write so index entries don't cause extra space between + @defuns (for example). + +Wed May 6 12:51:27 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\deftypemethparsebody): Handle the extra arg in + @deftypemethodx, too. + (\deftypefunx): Error definition was misspelled as \deftypeunx. + +Fri May 1 17:31:58 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo/texinfo.tex (\putwordon, \putwordMethodon): New macros. + Use in \def... commands. + (\indexdummies): make `\ ' be just ` ' for sorting. + (\deftypemethparsebody): New macro. + (\defmethod): Call it. + Various doc fixes. + Repored by: KHMarbaise@p69.ks.fido.de (Karl Heinz Marbaise) + Date: Wed, 07 Jan 1998 10:19:42 +0100 + +Fri Apr 10 16:54:48 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: @cartouche: Align right side correctly. + From: dale.smith@bellhow.com (Dale Smith) + Date: Fri, 06 Mar 1998 14:47:02 GMT + +Sun Apr 5 17:19:03 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\dosetq): Use \normalturnoffactive instead of just + \turnoffactive, so \'s in node names are handled properly. + (\tie): Move definition to more rational position in the file. + (\@, \{, etc.): Use decimal numbers in all cases, to avoid use of '. + Paranoia only. + (\+): Turn off once and for all at the beginning, and define as + \tabalign in @tex. + +Tue Mar 31 19:33:31 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\synindex, \syncodeindex): \closeout the redirected + index. + From: Jakob Stoklund Olesen <stoklund@mi.aau.dk> + + * texinfo.tex (\doignore): Ignore everything after `c', so @end + ifinfo and the like can be commented out. + (\macrocsname): New macro. + Reported by: "James A. Lupo" <lupoja@feynman.ml.wpafb.af.mil> + +Wed Feb 25 15:48:51 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\doprintindex): Change catcode of @ before \read, + in case of \initial{@} being the line that is read. + Reported by: Drew Csillag <drew_csillag@geocities.com> + + * texinfo.tex (\dotable): Add \leftskip to \hsize in the first column. + Don't inherit \rightskip from surrounding environment. + Set \item to \crcr to avoid empty first row. + Prepend \parskip glue before table. + Set \everycr locally outside of alignment, don't reset it + explicitly in \Emultitable. + All from Andreas Schwab, to avoid overfull hboxes. + + Also, work on leading commentary in file a bit. + +Tue Feb 24 17:48:29 1998 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: \!: Save and restore this for @tex. + From: Jean-Pierre Moreau <jpmoreau@ciframedical.com> + Date: Fri, 22 Aug 1997 16:47:36 -0400 + + * texinfo.tex (\angleleft, \angleright): New macros. + (\refx, \email, \key): Use them. + From: Stephen Gildea <gildea@intouchsys.com> + Date: Fri, 26 Dec 1997 11:43:32 EST + +Mon Feb 23 17:34:23 1998 Karl Berry <karl@cs.umb.edu> + + 1997-08-28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + * doc/texinfo.tex (xrdef): Read the second argument with \ + as an escape character. + +1998-01-22 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * texinfo.tex (\tocentry): Don't \turnoffactive before typesetting + the arguments, it causes special characters to be printed + incorrectly. + +Mon Jan 19 10:58:25 1998 Karl Berry <karl@cs.umb.edu> + + * texi2html: Correct version number, home page reference. + +Sat Jan 17 15:12:03 1998 Karl Berry <karl@cs.umb.edu> + + * texi2html: Version 1.54. Handle @image better, etc. + * From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>. + +Wed Dec 24 13:59:07 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\dots, \enddots): Use current font instead of + always using math italic. From Stephen Gildea. + +Tue Dec 23 11:33:07 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: Spurious xepsf.tex should be epsf.tex. + +Mon Oct 13 15:49:28 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\titlefont): Explicitly set \rm. + +Sat Jul 26 15:12:37 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\email): Let to \uref instead of \code, as a second + optional argument makes sense for this, too. + +Mon Jul 14 13:43:43 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\indexdummies): Add \value. + +Thu Jul 10 13:34:30 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\authorrm): Must use \def instead of \let, as + \secrm is not yet defined. + +1997-07-09 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * texinfo.tex (\titlefont): Define again, using \titlefonts. + +Wed Jul 9 16:45:30 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\startcontents): Leave ^ catcode as other. + +Sat Jul 5 17:16:40 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\titlefonts): New macro to set title font styles, + so italic etc. work in @title. + (\titlefont): No longer needed. + (\titlepage): Call \titlefonts instead of \titlefont. + (\chapsf, \ssecsy, \ssecttsl): Correct magstep values. + From: Stephen Gildea <gildea@intouchsys.com>. + + * texinfo.tex (\onepageout): Back up to 2\baselineskip per Stephen. + (\kbdinputstyle): New command. + +1997-04-03 00:07:28 1997 Richard Stallman <rms@gnu.ai.mit.edu> + + * texinfo.tex (\kbdfont, \kbdexamplefont): New macros, parms that + tell @@kbd what to do. + (\setkbdinputdistinct, \setkbdinputexample): New commands set them. + (\kbd): Use those parms. + +Thu Jul 3 16:52:39 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\onepageout): Leave only one line space above the + footline, to be more like plain. Suggested by Stephen Gildea. + (\evenfootline): Left one too many line spaces here, so reduce by two. + + (\ifnottex): Another ignore command. + (\ifnothtml,\ifnotinfo): New commands. + (\doignore): Ignore brace characters, so mismatched braces in ignored + text do not cause complaints. + +Fri Jun 27 15:09:16 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\image): New definition for new @image command. + +Wed Jun 18 15:58:20 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\oddfootingxxx), + (\onepageout): Leave space for the footline if present. + (\everyfootingxxx, \everyheadingxxx): Call \oddfootingxxx and + \evenfootingxxx instead of repeating their code. From: Stephen + Gildea <gildea@intouchsys.com>. + + (\setfilename): Read texinfo.cnf if present. + + (\indexdummies, \indexnofonts): No-op additional commands @result @equiv + @expansion @print @error @point. From: Dave Bodenstab + <imdave@ais.net> (for texi2www doc). + +Fri Jun 6 10:31:34 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\setmultitablespacing): Restore bad typing mistake + from yesterday. + +Thu Jun 5 18:04:26 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\uref): Write real definition, taking one mandatory + argument and one optional one. + +Wed Jun 4 17:16:09 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\mainmagstep): Define this as a \count variable + instead of with \let, to make changing to \magstep1 more transparent. + From: HERBERT@boevm4.vnet.ibm.com. + (\uref): New command a la \url. + +Sat May 24 18:06:41 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\deftypemethod, \deftypemethodheader): New macros + to implement new commands @deftypemethod and @deftypemethodx. + Suggestion from: KHMarbaise@p69.ks.fido.de (Karl Heinz Marbaise). + +Wed May 21 17:17:52 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\opnr, \clnr): Increment/decrement \parencount, for + @defun lines with nested parens. From Bill Schelter + <wfs@fireant.ma.utexas.edu>. + (\itemizeitem): Correct \errmessage. + +Mon May 19 17:34:40 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\codeunder): Use \_ and \ifusingtt to avoid + dotaccent from _ in roman fonts, e.g., @deftypefn. + (\tex): Remove spurious spaces at the end of subdefinitions. + From: "John W. Eaton" <jwe@bevo.che.wisc.edu>. + (\url, \email): \let to \code; no quotes or angle brackets. + +Mon May 5 17:06:35 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\onepageout): \ifcropmarks, center the page body. + Lost this when merged \croppageout with \onepageout. Found by + Arnold. + + (\doprintindex): Do not bother to go into double column mode unless + there actually is a non-empty index. + + (\begindoublecolumns): Include any existing \partialpage in the new one, + lest we lose a whole page of output. Found by M J Morley + <mjm@scs.leeds.ac.uk>. + + (\chapternofonts): Remove spurious spaces, both in the definitions that + get output to the aux file(s) and in this macro. + + Fix comments and rationalize whitespace in various other places. + +Sun Apr 27 15:41:16 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\chapter, etc.): Avoid expansion of section title + when writing the toc. + +Thu Apr 24 16:35:46 1997 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\onepageout): Integrate cropmarks case here, + instead of having a completely different routine. + (\croppageout): Remove this. + +Sun Jun 9 14:26:42 1996 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\ignoremorecommands): Ignore \defcodeindex, and do + not ignore \message. + +Thu Apr 11 12:59:42 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\macro): New macro. + (\enddots, \endldots): New macros. + (\centerchap, \centerchapyyy): New macros. + (\centerchfplain, \centerchfopen): New macros. + (\CHAPFplain, \CHAPFopen): Set \centerchapmacro. + +Wed Mar 13 11:42:17 1996 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\url): New macro, like \samp for now. + +Sun Mar 10 13:05:08 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex: Changes in @multitable code. + Change meaning of @multitablelinespace. + +Tue Mar 5 18:56:08 1996 Dave Love <d.love@dl.ac.uk> + + * texinfo.tex (\set): Set catcode of space explicitly (inside a + group) to avoid losing inside @example, say. + +Sun Mar 3 17:01:27 1996 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\itemxpar): Protect the \vskip here with \nobreak, + to avoid a possible page break at an @itemx. + +Sun Feb 25 14:53:15 1996 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\obstexwarn): Use \global to avoid ever getting the + warning twice. + + * texinfo.tex (\include): Allow underscores and other such + characters we made active in the file name argument. + +Tue Feb 6 15:06:27 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\afourlatex): Delete the old duplicate definition + of \afourlatex. + +Sun Feb 4 15:20:16 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\tab): New definition. + (\setuptable): Fix previous change. + (\multitablecolspace): Renamed from \multitablecolmargin. + (\multitablelinespace): Renamed from \multitablelineskip. + +Fri Feb 2 02:20:16 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\multitableparskip): Renamed from \intableparskip. + Allocate with \newskip. + (\multitableparindent): Renamed from \intableparindent. Use \newskip. + (\multitablelineskip): Renamed from \spacebetweenlines. Use \newskip. + (\multitablecolmargin): Renamed from \spacebetweencols. + (\columnfractions): Renamed from \percentofhsize. + (xcolumnfractions): Renamed from \xpercentofhsize. + + * texinfo.tex (\setuptable): Handle >1 digits after @percentofsize. + (\pickupwholepercent): New macro. + +Sun Jan 28 21:14:46 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\key, \kbdfoo): Use \ttsl unconditionally. + (\setkeyfont): Definition deleted. + +Tue Jan 23 14:57:23 1996 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex: @kbd within @example selects slanted tty font: + (\ttsl, \ttslshape): Define this new font shape. + (\kbdfoo): Set the font to \ttsl if already using \tt. + (\setkeyfont, \ifmonospace): New macros. + +Wed Jan 17 23:57:48 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\changepagesizes): Additional arg for topskip. + (\afourlatex): Total rewrite. + (\afourwide): Pass new arg to \changepagesizes. + +Wed Jan 3 17:15:00 1996 Stephen Gildea <gildea@x.org> + + * texinfo.tex (\slbshape, \itbshape): Use bold slant and and + bold italic in titles to match the bold roman. Do not use + bold sf or bold tt, which would be too heavy. + + * texinfo.tex (\setfont): Pass font name in more pieces. + (\*shape): New macros defining symbolic names for all font + shapes so can use other font families with different naming + conventions. + +Wed Jan 3 15:52:18 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\ignoremorecommands): Turn off @everyheading and + friends, @headings, @setchapternewpage, @setchapterstyle. + +Sat Dec 30 17:20:48 1995 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\inmargin): Don't allow a break before the vertical + kern. Do allow a whole paragraph of marginal text, not just one line. + Use \inmarginspacing. + +Thu Dec 28 23:22:08 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\inmargin): New command @inmargin. + (\dircategory): Ignore @dircategory. + +Tue Dec 12 17:25:36 1995 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\lvvmode): Remove this; use \leavevmode as usual, + so spaces/underscores at beginnings of lines inside @example work. + Bogus index entries should be (and now are, I think) handled in + other ways. + +Mon Nov 13 16:07:09 1995 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\xrefX): Test for xref-automatic-section-title + being @set correctly, and remove spurious redefinition of + \printednodename in that case. + +Mon Oct 16 15:16:34 1995 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\unsepspaces): New macro to make active space + expand into a normal space char in index entries. + (\indexdummies): Use \unsepspaces. + +Thu Oct 12 14:56:52 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\tie): Use \lvvmode, not \leavevmode. + Don't use \@M directly either. + +Sun Aug 27 21:17:09 1995 Paul Eggert <eggert@twinsun.com> + + * texinfo.tex (\appendixsection): Fix misspelled defn. + +Mon Jul 31 23:57:57 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\ttfont): Don't call \nohyphenation. + +Sun Jul 30 18:30:47 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\tocentry): Use \turnoffactive. + +Sun Feb 5 05:34:13 1995 Richard Stallman <rms@pogo.gnu.ai.mit.edu> + + * texinfo.tex (\boldbraxnoamp): New function. + (\deftypefunargs): Use that, not \boldbrax. + +Tue Jan 31 12:15:28 1995 Karl Berry <karl@cs.umb.edu> + + * texinfo.tex (\set): Use \gdef, not \xdef. + +Sat Jan 21 16:39:36 1995 Richard Stallman <rms@pogo.gnu.ai.mit.edu> + + * texinfo.tex: Initially make _ and + \active, + then later make them \other. + (\otherifyactive): New command. + +Thu Jan 19 21:59:22 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\afourwide): New command. + +Mon Jan 16 09:29:38 1995 Stephen Gildea <gildea@x.org> + + * texinfo.tex: Initially make + and _ "other" characters. + (\fixbackslash, \everyjob): Make + and _ active characters. + +Tue Jan 10 19:16:09 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex: At beginning, \input plain if necessary. + (\deftypefunargs): Use \boldbrax, not \functionparens. + +Sun Dec 18 16:40:11 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\indsc): Use csc10 (at 9pt), not indrm. + +Mon Oct 31 00:51:20 1994 Richard Stallman <rms@pogo.gnu.ai.mit.edu> + + * texinfo.tex (\changepapersizes): Fix definition syntax. + (\fontprefix): Define only if not yet defined. + + * texinfo.tex (\margin): Define a new insert. + (\SETmarginindex): Initialize to \relax. + (\doindex): Optionally put the entry in the margin. + (\pagecontents): Print the index entries put in the margin. + +Sat Oct 29 19:50:10 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\auxhat): New macro. + (\dosetq): Use \auxhat. + (reading the aux file): Give ^ catcode 7. + +Wed Oct 26 03:28:04 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\setfont): New macro. Use it for specifying + most of the fonts that are normally cm fonts. + (\fontprefix): New macro, normally `cm'. + +Mon Oct 24 01:27:09 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\startcontents): Set catcode of ^. + +Thu Oct 13 02:19:43 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\ifhtml, \html, \enddots, \?, \!): New commands. + +Fri Sep 16 16:30:52 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\defheaderxcond): New macro. + (\deftypefnheaderx): Use defheaderxcond when calling defname. + (\deftypefunheaderx, \deftypevarheader, \deftypevrheader): Likewise. + +Fri Aug 26 03:08:08 1994 Amy Hendickson <amyh@ai.mit.edu> + + * texinfo.tex (\multitable): New command. + +Mon Aug 1 14:28:57 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * texinfo.tex (\changepagesizes, \afourlatex): New macros. + +Tue Jul 12 11:45:58 1994 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\quotation): Set \parskip to zero to avoid extra + space below the environment. + (\quotation): Clean up comments and indentation. + +Wed Jul 13 05:36:40 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\xrefX): Put back, and correct, the test of + SETxref-automatic-section-title. + +Thu Jul 7 15:57:52 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Set catcodes of chars 128-255 to \other. + +Mon Jul 4 15:32:41 1994 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\tie): Set \catcode of @ to 11 before using \@M. + + * texinfo.tex (\xrefX): Undo \turnoffactive while printing the node + name, so _ in node names doesn't come out as the dot accent. + +Sat Jul 2 14:49:26 1994 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\tie): Ensure we're in horizontal mode before the + \penalty. + +Tue May 10 01:21:28 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\donoderef, \unnumbnoderef, \appendixnoderef): + Set \lastnode globally. + +Sun Apr 17 15:35:43 1994 Karl Berry (karl@ra.cs.umb.edu) + + * texinfo.tex (\~): Define to be a tie. + (\ptextilde): New defn to save the plain's tilde accent. + (\tex): Restore plain tilde. + +Sun Mar 27 23:35:17 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\smallbook): Set \defbodyindent and \deftypemargin. + +Sun Mar 20 19:47:59 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\xrefX): Define and use \correctnodename. + (@turnoffactive): Move after @ becomes available + and turn off backslash as well as other chars. Use @realbackslash. + (@normalturnoffactive): Like @turnoffactive but use @normalbackslash. + +Sat Mar 19 12:26:25 1994 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\singlespaceskip): Increase to 12.5pt. + (\singlespace): Call \setleading instead of just assigning to + \baselineskip, so the strut box will be reset. + (\smalllispx): Likewise. + +Sun Mar 13 20:32:28 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\dots): Change back to \ldots. + +Sat Mar 12 22:34:10 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\indexnofonts): Add %'s to suppress newlines after \def. + +Sat Feb 26 15:51:37 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\deftexinfoversion): New macro. + (\texinfoversion): Define using \deftexinfoversion. + +Wed Jan 26 12:40:52 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\putwordSee, \putwordInfo, \putwordfile) + (\putwordChapter, \putwordAppendix, \putwordSection) + (\putwordsection, \putwordpage) + (\putwordTableofContents, \putwordShortContents): New macros. + Used in various places instead of fixed words. + +Mon Jan 24 22:51:36 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\ignoremorecommands): Turn off @item and @message. + +Thu Jan 20 17:01:53 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\indexnofonts): Treat accents as dummies. + Turn modified European letters into one or more ordinary letters. + +Tue Jan 18 14:54:32 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\indexdummies): Handle tex accents and European letters. + +Wed Nov 24 16:11:51 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\dots): Use $\,$ for spacing. + +Sun Nov 21 22:16:21 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\dots): Avoid using \ldots; use periods and kern. + (\indexdotfill): Use italic periods. + +Fri Nov 19 20:50:31 1993 Roland H. Pesch (pesch@apple-gunkies.gnu.ai.mit.edu) + + * texinfo.tex (\deftypefunargs): use \tclose rather than \code to + avoid side effects on active chars + +Tue Sep 28 16:01:58 1993 Roland H. Pesch (pesch@apple-gunkies.gnu.ai.mit.edu) + + * texinfo.tex (\obeyedspace defn): remove blank after \sepspaces + (left destructive penalty in vertical list) + +Mon Aug 30 14:17:27 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * texinfo.tex (\setref, \unnumbsetref, \appendixsetref): Uncomment + \dosetq for title. + (\Ytitle): Define as \thissection instead of \thischapter. + (\xrefX): If there is no printed-title arg given, and @ifset + xref-automatic-section-title, try to use the real section title. + +Tue Jul 27 12:47:24 1993 Charles Hannym (mycroft@trinity.gnu.ai.mit.edu) + + * texinfo.tex (\ifitemxneedsnegativevskip): New \if; set immediately + following a short \item. + (\itemxpar): \par and then if \ifitemxneedsnegativevskip is set, do + a \vskip-\parskip. + (\internalBitemx, \internalBxitemx, \internalBkitemx): Use \itemxpar + rather than \par. + (\itemzzz): Set \ifitemxneedsnegativevskip as appropriate. + +Thu Jul 22 16:08:33 1993 Charles Hannum (mycroft@trinity.gnu.ai.mit.edu) + + * texinfo.tex (\titlezzz, \finishtitlepage): Explicitly make hrules + have a width of \hsize so they aren't too long in smallbook format. + +Tue Jun 29 15:56:19 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (\deftypefnheaderx): call \normalparens to permit + normal typesetting of strings (e.g. for C++ docn) containing `&' + +Fri Jun 25 14:08:44 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (\nestedignore): turn off \ind... fonts too + (primarily for use within @smallexample) + +Wed Jun 23 11:58:48 1993 Jim Kingdon (kingdon@wombat.gnu.ai.mit.edu) + + * longopts.table: Update GDB options. + +Sun Jun 20 22:00:11 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * lgpl.texinfo: Use @smallexample instead of @example. Reformat + example disclaimer to avoid overfull \hbox. + +Mon Jun 14 04:09:47 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\entry): Don't make a line of dots + if there are no page numbers. + +Fri Jun 11 16:35:23 1993 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\defparsebodycommon): New macro from \defvrparsebody. + (\deftpparsebody): Call it; can't use \defvrparsebody. + (\deftpheaderline, \removeemptybraces): New macros. + +Sat May 8 10:49:25 1993 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\itemzzz): Only change \parskip temporarily, and + unskip by it later if the item text is on its own line. + + * texinfo.tex (\tablez): Do \afterenvbreak before the \endgroup, + so the \parskip value is the table's, not the surrounding text's. + (\vtable, \ftable, \itemizey): Likewise. + Note: for most environments, \nonfillfinish deals with this. + + * texinfo.tex (\smalllisp): New definition for non-small case, a + la @smallexample. + + * texinfo.tex: Delete \message{} at beginning; it does nothing. + + (These changes are all trying to make space above and below + environments more equal.) + * texinfo.tex (\singlespace): Don't insert a kern. + (\group): Do \offinterlineskip, and reset \par to insert a blank + line's worth of space. + (\lisppar): Delete meaningless call to \obeyspaces before making + the definition. + (\Elisp [the outer one]): Rename to \nonfillfinish, and end the + paragraph before the group. + (\lisp): Set \Elisp (the inner one) to \nonfillfinish + (\example, \smallexample, \display, \format, \flushleft, + \flushright, \quotation): Use \nonfillfinish. + (\lineskipfactor, \strut{height,depth}percent): Set to more exact + values. + (\setleading): Set \normallineskip and call \normalbaselines, for + cleanliness. + +Thu May 6 16:00:59 1993 Jeffrey Osier (jeffrey@deneb.cygnus.com) + + * texinfo.tex (\ignoremorecommands): Turn off \set and \clear. + +Tue Apr 20 17:02:34 1993 Roland H. Pesch (pesch@apple-gunkies.gnu.ai.mit.edu) + + * texinfo.tex (\codex): Delete space. + +Thu Apr 15 14:59:04 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (\ignoremorecommands): Turn off @raisesections, @up, + @lowersections, @down within false conditionals. + +Sun Apr 18 04:33:13 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\code): Define - and _ to permit line-breaking + despite the fact that hyphenation is disabled. + (\codex, \codedash, \codeunder): New macros. + +Tue Mar 16 18:19:16 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (\ignoremorecommands): Turn off @printindex within + false conditionals. + +Sun Mar 14 10:47:36 1993 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\footnote): Don't bother to take the footnote text + as an argument, and hence don't define as \long. + (\footnotezzz): Do \footstrut after we start the paragraph. + (Also reformat these macros to make them easier to read.) + +Fri Feb 26 13:02:44 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (@include): Use \thisfile rather than #1 as \input arg. + + * texinfo.tex (\readauxfile): Call \warnedobstrue to turn off warning + re TeX 3.0 on second and subsequent runs. + +Thu Feb 25 18:03:38 1993 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\realeverypar): Delete, as it was unused. + + * texinfo.tex (\group): Do a \strut in \everypar. + +Mon Feb 22 17:10:06 1993 Karl Berry (karl@claude.cs.umb.edu) + + * texinfo.tex (\obeyedspace): Define to be whatever \sepspaces + does (and move the definition to after \sepspaces). + +Wed Feb 17 01:55:20 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\nonfillstart): Do \singlespaces and \let\par + before \obeylines. + +Fri Feb 12 12:32:56 1993 Roland H. Pesch (pesch at el_bosque.cygnus.com) + + * texinfo.tex (\obstexwarn): issue message re bug in TeX 3.0. + (\nullfont): commented-out redefinition, to enable w/TeX 3.0. + (\nestedignore): call \obstexwarn for manuals that may trip bug + + * texinfo.tex (\nestedignore): avoid @tex contents with \doignore + +Thu Feb 11 15:41:06 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (\indexdummies): enable @dfn and @emph in index entries + +Thu Feb 11 13:32:32 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (\ignoremorecommands): ignore @include within + failing conditionals + +Sat Feb 6 19:44:28 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\nestedignore): Set \globaldefs--make all defs local. + +Tue Feb 2 15:57:37 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (@raisesections, @lowersections): new commands. + * (@up, down): original BFox synonyms for above. + * (\numhead, \apphead, \unnmhead): internal macros to map headings + to appropriate level + * (@nwnode): new synonym for @node, used in newest + makeinfo + +Tue Jan 26 17:05:02 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (\include): avoid group around file contents + +Tue Jan 19 18:58:56 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (\ignoremorecommands, used in \nestedignore): also + ignore cross-ref commands and \settitle + (\setyyy, used in @set): make definitions global + (\clearxxx, used in @clear): clear definitions globally + +Thu Jan 14 17:43:32 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * texinfo.tex: Added \shorttitlepage. + +Sat Jan 2 15:01:45 1993 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\tclose): Use \spaceskip instead of modifying + \fontdimen's to normalize the interword space. + + * texinfo.tex (\t, \key, \tclose): Use \hyphenchar instead of + \exhyphenpenalty, to turn off hyphenation for real. + (\{no,restore}hyphenation): New macros. + +Sat Jan 2 15:01:45 1993 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\t, \key, \tclose): Use \hyphenchar instead of + \exhyphenpenalty, to turn off hyphenation for real. + (\{no,restore}hyphenation): New macros. + +Tue Jan 5 19:15:46 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\deftpparsebody): Make synonymous with \defvrparsebody. + +Sun Dec 27 09:40:08 1992 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\inforef, \inforefzzz): Use the \ignorespaces + primitive instead of \losespace. + (\losespace): Delete. + + * texinfo.tex (\menu, \direntry): Handle like \ifinfo. + + * texinfo.tex (\unmatchedenderror, \defineunmatchedend): New macros. + (\endxxx): Call it, instead of just doing it inline. + (\conditionalsucceed, \nece): More new macros. + (\iftex): Call \conditionalsucceed. + (\Eiftex): Define to give an error at the outer level. + + * texinfo.tex (\ignoremorecommands, \nestedignore): New macros. + (\ifset, \ifclear): Expand a macro on success as well as failure; + also switch to using expansion instead of assignments to act after + the conditional. + (\if{set,clear}succeed): Call \conditionalsucceed. + (\if{set,clear}fail): Call \nestedignore instead of \doignore. + + * texinfo.tex (\clear): Don't insert a spurious space. + + * texinfo.tex (\value): Put comment next to definition. + + * texinfo.tex (\setyyy): Call \setzzz, and define the variable as + simply the parameter, no \unskip. + (\setzzz): New macro; do not globally define the variable. + +Thu Dec 3 17:24:05 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (croppageout): use same escape-char switching as + default output routine. Permits using _ in TOC entries. + +Fri Nov 13 17:35:38 1992 Charles Hannum (mycroft@gnu.ai.mit.edu) + + * texinfo.tex (indexing): Rewrote double-column mode to fix a + rare breakage. + +Sun Oct 25 07:13:31 1992 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\obeyedspace): No need to define with \gdef, we're + at the outer level. + +Fri Oct 16 18:04:40 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * lgpl.texinfo: Change "This program" to "This library" in example + copying notice. + +Sat Oct 10 09:43:45 1992 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\bullet, \minus): Use \implicitmath instead of $. + +Fri Oct 2 08:35:51 1992 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\Egroup): Don't do the \strut and \nointerlineskip. + +Sat Sep 26 09:08:59 1992 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\doignore, \enddoignore): New macros. + (\ifinfo): Call \doignore. + (\ifxinfoxxx): Deleted. + (\ignore, \ifsetfail, \ifclearfail): use \doignore. + + * texinfo.tex (\unnumbered): Expand the arg only once for the \message. + + * texinfo.tex (\deftpparsebody, \parsetpheaderline): New macros. + (\deftp): Call \deftpparsebody. + +Thu Sep 24 10:12:45 1992 Karl Berry (karl@cs.umb.edu) + + * texinfo.tex (\entry): Do \par first; add comments. + (\short{chap,unnumbered}entry,\do{chap,sec,subsec,subsubsec}entry): + Call \tocentry, instead of using \vbox. + (\tocentry): New macro. + +Sat Sep 19 14:36:11 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\`, \'): Definitions deleted. + +Fri Sep 18 14:33:09 1992 Roland H. Pesch (pesch@cygnus.com) + + * texinfo.tex (\ifset, \ifclear): Standardize catcode of space as + for \ignore. + +Fri Sep 11 15:25:01 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\finalout): Move out of final section of file, + which claims not to define new control words. + + * texinfo.tex (\setleading): New macro. + (outer level, @smallbook, @afourpaper): Call it, instead of + setting \baselineskip directly. + + * texinfo.tex (\|): New definition for changebars. + +Tue Sep 1 17:32:48 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\begindoublecolumns): Exactly double \vsize. + +Sat Aug 29 10:12:16 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\group): Define \Egroup to use struts instead of + letting TeX do its own interline spacing. + + * texinfo.tex (\{remove,ignore}activespaces): New macros. + (\end): Call \removeactivespaces; give the correct error messages; + don't try to expand a nonexistent \E... macro. + + * texinfo.tex (\EMsimple): End the help message with a period. + + * texinfo.tex (\gobble): New macro. + (\lisp): Call it (instead of defining it every time). + (\example, \smallexample): Define \E... within the macro. + +Tue Aug 25 11:56:26 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex (\readauxfile): Make + normal while reading aux file. + +Thu Aug 20 21:32:34 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\doublecolumnhsize): Compute value in + \begindoublecolumns. + (\afourpaper, \smallbook, <outer level>): Remove these (virtually + identical) computations. + + * texinfo.tex (\doublecolumnvsize): Deleted. + (\afourpaper, \smallbook): Don't compute it. + (\begindoublecolumns): Just double \vsize here (thus decreasing + the value considerably from the old value of 19.1in, which was far + too large.) + +Fri Aug 14 10:16:42 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\parseargx): Use \expandafter instead of + \aftergroup to continue the processing. + (\parsearglinex): Renamed to \parseargline, since the former + \parseargline is no longer needed. + + * texinfo.tex (\parseargline) Remove a trailing @c or @comment. + (\argremovec, \argremovecomment): New macros. + +Thu Aug 6 11:28:55 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * texinfo.tex: extended @set to define expandable vars; + @value expands same. Auxiliary macros \setxxx, \setyyy + used for @set. + +Sun Aug 2 14:34:48 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\entry): do line-breaking on the index entry. + +Wed Jul 1 17:05:26 1992 Karl Berry (karl@claude.cs.umb.edu) + + * texinfo.tex (\lparen, \rparen): new definitions. + ((,[,],)): new global definitions for these four active + characters, so parens and brackets can be used in @deffn names. + +Sat Jun 27 11:32:58 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\shortchaplabel): new macro to align chapter and + appendix labels. + (\shortchapentry): call it. + (\shortappendixwidth): new dimen register. + +Wed Jun 24 09:45:34 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\afterenvbreak): make the same as \aboveenvbreak, + so space below environments doesn't get lost. + (\aboveenvskipamount): rename to \envskipamount, since it's used + both above and below. + +Wed Jun 24 09:45:34 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\group): do @comment at the end, to avoid excessive + white space when called inside @group. + +Wed Jun 24 16:36:04 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\startcontents): End page before setting pageno. + +Thu May 28 20:27:25 1992 Robert J. Chassell (bob@hill.gnu.ai.mit.edu) + + * texinfo.tex (\vtable): Like @ftable, but for variables. + +Fri May 22 07:04:32 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\w): do \leavevmode before the \hbox. + +Sat May 16 11:16:27 1992 Karl Berry (karl@hayley) + + * texinfo.tex (\smallbook): decrease \topskip somewhat. + + * texinfo.tex (\group): use \vtop instead of \vbox. + + * texinfo.tex (\newlinechar): define for use in help strings. + (\groupinvalidhelp): define this for use with \errhelp. + (\group): set \errhelp to above. + +Thu Apr 30 16:19:17 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\need): Rewritten by karl. + +Sat Apr 18 16:24:00 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\exdentamount): New var, set by environments. + (\exdent, \exdentyyy): Define suitably for filled environments. + Always exdent by innermost indentation step. + (\nofillexdent, \nofillexdentyyy): Alternates for nofill envs. + (\lisp, \smalllispx, \display): Set \exdent to \nofillexdent. + +Thu Apr 2 15:04:15 1992 Robert J. Chassell (bob@kropotkin.gnu.ai.mit.edu) + + * texinfo.tex (\Esmalllisp): Smaller baseline skip for smallexamples. + +Sun Mar 29 20:44:49 1992 Brendan Kehoe (brendan@cs.widener.edu) + + * texinfo.tex (\startcontents): Always close contentsfile and + adjust the page. + +Fri Mar 27 17:41:52 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\chapternofonts): Deal with \result, \equiv, etc. + +Sat Mar 21 08:22:29 1992 Karl Berry (karl at hayley) + + * texinfo.tex (\entry): format entries better if the page number + and entry text don't fit on one line. + + * texinfo.tex (\loggingall, \gloggingall): new macros to help with + debugging. + +Fri Mar 20 15:35:42 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\result, \expansion, \print, \equiv): + Don't copy prefabricated boxes; must adapt to current font. + (\dblarrowbox, \longdblarrowbox, \pushcharbox, \equivbox): Deleted. + (\bullbox): Deleted. + +Thu Mar 19 22:17:14 1992 Robert J. Chassell (bob@kropotkin.gnu.ai.mit.edu) + + * texinfo.tex (\widowpenalty, \clubpenalty): Set them to 10000, since + 8000 did not work. + +Fri Mar 6 13:26:36 1992 Robert J. Chassell (bob@kropotkin.gnu.ai.mit.edu) + + * texinfo.tex (\widowpenalty, \clubpenalty): Set them to 8000, since + 2000 did not work (but \widowpenalty at 20000 did work). + +Thu Feb 27 12:27:14 1992 Karl Berry (karl@wombat.gnu.ai.mit.edu) + + * texinfo.tex (\widowpenalty): set to 2000, not 20000. + +Sat Feb 8 14:34:45 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\widowpenalty, \clubpenalty): Set them to 2000. + (\itemizeitem): Use penalty 1200. + (\itemzzz): Add \nobreak near beginning. + + * texinfo.tex (\quotation): Increase right margin, instead of + left margin twice. + +Wed Feb 5 12:08:30 1992 Karl Berry (karl at hayley) + + * texinfo.tex (\alphaenumerate, \capsenumerate): redefine as a call + to \enumerate. + (\{lower,upper}caseenumerate): Rename from \{alpha,caps}enumerate. + +Sun Feb 2 21:07:19 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\itemzzz): Compensate in line-by-itself case for + a table that is indented. + +Mon Jan 13 21:04:07 1992 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex: Use 26 instead of control-z as character constant. + +Sat Jan 11 02:20:58 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * gpl.texinfo: Unfilled Yoyodyne example. + +Sat Dec 7 16:16:54 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\cartouche): Set \nonarrowing. + (\lisp, \smalllisp, \quotation, \display): If set, don't narrow. + +Mon Dec 2 08:15:08 1991 Karl Berry (karl at hayley) + + * texinfo.tex (\itemzzz): don't start a paragraph if the item text + is on a line by itself; don't allow a page break after that + line; always do \par before typesetting anything. + +Tue Nov 26 15:13:13 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * lgpl.texinfo: @ifset lgpl-appendix, use @appendix instead of + @unnumbered. + +Sun Nov 10 12:00:06 1991 Karl Berry (karl at hayley) + + * texinfo.tex (\doprintindex): only \read if the file existed; + \closein the test stream in all cases. + (\initial, \entry): do not \outer, so that \read does not get an + error if the index exists. + +Fri Nov 8 18:13:28 1991 Michael Bushnell (roland@churchy.gnu.ai.mit.edu) + + * texinfo.tex (\itemizey): missing %'s in macro defn. + Also, add \begingroup; accidentally deleted by Karl Berry. + +Thu Nov 7 11:41:25 1991 Karl Berry (karl at hayley) + + * texinfo.tex (\doprintindex): \read from the index file to make + \ifeof true when the file exists but is empty. + +Tue Nov 5 08:29:13 1991 Robert J. Chassell (bob at grackle) + + * texinfo.tex (@thischaptername): Provide default value for when + @chapter not defined. + +Sat Nov 2 17:59:02 1991 Karl Berry (karl at hayley) + + * texinfo.tex (\itemizezzz): do \begingroup here, since \itemizey + can't any longer. + +Tue Oct 29 12:17:41 1991 Robert J. Chassell (bob at grackle) + + * texinfo.tex: @paragraphindent defined as a no op. + +Fri Oct 25 15:19:47 1991 Karl Berry (karl at hayley) + + * texinfo.tex (\enumeratey): allow any lowercase letter, uppercase + letter, or number as argument; initialize \itemno and begin the + environment's group here. + (\itemizey): don't initialize \itemno here. + (\numericenumerate, \startenumeration): new macro. + +Wed Oct 23 16:26:30 1991 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\ifclear, \ifset): Remove \outer. + + * texinfo.tex (\afourpaper): Set various parameters. + +Tue Oct 22 18:42:31 1991 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\alphaenumerate, \capsenumerate): + Let @end enumerate end these. + (\Ealphaenumerate, \Ecapsenumerate): Aliases for \Eenumerate. + +Sun Oct 20 18:23:18 1991 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * texinfo.tex (\mainmagstep): New parameter macro. + (Defining fonts): Use that parameter to scale them. + If \bigger is defined, use 12 point fonts. + +Tue Sep 24 00:30:07 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * texi2dvi: Iterate over the right variable to look for new idx files. + + * texi2dvi: GPL 2. + + * texi2dvi: Fix 2nd invocation of texindex to pass right args. + +Wed Sep 11 20:52:42 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\cartouche): New macro. + +Fri Aug 23 16:13:46 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\section, \subsection, \subsubsection): + Initially define for numbered chapters. + +Fri Aug 2 01:46:09 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\footnote): Use \unskip instead of \removelastskip. + +Mon Jul 29 14:06:54 1991 Roland H. Pesch (pesch at cygint.cygnus.com) + + * texinfo.tex (\majorheadingzzz, \chapheadingzzz, \chfplain, + \unnchfplain, \unnchfopen, \secheadingi, \subsecheadingi, + \subsubsecheadingi): allow line breaks in headings. + (\shortchapentry, \shortunnumberedentry, \dochapentry, \dosecentry, + \dosubsecentry, \dosubsubsecentry): allow line breaks in table of + contents entries. + +Thu Jul 18 19:01:53 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\secfonts, \indexfonts): Fix typos. + +Sun Jul 7 16:36:28 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\afourpaper): New command. + + * texinfo.tex (\numberedsec): Renamed from \section. + (\numberedsubsec): Renamed from \subsection. + (\numberedsubsubsec): Renamed from \subsubsection. + (\chapter, \appendix, \unnumbered): Define \section, \subsection, + and \subsubsection here according to type of chapter. + +Thu Jul 4 14:19:32 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\defvarparsebody, \defvrparsebody, \defopvarparsebody): + New functions. + (\defvar, \defvr, \defopt, \defcv, \defivar): Use them. + (\deftypevar, \deftypevr): Likewise. + +Mon Jul 1 13:49:25 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\group): Report error if used outside @example, etc. + + * texinfo.tex (\defname): Reduce \leftskip + to cancel temporarily the increase made in \defparsebody. + + * texinfo.tex (\enumerate): Allow optional arg to specify type + of counting. + + * texinfo.tex (\set, \clear): New commands. + +Mon Jun 24 12:22:44 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * texinfo.tex (\eleterate): Renamed to \alphaenumerate. Sigh. + (\ecapitate): Likewise \capsenumerate. + +Thu Jun 6 20:02:48 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * lgpl.texinfo: Created from /fsf/rms/gnuorg/lgpl.text. + + * gpl.texinfo: Created from /fsf/rms/gnuorg/gpl.text (GPL v2). + + * texinfo.tex (\eleterate, \ecapitate): New commands, like @itemize, + but with [a..z] or [A..Z] instead of [1..n]. + +Tue May 21 15:46:32 1991 Karl Berry (karl at hayley) + + * texinfo.tex (\dmn): new command to typeset a dimension. + +Tue May 21 20:58:22 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\doind, \dosubind): Make new group around \indexdummies + and most of body, excluding the \penalty commands. + +Mon May 20 21:16:32 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\tex): Typo in redefining \@. + + * texinfo.tex (\_): Use \lvvmode, not \leavevmode. + (\lvvmode): New macro. + + * texinfo.tex (\authorrm, \titlerm): Move to after section fonts. + +Tue May 14 21:13:29 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\defunargs): Set \hyphenchar in \tensl, not \sl. + +Thu May 9 17:07:08 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\ignore): Standardize catcode of space. + +Wed May 8 13:49:45 1991 Karl Berry (karl at hayley) + + * texinfo.tex (\sffam, \sf): New macros; support sans serif + type style in math. + (top level): Set up \textfonts early on, so we can create boxes w/ it. + (\tenrm...\tensf): Define these to be \textrm...\textsf instead. + (\df, \textfonts, \chapfonts, \secfonts, \subsecfonts): + (\indexfonts): Redefine \tenrm (etc.) instead of just \rm, so that + the math family assignment doesn't get lost; call \resetmathfonts. + (\resetmathfonts): New macro; redefines \textfont of each math family. + (\indsc, \indi, \indsy \chapsc, \chapi, \chapsy, \secsc, \seci): + (\secsy, \ssecsc, \sseci, \ssecsy): New font definitions. + +Mon May 6 21:30:19 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\indexdummies): Write \_ when an _ is seen. + +Mon Apr 29 01:41:44 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\defname): Use \dimen2, \dimen3 for outer margins. + Use outer margins for influencing \rightline. + (\tclose, \key, \t): Turn off line breaks at hyphens. + +Fri Apr 12 03:12:14 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\authorrm): Move definition to top level; copy \secrm. + +Tue Apr 2 22:48:39 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\defname): Adjust size of \rlap box, not \dimen0 + or \dimen1, for current width. + + * texinfo.tex (\Yappendixletterandtype): End with {}. + +Sat Mar 30 16:13:25 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\xrefX): Really use \cite. + (\inforefzzz): Use \samp for node name. + + * texinfo.tex (\defname): Use current width for \dimen0, \dimen1. + + * texinfo.tex (\doprintindex): Put lots of whitespace before index. + +Fri Mar 29 17:00:58 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\xrdef): Take out last change. + + * texinfo.tex (\needx): Turn off \baselineskip. Use kern, and no glue. + + * texinfo.tex (\shortcontrm): Renamed from \truesecrm. + (\shortcontbf, \shortcontsl): New fonts for short contents lines. + (\summarycontents): Use them. + + * texinfo.tex (\defname): Don't set \leftskip to 0; just decrease by + one indent level. + (\defparsebody, \def*parsebody): Increment both margins by one level. + +Tue Mar 26 22:41:38 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * texinfo.tex (\xrdef): Change catcode before reading args. + +Wed Mar 20 14:21:57 1991 Roland McGrath (roland at geech.gnu.ai.mit.edu) + + * texi2dvi: Use p modifier in sed -n command, so it works. + Duplicate code to find the index files, instead of being smart in + one place and dumb in another. + +Thu Mar 7 17:08:32 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\defaultparindent): New variable. + (\footnotezzz): Reset \parindent to default. + (\xrefX): Use \cite for printed manual and node names. + +Tue Mar 5 13:39:34 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\emergencystretch feature): Use \thisisundefined. + +Mon Mar 4 00:35:57 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\ftablex): Define \Eftable; undefine \Etable. + + * texinfo.tex (\footnote): Discard preceding whitespace. + + * texinfo.tex: Use the \emergencystretch feature if available. + +Fri Feb 22 03:50:58 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\tex): Make + not active. + +Fri Feb 15 10:05:24 1991 Roland McGrath (mcgrath at cygint.cygnus.com) + + * texi2dvi: Use $TEXINFO in place of $TEX (falling back to $TEX + if $TEXINFO is undefined). + + * texi2dvi: Renamed from texinfo. Bob (I believe) did this at some + point at and didn't make a ChangeLog entry. I'd shoot him myself if + he weren't the person who signs my paychecks. + +Sun Feb 10 22:51:52 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\doprintindex): If index is empty, print a dummy. + (\need): Use vskips and penalties; don't use \pagetotal. + +Fri Feb 8 17:36:53 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\ignoresections): + Turn off \contents, \smallbook and \titlepage. + + * texinfo.tex (\Etitlepage): Do a page break before ending the group. + + * texinfo.tex (\setref, \unnumbsetref, \appendixsetref): + Comment out recording the chapter title. + +Thu Jan 24 23:28:41 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\top): Synonym for \unnumbered. + (\infotop): Synonym for \infounnumbered. + (\ignoresections): Handle \top. + +Thu Jan 24 12:41:33 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex: Delete spurious character at beginning. + +Thu Jan 17 16:34:25 1991 Roland McGrath (roland at cygint.cygnus.com) + + * texinfo: Check the exit status of tex and texindex. Don't procede + after a failing run. + +Thu Jan 10 15:16:47 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\xrefX): Get rid of blank line. + +Wed Jan 9 18:06:20 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\entry, \secondary): Use \indexdotfill. + (\indexdotfill): New macro. + +Tue Jan 8 17:44:01 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\donoderef): Define a ...-title cross-reference. + (Ytitle): Subroutine for that. + (xrefX): Use the real title by default (but this is commented out). + +Tue Jan 1 23:18:21 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\indexnofonts): Delete troublemaking blank line. + +Sat Dec 22 00:47:21 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\xrefX): Prevent extra space. + +Fri Dec 21 21:14:50 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\comment, \commentxxx): Ignore @ in comment. + +Thu Dec 13 22:38:31 1990 Chris Hanson (cph at kleph) + + * texinfo.tex (\defivarheader): Capitalize "Variable". + +Sun Dec 2 01:46:04 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\indexdummies, \indexnofonts): Handle \t like \r. + + * texinfo.tex (heading fonts): New fonts based on cm...12. + +Tue Nov 27 16:59:35 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\indexnofonts): Also supersede \TeX and \dots. + +Sun Nov 18 16:18:14 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\*): End with \ignorespaces. + +Fri Nov 2 17:41:48 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\*): Output empty hbox to avoid losing whitespace. + (\deftypevarheader, \deftypevrheader): End the paragraph + with suitable penalties. + (\deftypevrheader): Do print the data type. + +Thu Nov 1 12:04:52 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\defmethodheader): Print `method', not `operation'. + +Fri Oct 26 17:11:08 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\indexdummies): Temporarily redefine \_. + (\ptexdots): Copy of plain tex \dots. + (\tex): Temporarily reinstall that. + +Fri Oct 19 16:57:48 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\subsubsecheadingi, \subsecheadingi): New subroutines. + +Mon Oct 8 13:34:19 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (active _): Use \normalunderscore. + +Tue Sep 25 22:32:55 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\deftypefn, \deftypevar, \deftypevr): New macros. + Their subroutines also new. + +Tue Sep 25 16:42:52 1990 Roland McGrath (roland at geech.ai.mit.edu) + + * texinfo: Recognize `.tex' as a suffix. + +Tue Sep 25 01:46:54 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\deftypefun): New macro. + (\deftypefunheader, \deftypefunheaderx, \deftypefunargs): Also new. + +Fri Sep 14 00:38:28 1990 Roland McGrath (roland at churchy.ai.mit.edu) + + * texinfo: Weed out files that have two-letter extensions but don't + start with a backslash, and therefore aren't index files. + + * texinfo: Handle index files that have any two-letter extension, + rather than using a static list of extensions. + + * texinfo: Handle .texi extension as well as .texinfo. + + * texinfo: New file, a sh script to do .texinfo -> .dvi. + +Mon Sep 10 13:14:39 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * texinfo.tex (\math): New macro. + +Tue Sep 4 07:43:33 1990 Karl Berry (karl at hayley) + + * texinfo.tex (\chfplain): Do not print a period after the chapter + number, for consistency with sections et al. + + * texinfo.tex (\refX): hyphenate `undefined' so that the ligature + is not lost. + + * texinfo.tex (_): use \_ unless we're in tt. + (\ifusingtt): new macro for such conditionalization. + + * texinfo.tex (\xrefX): don't use \unhbox to print the node names, + since that loses on hyphens. + Use \ignorespaces rather than \losespace. + +Thu Aug 2 07:03:26 1990 Karl Berry (karl at hayley) + + * texinfo.tex (\linenumber): new macro. + (\refx): give the line number in the message. + +Tue Jul 31 09:13:32 1990 Karl Berry (karl at hayley) + + * texinfo.tex (\refx): improve warning messages, remove + unnecessary groups, and improve logic. + +Thu Jul 26 20:53:38 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\subheading, \subsubheading): Missing macros defined. + +Thu Jul 19 22:48:26 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\titlepage): Don't print rule for \page unless already + printed a rule. + (\abstract): Deleted. + (\direntry): New command, much like \ignore. + +Sun Jul 15 16:28:42 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\abstract): New construct; trivial in tex. + +Sun Jun 17 01:03:16 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\defcv): Protect space before `of'. + (\defspec): Capitalize `Form'. + +Sat Jun 16 19:36:56 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\kbd, \kbdfoo): Use \par to term. arg to \kbdfoo. + +Fri Jun 15 10:47:12 1990 Robert J. Chassell (bob at pogo.ai.mit.edu) + + * texinfo.tex (\defcv): Use \defcvarheader instead of (undefined) + \defcvheader. + +Fri May 25 18:04:31 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\xrefX): Use \turnoffactive. + +Mon May 21 21:17:34 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\turnoffactive): New command. + (\normaldoublequote, ...): New commands. + (\dosetq): Use \turnoffactive. + +Sat May 19 12:31:17 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\indit): Use slanted font, not italic. + (\smalllispx): Do \indexfonts. + +Fri May 4 17:35:04 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\footnote, \footnotezzz): Make it \long. + +Wed May 2 01:19:55 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\titlerm): Go back to cmbx10 scaled \magstep5. + (\hsize): Don't set it, use the default. + +Fri Mar 23 21:07:02 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\footnote): Read arg in braces, not as a line. + +Mon Mar 19 19:30:08 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\unnumbsubsubsecentry): Typo in name being defined. + +Tue Mar 13 18:49:27 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\defvarargs): Add penalty at end. + + * texinfo.tex (\synindex, \syncodeindex): Copy one index file name + into the other. + +Tue Mar 6 16:58:54 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\deftt): Make this a distinct font. + + * texinfo.tex (\initial): Define \tt like \tentt. + + * texinfo.tex (\ifinfo): End with \losespace. + (\ignore, \ifsetfailxxx, \ifclearfailxxx): Likewise. + +Sun Mar 4 19:55:57 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\lbrb, \rbrb): Use \bf. + +Sat Mar 3 17:53:22 1990 Richard Stallman (rms at geech) + + * texinfo.tex (\onepageout): Set \escapechar here. + + * texinfo.tex (\rawbackslash): Define using \chardef. + + * texinfo.tex (\@): Use ttfont. + +Thu Mar 1 16:37:46 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (Ysectionnumberandtype, Yappendixletterandtype): + Capitalize "chapter", "appendix" and "section". + +Mon Feb 19 20:26:22 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\xkey): Attempt to eliminate spurious space from + output. Look at y-or-n-p. + +Mon Feb 12 16:34:00 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\errorbox): Get \dimen0 from \tentt. + +Sun Feb 11 15:11:57 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\defunargs): Use ragged right for args. + Add large penalty at end. + + * texinfo.tex: Make active definition for = using \tt, but disable. + (\defparsebody): Make = active. + (\defunheader, etc.): Make inactive again. + + * texinfo.tex (\errorbox): Try to equalize outside space to both sides. + +Fri Feb 2 14:47:21 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\appendix): Don't use \the before \appendixletter. + +Sat Dec 16 14:02:56 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\chapter, \appendix): Make defn of \thischapter + refer to \thischaptername, and store actual name there. + (\chapternofonts): Turn off more macros. + (\indexdummies): Likewise. + +Sun Nov 19 15:29:47 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\titlerm): There were two definitions of this command. + Put them together and commented out one of them. + (\subtitlerm): Was same as \tenrm, so just copy that. + (\ninett): Always define this. + (\indtt): Copy from \ninett. + +Sat Nov 18 22:57:37 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\ssecrm, etc.): Scale by 1315, rather than to 13pt. + +Wed Nov 8 18:38:33 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\titlepage): Turn on iffinishedtitlepage so + bottom rule is not printed. + (\titlezzz): Turn it off, so bottom rule is printed. + +Mon Nov 6 09:23:29 1989 Karl Berry (karl at hayley) + + * texinfo.tex (\chapterzzz, \appendixzzz): include `Chapter + \the\chapno' and `Appendix \appendixletter' in \thischapter; use + \xdef instead of \gdef to define \thischapter, to avoid timing + problems with \chapno or \appendixletter. + (\startcontents): don't bother putting `Table of Contents' or + `Short Contents' in the headline. + +Fri Oct 20 09:11:35 1989 Karl Berry (karl at hayley) + + * texinfo.tex (\titlepage): remove obsolete code for subtitles. + (\titlezzz): end with \relax, to avoid misinterpretation of a + following `plus' or `minus' + (\page (inside \titlepage)): call \finishtitlepage. + (\Etitlepage): call \finishtitlepage, if it hasn't been. + (\finishtitlepage): new macro to print a rule and leave some space + at the bottom of the title page. + (\iffinishedtitlepage): new; says whether \finishtitlepage has been + called. + +Mon Nov 6 21:35:34 1989 Robert J. Chassell (bob at rice-chex) + + * texinfo.tex: Replaced `GNU CC' in the copyleft of this file with + the phrase `this texinfo.tex file'. + +Fri Oct 27 10:36:32 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\setfilename): Do nothing except 1st time used. + (\titlepage): Brace misplaced in \titlezzz. + (\indexdummies, \indexnofonts): Handle @w. + + (\readauxfile): Set \ifhavexrefs true. + (\refX): Warn for every use of an undefined xref, + but if no xref values are known, warn just once that none are known. + +Tue Sep 19 04:12:51 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\xrefX): Go back to `section N [Foo], page M'. + (\exp): Delete it. + +Mon Sep 18 15:29:30 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\chapentryfonts): Try using \rm for chap title. + +Tue Sep 12 03:41:10 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\titlepage): Missing closeparen after \title. + Delete excess paren after \page. + + * texinfo.tex (\samp): Use \tclose. + +Mon Sep 11 23:28:04 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\tclose): Make `@ ' a full-width space. + +Sat Sep 9 20:11:29 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\balancecolumns): Handle properly the case where + the index ends before one page is output, so \partialpage is nonempty. + In this case we may need to output two pages if the data + would just barely fit if not for \partialpage. + +Wed Aug 30 22:45:31 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\refx): New 2nd operand, output if xref is non-null. + (\xrefX): Use that to output the comma after the section number. + (\appendixnoderef, \appendixsetref, \Yappendixletterandtype): + Define xrefs for appendices that say "Appendix N". + Used in \appendix, \appendixsec, etc. + + * texinfo.tex (\smartitalic): The actual italic correction was omitted. + +Mon Aug 28 00:21:33 1989 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * texinfo.tex (\ref): New kind of cross-reference. + (\xrefX): Put single quotes around section name. + (\refx): Allow hyphenation in `undefined'. + + * texinfo.tex (+): Make it active. + (Altmode): Delete active defn. + + * texinfo.tex (\defunargs): Prevent hyphenation at `-' in args. + Move the penalty at the end so that it works. + (\defvarargs): Move the penalty at the end so that it works. + + * texinfo.tex (\defparsebody): Do increase right margin. + + * texinfo.tex (\defbodyindent): Now .4 inch. + + * texinfo.tex (\point, \result, \expansion, \print, \equiv, \error): + New macros for Lisp manual. + + * texinfo.tex (\tex): Set = to code 12. + + * texinfo.tex (\entry): Hairier way to output dots. + + * texinfo.tex (\kbd): If arg consists of one \key command, be a no op. + + * texinfo.tex (\sc): Delete spurious \. + + * texinfo.tex (\smartitalic): New macro, does italic correction at end. + (\i, \var, \dfn, \emph, \cite): Use that. + + * texinfo.tex (\node): Do \ENVcheck. + + * texinfo.tex (\initial): Infinite penalty at end. + + * texinfo.tex (\chapternofonts): New macro, sets \code, etc. to + output selves into file. Also undef \frenchspacing and \rawbackslash. + (\xhapterzzz, etc.): Call that. Make a group to undo it. + (\indexdummies): Do like \chapternofonts. + +Sun Aug 27 16:05:23 1989 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * texinfo.tex (\frenchspacing): Our own definition, using + decimal numbers for all character codes. The standard one fails. + + * texinfo.tex (\indexnofonts): Handle \file, \tt, and many more. + +Fri Aug 25 22:05:24 1989 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * texinfo.tex (\chapter, etc.): Undefine \tclose around \edef\temp. + +Mon Aug 21 15:42:47 1989 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * texinfo.tex (\tclose): Like \t but make space same width + as in surrounding text. + (\code, \kbd): Use \tclose. + +Tue Jul 4 20:53:52 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (titlepage): Don't set \everypar; start just one group. + See comments in the code. + + * texinfo.tex (defop,defcv): Use defopparsebody. + * texinfo.tex (defopparsebody): Like defmethparsebody but defines + def...x for more arguments. + +Sat Jun 17 13:49:13 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\titlepage): Rename @subtext, etc., to @subtitle, etc. + + * texinfo.tex (\titlepage): Don't print the title automatically. + Define @title to print it, and the rule underneath it. + This should make @titlepage upward compatible with the old one. + + * texinfo.tex (\titlepage): Revert local definition of @page + to previous. Don't print a rule. + +Mon Jun 12 20:49:17 1989 Karl Berry. (karl at mote) + + * texinfo.tex (\titlepage): allow intensional definition of the + items on the title page. New control sequences (allowed only + within the titlepage environment:) + (@subtext): may take either a paragraph (e.g., a brief + description of the program) or just a line (e.g., the date). + May appear more than once. + (@author): must come after all the @subtext's. Can appear more + than once, also. + Also, use the title defined by @settitle. + (\subtextfont, \authorfont): switch to using the appropriate + fonts with appropriate leading. + (\titlepagetopglue, \titlepagebottomglue): define space that + never stretches or shrinks. + (\realeverypar): formatting for the @subtext's. + +Sun Jun 4 15:04:59 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (\shortchapentry, \shortunnumberedentry): + Use dots, right justify page numbers. Don't use italics. + +Fri Jun 2 14:40:28 1989 Karl Berry. (karl at mote) + + * texinfo.tex (\entry, \secondary): use plain TeX \dotfill for + better leaders than the homegrown one. + (\Dotsbox): Deleted. + (\dotfill): Deleted; use Plain TeX definition. + +Wed May 31 17:19:30 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (ignore): Undefine the chapter/section macros + while reading the args, since they are \outer. + (ifinfo): Likewise + (ifsetxxx, ifclearxxx): Call another macro to parse the + conditionalized text, and do to that macro as with \ignore. + +Tue May 30 15:04:37 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex (unnumbered): Change back from \long to \outer. + + * texinfo.tex: Changes by Karl Berry for toc format. + Rewrite the table of contents for appearance's sake. Add a + synonym for \summarycontents, \shortcontents, since that is the + traditional name. Two subroutines are now shared by \contents and + \summarycontents: \prepareforcontents, to reset the page number + and such; and \startcontents, which begins the \unnumbered and + resets catcodes before \input \jobname.toc. Some other macros -- + \labelspace, \dopageno, \shortpageno -- are shared by the printing + macros. + + * texinfo.tex (\truesecrm): New font, section-size roman, used in the + new toc. (cmr12) + +Sun May 28 07:25:42 1989 Karl Berry. (karl at mote) + + * texinfo.tex (\eatinput): Do not print the `\input texinfo' if a + .fmt file is being used; ignore it, instead. This is the initial + definition for `\' now. + (\fixbackslash): on the other hand, subsequent backslashes should + be printed, and if the file does not have an `\input texinfo', the + first one should be printed. This new macro makes the definition + for `\' be \normalbackslash, if it is \eatinput. + (\setfilename): use \fixbackslash. + +Wed May 24 15:34:59 1989 Joseph Arceneaux (jla at apple-gunkies.ai.mit.edu) + + * texinfo.tex: Changed def of unnumbered from \outer to \long. + +Tue May 23 12:27:59 1989 Karl Berry. (karl at mote) + + * texinfo.tex: Allow one to make a texinfo.fmt file (with the + invocation: + initex \&plain texinfo + and then saying + @dump + after texinfo.tex has been read. + Changes: + (\setfilename): Instead of being a no-op, read the xref info, and + open the contents and index files. These actions were done as + texinfo.tex was read before. + (\opencontents, \openindices): new macros to open those files. + (\readauxfile): and one to read the aux file. + +Sat Apr 29 22:28:02 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex: `@headings on' no longer does a page break. + +Sun Apr 2 11:22:29 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex: Defined `@headings single' and `@headings double'. + `@headings on' picks one of them: `@setchapternewpage odd' + says `@headings on' means double; otherwise it means single. + +Mon Jan 30 22:00:35 1989 Robert J. Chassell (bob at rice-krispies.ai.mit.edu) + + * texinfo.tex: Changed the size of the subsection fonts so they + are scaled at13pt rather than at magstep 2. This makes them + smaller than the section fonts, which are scaled at magstep 2. + In addition, changed the ssecrm font from cmbx to cmb. + +Fri Jan 6 15:00:44 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * texinfo.tex: Changed @lisp, @smalllisp, @display not to change + the right margin. + +Mon Dec 5 22:01:49 1988 Robert J. Chassell (bob at rice-krispies.ai.mit.edu) + + * texinfo.tex: Tested the use of `cmbx10' vrs `cmb10' font and + stayed with cmb10 font since cmb10 looks better when the bold face + is part of a sentence although the cmbx10 font looks better on its own. + +Mon Aug 15 14:33:51 1988 Robert J. Chassell (bob at spiff) + + * texinfo.tex: Changed the (undocumented) @today command from a + Month Day, Year format to a Day Month Year format. Left old + version commented out. + + +Local Variables: +mode: indented-text +left-margin: 8 +fill-column: 76 +version-control: never +End: diff --git a/contrib/texinfo/INSTALL b/contrib/texinfo/INSTALL index a2c8722..50dbe43 100644 --- a/contrib/texinfo/INSTALL +++ b/contrib/texinfo/INSTALL @@ -167,7 +167,9 @@ operates. `--quiet' `--silent' `-q' - Do not print messages saying which checks are being made. + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually diff --git a/contrib/texinfo/INTRODUCTION b/contrib/texinfo/INTRODUCTION index 13e24f7..0a9e0a4 100644 --- a/contrib/texinfo/INTRODUCTION +++ b/contrib/texinfo/INTRODUCTION @@ -1,3 +1,12 @@ +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000, 01 +Free Software Foundation. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. + + Getting Started with Texinfo ============================ diff --git a/contrib/texinfo/NEWS b/contrib/texinfo/NEWS index 18423d5..5a1bd8c 100644 --- a/contrib/texinfo/NEWS +++ b/contrib/texinfo/NEWS @@ -1,5 +1,39 @@ +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000, 01, 02 +Free Software Foundation. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. + This file records noteworthy changes. +4.1 (4 March 2002) +* Language: + . new commands @verbatim and @verb for printing verbatim inserts. + . new command @verbatiminclude for verbatim include of files. + . new environment @documentdescription for defining the HTML description. + . new command @afivepaper for the A5 paper size. +* makeinfo: + . supports xml and docbook output. + . supports HTML splitting by node, which is now the default. + . new option --split-size to control maximum size of split info files. +* info: + . user-specified key bindings supported. + . ANSI escape sequences (as produced by groff) removed from man output + by default; use --raw-escapes to let them through if your terminal + supports them. +* texinfo.tex: + . @math implies @tex, so all the usual plain TeX math is supported. + . smaller fonts for @smallexample, in all page sizes. + . improvements in the PDF support. +* texi2dvi: + . new option -o to explicitly specify output filename. +* Distribution: + . switch to GNU Free Documentation License (http://www.gnu.org/copyleft/). + . update to GNU gettext 0.11, autoconf 2.52, and automake 1.5. + . Danish, Swedish, and Hebrew message translations. + 4.0 (28 September 1999) * Language: . New command @anchor for cross references to arbitrary points. @@ -34,6 +68,7 @@ This file records noteworthy changes. . @emph and @i use true italic type (cmti) instead of slanted (cmsl). . implements pdf output when run with pdftex. . better support for internationalization via txi-??.tex files. + . footnotes now set in a smaller point size. * makeinfo: . supports HTML output with the --html option. . implication of --html: @top nodes should be wrapped in @ifnottex diff --git a/contrib/texinfo/README b/contrib/texinfo/README index 0b865ef..a3fb18e 100644 --- a/contrib/texinfo/README +++ b/contrib/texinfo/README @@ -1,31 +1,42 @@ +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000, 01, 02 +Free Software Foundation. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. + + This is the README file for the GNU Texinfo distribution. -The primary distribution point is ftp://ftp.gnu.org/gnu/texinfo/. +The primary distribution point is ftp://ftp.gnu.org/gnu/texinfo/ +and the primary home page is http://www.gnu.org/software/texinfo/, +secondary home page at http://texinfo.org/. Mailing lists: - bug-texinfo@gnu.org for bug reports or enhancement suggestions, - archived at ftp://ftp-mailing-list-archives.gnu.org/. + archived at ftp://ftp-mailing-list-archives.gnu.org/bug-texinfo/. - help-texinfo@gnu.org for authoring questions and general discussion. - archived at the same place. -- texinfo-pretest@tug.org for pretests of new releases, - archived at http://tug.org/archives/texinfo-pretest/. + archived at ftp://ftp-mailing-list-archives.gnu.org/help-texinfo/. +- texinfo-pretest@texinfo.org for pretests of new releases, + archived at ftp://ftp.texinfo.org/texinfo/texinfo-pretest-archive/. There are as yet no corresponding newsgroups. For bug reports, please include enough information for the maintainers to reproduce the problem. Generally speaking, that means: +- the contents of any input files necessary to reproduce the bug (crucial!). +- a description of the problem and any samples of the erroneous output. - the version number of Texinfo and the program(s) involved (use --version). - hardware, operating system, and compiler versions (uname -a). - any unusual options you gave to configure (see config.status). -- the contents of any input files necessary to reproduce the bug (crucial!). -- a description of the problem and any samples of the erroneous output. - anything else that you think would be helpful. Patches are most welcome; if possible, please make them with diff -c and include ChangeLog entries. When sending email, please do not encode or split the messages in any -way if at all possible; it's much easier to deal with one large message -than many small ones. GNU shar is a convenient way of packaging -multiple and/or binary files for email. +way if at all possible; it's easier to deal with one large message than +many small ones. GNU shar is a convenient way of packaging multiple +and/or binary files for email. For generic installation instructions on compiling and installing this @@ -47,7 +58,7 @@ Installation notes specific to Texinfo: to config.h after running configure. * For instructions on compiling this distribution with DJGPP tools - for MS-DOS and MS-Windows, please see the file djgpp/README. + for MS-DOS and MS-Windows, see the file djgpp/README. If you would like to contribute to the GNU project by implementing @@ -56,11 +67,14 @@ great. But please do not write a separate translator texi2foo for your favorite format foo! That is the hard way to do the job, and makes extra work in subsequent maintenance, since the Texinfo language is continually being enhanced and updated. Instead, the best approach is -modify Makeinfo to generate the new format, as it does now for Info and HTML. +modify Makeinfo to generate the new format, as it does now for Info, +HTML, XML, and DocBook. +If you want to convert from DocBook to Texinfo, please see +http://docbook2X.sourceforge.net/. -This distribution includes the following files, among others: +This distribution includes the following files, among others: README This file. NEWS Summary of new features by release. @@ -70,7 +84,6 @@ This distribution includes the following files, among others: Texinfo source files in this distribution. Texinfo source files (in ./doc): - texinfo.txi Describes the Texinfo language and many of the associated tools. It tells how to use Texinfo to write documentation, @@ -93,7 +106,6 @@ Texinfo source files (in ./doc): source (./info). Printing related files: - doc/texinfo.tex This TeX definitions file tells the TeX program how to typeset a Texinfo file into a DVI file ready for @@ -121,7 +133,6 @@ Source files for standalone C programs (./lib, ./makeinfo, ./info): view Info files on an ASCII terminal. Installation files: - configure This file creates creates a Makefile which in turn creates an `info' or `makeinfo' executable, or a C sources @@ -139,7 +150,6 @@ Installation files: Other files: - fixfonts This is a shell script to install the `lcircle10' TeX fonts as an alias for the `circle10' fonts. In some older diff --git a/contrib/texinfo/TODO b/contrib/texinfo/TODO index a06b40c..dfcc0f3 100644 --- a/contrib/texinfo/TODO +++ b/contrib/texinfo/TODO @@ -1,21 +1,26 @@ +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000, 01 +Free Software Foundation. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. + + If you are interested in working on any of these, email bug-texinfo@gnu.org. * Makeinfo: - - Support output of Docbook format and SGML-Tools format. - - Support output of true 8-bit characters from accent commands, etc. + - Try directory of main source file. + - Support @`{@dotless{i}} et al. in HTML. - A detexinfo program, like detex or delatex. This command would strip all the texinfo commands out, and would be used as a filter on the way to a speller. An option would be to NOT strip comments out. makeinfo --no-headers comes close. - If node name contains an @ command, complain explicitly. - - Better ASCII output: convert menus to single table of contents, - enumerate chapters and sections, convert cross-refs and indices to - chapter/section references. See: - ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/faq201s.zip - - Call Ghostscript to get ASCII output for the @image command. + - Call Ghostscript to get ASCII/jpg output for the @image command. - Better HTML output: allow settable background color, table colors and spacing, <head> meta tags, back link from footnote marker, etc. - - Could warn if @sc{TEXT} for all-caps TEXT, since it's a no-op. + - Rewrite completely to simplify generation of different formats. * TeX: - Use @ as the escape character, and Texinfo syntax generally, in the @@ -23,16 +28,16 @@ If you are interested in working on any of these, email bug-texinfo@gnu.org. multiple redefinitions of every Texinfo command in different contexts. - Handle @hsep and @vsep in @multitables. - Introduce new command to change \bindingoffset. + - Reasonable way to change fonts from the default (some work has been done). - How about using latex2html to produce HTML? + - Support 8-bit input characters, perhaps via the ec fonts. + - Repeat table headings if a @multitable is multiple pages long. * General: - - Better i18n support, including support for 8-bit input characters, - and 8-bit output in info. Perhaps have to use the ec fonts. - - Support compressed image files, automatic generation of .txt - or .jpg from .eps by Ghostscript. + - @xindexterm [def] primary [,secondary [,tertiary]] or some such? + - Support compressed image files. - Handle reference card creation, perhaps by only paying attention to sectioning and @def... commands. - - Allow : in node names for info files, for names like `class::method'. - Allow @end (and other?) commands to be indented in the source. - Get Info declared as a MIME Content-Type. @@ -45,29 +50,31 @@ If you are interested in working on any of these, email bug-texinfo@gnu.org. @caption ... @end caption <arbitrary Texinfo commands> @end figure + - multicolumn * width to take up `the rest'. + - another table command to take N succeeding items and split them + into M columns (see eplain). - support bibliographies with BibTeX (see web2c/doc for kludge prototype). - @flushboth to combine @flushleft and @flushright, for RFC's. - @part sectioning command. - Allow subitems and `see' and `see also' in indices. - - @verbatim ... @end verbatim. - @exercise/@answer command for, e.g., gawk. - Allow @hsep/@vsep at @item, instead of just in template. - - The dark corner symbol for the gawk manual. - Support automatic line numbering of examples. + - Better macro syntax. + - Allow : in node names for info files, for names like `class::method'. - Change bars. This is difficult or impossible in TeX, unfortunately. To do it right requires device driver support. - wdiff or ediff may be better in some cases, anyway. + wdiff or ediff may be all we can do. * Doc: - Include a complete functional summary, as in a reference card, in the manual. - - Improve the manuals for makeinfo, standalone info, etc. - - Page 39, need a new section on doing dedication pages. See gawk.texi + - Improve the manuals, especially for makeinfo, standalone info, etc. + - new section on doing dedication pages. See gawk.texi for an example of doing it in both the tex and info versions. * Info: - Regular expression search. - - Allow key rebinding, perhaps through the readline library. - Full-text search across all info files installed on the system. - Support character sets other than ISO Latin 1. - Perhaps comply with LANGUAGE setting on a per-node basis, to allow @@ -75,21 +82,32 @@ If you are interested in working on any of these, email bug-texinfo@gnu.org. - Search all nodes of dir file at startup, then can have INFO-DIR-SEPARATE-GROUPS and other such. - Better dir file merging. - - Steal interface ideas from Lynx: TAB for navigating to next link - within a page, number links, use color, etc. Perhaps code from the pinfo - viewer can be reused: http://zeus.polsl.gliwice.pl/~pborys/. + - Steal interface ideas from Lynx: number links, use color, etc. + Perhaps code from the pinfo viewer can be reused: + http://zeus.polsl.gliwice.pl/~pborys/. + - More sample .infokey files, so people can choose without writing their own. - q within help should quit help like C-x 0. - Incorporate an X-based viewer, perhaps tkinfo http://www.math.ucsb.edu/~boldt/tkinfo/ or saxinfo. - - Perhaps process Texinfo files directly instead of converting to Info: - ftp://ftp.cs.berkeley.edu/ucb/people/phelps/tcltk/tkman.tar.Z - + ftp://ftp.cs.berkeley.edu/ucb/people/phelps/tcltk/rman.tar.Z - + Tcl/Tk 8.0 from ftp.smli.com in the /pub/tcl directory. - From: phelps@ecstasy.CS.Berkeley.EDU (Tom Phelps) - (But this has the disadvantage of needing to be updated when the - Texinfo language changes, so don't.) -* Install-info: +* PDF: + - make each letter of the index (A, B, ...) a section in the TOC. + From Carsten Dominik <dominik@astro.uva.nl>. + + +* install-info: - be able to copy the info file to compile-time $(infodir), to simplify by-hand installation. + + +Ideas that will not be implemented: +- Process Texinfo files directly instead of converting to Info: + ftp://ftp.cs.berkeley.edu/ucb/people/phelps/tcltk/tkman.tar.Z, which + uses Tcl/Tk 8.0 from ftp.smli.com in the /pub/tcl directory. + From: phelps@ecstasy.CS.Berkeley.EDU (Tom Phelps) + [This has the disadvantage of needing to be updated when the + Texinfo language changes, so don't.] + +- Split HTML output by chapter. + [Then cross-references in HTML cannot be generated consistently.] diff --git a/contrib/texinfo/config.h.in b/contrib/texinfo/config.h.in index 7434895..ce0d6a3 100644 --- a/contrib/texinfo/config.h.in +++ b/contrib/texinfo/config.h.in @@ -1,4 +1,4 @@ -/* config.in. Generated automatically from configure.in by autoheader. */ +/* config.in. Generated automatically from configure.ac by autoheader. */ /* acconfig.h This file is in the public domain. $Id: acconfig.h,v 1.3 1998/12/06 22:04:03 karl Exp $ @@ -17,259 +17,330 @@ -/* Define if using alloca.c. */ -#undef C_ALLOCA -/* Define to empty if the keyword does not work. */ -#undef const +/* Define to 1 if including sys/ioctl.h is needed to get TIOCGWINSZ. */ +#undef GWINSZ_IN_SYS_IOCTL + +/* Define to 1 if NLS is requested. */ +#undef ENABLE_NLS + +/* Define as 1 if you have catgets and don't want to use GNU gettext. */ +#undef HAVE_CATGETS + +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +#undef HAVE_GETTEXT + +/* Define if your locale.h file contains LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES + +/* Define as 1 if you have the stpcpy function. */ +#undef HAVE_STPCPY + +/* Define to the name of the distribution. */ +#undef PACKAGE + +/* Define to the version of the distribution. */ +#undef VERSION -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ #undef CRAY_STACKSEG_END -/* Define if you have alloca, as a function or macro. */ +/* Define if using `alloca.c'. */ +#undef C_ALLOCA + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* Define if `TIOCGWINSZ' requires <sys/ioctl.h> */ +#undef GWINSZ_IN_SYS_IOCTL + +/* Define if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA -/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ +/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H -/* Define if you don't have vprintf but do have _doprnt. */ -#undef HAVE_DOPRNT - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP +/* Define if you have the <argz.h> header file. */ +#undef HAVE_ARGZ_H -/* Define if you have the strcoll function and it is properly defined. */ -#undef HAVE_STRCOLL +/* Define if you have the `bzero' function. */ +#undef HAVE_BZERO -/* Define if you have the vprintf function. */ -#undef HAVE_VPRINTF +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#undef HAVE_DCGETTEXT -/* Define as __inline if that's what the C compiler calls it. */ -#undef inline +/* Define if this function is declared. */ +#undef HAVE_DECL_STRCASECMP -/* Define if on MINIX. */ -#undef _MINIX +/* Define if this function is declared. */ +#undef HAVE_DECL_STRCOLL -/* Define to `long' if <sys/types.h> doesn't define. */ -#undef off_t +/* Define if this function is declared. */ +#undef HAVE_DECL_STRERROR -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -#undef _POSIX_1_SOURCE +/* Define if this function is declared. */ +#undef HAVE_DECL_STRNCASECMP -/* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE +/* Define if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE +/* Define if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H -/* Define if the setvbuf function takes the buffering type as its second - argument and the buffer pointer as the third, as on System V - before release 3. */ -#undef SETVBUF_REVERSED +/* Define if you have the `feof_unlocked' function. */ +#undef HAVE_FEOF_UNLOCKED -/* Define to `unsigned' if <sys/types.h> doesn't define. */ -#undef size_t +/* Define if you have the `fgets_unlocked' function. */ +#undef HAVE_FGETS_UNLOCKED -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -#undef STACK_DIRECTION +/* Define if you have the `getcwd' function. */ +#undef HAVE_GETCWD -/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ -#undef STAT_MACROS_BROKEN +/* Define if you have the `getc_unlocked' function. */ +#undef HAVE_GETC_UNLOCKED -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS +/* Define if you have the `getegid' function. */ +#undef HAVE_GETEGID -/* Define if your <sys/time.h> declares struct tm. */ -#undef TM_IN_SYS_TIME +/* Define if you have the `geteuid' function. */ +#undef HAVE_GETEUID -/* Define to 1 if NLS is requested. */ -#undef ENABLE_NLS +/* Define if you have the `getgid' function. */ +#undef HAVE_GETGID -/* Define as 1 if you have catgets and don't want to use GNU gettext. */ -#undef HAVE_CATGETS +/* Define if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE -/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +/* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT -/* Define if your locale.h file contains LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES +/* Define if you have the `getuid' function. */ +#undef HAVE_GETUID -/* Define as 1 if you have the stpcpy function. */ -#undef HAVE_STPCPY +/* Define if you have the iconv() function. */ +#undef HAVE_ICONV -/* Define if you have the __argz_count function. */ -#undef HAVE___ARGZ_COUNT +/* Define if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H -/* Define if you have the __argz_next function. */ -#undef HAVE___ARGZ_NEXT +/* Define if you have the <io.h> header file. */ +#undef HAVE_IO_H -/* Define if you have the __argz_stringify function. */ -#undef HAVE___ARGZ_STRINGIFY +/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ +#undef HAVE_LANGINFO_CODESET -/* Define if you have the bzero function. */ -#undef HAVE_BZERO +/* Define if your <locale.h> file defines LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES -/* Define if you have the dcgettext function. */ -#undef HAVE_DCGETTEXT +/* Define if you have the `bsd' library (-lbsd). */ +#undef HAVE_LIBBSD -/* Define if you have the getcwd function. */ -#undef HAVE_GETCWD +/* Define if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE +/* Define if you have the <locale.h> header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the <malloc.h> header file. */ +#undef HAVE_MALLOC_H -/* Define if you have the memcpy function. */ +/* Define if you have the `memcpy' function. */ #undef HAVE_MEMCPY -/* Define if you have the memmove function. */ +/* Define if you have the `memmove' function. */ #undef HAVE_MEMMOVE -/* Define if you have the memset function. */ +/* Define if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define if you have the `mempcpy' function. */ +#undef HAVE_MEMPCPY + +/* Define if you have the `memset' function. */ #undef HAVE_MEMSET -/* Define if you have the munmap function. */ +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if you have the `munmap' function. */ #undef HAVE_MUNMAP -/* Define if you have the putenv function. */ +/* Define if you have the <ncurses/termcap.h> header file. */ +#undef HAVE_NCURSES_TERMCAP_H + +/* Define if you have the <nl_types.h> header file. */ +#undef HAVE_NL_TYPES_H + +/* Define if you have the `putenv' function. */ #undef HAVE_PUTENV -/* Define if you have the setenv function. */ +/* Define if you have the <pwd.h> header file. */ +#undef HAVE_PWD_H + +/* Define if you have the `setenv' function. */ #undef HAVE_SETENV -/* Define if you have the setlocale function. */ +/* Define if you have the `setlocale' function. */ #undef HAVE_SETLOCALE -/* Define if you have the setvbuf function. */ +/* Define if you have the `setvbuf' function. */ #undef HAVE_SETVBUF -/* Define if you have the sigprocmask function. */ +/* Define if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK -/* Define if you have the sigsetmask function. */ +/* Define if you have the `sigsetmask' function. */ #undef HAVE_SIGSETMASK -/* Define if you have the stpcpy function. */ +/* Define if you have the <stddef.h> header file. */ +#undef HAVE_STDDEF_H + +/* Define if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define if you have the `stpcpy' function. */ #undef HAVE_STPCPY -/* Define if you have the strcasecmp function. */ +/* Define if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP -/* Define if you have the strchr function. */ +/* Define if you have the `strchr' function. */ #undef HAVE_STRCHR -/* Define if you have the strdup function. */ +/* Define if you have the `strcoll' function and it is properly defined. */ +#undef HAVE_STRCOLL + +/* Define if you have the `strdup' function. */ #undef HAVE_STRDUP -/* Define if you have the strerror function. */ +/* Define if you have the `strerror' function. */ #undef HAVE_STRERROR -/* Define if you have the strncasecmp function. */ -#undef HAVE_STRNCASECMP - -/* Define if you have the <argz.h> header file. */ -#undef HAVE_ARGZ_H - -/* Define if you have the <fcntl.h> header file. */ -#undef HAVE_FCNTL_H - -/* Define if you have the <limits.h> header file. */ -#undef HAVE_LIMITS_H - -/* Define if you have the <locale.h> header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the <malloc.h> header file. */ -#undef HAVE_MALLOC_H - -/* Define if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the <ncurses/termcap.h> header file. */ -#undef HAVE_NCURSES_TERMCAP_H - -/* Define if you have the <nl_types.h> header file. */ -#undef HAVE_NL_TYPES_H - -/* Define if you have the <pwd.h> header file. */ -#undef HAVE_PWD_H - -/* Define if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H +/* Define if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H -/* Define if you have the <string.h> header file. */ +/* Define if you have the <string.h> header file. */ #undef HAVE_STRING_H -/* Define if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H +/* Define if you have the `strncasecmp' function. */ +#undef HAVE_STRNCASECMP -/* Define if you have the <sys/fcntl.h> header file. */ +/* Define if you have the `strtoul' function. */ +#undef HAVE_STRTOUL + +/* Define if you have the <sys/fcntl.h> header file. */ #undef HAVE_SYS_FCNTL_H -/* Define if you have the <sys/file.h> header file. */ +/* Define if you have the <sys/file.h> header file. */ #undef HAVE_SYS_FILE_H -/* Define if you have the <sys/param.h> header file. */ +/* Define if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H -/* Define if you have the <sys/ptem.h> header file. */ +/* Define if you have the <sys/ptem.h> header file. */ #undef HAVE_SYS_PTEM_H -/* Define if you have the <sys/time.h> header file. */ +/* Define if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H -/* Define if you have the <sys/ttold.h> header file. */ +/* Define if you have the <sys/ttold.h> header file. */ #undef HAVE_SYS_TTOLD_H -/* Define if you have the <sys/wait.h> header file. */ +/* Define if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if you have the <sys/wait.h> header file. */ #undef HAVE_SYS_WAIT_H -/* Define if you have the <termcap.h> header file. */ +/* Define if you have the <termcap.h> header file. */ #undef HAVE_TERMCAP_H -/* Define if you have the <termio.h> header file. */ +/* Define if you have the <termios.h> header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the <termio.h> header file. */ #undef HAVE_TERMIO_H -/* Define if you have the <termios.h> header file. */ -#undef HAVE_TERMIOS_H +/* Define if you have the `tsearch' function. */ +#undef HAVE_TSEARCH -/* Define if you have the <unistd.h> header file. */ +/* Define if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define if you have the bsd library (-lbsd). */ -#undef HAVE_LIBBSD +/* Define if you have the `vprintf' function. */ +#undef HAVE_VPRINTF -/* Define if you have the i library (-li). */ -#undef HAVE_LIBI +/* Define if you have the `__argz_count' function. */ +#undef HAVE___ARGZ_COUNT + +/* Define if you have the `__argz_next' function. */ +#undef HAVE___ARGZ_NEXT + +/* Define if you have the `__argz_stringify' function. */ +#undef HAVE___ARGZ_STRINGIFY + +/* Define as const if the declaration of iconv() needs const. */ +#undef ICONV_CONST /* Name of package */ #undef PACKAGE +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + +/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ +#undef STAT_MACROS_BROKEN + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if your <sys/time.h> declares `struct tm'. */ +#undef TM_IN_SYS_TIME + /* Version number of package */ #undef VERSION -/* Define if TIOCGWINSZ requires sys/ioctl.h */ -#undef GWINSZ_IN_SYS_IOCTL +/* Define if on MINIX. */ +#undef _MINIX -/* Define if this function is declared. */ -#undef HAVE_DECL_STRERROR +/* Define if the system does not provide POSIX.1 features except with this + defined. */ +#undef _POSIX_1_SOURCE -/* Define if this function is declared. */ -#undef HAVE_DECL_STRCASECMP +/* Define if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE -/* Define if this function is declared. */ -#undef HAVE_DECL_STRNCASECMP +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const -/* Define if this function is declared. */ -#undef HAVE_DECL_STRCOLL +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +#undef inline +/* Define to `long' if <sys/types.h> does not define. */ +#undef off_t + +/* Define to `unsigned' if <sys/types.h> does not define. */ +#undef size_t /* Leave that blank line there!! Autoheader needs it. diff --git a/contrib/texinfo/doc/README b/contrib/texinfo/doc/README index c10fad9..9bd6390 100644 --- a/contrib/texinfo/doc/README +++ b/contrib/texinfo/doc/README @@ -1,6 +1,6 @@ This directory contains documentation on the Texinfo system and the TeX sources needed to process Texinfo sources. We recommend using the -texi2dvi included in the distribution to run a Texinfo manual through +texi2dvi included in this distribution to run a Texinfo manual through TeX to produce a DVI file. The .tex files are not installed automatically because TeX installations @@ -8,14 +8,14 @@ vary so widely. Installing them in the wrong place would give a false sense of security. So, you should simply cp *.tex to the appropriate place. If your installation follows the TeX Directory Structure standard (http://tug.org/tds/), this will be the directory -<texmf>/tex/texinfo/ for texinfo.tex and <texmf>/tex/plain/dvips/ for -epsf.tex. If you use the default installation paths, <texmf> will be -/usr/local/share/texmf. On systems with TeX preinstalled, as most -GNU/Linux distributions offer, <texmf> will often be something like -/usr/share/texmf. +TEXMF/tex/texinfo/ for texinfo.tex, TEXMF/tex/plain/dvips/ for epsf.tex, +and TEXMF/pdftex/plain/misc for pdfcolor.tex. If you use the default +installation paths, TEXMF will be /usr/local/share/texmf. On systems +with TeX preinstalled, as most GNU/Linux distributions offer, TEXMF +will often be something like /usr/share/texmf. It is also possible to put these .tex files in a `local' place instead -of overwriting existing ones, but it is more complicated. See your TeX +of overwriting existing ones, but this is more complicated. See your TeX documentation in general and the texmf.cnf file in particular for information. If you add files to your TeX installations, not just replace existing diff --git a/contrib/texinfo/doc/help2man b/contrib/texinfo/doc/help2man index d33f7cd..8f40e8d 100755 --- a/contrib/texinfo/doc/help2man +++ b/contrib/texinfo/doc/help2man @@ -1,7 +1,7 @@ #!/usr/local/bin/perl -w # Generate a short man page from --help and --version output. -# Copyright © 1997, 98, 99 Free Software Foundation, Inc. +# Copyright © 1997, 1998, 1999, 2000 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 @@ -18,6 +18,7 @@ # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Written by Brendan O'Dea <bod@compusol.com.au> +# Available from ftp://ftp.gnu.org/gnu/help2man/ use 5.004; use strict; @@ -26,11 +27,11 @@ use Text::Tabs qw(expand); use POSIX qw(strftime setlocale LC_TIME); my $this_program = 'help2man'; -my $this_version = '1.013'; +my $this_version = '1.24'; my $version_info = <<EOT; -$this_program $this_version +GNU $this_program $this_version -Copyright (C) 1997, 98, 99 Free Software Foundation, Inc. +Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -49,95 +50,134 @@ Usage: $this_program [OPTION]... EXECUTABLE -o, --output=FILE send output to `FILE' -N, --no-info suppress pointer to Texinfo manual --help print this help, then exit - --version print $this_program program version number, then exit + --version print version number, then exit EXECUTABLE should accept `--help' and `--version' options. + +Report bugs to <bug-help2man\@gnu.org>. EOT my $section = 1; -my ($include, $opt_name, $opt_include, $opt_output, $opt_no_info); - -# Parse options. -Getopt::Long::config('bundling'); -GetOptions ( +my ($opt_name, @opt_include, $opt_output, $opt_no_info); +my %opt_def = ( 'n|name=s' => \$opt_name, 's|section=s' => \$section, - 'i|include=s' => \$include, - 'I|opt-include=s' => \$opt_include, + 'i|include=s' => sub { push @opt_include, [ pop, 1 ] }, + 'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] }, 'o|output=s' => \$opt_output, 'N|no-info' => \$opt_no_info, - help => sub { print $help_info; exit }, - version => sub { print $version_info; exit }, +); + +# Parse options. +Getopt::Long::config('bundling'); +GetOptions (%opt_def, + help => sub { print $help_info; exit }, + version => sub { print $version_info; exit }, ) or die $help_info; die $help_info unless @ARGV == 1; my %include = (); -my @include = (); # to retain order +my %append = (); +my @include = (); # retain order given in include file + +# Provide replacement `quote-regex' operator for pre-5.005. +BEGIN { eval q(sub qr { '' =~ $_[0]; $_[0] }) if $] < 5.005 } # Process include file (if given). Format is: # -# [section name] -# verbatim text +# [section name] +# verbatim text +# +# or +# +# /pattern/ +# verbatim text +# -if ($include or $opt_include) +while (@opt_include) { - if (open INC, $include || $opt_include) + my ($inc, $required) = @{shift @opt_include}; + + next unless -f $inc or $required; + die "$this_program: can't open `$inc' ($!)\n" + unless open INC, $inc; + + my $key; + my $hash = \%include; + + while (<INC>) { - my $sect; + # [section] + if (/^\[([^]]+)\]/) + { + $key = uc $1; + $key =~ s/^\s+//; + $key =~ s/\s+$//; + $hash = \%include; + push @include, $key unless $include{$key}; + next; + } - while (<INC>) + # /pattern/ + if (m!^/(.*)/([ims]*)!) { - if (/^\[([^]]+)\]/) + my $pat = $2 ? "(?$2)$1" : $1; + + # Check pattern. + eval { $key = qr($pat) }; + if ($@) { - $sect = uc $1; - $sect =~ s/^\s+//; - $sect =~ s/\s+$//; - next; + $@ =~ s/ at .*? line \d.*//; + die "$inc:$.:$@"; } - # Silently ignore anything before the first - # section--allows for comments and revision info. - next unless $sect; - - push @include, $sect unless $include{$sect}; - $include{$sect} ||= ''; - $include{$sect} .= $_; + $hash = \%append; + next; } - close INC; - - die "$this_program: no valid information found in `$include'\n" - unless %include; - - # Compress trailing blank lines. - for (keys %include) + # Check for options before the first section--anything else is + # silently ignored, allowing the first for comments and + # revision info. + unless ($key) { - $include{$_} =~ s/\n+$//; - $include{$_} .= "\n" unless /^NAME$/; + # handle options + if (/^-/) + { + local @ARGV = split; + GetOptions %opt_def; + } + + next; } + + $hash->{$key} ||= ''; + $hash->{$key} .= $_; } - else - { - die "$this_program: can't open `$include' ($!)\n" if $include; - } + + close INC; + + die "$this_program: no valid information found in `$inc'\n" + unless $key; +} + +# Compress trailing blank lines. +for my $hash (\(%include, %append)) +{ + for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ } } # Turn off localisation of executable's ouput. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; -# Turn off localisation of date (for strftime) +# Turn off localisation of date (for strftime). setlocale LC_TIME, 'C'; -# Expand tabs, strip trailing spaces and break into paragraphs -sub paragraphs { split /\n\n+/, join '', expand @_ } - -# Grab help and version paragraphs from executable -my @help = paragraphs `$ARGV[0] --help 2>/dev/null` - or die "$this_program: can't get `--help' info from $ARGV[0]\n"; - -my @version = paragraphs `$ARGV[0] --version 2>/dev/null` - or die "$this_program: can't get `--version' info from $ARGV[0]\n"; +# Grab help and version info from executable. +my ($help_text, $version_text) = map { + join '', map { s/ +$//; expand $_ } `$ARGV[0] --$_ 2>/dev/null` + or die "$this_program: can't get `--$_' info from $ARGV[0]\n" +} qw(help version); my $date = strftime "%B %Y", localtime; (my $program = $ARGV[0]) =~ s!.*/!!; @@ -165,7 +205,7 @@ if ($opt_output) # # and seperated from any copyright/author details by a blank line. -$_ = shift @version; +($_, $version_text) = split /\n+/, $version_text, 2; if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or /^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/) @@ -187,163 +227,245 @@ else $program =~ s!.*/!!; -# no info for `info' itself +# No info for `info' itself. $opt_no_info = 1 if $program eq 'info'; -# --name overrides --include contents -$include{NAME} = "$program \\- $opt_name" if $opt_name; +# --name overrides --include contents. +$include{NAME} = "$program \\- $opt_name\n" if $opt_name; -# Default (useless) NAME paragraph -$include{NAME} ||= "$program \\- manual page for $program $version"; +# Default (useless) NAME paragraph. +$include{NAME} ||= "$program \\- manual page for $program $version\n"; # Man pages traditionally have the page title in caps. my $PROGRAM = uc $program; -# Header. -print <<EOT; -.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version. -.TH $PROGRAM "$section" "$date" "$package $version" FSF -.SH NAME -$include{NAME} -EOT +# Extract usage clause(s) [if any] for SYNOPSIS. +if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m) +{ + my @syn = $2 . $3; + + if ($_ = $4) + { + s/^\n//; + for (split /\n/) { s/^ *(or: +)?//; push @syn, $_ } + } -my $break; -my $accumulate = 1; -my @description = (); + my $synopsis = ''; + for (@syn) + { + $synopsis .= ".br\n" if $synopsis; + s!^\S*/!!; + s/^(\S+) *//; + $synopsis .= ".B $1\n"; + s/\s+$//; + s/(([][]|\.\.+)+)/\\fR$1\\fI/g; + s/^/\\fI/ unless s/^\\fR//; + $_ .= '\fR'; + s/(\\fI)( *)/$2$1/g; + s/\\fI\\fR//g; + s/^\\fR//; + s/\\fI$//; + s/^\./\\&./; + + $synopsis .= "$_\n"; + } + + $include{SYNOPSIS} ||= $synopsis; +} + +# Process text, initial section is DESCRIPTION. +my $sect = 'DESCRIPTION'; +$_ = "$help_text\n\n$version_text"; + +# Normalise paragraph breaks. +s/^\n+//; +s/\n*$/\n/; +s/\n\n+/\n\n/g; + +# Temporarily exchange leading dots, apostrophes and backslashes for +# tokens. +s/^\./\x80/mg; +s/^'/\x81/mg; +s/\\/\x82/g; + +# Start a new paragraph (if required) for these. +s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g; sub convert_option; -# Output converted --help information. -for (@help) +while (length) { - chomp; + # Convert some standard paragraph names. + if (s/^(Options|Examples): *\n//) + { + $sect = uc $1; + next; + } - if (s/^Usage: +\S+ +(.*)\n?//) + # Copyright section + if (/^Copyright +[(\xa9]/) { - # Turn the usage clause into a synopsis. - my $synopsis = ''; - - do { - my $syn = $1; - $syn =~ s/(([][]|\.\.+)+)/\\fR$1\\fI/g; - $syn =~ s/^/\\fI/ unless $syn =~ s/^\\fR//; - $syn .= '\fR'; - $syn =~ s/\\fI( *)\\fR/$1/g; - - $synopsis .= ".br\n" unless $accumulate; - $synopsis .= ".B $program\n"; - $synopsis .= "$syn\n"; - $accumulate = 0; - } while s/^(?:Usage| *or): +\S+ +(.*)\n?//; - - # Include file overrides SYNOPSIS. - print ".SH SYNOPSIS\n", $include{SYNOPSIS} || $synopsis; - - # Dump any accumulated description text. - print ".SH DESCRIPTION\n"; - print @description; - - # Add additional description text from include file. - if ($include{DESCRIPTION}) + $sect = 'COPYRIGHT'; + $include{$sect} ||= ''; + $include{$sect} .= ".PP\n" if $include{$sect}; + + my $copy; + ($copy, $_) = split /\n\n/, $_, 2; + + for ($copy) { - print ".PP\n" unless $include{DESCRIPTION} =~ /^\..P/; - print $include{DESCRIPTION}; + # Add back newline + s/\n*$/\n/; + + # Convert iso9959-1 copyright symbol or (c) to nroff + # character. + s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg; + + # Insert line breaks before additional copyright messages + # and the disclaimer. + s/(.)\n(Copyright |This +is +free +software)/$1\n.br\n$2/g; + + # Join hyphenated lines. + s/([A-Za-z])-\n */$1/g; } - $break = 1; - next unless $_; + $include{$sect} .= $copy; + $_ ||= ''; + next; } - # Accumulate text if the synopsis has not been produced yet. - if ($accumulate) + # Catch bug report text. + if (/^(Report +bugs|Email +bug +reports +to) /) { - push @description, ".PP\n" if @description; - push @description, "$_\n"; - next; + $sect = 'REPORTING BUGS'; } - # Convert some standard paragraph names - if (s/^(Options|Examples): *\n//) + # Author section. + elsif (/^Written +by/) { - print qq(.SH \U$1\n); - $break = ''; - next unless length; + $sect = 'AUTHOR'; } - # Catch bug report text. - if (/^Report bugs |^Email bug reports to /) + # Examples, indicated by an indented leading $, % or > are + # rendered in a constant width font. + if (/^( +)([\$\%>] )\S/) { - print qq(.SH "REPORTING BUGS"\n$_\n); - $break = ''; + my $indent = $1; + my $prefix = $2; + my $break = '.IP'; + $include{$sect} ||= ''; + while (s/^$indent\Q$prefix\E(\S.*)\n*//) + { + $include{$sect} .= "$break\n\\f(CW$prefix$1\\fR\n"; + $break = '.br'; + } + next; } - # Option subsections have second line indented. - if (s/^(\S.*)\n / /) + my $matched = ''; + $include{$sect} ||= ''; + + # Sub-sections have a trailing colon and the second line indented. + if (s/^(\S.*:) *\n / /) { - print qq(.SS "$1"\n); - $break = ''; + $matched .= $& if %append; + $include{$sect} .= qq(.SS "$1"\n); } - my $output = ''; - while (length) - { - my $indent = 0; + my $indent = 0; + my $content = ''; - # Tagged paragraph - if (s/^( +(\S.*?) +)(\S.*)\n?//) + # Option with description. + if (s/^( {1,10}([+-]\S.*?))(?:( +)|\n( {20,}))(\S.*)\n//) + { + $matched .= $& if %append; + $indent = length ($4 || "$1$3"); + $content = ".TP\n\x83$2\n\x83$5\n"; + unless ($4) { - $indent = length $1; - $output .= ".TP\n$2\n$3\n"; - $break = 1; + # Indent may be different on second line. + $indent = length $& if /^ {20,}/; } + } - # Indented paragraph - elsif (s/^( +)(\S.*)\n?//) - { - $indent = length $1; - $output .= ".IP\n$2\n"; - $break = 1; - } + # Option without description. + elsif (s/^ {1,10}([+-]\S.*)\n//) + { + $matched .= $& if %append; + $content = ".HP\n\x83$1\n"; + $indent = 80; # not continued + } - # Left justified paragraph - else - { - s/(.*)\n?//; - $output .= ".PP\n" if $break; - $output .= "$1\n"; - $break = 1; - } + # Indented paragraph with tag. + elsif (s/^( +(\S.*?) +)(\S.*)\n//) + { + $matched .= $& if %append; + $indent = length $1; + $content = ".TP\n\x83$2\n\x83$3\n"; + } + + # Indented paragraph. + elsif (s/^( +)(\S.*)\n//) + { + $matched .= $& if %append; + $indent = length $1; + $content = ".IP\n\x83$2\n"; + } + + # Left justified paragraph. + else + { + s/(.*)\n//; + $matched .= $& if %append; + $content = ".PP\n" if $include{$sect}; + $content .= "$1\n"; + } - # Continuations - $output .= "$1\n" while s/^ {$indent}(\S.*)\n?//; + # Append continuations. + while (s/^ {$indent}(\S.*)\n//) + { + $matched .= $& if %append; + $content .= "\x83$1\n" } - $_ = $output; + # Move to next paragraph. + s/^\n+//; - # Escape backslashes. - s/\\/\\e/g; + for ($content) + { + # Leading dot and apostrophe protection. + s/\x83\./\x80/g; + s/\x83'/\x81/g; + s/\x83//g; - # Convert options. - s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge; - print; -} + # Convert options. + s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge; + } -# Print any include items other than the ones we have already dealt -# with. -for (@include) -{ - print qq(.SH "$_"\n$include{$_}) - unless /^(NAME|SYNOPSIS|DESCRIPTION|SEE ALSO)$/; + # Check if matched paragraph contains /pat/. + if (%append) + { + for my $pat (keys %append) + { + if ($matched =~ $pat) + { + $content .= ".PP\n" unless $append{$pat} =~ /^\./; + $content .= $append{$pat}; + } + } + } + + $include{$sect} .= $content; } # Refer to the real documentation. -if ($include{'SEE ALSO'} or !$opt_no_info) +unless ($opt_no_info) { - print qq(.SH "SEE ALSO"\n); - print $include{'SEE ALSO'}, ".PP\n" if $include{'SEE ALSO'}; - - print <<EOT unless $opt_no_info; + $sect = 'SEE ALSO'; + $include{$sect} ||= ''; + $include{$sect} .= ".PP\n" if $include{$sect}; + $include{$sect} .= <<EOT; The full documentation for .B $program is maintained as a Texinfo manual. If the @@ -358,27 +480,34 @@ should give you access to the complete manual. EOT } -# Output converted --version information. -for (@version) -{ - chomp; - - # Join hyphenated lines. - s/([A-Za-z])-\n */$1/g; - - # Convert copyright symbol or (c) to nroff character. - s/Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/g; - - # Insert appropriate headings for copyright and author. - if (/^Copyright \\/) { print ".SH COPYRIGHT\n" } - elsif (/^Written +by/) { print ".SH AUTHOR\n" } - else { print ".PP\n"; } +# Output header. +print <<EOT; +.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version. +.TH $PROGRAM "$section" "$date" "$package $version" FSF +EOT - # Insert line breaks before additional copyright messages and the - # disclaimer. - s/(.)\n(Copyright |This is free software)/$1\n.br\n$2/g; +# Section ordering. +my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES); +my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO'); +my $filter = join '|', @pre, @post; - print "$_\n"; +# Output content. +for (@pre, (grep ! /^($filter)$/o, @include), @post) +{ + if ($include{$_}) + { + my $quote = /\W/ ? '"' : ''; + print ".SH $quote$_$quote\n"; + + for ($include{$_}) + { + # Replace leading dot, apostrophe and backslash tokens. + s/\x80/\\&./g; + s/\x81/\\&'/g; + s/\x82/\\e/g; + print; + } + } } exit; @@ -387,15 +516,15 @@ exit; # embolden. Option arguments get italicised. sub convert_option { - my $option = '\fB' . shift; + local $_ = '\fB' . shift; - $option =~ s/-/\\-/g; - unless ($option =~ s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/) + s/-/\\-/g; + unless (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/) { - $option =~ s/=(.)/\\fR=\\fI$1/; - $option =~ s/ (.)/ \\fI$1/; - $option .= '\fR'; + s/=(.)/\\fR=\\fI$1/; + s/ (.)/ \\fI$1/; + $_ .= '\fR'; } - $option; + $_; } diff --git a/contrib/texinfo/doc/info-stnd.texi b/contrib/texinfo/doc/info-stnd.texi index c08a8a5..aaccfd2 100644 --- a/contrib/texinfo/doc/info-stnd.texi +++ b/contrib/texinfo/doc/info-stnd.texi @@ -6,13 +6,14 @@ @synindex fn cp @synindex ky cp @comment %**end of header -@comment $Id: info-stnd.texi,v 1.23 1999/06/25 21:57:04 karl Exp $ +@comment $Id: info-stnd.texi,v 1.33 2002/03/02 15:03:54 karl Exp $ -@include version.texi +@include version-stnd.texi @dircategory Texinfo documentation system @direntry -* Standalone info program: (info-stnd). Standalone Info-reading program. +* info standalone: (info-stnd). Read Info documents without Emacs. +* infokey: (info-stnd)Invoking infokey. Compile Info customizations. @end direntry @ifinfo @@ -22,7 +23,8 @@ documentation for the Info reader that is part of GNU Emacs. If you do not know how to use Info, but have a working Info reader, you should read that documentation first. -Copyright @copyright{} 1992, 93, 96, 97, 98, 99 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 93, 96, 97, 98, 99, +2001, 02 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -54,7 +56,7 @@ approved by the Free Software Foundation. @author Brian J. Fox (bfox@@gnu.org) @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, 93, 97, 98, 99 Free Software Foundation +Copyright @copyright{} 1992, 93, 97, 98, 99, 2001, 02 Free Software Foundation This manual is for GNU Info version @value{VERSION}, @value{UPDATED}. @@ -75,6 +77,8 @@ except that this permission notice may be stated in a translation approved by the Free Software Foundation. @end titlepage +@contents + @ifnottex @node Top @top GNU Info @@ -91,8 +95,7 @@ This manual is for Info version @value{VERSION}, updated @value{UPDATED}. * What is Info:: What is Info? * Invoking Info:: Options you can pass on the command line. * Cursor Commands:: Commands which move the cursor within a node. -* Scrolling Commands:: Commands for moving the node around - in a window. +* Scrolling Commands:: Commands for reading the text within a node. * Node Commands:: Commands for selecting a new node. * Searching Commands:: Commands for searching an Info file. * Xref Commands:: Commands for selecting cross references. @@ -100,7 +103,9 @@ This manual is for Info version @value{VERSION}, updated @value{UPDATED}. * Printing Nodes:: How to print out the contents of a node. * Miscellaneous Commands:: A few commands that defy categories. * Variables:: How to change the default behavior of Info. -* GNU Info Global Index:: Global index containing keystrokes, +* Custom Key Bindings:: How to define your own key-to-command + bindings. +* Index:: Global index containing keystrokes, command names, variable names, and general concepts. @end menu @@ -120,7 +125,9 @@ that you read in Info. @node Invoking Info @chapter Invoking Info -@cindex invoking info + +@cindex Info, invoking +@cindex invoking Info @cindex command line options @cindex options, command line @cindex arguments, command line @@ -136,6 +143,7 @@ info [@var{option}]@dots{} [@var{menu-item}@dots{}] The program accepts the following options: @table @code +@anchor{--apropos} @item --apropos=@var{string} @cindex Searching all indices @cindex Info files@r{, searching all indices} @@ -147,6 +155,9 @@ you are not sure which Info file explains certain issues, this option is your friend. Note that if your system has a lot of Info files installed, searching all of them might take some time. +You can invoke the apropos command from inside Info; see +@ref{Searching Commands}. + @cindex directory path @item --directory @var{directory-path} @itemx -d @var{directory-path} @@ -229,6 +240,9 @@ another program as a way to provide online help, or as a quick way of starting to read an Info file at a certain node when you don't know the exact name of that node. +This command can also be invoked from inside Info; see @ref{Searching +Commands}. + @item --node @var{nodename} @itemx -n @var{nodename} @cindex node, selecting from the command line @@ -251,6 +265,18 @@ Each node that Info visits will be output to @var{filename} instead of interactively viewed. A value of @code{-} for @var{filename} specifies the standard output. +@cindex colors in man pages +@cindex ANSI escape sequences in man pages +@item --raw-escapes +@itemx -R +Do not remove ANSI escape sequences from man pages. Some versions of +Groff, the GNU document formatter, produce man pages with ANSI escape +sequences for bold, italics, and underlined characters, and for +colorized text. By default, Info removes those escape sequences +before it displays the man page. If your terminal supports these +escapes, use @code{--raw-escapes} to let the terminal handle them and +display the man pages with those attributes. + @cindex replaying recorded keystrokes @item --restore=@var{dribble-file} Read keystrokes from @var{dribble-file}, presumably recorded during @@ -300,6 +326,8 @@ Prints the version information of Info and exits. This option binds functions to keys differently, to emulate the key bindings of @code{vi} and Less. The default key bindings are generally modeled after Emacs. +(@xref{Custom Key Bindings}, +for a more general way of altering GNU Info's key bindings.) @item @var{menu-item} @cindex menu, following @@ -455,7 +483,8 @@ center of the window. With a numeric argument of @var{n}, @code{M-r} moves the cursor to the start of the @var{n}th line in the window. @end table -@node Scrolling Commands, Node Commands, Cursor Commands, Top + +@node Scrolling Commands @chapter Moving Text Within a Window @cindex scrolling @@ -470,17 +499,7 @@ with ``vi-like operation''. @table @asis @item @key{SPC} (@code{scroll-forward}) -@itemx @key{NEXT} (an arrow key) -@itemx @key{C-v} -@itemx @key{C-f}, vi-like operation -@itemx @key{f}, vi-like operation -@itemx @key{M-SPC}, vi-like operation @kindex SPC, in Info windows -@kindex NEXT -@kindex C-v -@kindex C-f, vi-like operation -@kindex f, vi-like operation -@kindex M-SPC, vi-like operation @findex scroll-forward Shift the text in this window up. That is, show more of the node which is currently below the bottom of the window. With a numeric argument, @@ -490,46 +509,71 @@ argument of 4 would shift all of the text in the window up 4 lines of the window. Without a numeric argument, @key{SPC} takes the bottom two lines of the window and places them at the top of the window, redisplaying almost a completely new screenful of lines. If you are at -the end of a node, SPC takes you to the ``next'' node, so that you can -read an entire manual from start to finish by repeating SPC. +the end of a node, @key{SPC} takes you to the ``next'' node, so that you can +read an entire manual from start to finish by repeating @key{SPC}. The default scroll size is one screen-full, but it can be changed by -invoking the (@code{scroll-forward-set-window}) command, @samp{z} under -@samp{--vi-keys}, with a numeric argument. +invoking the (@code{scroll-forward-page-only-set-window}) command, +@samp{z} under @samp{--vi-keys}, with a numeric argument. + +@item @key{NEXT} (an arrow key) (@code{scroll-forward-page-only}) +@itemx @key{C-v} +@itemx @key{C-f}, vi-like operation +@itemx @key{f}, vi-like operation +@itemx @key{M-SPC}, vi-like operation +@kindex NEXT +@kindex C-v +@kindex C-f, vi-like operation +@kindex f, vi-like operation +@kindex M-SPC, vi-like operation +@findex scroll-forward-page-only +Shift the text in this window up. This is identical to the @key{SPC} +operation above, except that it never scrolls beyond the end of the +current node. @kindex PageDown The @key{NEXT} key is known as the @key{PageDown} key on some -keyboards. When you use @key{NEXT} or @key{PageDown} to scroll, Info -never scrolls beyond the end of the current node. +keyboards. -@item @key{z} (@code{scroll-forward-set-window}, vi-like operation) +@item @key{z} (@code{scroll-forward-page-only-set-window}, vi-like operation) @kindex z, vi-like operation -@findex scroll-forward-set-window -Scroll forward, like with @key{SPC}, but if a numeric argument is +@findex scroll-forward-page-only-set-window +Scroll forward, like with @key{NEXT}, but if a numeric argument is specified, it becomes the default scroll size for subsequent -@code{scroll-forward} and @code{scroll-backward} commands. +@code{scroll-forward} and @code{scroll-backward} commands and their +ilk. @item @key{DEL} (@code{scroll-backward}) -@itemx @key{PREVIOUS} (arrow key) +@kindex DEL, in Info windows +@findex scroll-backward +Shift the text in this window down. The inverse of +@code{scroll-forward}. +If you are at the start of a node, @key{DEL} takes you to the +``previous'' node, so that you can read an entire manual from finish to +start by repeating @key{DEL}. The default scroll size can be changed by +invoking the (@code{scroll-backward-page-only-set-window}) command, +@samp{w} under @samp{--vi-keys}, with a numeric argument. + +@itemx @key{PREVIOUS} (arrow key) (@code{scroll-backward-page-only}) @itemx @key{PRIOR} (arrow key) @itemx @key{M-v} @itemx @key{b}, vi-like operation @itemx @key{C-b}, vi-like operation -@kindex DEL, in Info windows @kindex PREVIOUS @kindex M-v @kindex b, vi-like operation @kindex C-b, vi-like operation -@findex scroll-backward +@findex scroll-backward-page-only Shift the text in this window down. The inverse of -@code{scroll-forward}. The default scroll size can be changed by -invoking the(@code{scroll-backward-set-window}) command, @samp{w} under +@code{scroll-forward-page-only}. Does not scroll beyond the start of +the current node. The default scroll size can be changed by invoking +the(@code{scroll-backward-page-only-set-window}) command, @samp{w} under @samp{--vi-keys}, with a numeric argument. -@item @key{w} (@code{scroll-backward-set-window}, vi-like operation) +@item @key{w} (@code{scroll-backward-page-only-set-window}, vi-like operation) @kindex w, vi-like operation -@findex scroll-backward-set-window -Scroll backward, like with @key{DEL}, but if a numeric argument is +@findex scroll-backward-page-only-set-window +Scroll backward, like with @key{PREVIOUS}, but if a numeric argument is specified, it becomes the default scroll size for subsequent @code{scroll-forward} and @code{scroll-backward} commands. @@ -592,6 +636,9 @@ viewing the beginning of a node, what happens is controlled by the variable @code{scroll-behavior}. @xref{Variables, @code{scroll-behavior}}, for more information. +The @code{scroll-forward-page-only} and @code{scroll-backward-page-only} +commands never scroll beyond the current node. + @kindex PageUp The @key{PREVIOUS} key is the @key{PageUp} key on many keyboards. Emacs refers to it by the name @key{PRIOR}. When you use @key{PRIOR} or @@ -628,8 +675,9 @@ invisible. When long lines are truncated, the modeline displays the @samp{$} character near its left edge. @end table -@node Node Commands, Searching Commands, Scrolling Commands, Top -@chapter Selecting a New Node + +@node Node Commands +@chapter Selecting a Node @cindex nodes, selection of This section details the numerous Info commands which select a new node @@ -879,7 +927,8 @@ This is similar to @samp{C-x C-b} followed by @samp{m}, but no window is created. @end table -@node Searching Commands, Xref Commands, Node Commands, Top + +@node Searching Commands @chapter Searching an Info File @cindex searching @@ -965,6 +1014,11 @@ where the found index entry points to. @findex next-index-match Move to the node containing the next matching index item from the last @samp{i} command. + +@item @kbd{M-x index-apropos} +@findex index-apropos +Grovel the indices of all the known Info files on your system for a +string, and build a menu of the possible matches. @end table The most basic searching command is @samp{s} or @samp{/} @@ -993,7 +1047,23 @@ even for a string that includes only lower-case letters, by using the @samp{N} commands operate case-sensitively if the last search command was @samp{S}. -@node Xref Commands, Window Commands, Searching Commands, Top +The most efficient means of finding something quickly in a manual is +the @samp{i} command (@code{index-search}). This command prompts for +a string, and then looks for that string in all the indices of the +current Info manual. If it finds a matching index entry, it displays +the node to which that entry refers and prints the full text of the +entry in the echo area. You can press @samp{,} +(@code{next-index-match}) to find more matches. A good Info manual +has all of its important concepts indexed, so the @samp{i} command +lets you use a manual as a reference. + +If you don't know what manual documents something, try the @kbd{M-x +index-apropos}. It prompts for a string and then looks up that string +in all the indices of all the Info documents installed on your system. +It can also be invoked from the command line; see @ref{--apropos}. + + +@node Xref Commands @chapter Selecting Cross References We have already discussed the @samp{Next}, @samp{Prev}, and @samp{Up} @@ -1144,7 +1214,8 @@ On DOS/Windows only, the @kbd{Shift-@key{TAB}} key is an alias for Select the menu item or note reference appearing on this line. @end table -@node Window Commands, Printing Nodes, Xref Commands, Top + +@node Window Commands @chapter Manipulating Multiple Windows @cindex windows, manipulating @@ -1530,8 +1601,9 @@ Scroll the completions window, if that is visible, or the "other" window if not. @end table -@node Printing Nodes, Miscellaneous Commands, Window Commands, Top -@chapter Printing Out Nodes + +@node Printing Nodes +@chapter Printing Nodes @cindex printing In general, we recommend that you use @TeX{} to format the document and @@ -1559,7 +1631,8 @@ under the assumption that text written to that file will be printed by the underlying OS. @end table -@node Miscellaneous Commands, Variables, Printing Nodes, Top + +@node Miscellaneous Commands @chapter Miscellaneous Commands GNU Info contains several commands which self-document GNU Info: @@ -1729,7 +1802,8 @@ associated with a node when the node is selected by setting the variable @code{automatic-footnotes}. @xref{Variables, , @code{automatic-footnotes}}. @end table -@node Variables, GNU Info Global Index, Miscellaneous Commands, Top + +@node Variables @chapter Manipulating Variables GNU Info contains several @dfn{variables} whose values are looked at by @@ -1737,6 +1811,10 @@ various Info commands. You can change the values of these variables, and thus change the behavior of Info to more closely match your environment and Info file reading manner. +There are two ways to set the value of a variable: interactively, using +the @code{set-variable} command described below, or in the @code{#var} +section of the @code{.infokey} file. @xref{Custom Key Bindings}. + @table @asis @item @kbd{M-x set-variable} @cindex variables, setting @@ -1781,15 +1859,6 @@ window. There are exceptions to the automatic tiling; specifically, the windows @samp{*Completions*} and @samp{*Footnotes*} are @emph{not} resized through automatic tiling; they remain their original size. -@item visible-bell -@vindex visible-bell -When set to @code{On}, GNU Info attempts to flash the screen instead of -ringing the bell. This variable is @code{Off} by default. Of course, -Info can only flash the screen if the terminal allows it; in the case -that the terminal does not allow it, the setting of this variable has no -effect. However, you can make Info perform quietly by setting the -@code{errors-ring-bell} variable to @code{Off}. - @item errors-ring-bell @vindex errors-ring-bell When set to @code{On}, errors cause the bell to ring. The default @@ -1810,15 +1879,14 @@ consuming operation, and so Info tries hard not to do it twice. @code{gc-compressed-files} tells Info it is okay to garbage collect the text of the nodes of a file which was compressed on disk. -@item show-index-match -@vindex show-index-match -When set to @code{On}, the portion of the matched search string is -highlighted in the message which explains where the matched search -string was found. The default value of this variable is @code{On}. -When Info displays the location where an index match was found, -(@pxref{Searching Commands, , @code{next-index-match}}), the portion of the -string that you had typed is highlighted by displaying it in the inverse -case from its surrounding characters. +@item ISO-Latin +@cindex ISO Latin characters +@vindex ISO-Latin +When set to @code{On}, Info accepts and displays ISO Latin characters. +By default, Info assumes an ASCII character set. @code{ISO-Latin} tells +Info that it is running in an environment where the European standard +character set is in use, and allows you to input such characters to +Info, as well as display them. @item scroll-behavior @vindex scroll-behavior @@ -1858,16 +1926,234 @@ cursor (and the text it is attached to) in the center of the window. Setting this variable to 1 causes a kind of "smooth scrolling" which some people prefer. -@item ISO-Latin -@cindex ISO Latin characters -@vindex ISO-Latin -When set to @code{On}, Info accepts and displays ISO Latin characters. -By default, Info assumes an ASCII character set. @code{ISO-Latin} tells -Info that it is running in an environment where the European standard -character set is in use, and allows you to input such characters to -Info, as well as display them. +@item show-index-match +@vindex show-index-match +When set to @code{On}, the portion of the matched search string is +highlighted in the message which explains where the matched search +string was found. The default value of this variable is @code{On}. +When Info displays the location where an index match was found, +(@pxref{Searching Commands, , @code{next-index-match}}), the portion of the +string that you had typed is highlighted by displaying it in the inverse +case from its surrounding characters. + +@item visible-bell +@vindex visible-bell +When set to @code{On}, GNU Info attempts to flash the screen instead of +ringing the bell. This variable is @code{Off} by default. Of course, +Info can only flash the screen if the terminal allows it; in the case +that the terminal does not allow it, the setting of this variable has no +effect. However, you can make Info perform quietly by setting the +@code{errors-ring-bell} variable to @code{Off}. + +@end table + + +@node Custom Key Bindings +@chapter Customizing Key Bindings and Variables + +@cindex default key bindings, overriding +@cindex overriding default key bindings +@cindex customizing key bindings +@cindex key bindings, customizing +@cindex infokey +@cindex .info +@cindex .infokey +@cindex _info file (MS-DOS) + +For those whose editor/pager of choice is not Emacs and who are not +entirely satisfied with the --vi-keys option (@pxref{--vi-keys}), GNU +Info provides a way to define different key-to-command bindings and +variable settings from the defaults described in this document. + +On startup, GNU Info looks for a configuration file in the invoker's +HOME directory called @file{.info}@footnote{Due to the limitations of +DOS filesystems, the MS-DOS version of Info looks for a file +@file{_info} instead. If the @env{HOME} variable is not defined, Info +additionally looks in the current directory.}. If it is present, and +appears to contain Info configuration data, and was created with the +current version of the @code{infokey} command, then Info adopts the +key bindings and variable settings contained therein. + +The @file{.info} file contains compact, non-textual data for reasons of +efficiency and because its design was lifted wholesale from the GNU Less +program, which also does it that way. It must be created by compiling a +textual source file using the @code{infokey} command. + +@menu +* Invoking infokey:: +* infokey source format:: +@end menu + + +@node Invoking infokey +@section Invoking @command{infokey} + +@cindex invoking infokey +@cindex infokey, invoking +@cindex _infokey file (MS-DOS) + +@command{infokey} compiles a source file +(@file{$HOME/.infokey}@footnote{This file is named @file{_infokey} in +the MS-DOS version, and is looked for in the current directory if +@env{HOME} is undefined.} by default) containing Info customizations +into a binary format (@file{$HOME/.info} by default). GNU Info reads +the binary file at startup to override the default key bindings and +variable definitions. Synopsis: + +@example +infokey [@var{option}@dots{}] [@var{input-file}] +@end example + +Besides the standard @option{--help} and @option{--version}, the only +option is @option{--output @var{file}}. This tells @command{infokey} to +write the binary data to @var{file} instead of @file{$HOME/.info}. + + +@node infokey source format +@section @command{infokey} source format + +@cindex infokey source format +@cindex .infokey source format +@cindex format of .infokey source + +The format of the source file read by @command{infokey} is most easily +illustrated by example. For instance, here is a sample @file{.infokey} +source file suitable for aficionados of @command{vi} or @command{less}: + +@example +#info +j next-line +k prev-line +l forward-char +h backward-char +\kd next-line +\ku prev-line +\kr forward-char +\kl backward-char +\ scroll-forward +\kD scroll-forward-page-only +b scroll-backward +\kU scroll-backward-page-only +g beginning-of-node +\kh beginning-of-node +G end-of-node +\ke end-of-node +\t select-reference-this-line +- history-node +n next-node +p prev-node +u up-node +t top-node +d dir-node +#var +scroll-step=1 +@end example + +The source file consists of one or more @dfn{sections}. +Each section starts with a line that identifies the type of section. +Possible sections are: + +@table @code +@item #info +Key bindings for Info windows. +The start of this section is indicated by a line containing just +@code{#info} by itself. If this is the first section in the source +file, the @code{#info} line can be omitted. The rest of this section +consists of lines of the form: + +@example +@var{string} whitespace @var{action} [ whitespace [ # comment ] ] newline +@end example + +Whitespace is any sequence of one or more spaces and/or tabs. Comment +is any sequence of any characters, excluding newline. @var{string} is +the key sequence which invokes the action. @var{action} is the name of +an Info command. The characters in @var{string} are interpreted +literally or prefixed by a caret (@code{^}) to indicate a control +character. A backslash followed by certain characters specifies input +keystrokes as follows: + +@table @code +@item \b +Backspace +@item \e +Escape (ESC) +@item \n +Newline +@item \r +Return +@item \t +Tab +@item \ku +Up arrow +@item \kd +Down arrow +@item \kl +Left arrow +@item \kr +Right arrow +@item \kU +Page Up +@item \kD +Page Down +@item \kh +HOME +@item \ke +END +@item \kx +Delete (DEL) +@item \m@var{x} +Meta-@var{x} where @var{x} is any character as described above. +@end table + +Backslash followed by any other character indicates that character is to +be taken literally. Characters which must be preceded by a backslash +include caret, space, tab, and backslash itself. + +@item #echo-area +Key bindings for the echo area. +The start of this section is indicated by a line containing just +@code{#echo-area} by itself. The rest of this section has a syntax +identical to that for the key definitions for the Info area, described +above. + +@item #var +Variable initializations. +The start of this section is indicated by a line containing just +@code{#var} by itself. Following this line is a list of variable +assignments, one per line. Each line consists of a variable name +(@xref{Variables},) followed by @code{=} followed by a value. +There may be no white space between the variable name and the @code{=}, +and all characters following the @code{=}, including white space, +are included in the value. @end table +Blank lines and lines starting with @code{#} are ignored, except for +the special section header lines. + +Key bindings defined in the @file{.info} file take precedence over GNU +Info's default key bindings, whether or not @samp{--vi-keys} is used. A +default key binding may be disabled by overriding it in the @file{.info} +file with the action @code{invalid}. In addition, @emph{all} default +key bindings can be disabled by adding this line @emph{anywhere} in the +relevant section: + +@example +#stop +@end example + +This will cause GNU Info to ignore all the default key commands for that +section. + +Beware: @code{#stop} can be dangerous. Since it disables all default +key bindings, you must supply enough new key bindings to enable all +necessary actions. Failure to bind any key to the @code{quit} command, +for example, can lead to frustration. + +The order in which key bindings are defined in the @file{.info} file is +not important, except that the command summary produced by the +@code{get-help-window} command only displays the @emph{first} key that +is bound to each command. @c the following is incomplete @@ -1916,10 +2202,10 @@ Building DIR on the fly. Some common ways to organize Info files. @end ignore -@node GNU Info Global Index, , Variables, Top -@appendix Global Index + +@node Index +@appendix Index @printindex cp -@contents @bye diff --git a/contrib/texinfo/doc/info.1 b/contrib/texinfo/doc/info.1 index f572a4f..6221075 100644 --- a/contrib/texinfo/doc/info.1 +++ b/contrib/texinfo/doc/info.1 @@ -1,12 +1,11 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.013. -.TH INFO "1" "September 1999" "GNU texinfo 4.0" FSF +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.24. +.TH INFO "1" "March 2002" "GNU texinfo 4.1" FSF .SH NAME info \- read Info documents .SH SYNOPSIS .B info [\fIOPTION\fR]... [\fIMENU-ITEM\fR...] .SH DESCRIPTION -.PP Read documentation in Info format. .SH OPTIONS .TP @@ -34,6 +33,9 @@ specify nodes in first visited Info file. \fB\-\-output\fR=\fIFILENAME\fR output selected nodes to FILENAME. .TP +\fB\-\-raw\-escapes\fR +don't remove ANSI escapes from man pages. +.TP \fB\-\-restore\fR=\fIFILENAME\fR read initial keystrokes from FILENAME. .TP @@ -74,7 +76,7 @@ show file ./foo.info, not searching dir Email bug reports to bug-texinfo@gnu.org, general questions and discussion to help-texinfo@gnu.org. .SH COPYRIGHT -Copyright \(co 1999 Free Software Foundation, Inc. +Copyright \(co 2002 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. diff --git a/contrib/texinfo/doc/info.texi b/contrib/texinfo/doc/info.texi index c81bfd2..73a7033 100644 --- a/contrib/texinfo/doc/info.texi +++ b/contrib/texinfo/doc/info.texi @@ -2,8 +2,11 @@ @comment %**start of header @setfilename info.info @settitle Info +@syncodeindex fn cp +@syncodeindex vr cp +@syncodeindex ky cp @comment %**end of header -@comment $Id: info.texi,v 1.11 1999/04/19 21:37:23 karl Exp $ +@comment $Id: info.texi,v 1.22 2002/02/09 00:54:34 karl Exp $ @dircategory Texinfo documentation system @direntry @@ -14,72 +17,84 @@ This file describes how to use Info, the on-line, menu-driven GNU documentation system. -Copyright (C) 1989, 92, 96, 97, 98, 99 Free Software Foundation, Inc. +Copyright (C) 1989, 92, 96, 97, 98, 99, 2000, 2001 +Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -@ignore -Permission is granted to process this file through TeX and print the -results, provided the printed document carries copying permission -notice identical to this one except for the removal of this paragraph -(this paragraph not being relevant to the printed manual). +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being ``A GNU +Manual'', and with the Back-Cover Texts as in (a) below. A copy of the +license is included in the section entitled ``GNU Free Documentation +License'' in the Emacs manual. -@end ignore -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the entire -resulting derived work is distributed under the terms of a permission -notice identical to this one. +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify +this GNU Manual, like GNU software. Copies published by the Free +Software Foundation raise funds for GNU development.'' -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation approved -by the Free Software Foundation. +This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. @end ifinfo @titlepage @title Info -@subtitle The online, menu-driven GNU documentation system +@subtitle The online, hyper-text GNU documentation system @author Brian Fox +@author and the GNU Texinfo community @page @vskip 0pt plus 1filll -Copyright @copyright{} 1989, 92, 93, 96, 97, 98, 99 Free Software -Foundation, Inc. +Copyright @copyright{} 1989, 92, 93, 96, 97, 98, 99, 2000, 2001 +Free Software Foundation, Inc. @sp 2 Published by the Free Software Foundation @* 59 Temple Place - Suite 330 @* Boston, MA 02111-1307, USA. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the entire -resulting derived work is distributed under the terms of a permission -notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation approved -by the Free Software Foundation. +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being ``A GNU +Manual'', and with the Back-Cover Texts as in (a) below. A copy of the +license is included in the section entitled ``GNU Free Documentation +License'' in the Emacs manual. + +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify +this GNU Manual, like GNU software. Copies published by the Free +Software Foundation raise funds for GNU development.'' + +This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. @end titlepage @ifnottex @node Top @top Info: An Introduction -Info is a program for reading documentation, which you are using now. +Info is a program, which you are using now, for reading documentation of +computer programs. The GNU Project distributes most of its on-line +manuals in the Info format, so you need a program called @dfn{Info +reader} to read the manuals. One of such programs you are using now. + +@ifinfo +If you are new to Info and want to learn how to use it, type the +command @kbd{h} now. It brings you to a programmed instruction +sequence. -To learn how to use Info, type the command @kbd{h}. It brings you -to a programmed instruction sequence. +To learn advanced Info commands, type @kbd{n} twice. This brings you to +@cite{Info for Experts}, skipping over the `Getting Started' chapter. +@end ifinfo @end ifnottex @menu * Getting Started:: Getting started using an Info reader. * Advanced Info:: Advanced commands within Info. * Creating an Info File:: How to make your own Info file. +* Index:: An index of topics, commands, and variables. @end menu @node Getting Started, Advanced Info, Top, Top @@ -89,28 +104,31 @@ to a programmed instruction sequence. This first part of the Info manual describes how to get around inside of Info. The second part of the manual describes various advanced Info commands, and how to write an Info as distinct from a Texinfo -file. The third part is about how to generate Info files from +file. The third part briefly explains how to generate Info files from Texinfo files. -@iftex -This manual is primarily designed for use on a computer, so that you can -try Info commands while reading about them. Reading it on paper is less +@ifnotinfo +This manual is primarily designed for browsing with an Info reader +program on a computer, so that you can try Info commands while reading +about them. Reading it on paper or with an HTML browser is less effective, since you must take it on faith that the commands described -really do what the manual says. By all means go through this manual now -that you have it; but please try going through the on-line version as -well. +really do what the manual says. By all means go through this manual +now that you have it; but please try going through the on-line version +as well. +@cindex Info reader, how to invoke +@cindex entering Info There are two ways of looking at the online version of this manual: @enumerate @item Type @code{info} at your shell's command line. This approach uses a -small stand-alone program designed just to read Info files. +stand-alone program designed just to read Info files. @item -Type @code{emacs} at the command line; then type @kbd{C-h i} (Control -@kbd{h}, followed by @kbd{i}). This approach uses the Info mode of the -Emacs program, an editor with many other capabilities. +Type @code{emacs} at the command line; then type @kbd{C-h i} +(@kbd{Control-h}, followed by @kbd{i}). This approach uses the Info +mode of the Emacs program, an editor with many other capabilities. @end enumerate In either case, then type @kbd{mInfo} (just the letters), followed by @@ -121,88 +139,93 @@ the screen. @c Is it worth worrying about what-if the beginner goes to somebody @c else's Emacs session, which already has an Info running in the middle @c of something---in which case these simple instructions won't work? -@end iftex +@end ifnotinfo @menu * Help-Small-Screen:: Starting Info on a Small Screen * Help:: How to use Info * Help-P:: Returning to the Previous node -* Help-^L:: The Space, Rubout, B and ^L commands. +* Help-^L:: The Space, DEL, B and ^L commands. * Help-M:: Menus -* Help-Adv:: Some advanced Info commands +* Help-Xref:: Following cross-references +* Help-Int:: Some intermediate Info commands * Help-Q:: Quitting Info @end menu -@node Help-Small-Screen, Help, , Getting Started -@comment node-name, next, previous, up +@node Help-Small-Screen @section Starting Info on a Small Screen -@iftex +@ifnotinfo (In Info, you only see this section if your terminal has a small number of lines; most readers pass by it without seeing it.) -@end iftex +@end ifnotinfo -Since your terminal has an unusually small number of lines on its +@cindex small screen, moving around +Since your terminal has a relatively small number of lines on its screen, it is necessary to give you special advice at the beginning. -If you see the text @samp{--All----} at near the bottom right corner +If you see the text @samp{--All----} near the bottom right corner of the screen, it means the entire text you are looking at fits on the screen. If you see @samp{--Top----} instead, it means that there is more text below that does not fit. To move forward through the text -and see another screen full, press the Space bar, @key{SPC}. To move -back up, press the key labeled @samp{Backspace} or @key{Delete}. +and see another screen full, press @key{SPC}, the Space bar. To move +back up, press the key labeled @samp{Backspace} or @samp{DEL} (on some +keyboards, this key might be labeled @samp{Delete}). @ifinfo -Here are 40 lines of junk, so you can try Spaces and Deletes and +Here are 40 lines of junk, so you can try @key{SPC} and @key{DEL} and see what they do. At the end are instructions of what you should do next. -This is line 17 @* -This is line 18 @* -This is line 19 @* -This is line 20 @* -This is line 21 @* -This is line 22 @* -This is line 23 @* -This is line 24 @* -This is line 25 @* -This is line 26 @* -This is line 27 @* -This is line 28 @* -This is line 29 @* -This is line 30 @* -This is line 31 @* -This is line 32 @* -This is line 33 @* -This is line 34 @* -This is line 35 @* -This is line 36 @* -This is line 37 @* -This is line 38 @* -This is line 39 @* -This is line 40 @* -This is line 41 @* -This is line 42 @* -This is line 43 @* -This is line 44 @* -This is line 45 @* -This is line 46 @* -This is line 47 @* -This is line 48 @* -This is line 49 @* -This is line 50 @* -This is line 51 @* -This is line 52 @* -This is line 53 @* -This is line 54 @* -This is line 55 @* -This is line 56 @* +@format +This is line 20 +This is line 21 +This is line 22 +This is line 23 +This is line 24 +This is line 25 +This is line 26 +This is line 27 +This is line 28 +This is line 29 +This is line 30 +This is line 31 +This is line 32 +This is line 33 +This is line 34 +This is line 35 +This is line 36 +This is line 37 +This is line 38 +This is line 39 +This is line 40 +This is line 41 +This is line 42 +This is line 43 +This is line 44 +This is line 45 +This is line 46 +This is line 47 +This is line 48 +This is line 49 +This is line 50 +This is line 51 +This is line 52 +This is line 53 +This is line 54 +This is line 55 +This is line 56 +This is line 57 +This is line 58 +This is line 59 +@end format If you have managed to get here, go back to the beginning with -Delete, and come back here again, then you understand Space and -Delete. So now type an @kbd{n} ---just one character; don't type -the quotes and don't type the Return key afterward--- to -get to the normal start of the course. +@kbd{DEL} (or @key{BACKSPACE}), and come back here again, then you +understand the about the @samp{Space} and @samp{Backspace} keys. So +now type an @kbd{n} ---just one character; don't type the quotes and +don't type the Return key afterward--- to get to the normal start of +the course. @end ifinfo @node Help, Help-P, Help-Small-Screen, Getting Started @@ -211,124 +234,221 @@ get to the normal start of the course. You are talking to the program Info, for reading documentation. +@cindex node, in Info documents Right now you are looking at one @dfn{Node} of Information. A node contains text describing a specific topic at a specific -level of detail. This node's topic is ``how to use Info''. +level of detail. This node's topic is ``how to use Info''. The mode +line says that this is node @samp{Help} in the file @file{info}. +@cindex header of Info node The top line of a node is its @dfn{header}. This node's header (look at -it now) says that it is the node named @samp{Help} in the file -@file{info}. It says that the @samp{Next} node after this one is the node +it now) says that the @samp{Next} node after this one is the node called @samp{Help-P}. An advanced Info command lets you go to any node -whose name you know. - - Besides a @samp{Next}, a node can have a @samp{Previous} or an @samp{Up}. -This node has a @samp{Previous} but no @samp{Up}, as you can see. - +whose name you know. In the stand-alone Info reader program, the +header line shows the names of this node and the info file as well. +In Emacs, the header line is displayed in a special typeface, and it +doesn't scroll off the screen when you scroll the display. The names +of this node and of its Info file are omitted by Emacs from the header +line. + + Besides a @samp{Next}, a node can have a @samp{Previous} or an +@samp{Up} links, or both. As you can see, this node has all of these +links. + +@kindex n @r{(Info mode)} Now it is time to move on to the @samp{Next} node, named @samp{Help-P}. ->> Type @samp{n} to move there. Type just one character; +@format +>> Type @kbd{n} to move there. Type just one character; do not type the quotes and do not type a @key{RET} afterward. +@end format +@noindent @samp{>>} in the margin means it is really time to try a command. +@format +>> If you have a mouse, and if you already practiced typing @kbd{n} + to get to the next node, click now with the right mouse button on + the @samp{Next} link to do the same ``the mouse way''. +@end format + @node Help-P, Help-^L, Help, Getting Started @comment node-name, next, previous, up @section Returning to the Previous node +@kindex p @r{(Info mode)} This node is called @samp{Help-P}. The @samp{Previous} node, as you see, is @samp{Help}, which is the one you just came from using the @kbd{n} command. Another @kbd{n} command now would take you to the next -node, @samp{Help-^L}. - ->> But do not do that yet. First, try the @kbd{p} command, which takes - you to the @samp{Previous} node. When you get there, you can do an - @kbd{n} again to return here. +node, @samp{Help-^L}. In Emacs, @kbd{n} runs the Emacs command +@code{Info-next}, and @kbd{p} runs @code{Info-prev}. + +@format +>> But do not type @kbd{n} yet. First, try the @kbd{p} command, + or click the mouse on the @samp{Prev} link, which takes you to the + @samp{Previous} node. When you get there, you can do an @kbd{n} + again to return here. +@end format + + If you read this in Emacs, you will see an @samp{Info} item in the +menu bar, close to its right edge. Clicking your mouse on the +@samp{Info} menu-bar item opens a menu of commands which include +@samp{Next} and @samp{Prev} (and also some others which you didn't yet +learn about). This all probably seems insultingly simple so far, but @emph{do not} be led into skimming. Things will get more complicated soon. Also, do not try a new command until you are told it is time to. Otherwise, you may make Info skip past an important warning that was coming up. ->> Now do an @kbd{n} to get to the node @samp{Help-^L} and learn more. +@format +>> Now do an @kbd{n}, or click the mouse on the @samp{Next} link, to + get to the node @samp{Help-^L} and learn more. +@end format @node Help-^L, Help-M, Help-P, Getting Started @comment node-name, next, previous, up -@section The Space, Delete, B and ^L commands. +@section The Space, DEL, B and ^L commands. - This node's header tells you that you are now at node @samp{Help-^L}, and -that @kbd{p} would get you back to @samp{Help-P}. The node's title is -underlined; it says what the node is about (most nodes have titles). + This node's mode line tells you that you are now at node @samp{Help-^L}, +and the header line tells you that @kbd{p} would get you back to +@samp{Help-P}. The node's title is underlined; it says what the node +is about (most nodes have titles). This is a big node and it does not all fit on your display screen. You can tell that there is more that is not visible because you can see the string @samp{--Top-----} rather than @samp{--All----} near the bottom right corner of the screen. - The Space, Delete and @kbd{B} commands exist to allow you to ``move -around'' in a node that does not all fit on the screen at once. -Space moves forward, to show what was below the bottom of the screen. -Delete moves backward, to show what was above the top of the screen -(there is not anything above the top until you have typed some spaces). - ->> Now try typing a Space (afterward, type a Delete to return here). - - When you type the space, the two lines that were at the bottom of -the screen appear at the top, followed by more lines. Delete takes -the two lines from the top and moves them to the bottom, -@emph{usually}, but if there are not a full screen's worth of lines -above them they may not make it all the way to the bottom. - - If you type Space when there is no more to see, it rings the -bell and otherwise does nothing. The same goes for Delete when -the header of the node is visible. - - If your screen is ever garbaged, you can tell Info to print it out -again by typing @kbd{C-l} (@kbd{Control-L}, that is---hold down ``Control'' and -type an @key{L} or @kbd{l}). - +@kindex SPC @r{(Info mode)} +@kindex DEL @r{(Info mode)} +@kindex BACKSPACE @r{(Info mode)} +@findex Info-scroll-up +@findex Info-scroll-down + The @key{SPC}, @key{BACKSPACE} (or @key{DEL})@footnote{The key which +we call ``Backspace or DEL'' in this manual is labeled differently on +different keyboards. Look for a key which is a little ways above the +@key{ENTER} or @key{RET} key and which you normally use outside Emacs +to erase the character before the cursor, i.e.@: the character you +typed last. It might be labeled @samp{Backspace} or @samp{<-} or +@samp{DEL}, or sometimes @samp{Delete}.} and @kbd{b} commands exist to +allow you to ``move around'' in a node that does not all fit on the +screen at once. @key{SPC} moves forward, to show what was below the +bottom of the screen. @key{DEL} or @key{BACKSPACE} moves backward, to +show what was above the top of the screen (there is not anything above +the top until you have typed some spaces). In Emacs, @key{SPC} runs +the command @code{Info-scroll-up}, while @key{BACKSPACE} runs +@code{Info-scroll-down}. + +@format +>> Now try typing a @key{SPC} (afterward, type a @key{BACKSPACE} to + return here). +@end format + + When you type the @key{SPC}, the two lines that were at the bottom of +the screen appear at the top, followed by more lines. @key{DEL} or +@key{BACKSPACE} takes the two lines from the top and moves them to the +bottom, @emph{usually}, but if there are not a full screen's worth of +lines above them they may not make it all the way to the bottom. + + If you are reading this in Emacs, note that the header line is +always visible, never scrolling off the display. That way, you can +always see the @samp{Next}, @samp{Prev}, and @samp{Up} links, and you +can conveniently go to one of these links from anywhere in the node by +clicking the mouse on one of these links. + +@cindex reading Info documents top to bottom +@cindex Info documents as tutorials + @key{SPC} and @key{DEL} not only move forward and backward through +the current node. When these keys hit the beginning or the end of the +current node, they move to preceding or subsequent nodes. +Specifically, they scroll through all the nodes in an Info file as a +single logical sequence. In this sequence, a node's subnodes appear +following their parent. If a node has a menu, @key{SPC} takes you +into the subnodes listed in the menu, one by one. Once you reach the +end of a node, and have seen all of its subnodes, @key{SPC} takes you +to the next node or to the parent's next node. This is so you could +read the entire manual top to bottom by just typing @key{SPC}. + +@kindex PAGEUP @r{(Info mode)} +@kindex PAGEDOWN @r{(Info mode)} + Many keyboards nowadays have two scroll keys labeled @samp{PageUp} +and @samp{PageDown} (or maybe @samp{Prior} and @samp{Next}). If your +keyboard has these keys, you can use them to move forward and backward +through the text, like with @key{SPC} and @key{BACKSPACE}. However, +unlike @key{SPC} and @key{BACKSPACE}, @key{PAGEUP} and @key{PAGEDOWN} +keys will never scroll beyond the beginning or the end of the current +node. + +@kindex C-l @r{(Info mode)} + If your screen is ever garbaged, you can tell Info to display it +again by typing @kbd{C-l} (@kbd{Control-L}, that is---hold down +@key{CTRL} and type @kbd{L} or @kbd{l}). + +@format >> Type @kbd{C-l} now. +@end format +@kindex b @r{(Info mode)} To move back to the beginning of the node you are on, you can type -a lot of Deletes. You can also type simply @kbd{b} for beginning. +a lot of @key{BACKSPACE} keys. You can also type simply @kbd{b} for +beginning. + +@format >> Try that now. (We have put in enough verbiage to push this past -the first screenful, but screens are so big nowadays that perhaps it -isn't enough. You may need to shrink your Emacs or Info window.) -Then come back, with Spaces. + the first screenful, but screens are so big nowadays that perhaps it + isn't enough. You may need to shrink your Emacs or Info window.) + Then come back, with @key{SPS}s. +@end format If your screen is very tall, all of this node might fit at once. -In that case, "b" won't do anything. Sorry; what can we do? +In that case, @kbd{b} won't do anything. Sorry; what can we do? +@kindex ? @r{(Info mode)} +@findex Info-summary You have just learned a considerable number of commands. If you want to use one but have trouble remembering which, you should type -a @key{?} which prints out a brief list of commands. When you are -finished looking at the list, make it go away by pressing @key{SPC} -repeatedly. +a @kbd{?} (in Emacs it runs the @code{Info-summary} command) which +displays a brief list of commands. When you are finished looking at +the list, make it go away by typing a @key{SPC} repeatedly. +@format >> Type a @key{?} now. Press @key{SPC} to see consecutive screenfuls of ->> the list until finished. + the list until finished. Then type @key{SPC} several times, until + it goes away. +@end format + + (If you are using the stand-alone Info reader, type @kbd{C-x 0} to +return here, that is---press and hold @key{CTRL}, type an @kbd{x}, +then release @key{CTRL} and @kbd{x}, and press @kbd{0}---a zero, not +the letter ``o''.) From now on, you will encounter large nodes without warning, and -will be expected to know how to use Space and Delete to move -around in them without being told. Since not all terminals have +will be expected to know how to use @key{SPC} and @key{BACKSPACE} to +move around in them without being told. Since not all terminals have the same size screen, it would be impossible to warn you anyway. ->> Now type @kbd{n} to see the description of the @kbd{m} command. +@format +>> Now type @kbd{n}, or click the mouse on the @samp{Next} link, to + see the description of the @kbd{m} command. +@end format -@node Help-M, Help-Adv, Help-^L, Getting Started +@node Help-M, Help-Xref, Help-^L, Getting Started @comment node-name, next, previous, up -@section Menus - -Menus and the @kbd{m} command - - With only the @kbd{n} and @kbd{p} commands for moving between nodes, nodes -are restricted to a linear sequence. Menus allow a branching -structure. A menu is a list of other nodes you can move to. It is -actually just part of the text of the node formatted specially so that -Info can interpret it. The beginning of a menu is always identified -by a line which starts with @samp{* Menu:}. A node contains a menu if and -only if it has a line in it which starts that way. The only menu you -can use at any moment is the one in the node you are in. To use a -menu in any other node, you must move to that node first. +@section Menus and the @kbd{m} command + +@cindex menus in an Info document +@cindex Info menus + With only the @kbd{n} (next) and @kbd{p} (previous) commands for +moving between nodes, nodes are restricted to a linear sequence. +Menus allow a branching structure. A menu is a list of other nodes +you can move to. It is actually just part of the text of the node +formatted specially so that Info can interpret it. The beginning of a +menu is always identified by a line which starts with @samp{* Menu:}. +A node contains a menu if and only if it has a line in it which starts +that way. The only menu you can use at any moment is the one in the +node you are in. To use a menu in any other node, you must move to +that node first. After the start of the menu, each line that starts with a @samp{*} identifies one subtopic. The line usually contains a brief name @@ -339,13 +459,13 @@ special meaning---they are only for the human reader's benefit and do not define additional subtopics. Here is an example: @example -* Foo: FOO's Node This tells about FOO +* Foo: Node about FOO This tells about FOO @end example -The subtopic name is Foo, and the node describing it is @samp{FOO's Node}. -The rest of the line is just for the reader's Information. -[[ But this line is not a real menu item, simply because there is -no line above it which starts with @samp{* Menu:}.]] +The subtopic name is Foo, and the node describing it is @samp{Node +about FOO}. The rest of the line is just for the reader's +Information. [[ But this line is not a real menu item, simply because +there is no line above it which starts with @samp{* Menu:}.]] When you use a menu to go to another node (in a way that will be described soon), what you specify is the subtopic name, the first @@ -366,37 +486,42 @@ abbreviation for this: This means that the subtopic name and node name are the same; they are both @samp{Foo}. ->> Now use Spaces to find the menu in this node, then come back to - the front with a @kbd{b} and some Spaces. As you see, a menu is +@format +>> Now use @key{SPC} to find the menu in this node, then come back to + the front with a @kbd{b} and some @key{SPC}s. As you see, a menu is actually visible in its node. If you cannot find a menu in a node by looking at it, then the node does not have a menu and the @kbd{m} command is not available. +@end format +@kindex m @r{(Info mode)} The command to go to one of the subnodes is @kbd{m}---but @emph{do -not do it yet!} Before you use @kbd{m}, you must understand the -difference between commands and arguments. So far, you have learned -several commands that do not need arguments. When you type one, Info -processes it and is instantly ready for another command. The @kbd{m} -command is different: it is incomplete without the @dfn{name of the -subtopic}. Once you have typed @kbd{m}, Info tries to read the -subtopic name. +not do it yet!} Before you use @kbd{m}, you need to learn about +commands which prompt you for more input. So far, you have learned +several commands that do not need additional input; when you typed +one, Info processed it and was instantly ready for another command. +The @kbd{m} command is different: it is incomplete without the +@dfn{name of the subtopic}. Once you have typed @kbd{m}, Info tries +to read the subtopic name. Now look for the line containing many dashes near the bottom of the screen. There is one more line beneath that one, but usually it is blank. If it is empty, Info is ready for a command, such as @kbd{n} -or @kbd{b} or Space or @kbd{m}. If that line contains text ending -in a colon, it mean Info is trying to read the @dfn{argument} to a +or @kbd{b} or @key{SPC} or @kbd{m}. If that line contains text ending +in a colon, it means Info is trying to read more input for the last command. At such times, commands do not work, because Info tries to -use them as the argument. You must either type the argument and +use them as the input it needs. You must either type your response and finish the command you started, or type @kbd{Control-g} to cancel the command. When you have done one of those things, the line becomes blank again. +@findex Info-menu The command to go to a subnode via a menu is @kbd{m}. After you type the @kbd{m}, the line at the bottom of the screen says @samp{Menu item: }. You must then type the name of the subtopic you want, and end it with -a @key{RET}. +a @key{RET}. In Emacs, @kbd{m} runs the command @code{Info-menu}. +@cindex abbreviating Info subnodes You can abbreviate the subtopic name. If the abbreviation is not unique, the first matching subtopic is chosen. Some menus put the shortest possible abbreviation for each subtopic name in capital @@ -406,14 +531,15 @@ subtopic. You should not put any spaces at the end, or inside of the item name, except for one space where a space appears in the item in the menu. +@cindex completion of Info node names You can also use the @dfn{completion} feature to help enter the subtopic -name. If you type the Tab key after entering part of a name, it will +name. If you type the @key{TAB} key after entering part of a name, it will magically fill in more of the name---as much as follows uniquely from what you have entered. If you move the cursor to one of the menu subtopic lines, then you do -not need to type the argument: you just type a Return, and it stands for -the subtopic of the line you are on. +not need to type the argument: you just type a @key{RET}, and it +stands for the subtopic of the line you are on. Here is a menu to give you a chance to practice. This menu gives you three ways of going to one place, Help-FOO: @@ -424,66 +550,191 @@ three ways of going to one place, Help-FOO: * Help-FOO:: And yet another! @end menu +@format >> Now type just an @kbd{m} and see what happens: +@end format Now you are ``inside'' an @kbd{m} command. Commands cannot be used now; the next thing you will type must be the name of a subtopic. - You can change your mind about doing the @kbd{m} by typing Control-g. + You can change your mind about doing the @kbd{m} by typing +@kbd{Control-g}. +@format >> Try that now; notice the bottom line clear. +@end format +@format >> Then type another @kbd{m}. +@end format ->> Now type @samp{BAR} item name. Do not type Return yet. +@format +>> Now type @kbd{BAR}, the item name. Do not type @key{RET} yet. +@end format - While you are typing the item name, you can use the Delete key to -cancel one character at a time if you make a mistake. + While you are typing the item name, you can use the @key{DEL} (or +@key{BACKSPACE}) key to cancel one character at a time if you make a +mistake. ->> Type one to cancel the @samp{R}. You could type another @samp{R} to - replace it. You do not have to, since @samp{BA} is a valid abbreviation. +@format +>> Press @key{DEL} to cancel the @samp{R}. You could type another @kbd{R} + to replace it. But you do not have to, since @samp{BA} is a valid + abbreviation. +@end format +@format >> Now you are ready to go. Type a @key{RET}. - - After visiting Help-FOO, you should return here. - ->> Type @kbd{n} to see more commands. - -@c If a menu appears at the end of this node, remove it. -@c It is an accident of the menu updating command. - -Here is another way to get to Help-FOO, a menu. You can ignore this -if you want, or else try it (but then please come back to here). +@end format + + After visiting @samp{Help-FOO}, you should return here. + + Another way to move to the menu subtopic lines and between them is +to type @key{TAB}. Each time you type a @key{TAB}, you move to the +next subtopic line. To move to a previous subtopic line, type +@kbd{M-@key{TAB}}---that is, press and hold the @key{META} key and then +press @key{TAB}. (On some keyboards, the @key{META} key might be labeled +@samp{Alt}.) + + Once you move cursor to a subtopic line, press @key{RET} to go to +that subtopic's node. + +@cindex mouse support in Info mode +@kindex Mouse-2 @r{(Info mode)} + If your terminal supports a mouse, you have yet another way of going +to a subtopic. Move your mouse pointer to the subtopic line, +somewhere between the beginning @samp{*} and the colon @samp{:} which +ends the subtopic's brief name. You will see the subtopic's name +change its appearance (usually, its background color will change), and +the shape of the mouse pointer will change if your platform supports +that. After a while, if you leave the mouse on that spot, a tooltip +will pop up saying ``Mouse-2: go to that node''. (If the tooltips are +turned off or unavailable, this message is displayed in the @dfn{echo +area}, the bottom screen line where you typed the menu subtopics in +response to the prompt.) @kbd{Mouse-2} is the second button of your +mouse counting from the left---the rightmost button for two-button +mice, the middle button for 3-button mice. So pressing @kbd{Mouse-2} +while the mouse pointer is on a menu subtopic goes to that subtopic. + +@findex Info-mouse-follow-nearest-node + More generally, @kbd{Mouse-2} in an Info buffer runs the Emacs +command @code{Info-mouse-follow-nearest-node}, which finds the nearest +link to another node and goes there. For example, near a cross +reference it acts like @kbd{f}, in a menu it acts like @kbd{m}, on the +node's header line it acts like @kbd{n}, @kbd{p}, or @kbd{u}, etc. At +end of the node's text @kbd{Mouse-2} moves to the next node, or up if +there's no next node. + + Here is another way to get to Help-FOO, a menu. You can ignore this +if you want, or else try it by typing @key{TAB} and then @key{RET}, or +clicking @kbd{Mouse-2} on it (but then please come back to here). @menu * Help-FOO:: @end menu +@format +>> Type @kbd{n} to see more commands. +@end format + @node Help-FOO, , , Help-M -@comment node-name, next, previous, up @subsection The @kbd{u} command - Congratulations! This is the node @samp{Help-FOO}. Unlike the other -nodes you have seen, this one has an @samp{Up}: @samp{Help-M}, the node you -just came from via the @kbd{m} command. This is the usual -convention---the nodes you reach from a menu have @samp{Up} nodes that lead -back to the menu. Menus move Down in the tree, and @samp{Up} moves Up. -@samp{Previous}, on the other hand, is usually used to ``stay on the same -level but go backwards'' + Congratulations! This is the node @samp{Help-FOO}. It has an @samp{Up} +pointer @samp{Help-M}, the node you just came from via the @kbd{m} +command. This is the usual convention---the nodes you reach from a menu +have @samp{Up} nodes that lead back to the menu. Menus move Down in the +tree, and @samp{Up} moves Up. @samp{Previous}, on the other hand, is +usually used to ``stay on the same level but go backwards''. +@kindex u @r{(Info mode)} +@findex Info-up You can go back to the node @samp{Help-M} by typing the command -@kbd{u} for ``Up''. That puts you at the @emph{front} of the -node---to get back to where you were reading you have to type -some @key{SPC}s. +@kbd{u} for ``Up'' (the Emacs command run by @kbd{u} is +@code{Info-up}). That puts you at the @emph{front} of the node---to +get back to where you were reading you have to type some @key{SPC}s. +(Some Info readers, such as the one built into Emacs, put you at the +same place where you were reading in @samp{Help-M}.) + + Another way to go Up is to click on the @samp{Up} pointer shown in +the header line (provided that you have a mouse). +@format >> Now type @kbd{u} to move back up to @samp{Help-M}. +@end format -@node Help-Adv, Help-Q, Help-M, Getting Started +@node Help-Xref, Help-Int, Help-M, Getting Started @comment node-name, next, previous, up -@section Some advanced Info commands +@section Following Cross-References + +@cindex cross references in Info documents + In Info documentation, you will see many @dfn{cross references}. +Cross references look like this: @xref{Help-Cross, Cross}. That text +is a real, live cross reference, whose name is @samp{Cross} and which +points to the node named @samp{Help-Cross}. + +@kindex f @r{(Info mode)} +@findex Info-follow-reference + There are two ways to follow a cross reference. You can move the +cursor to it and press @key{RET}, just as in a menu. @key{RET} +follows the cross reference that the cursor is on. Or you can type +@kbd{f} and then specify the name of the cross reference (in this +case, @samp{Cross}) as an argument. In Emacs Info, @kbd{f} runs +@code{Info-follow-reference}, + + In the @kbd{f} command, you select the cross reference with its +name, so it does not matter where the cursor was. If the cursor is on +or near a cross reference, @kbd{f} suggests that reference name in +parentheses as the default; typing @key{RET} will follow that +reference. However, if you type a different reference name, @kbd{f} +will follow the other reference which has that name. + +@format +>> Type @kbd{f}, followed by @kbd{Cross}, and then @key{RET}. +@end format + + As you enter the reference name, you can use the @key{DEL} (or +@key{BACKSPACE}) key to edit your input. If you change your mind +about following any reference, you can use @kbd{Control-g} to cancel +the command. Completion is available in the @kbd{f} command; you can +complete among all the cross reference names in the current node by +typing a @key{TAB}. + + To get a list of all the cross references in the current node, you +can type @kbd{?} after an @kbd{f}. The @kbd{f} continues to await a +cross reference name even after displaying the list, so if you don't +actually want to follow a reference, you should type a @kbd{Control-g} +to cancel the @kbd{f}. + +@format +>> Type @kbd{f?} to get a list of the cross references in this node. Then + type a @kbd{Control-g} and see how the @samp{f} gives up. +@end format - The course is almost over, so please stick with it to the end. + The @key{TAB} and @kbd{M-@key{TAB}} key, which move between menu +items in a menu, also move between cross references outside of menus. +@node Help-Int, Help-Q, Help-Xref, Getting Started +@comment node-name, next, previous, up +@section Some intermediate Info commands + + The introductory course is almost over; please continue +a little longer to learn some intermediate-level commands. + + Most Info files have an index, which is actually a large node that +contains nothing but a menu. The menu has one menu item for each +topic listed in the index. You can find the index node from the main +menu of the file, with the @kbd{m} command; then you can use the +@kbd{m} command again in the index node to go to the node that +describes the topic. + + There is also a short-cut Info command, @kbd{i}, which does all of +that for you. It searches the index for a given topic (a string) and +goes to the node which is listed in the index for that topic. +@xref{Info Search}, for a full explanation. + +@kindex l @r{(Info mode)} +@findex Info-last +@cindex going back in Info mode If you have been moving around to different nodes and wish to retrace your steps, the @kbd{l} command (@kbd{l} for @dfn{last}) will do that, one node-step at a time. As you move from node to node, Info @@ -496,166 +747,235 @@ you back to @samp{Help-M}. Another @kbd{l} command would undo the @kbd{u} and get you back to @samp{Help-FOO}. Another @kbd{l} would undo the @kbd{m} and get you back to @samp{Help-M}. ->> Try typing three @kbd{l}'s, pausing in between to see what each - @kbd{l} does. + In Emacs, @kbd{l} runs the command @code{Info-last}. -Then follow directions again and you will end up back here. +@format +>> Try typing three @kbd{l}'s, pausing in between to see what each + @kbd{l} does. Then follow directions again and you will end up + back here. +@end format Note the difference between @kbd{l} and @kbd{p}: @kbd{l} moves to where @emph{you} last were, whereas @kbd{p} always moves to the node -which the header says is the @samp{Previous} node (from this node, to -@samp{Help-M}). - - The @samp{d} command gets you instantly to the Directory node. -This node, which is the first one you saw when you entered Info, -has a menu which leads (directly, or indirectly through other menus), -to all the nodes that exist. - ->> Try doing a @samp{d}, then do an @kbd{l} to return here (yes, +which the header says is the @samp{Previous} node (from this node, the +@samp{Prev} link leads to @samp{Help-M}). + +@kindex d @r{(Info mode)} +@findex Info-directory +@cindex go to Directory node + The @kbd{d} command (@code{Info-directory} in Emacs) gets you +instantly to the Directory node. This node, which is the first one +you saw when you entered Info, has a menu which leads (directly or +indirectly, through other menus), to all the nodes that exist. The +Directory node lists all the manuals and other Info documents that +are, or could be, installed on your system. + +@format +>> Try doing a @kbd{d}, then do an @kbd{l} to return here (yes, @emph{do} return). - - Sometimes, in Info documentation, you will see a cross reference. -Cross references look like this: @xref{Help-Cross, Cross}. That is a -real, live cross reference which is named @samp{Cross} and points at -the node named @samp{Help-Cross}. - - If you wish to follow a cross reference, you must use the @samp{f} -command. The @samp{f} must be followed by the cross reference name -(in this case, @samp{Cross}). While you enter the name, you can use the -Delete key to edit your input. If you change your mind about following -any reference, you can use @kbd{Control-g} to cancel the command. - - Completion is available in the @samp{f} command; you can complete among -all the cross reference names in the current node by typing a Tab. - ->> Type @samp{f}, followed by @samp{Cross}, and a @key{RET}. - - To get a list of all the cross references in the current node, you can -type @kbd{?} after an @samp{f}. The @samp{f} continues to await a -cross reference name even after printing the list, so if you don't -actually want to follow a reference, you should type a @kbd{Control-g} -to cancel the @samp{f}. - ->> Type "f?" to get a list of the cross references in this node. Then - type a @kbd{Control-g} and see how the @samp{f} gives up. - +@end format + +@kindex t @r{(Info mode)} +@findex Info-top-node +@cindex go to Top node + The @kbd{t} command moves to the @samp{Top} node of the manual. +This is useful if you want to browse the manual's main menu, or select +some specific top-level menu item. The Emacs command run by @kbd{t} +is @code{Info-top-node}. + + Clicking @kbd{Mouse-2} on or near a cross reference also follows the +reference. You can see that the cross reference is mouse-sensitive by +moving the mouse pointer to the reference and watching how the +underlying text and the mouse pointer change in response. + +@format >> Now type @kbd{n} to see the last node of the course. +@end format + + @xref{Advanced Info}, for more advanced Info features. @c If a menu appears at the end of this node, remove it. @c It is an accident of the menu updating command. -@node Help-Cross, , , Help-Adv -@subsection The node reached by the cross reference in Info - - This is the node reached by the cross reference named @samp{Cross}. - - While this node is specifically intended to be reached by a cross -reference, most cross references lead to nodes that ``belong'' someplace -else far away in the structure of Info. So you cannot expect the -footnote to have a @samp{Next}, @samp{Previous} or @samp{Up} pointing -back to where you came from. In general, the @kbd{l} (el) command is -the only way to get back there. - ->> Type @kbd{l} to return to the node where the cross reference was. - -@node Help-Q, , Help-Adv, Getting Started -@comment node-name, next, previous, up -@section Quitting Info - - To get out of Info, back to what you were doing before, type @kbd{q} -for @dfn{Quit}. - - This is the end of the course on using Info. There are some other -commands that are meant for experienced users; they are useful, and you -can find them by looking in the directory node for documentation on -Info. Finding them will be a good exercise in using Info in the usual -manner. - ->> Type @samp{d} to go to the Info directory node; then type - @samp{mInfo} and Return, to get to the node about Info and - see what other help is available. - - @node Advanced Info @chapter Info for Experts -This chapter describes various advanced Info commands, and how to write -an Info as distinct from a Texinfo file. (However, in most cases, writing a -Texinfo file is better, since you can use it @emph{both} to generate an -Info file and to make a printed manual. @xref{Top,, Overview of -Texinfo, texinfo, Texinfo}.) + This chapter describes various advanced Info commands. (If you are +using a stand-alone Info reader, there are additional commands +specific to it, which are documented in several chapters of @ref{Top,, +GNU Info, info-stnd, GNU Info}.) + + This chapter also explains how to write an Info as distinct from a +Texinfo file. (However, in most cases, writing a Texinfo file is +better, since you can use it @emph{both} to generate an Info file and +to make a printed manual. @xref{Top,, Overview of Texinfo, texinfo, +Texinfo: The GNU Documentation Format}.) @menu * Expert:: Advanced Info commands: g, s, e, and 1 - 5. +* Info Search:: How to search Info documents for specific subjects. * Add:: Describes how to add new nodes to the hierarchy. Also tells what nodes look like. * Menus:: How to add to or create menus in Info nodes. * Cross-refs:: How to add cross-references to Info nodes. -* Tags:: How to make tag tables for Info files. +* Tags:: How to make tags tables for Info files. * Checking:: Checking an Info File * Emacs Info Variables:: Variables modifying the behavior of Emacs Info. @end menu -@node Expert, Add, , Advanced Info +@node Expert, Info Search, , Advanced Info @comment node-name, next, previous, up @section Advanced Info Commands -@kbd{g}, @kbd{s}, @kbd{1}, -- @kbd{9}, and @kbd{e} +Here are some more Info commands that make it easier to move around. -If you know a node's name, you can go there by typing @kbd{g}, the +@unnumberedsubsec @kbd{g} goes to a node by name + +@kindex g @r{(Info mode)} +@findex Info-goto-node +@cindex go to a node by name + If you know a node's name, you can go there by typing @kbd{g}, the name, and @key{RET}. Thus, @kbd{gTop@key{RET}} would go to the node -called @samp{Top} in this file (its directory node). -@kbd{gExpert@key{RET}} would come back here. +called @samp{Top} in this file. (This is equivalent to @kbd{t}, see +@ref{Help-Int}.) @kbd{gExpert@key{RET}} would come back here. +@kbd{g} in Emacs runs the command @code{Info-goto-node}. -Unlike @kbd{m}, @kbd{g} does not allow the use of abbreviations. + Unlike @kbd{m}, @kbd{g} does not allow the use of abbreviations. +But it does allow completion, so you can type @key{TAB} to complete a +partial node name. -To go to a node in another file, you can include the filename in the +@cindex go to another Info file + To go to a node in another file, you can include the file name in the node name by putting it at the front, in parentheses. Thus, @kbd{g(dir)Top@key{RET}} would go to the Info Directory node, which is -node @samp{Top} in the file @file{dir}. +the node @samp{Top} in the Info file @file{dir}. Likewise, +@kbd{g(emacs)Top@key{RET}} goes to the top node of the Emacs manual. -The node name @samp{*} specifies the whole file. So you can look at + The node name @samp{*} specifies the whole file. So you can look at all of the current file by typing @kbd{g*@key{RET}} or all of any -other file with @kbd{g(FILENAME)@key{RET}}. +other file with @kbd{g(@var{filename})@key{RET}}. + +@unnumberedsubsec @kbd{1} -- @kbd{9} choose a menu subtopic by its number + +@kindex 1 @r{through} 9 @r{(Info mode)} +@findex Info-nth-menu-item +@cindex select @var{n}'th menu item + If you begrudge each character of type-in which your system requires, +you might like to use the commands @kbd{1}, @kbd{2}, @kbd{3}, @kbd{4}, +@dots{}, @kbd{9}. They are short for the @kbd{m} command together +with a name of a menu subtopic. @kbd{1} goes through the first item +in the current node's menu; @kbd{2} goes through the second item, etc. +In the stand-alone reader, @kbd{0} goes through the last menu item; +this is so you need not count how many entries are there. In Emacs, +the digit keys run the command @code{Info-nth-menu-item}. + + If your display supports multiple fonts, and you are using Emacs' +Info mode to read Info files, the @samp{*} for the fifth menu item +stands out, either in color or in some other attribute, such as +underline, and so is the @samp{*} for the ninth item; this makes it +easy to see at a glance which number to use for an item. + + Some terminals don't support colors or underlining. If you need to +actually count items, it is better to use @kbd{m} instead, and specify +the name, or use @key{TAB} to quickly move between menu items. -The @kbd{s} command allows you to search a whole file for a string. +@unnumberedsubsec @kbd{e} makes Info document editable + +@kindex e @r{(Info mode)} +@findex Info-edit +@cindex edit Info document + The Info command @kbd{e} changes from Info mode to an ordinary +Emacs editing mode, so that you can edit the text of the current node. +Type @kbd{C-c C-c} to switch back to Info. The @kbd{e} command is allowed +only if the variable @code{Info-enable-edit} is non-@code{nil}. + + The @kbd{e} command only works in Emacs, where it runs the command +@code{Info-edit}. The stand-alone Info reader doesn't allow you to +edit the Info file, so typing @kbd{e} there goes to the end of the +current node. + +@node Info Search, Add, Expert, Advanced Info +@comment node-name, next, previous, up +@section How to search Info documents for specific subjects + +@cindex searching Info documents +@cindex Info document as a reference + The commands which move between and inside nodes allow you to read +the entire manual or its large portions. But what if you need to find +some information in the manual as fast as you can, and you don't know +or don't remember in what node to look for it? This need arises when +you use a manual as a @dfn{reference}, or when it is impractical to +read the entire manual before you start using the programs it +describes. + + Info has powerful searching facilities that let you find things +quickly. You can search either the manual indices or its text. + +@kindex i @r{(Info mode)} +@findex Info-index + Since most subjects related to what the manual describes should be +indexed, you should try the index search first. The @kbd{i} command +prompts you for a subject and then looks up that subject in the +indices. If it finds an index entry with the subject you typed, it +goes to the node to which that index entry points. You should browse +through that node to see whether the issue you are looking for is +described there. If it isn't, type @kbd{,} one or more times to go +through additional index entries which match your subject. + + The @kbd{i} command finds all index entries which include the string +you typed @emph{as a substring}. For each match, Info shows in the +echo area the full index entry it found. Often, the text of the full +index entry already gives you enough information to decide whether it +is relevant to what you are looking for, so we recommend that you read +what Emacs shows in the echo are before looking at the node it +displays. + + Since @kbd{i} looks for a substring, you can search for subjects even +if you are not sure how they are spelled in the index. For example, +suppose you want to find something that is pertinent to commands which +complete partial input (e.g., when you type @key{TAB}). If you want +to catch index entries that refer to ``complete'', ``completion'', and +``completing'', you could type @kbd{icomplet@key{RET}}. + + Info documents which describe programs should index the commands, +options, and key sequences that the program provides. If you are +looking for a description of a command, an option, or a key, just type +their names when @kbd{i} prompts you for a topic. For example, if you +want to read the description of what the @kbd{C-f} key does, type +@kbd{iC-f@key{RET}}. Here @kbd{C-f} are 3 literal characters +@samp{C}, @samp{-}, and @samp{f}, not the ``Control-f'' command key +you type inside Emacs to run the command bound to @kbd{C-f}. + + In Emacs, @kbd{i} runs the command @code{Info-index}. + +@kindex s @r{(Info mode)} +@findex Info-search + The @kbd{s} command allows you to search a whole file for a string. It switches to the next node if and when that is necessary. You type @kbd{s} followed by the string to search for, terminated by @key{RET}. To search for the same string again, just @kbd{s} followed by @key{RET} will do. The file's nodes are scanned in the order they are in in the file, which has no necessary relationship to the -order that they may be in in the tree structure of menus and @samp{next} +order that they may be in the tree structure of menus and @samp{next} pointers. But normally the two orders are not very different. In any case, you can always do a @kbd{b} to find out what node you have reached, if the header is not visible (this can happen, because @kbd{s} puts your cursor at the occurrence of the string, not at the beginning of the node). -If you grudge the system each character of type-in it requires, you -might like to use the commands @kbd{1}, @kbd{2}, @kbd{3}, @kbd{4}, ... -@kbd{9}. They are short for the @kbd{m} command together with an -argument. @kbd{1} goes through the first item in the current node's -menu; @kbd{2} goes through the second item, etc. +@kindex M-s @r{(Info mode)} + In Emacs, @kbd{Meta-s} is equivalent to @kbd{s}. That is for +compatibility with other GNU packages that use @kbd{M-s} for a similar +kind of search command. Both @kbd{s} and @kbd{M-s} run in Emacs the +command @code{Info-search}. -If your display supports multiple fonts, and you are using Emacs' Info -mode to read Info files, the @samp{*} for the fifth menu item is -underlined, and so is the @samp{*} for the ninth item; these underlines -make it easy to see at a glance which number to use for an item. -On ordinary terminals, you won't have underlining. If you need to -actually count items, it is better to use @kbd{m} instead, and specify -the name. - -The Info command @kbd{e} changes from Info mode to an ordinary -Emacs editing mode, so that you can edit the text of the current node. -Type @kbd{C-c C-c} to switch back to Info. The @kbd{e} command is allowed -only if the variable @code{Info-enable-edit} is non-@code{nil}. - -@node Add, Menus, Expert, Advanced Info +@node Add, Menus, Info Search, Advanced Info @comment node-name, next, previous, up @section Adding a new node to Info To add a new topic to the list in the Info directory, you must: + @enumerate @item Create some nodes, in some file, to document that topic. @@ -663,29 +983,33 @@ Create some nodes, in some file, to document that topic. Put that topic in the menu in the directory. @xref{Menus, Menu}. @end enumerate -Usually, the way to create the nodes is with Texinfo (@pxref{Top,, -Overview of Texinfo, texinfo, Texinfo}); this has the advantage that you -can also make a printed manual from them. However, if you want to edit -an Info file, here is how. + Usually, the way to create the nodes is with Texinfo (@pxref{Top,, +Overview of Texinfo, texinfo, Texinfo: The GNU Documentation Format}); +this has the advantage that you can also make a printed manual from +them. However, if you want to edit an Info file, here is how. -The new node can live in an existing documentation file, or in a new -one. It must have a @key{^_} character before it (invisible to the +@cindex node delimiters + The new node can live in an existing documentation file, or in a new +one. It must have a @samp{^_} character before it (invisible to the user; this node has one but you cannot see it), and it ends with either -a @key{^_}, a @key{^L}, or the end of file. Note: If you put in a -@key{^L} to end a new node, be sure that there is a @key{^_} after it -to start the next one, since @key{^L} cannot @emph{start} a node. -Also, a nicer way to make a node boundary be a page boundary as well -is to put a @key{^L} @emph{right after} the @key{^_}. - - The @key{^_} starting a node must be followed by a newline or a -@key{^L} newline, after which comes the node's header line. The header +a @samp{^_}, a @samp{^L} (``formfeed''), or the end of file.@footnote{If +you put in a @samp{^L} to end a new node, be sure that there is a +@samp{^_} after it to start the next one, since @samp{^L} cannot +@emph{start} a node. Also, a nicer way to make a node boundary be a +page boundary as well is to put a @samp{^L} @emph{right after} the +@samp{^_}.} + + The @samp{^_} starting a node must be followed by a newline or a +@samp{^L} newline, after which comes the node's header line. The header line must give the node's name (by which Info finds it), and state the names of the @samp{Next}, @samp{Previous}, and @samp{Up} nodes (if there are any). As you can see, this node's @samp{Up} node is the node @samp{Top}, which points at all the documentation for Info. The @samp{Next} node is @samp{Menus}. - The keywords @dfn{Node}, @dfn{Previous}, @dfn{Up}, and @dfn{Next}, +@cindex node header line format +@cindex format of node headers + The keywords @dfn{Node}, @dfn{Next}, @dfn{Previous}, and @dfn{Up} may appear in any order, anywhere in the header line, but the recommended order is the one in this sentence. Each keyword must be followed by a colon, spaces and tabs, and then the appropriate name. @@ -693,30 +1017,35 @@ The name may be terminated with a tab, a comma, or a newline. A space does not end it; node names may contain spaces. The case of letters in the names is insignificant. +@cindex node name format +@cindex Directory node A node name has two forms. A node in the current file is named by what appears after the @samp{Node: } in that node's first line. For example, this node's name is @samp{Add}. A node in another file is named by @samp{(@var{filename})@var{node-within-file}}, as in @samp{(info)Add} for this node. If the file name starts with ``./'', -then it is relative to the current directory; otherwise, it is relative -starting from the standard Info file directory of your site. -The name @samp{(@var{filename})Top} can be abbreviated to just -@samp{(@var{filename})}. By convention, the name @samp{Top} is used for -the ``highest'' node in any single file---the node whose @samp{Up} points -out of the file. The Directory node is @file{(dir)}. The @samp{Top} node -of a document file listed in the Directory should have an @samp{Up: +then it is relative to the current directory; otherwise, it is +relative starting from the standard directory for Info files of your +site. The name @samp{(@var{filename})Top} can be abbreviated to just +@samp{(@var{filename})}. By convention, the name @samp{Top} is used +for the ``highest'' node in any single file---the node whose @samp{Up} +points out of the file. The @samp{Directory} node is @file{(dir)}, it +points to a file @file{dir} which holds a large menu listing all the +Info documents installed on your site. The @samp{Top} node of a +document file listed in the @samp{Directory} should have an @samp{Up: (dir)} in it. +@cindex unstructured documents The node name @kbd{*} is special: it refers to the entire file. Thus, @kbd{g*} shows you the whole current file. The use of the node @kbd{*} is to make it possible to make old-fashioned, unstructured files into nodes of the tree. The @samp{Node:} name, in which a node states its own name, must not -contain a filename, since Info when searching for a node does not expect -one to be there. The @samp{Next}, @samp{Previous} and @samp{Up} names -may contain them. In this node, since the @samp{Up} node is in the same -file, it was not necessary to use one. +contain a file name, since when Info searches for a node, it does not +expect a file name to be there. The @samp{Next}, @samp{Previous} and +@samp{Up} names may contain them. In this node, since the @samp{Up} +node is in the same file, it was not necessary to use one. Note that the nodes in this file have a file name in the header line. The file names are ignored by Info, but they serve as comments @@ -730,10 +1059,11 @@ to help identify the node for the user. The @kbd{m} command searches the current node's menu for the topic which it reads from the terminal. +@cindex menu and menu entry format A menu begins with a line starting with @samp{* Menu:}. The rest of the line is a comment. After the starting line, every line that begins -with a @samp{* } lists a single topic. The name of the topic--the -argument that the user must give to the @kbd{m} command to select this +with a @samp{* } lists a single topic. The name of the topic--what +the user must type at the @kbd{m}'s command prompt to select this topic---comes right after the star and space, and is followed by a colon, spaces and tabs, and the name of the node which discusses that topic. The node name, like node names following @samp{Next}, @samp{Previous} @@ -741,8 +1071,8 @@ and @samp{Up}, may be terminated with a tab, comma, or newline; it may also be terminated with a period. If the node name and topic name are the same, then rather than -giving the name twice, the abbreviation @samp{* NAME::} may be used -(and should be used, whenever possible, as it reduces the visual +giving the name twice, the abbreviation @samp{* @var{name}::} may be +used (and should be used, whenever possible, as it reduces the visual clutter in the menu). It is considerate to choose the topic names so that they differ @@ -761,8 +1091,8 @@ someone who wants to see them all need not keep revisiting the Menu. is, node @samp{Top} in file @file{.../info/dir}. You can put new entries in that menu just like any other menu. The Info Directory is @emph{not} the same as the file directory called @file{info}. It happens that many of -Info's files live on that file directory, but they do not have to; and -files on that directory are not automatically listed in the Info +Info's files live in that file directory, but they do not have to; and +files in that directory are not automatically listed in the Info Directory node. Also, although the Info node graph is claimed to be a ``hierarchy'', @@ -781,9 +1111,10 @@ ever find out that it exists. @comment node-name, next, previous, up @section Creating Cross References +@cindex cross reference format A cross reference can be placed anywhere in the text, unlike a menu item which must go at the front of a line. A cross reference looks -like a menu item except that it has @samp{*note} instead of @kbd{*}. +like a menu item except that it has @samp{*note} instead of @samp{*}. It @emph{cannot} be terminated by a @samp{)}, because @samp{)}'s are so often part of node names. If you wish to enclose a cross reference in parentheses, terminate it with a period first. Here are two @@ -793,32 +1124,95 @@ examples of cross references pointers: *Note details: commands. (See *note 3: Full Proof.) @end example -They are just examples. The places they ``lead to'' do not really exist! +@noindent +@emph{These are just examples.} The places they ``lead to'' do not +really exist! + +@menu +* Help-Cross:: Target of a cross-reference. +@end menu + + +@node Help-Cross, , , Cross-refs +@subsection The node reached by the cross reference in Info + + This is the node reached by the cross reference named @samp{Cross}. + + While this node is specifically intended to be reached by a cross +reference, most cross references lead to nodes that ``belong'' +someplace else far away in the structure of an Info document. So you +cannot expect this node to have a @samp{Next}, @samp{Previous} or +@samp{Up} links pointing back to where you came from. In general, the +@kbd{l} (el) command is the only way to get back there. + +@format +>> Type @kbd{l} to return to the node where the cross reference was. +@end format + +@node Help-Q, , Help-Int, Getting Started +@comment node-name, next, previous, up +@section Quitting Info + +@kindex q @r{(Info mode)} +@findex Info-exit +@cindex quitting Info mode + To get out of Info, back to what you were doing before, type @kbd{q} +for @dfn{Quit}. This runs @code{Info-exit} in Emacs. + + This is the end of the basic course on using Info. You have learned +how to move in an Info document, and how to follow menus and cross +references. This makes you ready for reading manuals top to bottom, +as new users should do when they learn a new package. + + Another set of Info commands is useful when you need to find +something quickly in a manual---that is, when you need to use a manual +as a reference rather than as a tutorial. We urge you to make learn +these search commands as well. If you want to do that now, follow this +cross reference to @ref{Info Search}. + +Yet another set of commands are meant for experienced users; you can +find them by looking in the Directory node for documentation on Info. +Finding them will be a good exercise in using Info in the usual +manner. + +@format +>> Type @kbd{d} to go to the Info directory node; then type + @kbd{mInfo} and Return, to get to the node about Info and + see what other help is available. +@end format + @node Tags, Checking, Cross-refs, Advanced Info @comment node-name, next, previous, up -@section Tag Tables for Info Files +@section Tags Tables for Info Files +@cindex tags tables in info files You can speed up the access to nodes of a large Info file by giving -it a tag table. Unlike the tag table for a program, the tag table for +it a tags table. Unlike the tags table for a program, the tags table for an Info file lives inside the file itself and is used automatically whenever Info reads in the file. - To make a tag table, go to a node in the file using Emacs Info mode and type +@findex Info-tagify + To make a tags table, go to a node in the file using Emacs Info mode and type @kbd{M-x Info-tagify}. Then you must use @kbd{C-x C-s} to save the -file. - - Once the Info file has a tag table, you must make certain it is up -to date. If, as a result of deletion of text, any node moves back +file. Info files produced by the @code{makeinfo} command that is part +of the Texinfo package always have tags tables to begin with. + +@cindex stale tags tables +@cindex update Info tags table + Once the Info file has a tags table, you must make certain it is up +to date. If you edit an Info file directly (as opposed to editing its +Texinfo source), and, as a result of deletion of text, any node moves back more than a thousand characters in the file from the position -recorded in the tag table, Info will no longer be able to find that -node. To update the tag table, use the @code{Info-tagify} command again. +recorded in the tags table, Info will no longer be able to find that +node. To update the tags table, use the @code{Info-tagify} command +again. - An Info file tag table appears at the end of the file and looks like + An Info file tags table appears at the end of the file and looks like this: @example -^_ +^_^L Tag Table: File: info, Node: Cross-refs^?21419 File: info, Node: Tags^?22145 @@ -829,7 +1223,7 @@ End Tag Table @noindent Note that it contains one line per node, and this line contains the beginning of the node's header (ending just after the node name), -a Delete character, and the character position in the file of the +a @samp{DEL} character, and the character position in the file of the beginning of the node. @@ -848,48 +1242,103 @@ back is reported. Only pointers within the file are checked, because checking pointers to other files would be terribly slow. But those are usually few. +@findex Info-validate To check an Info file, do @kbd{M-x Info-validate} while looking at any node of the file with Emacs Info mode. @node Emacs Info Variables, , Checking, Advanced Info @section Emacs Info-mode Variables -The following variables may modify the behaviour of Info-mode in Emacs; +The following variables may modify the behavior of Info-mode in Emacs; you may wish to set one or several of these variables interactively, or in your @file{~/.emacs} init file. @xref{Examining, Examining and Setting Variables, Examining and Setting Variables, emacs, The GNU Emacs -Manual}. +Manual}. The stand-alone Info reader program has its own set of +variables, described in @ref{Variables,, Manipulating Variables, +info-stnd, GNU Info}. @vtable @code -@item Info-enable-edit -Set to @code{nil}, disables the @samp{e} (@code{Info-edit}) command. A -non-@code{nil} value enables it. @xref{Add, Edit}. +@item Info-directory-list +The list of directories to search for Info files. Each element is a +string (directory name) or @code{nil} (try default directory). If not +initialized Info uses the environment variable @env{INFOPATH} to +initialize it, or @code{Info-default-directory-list} if there is no +@env{INFOPATH} variable in the environment. + +If you wish to customize the Info directory search list for both Emacs +info and stand-alone Info, it is best to set the @env{INFOPATH} +environment variable, since that applies to both programs. + +@item Info-additional-directory-list +A list of additional directories to search for Info documentation files. +These directories are not searched for merging the @file{dir} file. + +@item Info-fontify +When set to a non-@code{nil} value, enables highlighting of Info +files. The default is @code{t}. You can change how the highlighting +looks by customizing the faces @code{info-node}, @code{info-menu-5}, +@code{info-xref}, @code{info-header-xref}, @code{info-header-node}, +@code{info-title-@var{n}-face} (where @var{n} is the level of the +section, a number between 1 and 4), and @code{info-menu-header}. To +customize a face, type @kbd{M-x customize-face @key{RET} @var{face} +@key{RET}}, where @var{face} is one of the face names listed here. + +@item Info-use-header-line +If non-@code{nil}, Emacs puts in the Info buffer a header line showing +the @samp{Next}, @samp{Prev}, and @samp{Up} links. A header line does +not scroll with the rest of the buffer, making these links always +visible. + +@item Info-scroll-prefer-subnodes +If set to a non-@code{nil} value, @key{SPC} and @key{BACKSPACE} (or +@key{DEL}) keys in a menu visit subnodes of the current node before +scrolling to its end or beginning, respectively. For example, if the +node's menu appears on the screen, the next @key{SPC} moves to a +subnode indicated by the following menu item. Setting this option to +@code{nil} results in behavior similar to the stand-alone Info reader +program, which visits the first subnode from the menu only when you +hit the end of the current node. The default is @code{t}. @item Info-enable-active-nodes When set to a non-@code{nil} value, allows Info to execute Lisp code associated with nodes. The Lisp code is executed when the node is -selected. +selected. The Lisp code to be executed should follow the node +delimiter (the @samp{DEL} character) and an @samp{execute: } tag, like +this: -@item Info-directory-list -The list of directories to search for Info files. Each element is a -string (directory name) or @code{nil} (try default directory). +@example +^_execute: (message "This is an active node!") +@end example -@item Info-directory -The standard directory for Info documentation files. Only used when the -function @code{Info-directory} is called. +@item Info-enable-edit +Set to @code{nil}, disables the @samp{e} (@code{Info-edit}) command. A +non-@code{nil} value enables it. @xref{Add, Edit}. @end vtable @node Creating an Info File -@chapter Creating an Info File +@chapter Creating an Info File from a Texinfo File + +@code{makeinfo} is a utility that converts a Texinfo file into an Info +file; @code{texinfo-format-region} and @code{texinfo-format-buffer} are +GNU Emacs functions that do the same. + +@xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNU +Documentation Format}, to learn how to write a Texinfo file. + +@xref{Creating an Info File,,, texinfo, Texinfo: The GNU Documentation +Format}, to learn how to create an Info file from a Texinfo file. + +@xref{Installing an Info File,,, texinfo, Texinfo: The GNU +Documentation Format}, to learn how to install an Info file after you +have created one. -@xref{Top,, Overview of Texinfo, texinfo, Texinfo}, to learn how to -write a Texinfo file. +@node Index +@unnumbered Index -@xref{Creating an Info File,,, texinfo, Texinfo}, to learn how to create -an Info file from a Texinfo file. +This is an alphabetical listing of all the commands, variables, and +topics discussed in this document. -@xref{Installing an Info File,,, texinfo, Texinfo}, to learn how to -install an Info file after you have created one. +@printindex cp @bye diff --git a/contrib/texinfo/doc/install-info.1 b/contrib/texinfo/doc/install-info.1 index f2b8c2a..54b8fcf 100644 --- a/contrib/texinfo/doc/install-info.1 +++ b/contrib/texinfo/doc/install-info.1 @@ -1,29 +1,25 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.013. -.TH INSTALL-INFO "1" "September 1999" "GNU texinfo 4.0" FSF +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.24. +.TH INSTALL-INFO "1" "March 2002" "GNU texinfo 4.1" FSF .SH NAME install-info \- update info/dir entries .SH SYNOPSIS .B install-info [\fIOPTION\fR]... [\fIINFO-FILE \fR[\fIDIR-FILE\fR]] .SH DESCRIPTION -.PP Install or delete dir entries from INFO-FILE in the Info directory file DIR-FILE. .SH OPTIONS .TP \fB\-\-delete\fR delete existing entries for INFO-FILE from DIR-FILE; -.IP don't insert any new entries. .TP \fB\-\-dir\-file\fR=\fINAME\fR specify file name of Info directory file. -.IP This is equivalent to using the DIR-FILE argument. .TP \fB\-\-entry\fR=\fITEXT\fR insert TEXT as an Info directory entry. -.IP TEXT should have the form of an Info menu item line plus zero or more extra lines starting with whitespace. If you specify more than one entry, they are all added. @@ -35,7 +31,6 @@ display this help and exit. .TP \fB\-\-info\-file\fR=\fIFILE\fR specify Info file to install in the directory. -.IP This is equivalent to using the INFO-FILE argument. .TP \fB\-\-info\-dir\fR=\fIDIR\fR @@ -43,7 +38,6 @@ same as \fB\-\-dir\-file\fR=\fIDIR\fR/dir. .TP \fB\-\-item\fR=\fITEXT\fR same as \fB\-\-entry\fR TEXT. -.IP An Info directory entry is actually a menu item. .TP \fB\-\-quiet\fR @@ -54,7 +48,6 @@ same as \fB\-\-delete\fR. .TP \fB\-\-section\fR=\fISEC\fR put this file's entries in section SEC of the directory. -.IP If you specify more than one section, all the entries are added in each of the sections. If you don't specify any sections, they are determined @@ -65,6 +58,11 @@ display version information and exit. .SH "REPORTING BUGS" Email bug reports to bug-texinfo@gnu.org, general questions and discussion to help-texinfo@gnu.org. +.SH COPYRIGHT +Copyright \(co 2002 Free Software Foundation, Inc. +There is NO warranty. You may redistribute this software +under the terms of the GNU General Public License. +For more information about these matters, see the files named COPYING. .SH "SEE ALSO" The full documentation for .B install-info @@ -77,8 +75,3 @@ programs are properly installed at your site, the command .B info install-info .PP should give you access to the complete manual. -.SH COPYRIGHT -Copyright \(co 1999 Free Software Foundation, Inc. -There is NO warranty. You may redistribute this software -under the terms of the GNU General Public License. -For more information about these matters, see the files named COPYING. diff --git a/contrib/texinfo/doc/makeinfo.1 b/contrib/texinfo/doc/makeinfo.1 index 62d22b8..b56cb83 100644 --- a/contrib/texinfo/doc/makeinfo.1 +++ b/contrib/texinfo/doc/makeinfo.1 @@ -1,69 +1,117 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.013. -.TH MAKEINFO "1" "September 1999" "GNU texinfo 4.0" FSF +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.24. +.TH MAKEINFO "1" "March 2002" "GNU texinfo 4.1" FSF .SH NAME makeinfo \- translate Texinfo documents .SH SYNOPSIS .B makeinfo -[\fIOPTION\fR]...\fI TEXINFO-FILE\fR... +[\fIOPTION\fR]... \fITEXINFO-FILE\fR... .SH DESCRIPTION -.PP -Translate Texinfo source documentation to various other formats: -Info files suitable for reading online with Emacs or standalone GNU Info -(by default); plain text (with \fB\-\-no\-headers\fR); or HTML (with \fB\-\-html\fR). -.SH OPTIONS +Translate Texinfo source documentation to various other formats, by default +Info files suitable for reading online with Emacs or standalone GNU Info. +.SS "General options:" .TP -\fB\-\-commands\-in\-node\-names\fR -allow @ commands in node names. +\fB\-\-error\-limit\fR=\fINUM\fR +quit after NUM errors (default 100). .TP -\fB\-D\fR VAR -define a variable, as with @set. +\fB\-\-force\fR +preserve output even if errors. +.TP +\fB\-\-help\fR +display this help and exit. +.TP +\fB\-\-no\-validate\fR +suppress node cross-reference validation. +.TP +\fB\-\-no\-warn\fR +suppress warnings (but not errors). +.TP +\fB\-\-reference\-limit\fR=\fINUM\fR +warn about at most NUM references (default 1000). +.TP +\fB\-v\fR, \fB\-\-verbose\fR +explain what is being done. +.TP +\fB\-\-version\fR +display version information and exit. +.SS "Output format selection (default is to produce Info):" +.TP +\fB\-\-docbook\fR +output DocBook rather than Info. +.TP +\fB\-\-html\fR +output HTML rather than Info. +.TP +\fB\-\-no\-headers\fR +output plain text, suppressing Info node +separators and Node: lines; also, write to +standard output without \fB\-\-output\fR. +.TP +\fB\-\-xml\fR +output XML (TexinfoML) rather than Info. +.SS "General output options:" .TP \fB\-E\fR, \fB\-\-macro\-expand\fR FILE output macro-expanded source to FILE. +ignoring any @setfilename. .TP -\fB\-\-error\-limit\fR=\fINUM\fR -quit after NUM errors (default 100). +\fB\-\-no\-split\fR +suppress splitting of Info or HTML output, +generate only one output file. +.TP +\fB\-\-number\-sections\fR +output chapter and sectioning numbers. +.TP +\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR +output to FILE (directory if split HTML), +.SS "Options for Info and plain text:" +.TP +\fB\-\-enable\-encoding\fR +output accented and special characters in +Info output based on @documentencoding. .TP \fB\-\-fill\-column\fR=\fINUM\fR break Info lines at NUM characters (default 72). .TP \fB\-\-footnote\-style\fR=\fISTYLE\fR -output footnotes according to STYLE: -.IP -`separate' to place footnotes in their own node, -`end' to place the footnotes at the end of the +output footnotes in Info according to STYLE: +`separate' to put them in their own node; +`end' to put them at the end of the node .IP -node in which they are defined (the default). +in which they are defined (default). .TP -\fB\-\-force\fR -preserve output even if errors. +\fB\-\-paragraph\-indent\fR=\fIVAL\fR +indent Info paragraphs by VAL spaces (default 3). +If VAL is `none', do not indent; if VAL is +`asis', preserve existing indentation. .TP -\fB\-\-help\fR -display this help and exit. +\fB\-\-split\-size\fR=\fINUM\fR +split Info files at size NUM (default 50000). +.SS "Input file options:" .TP -\fB\-\-html\fR -output HTML rather than Info format; +\fB\-\-commands\-in\-node\-names\fR +allow @ commands in node names. +.TP +\fB\-D\fR VAR +define the variable VAR, as with @set. .TP \fB\-I\fR DIR append DIR to the @include search path. .TP +\fB\-P\fR DIR +prepend DIR to the @include search path. +.TP +\fB\-U\fR VAR +undefine the variable VAR, as with @clear. +.SS "Conditional processing in input:" +.TP \fB\-\-ifhtml\fR -process @ifhtml and @html text even when not -.IP -generating HTML. +process @ifhtml and @html even if not generating HTML. .TP \fB\-\-ifinfo\fR process @ifinfo text even when generating HTML. .TP \fB\-\-iftex\fR -process @iftex and @tex text. -.IP -implies \fB\-\-no\-split\fR. -.TP -\fB\-\-no\-headers\fR -suppress Info node separators and Node: lines and -.IP -write to standard output without \fB\-\-output\fR. +process @iftex and @tex text; implies \fB\-\-no\-split\fR. .TP \fB\-\-no\-ifhtml\fR do not process @ifhtml and @html text. @@ -73,44 +121,7 @@ do not process @ifinfo text. .TP \fB\-\-no\-iftex\fR do not process @iftex and @tex text. -.TP -\fB\-\-no\-split\fR -suppress splitting of large Info output files or -generation of one HTML file per node. -.TP -\fB\-\-no\-validate\fR -suppress node cross-reference validation. -.TP -\fB\-\-no\-warn\fR -suppress warnings (but not errors). -.TP -\fB\-\-number\-sections\fR -include chapter, section, etc. numbers in output. -.TP -\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR -output to FILE, ignoring any @setfilename. -.TP -\fB\-P\fR DIR -prepend DIR to the @include search path. -.TP -\fB\-\-paragraph\-indent\fR=\fIVAL\fR -indent Info paragraphs by VAL spaces (default 3). .IP -if VAL is `none', do not indent; -if VAL is `asis', preserve existing indentation. -.TP -\fB\-\-reference\-limit\fR=\fINUM\fR -warn about at most NUM references (default 1000). -.TP -\fB\-U\fR VAR -undefine a variable, as with @clear. -.TP -\fB\-v\fR, \fB\-\-verbose\fR -explain what is being done. -.TP -\fB\-\-version\fR -display version information and exit. -.PP The defaults for the @if... conditionals depend on the output format: if generating HTML, \fB\-\-ifhtml\fR is on and the others are off; if generating Info or plain text, \fB\-\-ifinfo\fR is on and the others are off. @@ -133,6 +144,11 @@ write one Info file however big .SH "REPORTING BUGS" Email bug reports to bug-texinfo@gnu.org, general questions and discussion to help-texinfo@gnu.org. +.SH COPYRIGHT +Copyright \(co 2002 Free Software Foundation, Inc. +There is NO warranty. You may redistribute this software +under the terms of the GNU General Public License. +For more information about these matters, see the files named COPYING. .SH "SEE ALSO" The full documentation for .B makeinfo @@ -145,8 +161,3 @@ programs are properly installed at your site, the command .B info makeinfo .PP should give you access to the complete manual. -.SH COPYRIGHT -Copyright \(co 1999 Free Software Foundation, Inc. -There is NO warranty. You may redistribute this software -under the terms of the GNU General Public License. -For more information about these matters, see the files named COPYING. diff --git a/contrib/texinfo/doc/texindex.1 b/contrib/texinfo/doc/texindex.1 index 6708829..019d5e4 100644 --- a/contrib/texinfo/doc/texindex.1 +++ b/contrib/texinfo/doc/texindex.1 @@ -1,12 +1,11 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.013. -.TH TEXINDEX "1" "September 1999" "GNU texinfo 4.0" FSF +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.24. +.TH TEXINDEX "1" "March 2002" "GNU texinfo 4.1" FSF .SH NAME texindex \- sort Texinfo index files .SH SYNOPSIS .B texindex -[\fIOPTION\fR]...\fI FILE\fR... +[\fIOPTION\fR]... \fIFILE\fR... .SH DESCRIPTION -.PP Generate a sorted index for each TeX output FILE. Usually FILE... is specified as `foo.??' for a document `foo.texi'. .SH OPTIONS @@ -28,6 +27,11 @@ display version information and exit .SH "REPORTING BUGS" Email bug reports to bug-texinfo@gnu.org, general questions and discussion to help-texinfo@gnu.org. +.SH COPYRIGHT +Copyright \(co 2002 Free Software Foundation, Inc. +There is NO warranty. You may redistribute this software +under the terms of the GNU General Public License. +For more information about these matters, see the files named COPYING. .SH "SEE ALSO" The full documentation for .B texindex @@ -40,8 +44,3 @@ programs are properly installed at your site, the command .B info texindex .PP should give you access to the complete manual. -.SH COPYRIGHT -Copyright \(co 1999 Free Software Foundation, Inc. -There is NO warranty. You may redistribute this software -under the terms of the GNU General Public License. -For more information about these matters, see the files named COPYING. diff --git a/contrib/texinfo/doc/texinfo.txi b/contrib/texinfo/doc/texinfo.txi index 7e0bbd0..fed4c4c 100644 --- a/contrib/texinfo/doc/texinfo.txi +++ b/contrib/texinfo/doc/texinfo.txi @@ -1,5 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- -@c $Id: texinfo.txi,v 1.162 1999/09/28 19:38:01 karl Exp $ +@c $Id: texinfo.txi,v 1.192 2002/03/04 14:52:52 karl Exp $ @c %**start of header @c All text is ignored before the setfilename. @@ -18,7 +18,7 @@ @footnotestyle separate @paragraphindent 2 -@finalout +@c finalout @comment %**end of header @@ -28,7 +28,7 @@ * install-info: (texinfo)Invoking install-info. Update info/dir entries. * texi2dvi: (texinfo)Format with texi2dvi. Print Texinfo documents. * texindex: (texinfo)Format with tex/texindex. Sort Texinfo index files. -* makeinfo: (texinfo)makeinfo Preferred. Translate Texinfo source. +* makeinfo: (texinfo)Invoking makeinfo. Translate Texinfo source. @end direntry @c Before release, run C-u C-c C-u C-a (texinfo-all-menus-update with a @@ -50,40 +50,24 @@ @ifinfo This file documents Texinfo, a documentation system that can produce -both online information and a printed manual from a single source file. +both online information and a printed manual from a single source. This +edition is for Texinfo version @value{VERSION}, @value{UPDATED}. -Copyright (C) 1988, 90, 91, 92, 93, 95, 96, 97, 98, 99 +Copyright (C) 1988, 90, 91, 92, 93, 95, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. -This edition is for Texinfo version @value{VERSION}, @value{UPDATED}. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -@ignore -Permission is granted to process this file through TeX and print the -results, provided the printed document carries copying permission -notice identical to this one except for the removal of this paragraph -(this paragraph not being relevant to the printed manual). - -@end ignore -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the entire -resulting derived work is distributed under the terms of a permission -notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation approved -by the Free Software Foundation. +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Section being ``History'', with no Front-Cover Texts, and with +no Back-Cover Texts. A copy of the license is included in the section +entitled ``GNU Free Documentation License''. @end ifinfo @shorttitlepage Texinfo @titlepage -@c use the new format for titles @title Texinfo @subtitle The GNU Documentation Format @subtitle for Texinfo version @value{VERSION}, @value{UPDATED} @@ -96,7 +80,7 @@ by the Free Software Foundation. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1988, 90, 91, 92, 93, 95, 96, 97, 98, 99 +Copyright @copyright{} 1988, 90, 91, 92, 93, 95, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. This manual is for Texinfo version @value{VERSION}, @value{UPDATED}. @@ -110,21 +94,15 @@ ISBN 1-882114-67-1 @c for version 4.0, September 1999. @c ISBN 1-882114-63-9 is for edition 2.20 of 28 February 1995 @c ISBN 1-882114-64-7 is for edition 2.24 of November 1996. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. +Cover art by Etienne Suvasa. -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the entire -resulting derived work is distributed under the terms of a permission -notice identical to this one. +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Section being ``History'', with no Front-Cover Texts, and with +no Back-Cover Texts. A copy of the license is included in the section +entitled ``GNU Free Documentation License''. -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation approved -by the Free Software Foundation. -@sp 2 -Cover art by Etienne Suvasa. @end titlepage @summarycontents @@ -134,8 +112,8 @@ Cover art by Etienne Suvasa. @node Top @top Texinfo -Texinfo is a documentation system that uses a single source file to -produce both online information and printed output. +Texinfo is a documentation system that uses a single source to produce +both online information and printed output. The first part of this master menu lists the major nodes in this Info document, including the @@-command and concept indices. The rest of @@ -174,19 +152,17 @@ This is Edition @value{VERSION} of the Texinfo manual, updated @value{UPDATED}. * Command List:: All the Texinfo @@-commands. * Tips:: Hints on how to write a Texinfo document. * Sample Texinfo File:: A sample Texinfo file to look at. -* Sample Permissions:: Tell readers they have the right to copy - and distribute. * Include Files:: How to incorporate other Texinfo files. * Headings:: How to write page headings and footings. * Catching Mistakes:: How to find formatting mistakes. * Refilling Paragraphs:: All about paragraph refilling. * Command Syntax:: A description of @@-Command syntax. * Obtaining TeX:: How to Obtain @TeX{}. +* Documentation Copying:: The GNU Free Documentation License. * Command and Variable Index:: A menu containing commands and variables. * Concept Index:: A menu covering many topics. @detailmenu - --- The Detailed Node Listing --- Overview of Texinfo @@ -201,7 +177,7 @@ Overview of Texinfo * Minimum:: What a Texinfo file must have. * Six Parts:: Usually, a Texinfo file has six parts. * Short Sample:: A short sample Texinfo file. -* Acknowledgements and History:: Contributors and genesis. +* History:: Acknowledgements, contributors and genesis. Using Texinfo Mode @@ -241,6 +217,7 @@ The Texinfo File Header * Start of Header:: Formatting a region requires this. * setfilename:: Tell Info the name of the Info file. * settitle:: Create a title for the printed work. +* documentdescription:: Document summary for the HTML output. * setchapternewpage:: Start chapters on right-hand pages. * paragraphindent:: Specify paragraph indentation. * exampleindent:: Specify environment indentation. @@ -346,7 +323,8 @@ Indicating Definitions, Commands, etc. * code:: Indicating program code. * kbd:: Showing keyboard input. * key:: Specifying keys. -* samp:: Showing a literal sequence of characters. +* samp:: A literal sequence of characters. +* verb:: A verbatim sequence of characters. * var:: Indicating metasyntactic variables. * env:: Indicating environment variables. * file:: Indicating file names. @@ -366,19 +344,19 @@ Emphasizing Text Quotations and Examples -* Block Enclosing Commands:: Use different constructs for - different purposes. -* quotation:: How to write a quotation. -* example:: How to write an example in a fixed-width font. -* noindent:: How to prevent paragraph indentation. -* lisp:: How to illustrate Lisp code. +* Block Enclosing Commands:: Different constructs for different purposes. +* quotation:: Writing a quotation. +* example:: Writing an example in a fixed-width font. +* verbatim:: Writing a verbatim example. +* verbatiminclude:: Including a file verbatim. +* lisp:: Illustrating Lisp code. * small:: Forms for @code{@@smallbook}. -* display:: How to write an example in the current font. -* format:: How to write an example that does not narrow - the margins. -* exdent:: How to undo the indentation of a line. -* flushleft & flushright:: How to push text flushleft or flushright. -* cartouche:: How to draw cartouches around examples. +* display:: Writing an example in the current font. +* format:: Writing an example without narrowed margins. +* exdent:: Undo indentation on a line. +* flushleft & flushright:: Pushing text flush left or flush right. +* noindent:: Preventing paragraph indentation. +* cartouche:: Drawing rounded rectangles around examples. Lists and Tables @@ -444,7 +422,7 @@ Inserting Space * Multiple Spaces:: Inserting multiple spaces. * dmn:: How to format a dimension. -Inserting Ellipsis, Dots, and Bullets +Inserting Ellipsis and Bullets * dots:: How to insert dots @dots{} * bullet:: How to insert a bullet. @@ -482,7 +460,7 @@ Making and Preventing Breaks * Break Commands:: Cause and prevent splits. * Line Breaks:: How to force a single line to use two lines. -* - and hyphenation:: How to tell TeX about hyphenation points. +* - and hyphenation:: How to tell @TeX{} about hyphenation points. * w:: How to prevent unwanted line breaks. * sp:: How to insert blank lines. * page:: How to force the start of a new page. @@ -519,8 +497,8 @@ Conditionally Visible Text @code{@@set}, @code{@@clear}, and @code{@@value} -* ifset ifclear:: Format a region if a flag is set. * set value:: Expand a flag variable to a string. +* ifset ifclear:: Format a region if a flag is set. * value Example:: An easy way to update edition information. Internationalization @@ -549,7 +527,7 @@ Formatting and Printing Hardcopy * Preparing for TeX:: What to do before you use @TeX{}. * Overfull hboxes:: What are and what to do with overfull hboxes. * smallbook:: How to print small format books and manuals. -* A4 Paper:: How to print on European A4 paper. +* A4 Paper:: How to print on A4 or A5 paper. * pagesizes:: How to print with customized page sizes. * Cropmarks and Magnification:: How to print marks to indicate the size of pages and how to print scaled up output. @@ -558,7 +536,7 @@ Formatting and Printing Hardcopy Creating and Installing Info Files * Creating an Info File:: -* Install an Info File:: +* Installing an Info File:: Creating an Info File @@ -578,19 +556,13 @@ Creating an Info File Installing an Info File * Directory File:: The top level menu for all Info files. -* New Info File:: Listing a new info file. +* New Info File:: Listing a new Info file. * Other Info Directories:: How to specify Info files that are located in other directories. * Installing Dir Entries:: How to specify what menu entry to add to the Info directory. * Invoking install-info:: @code{install-info} options. -Sample Permissions - -* Inserting Permissions:: How to put permissions in your document. -* ifinfo Permissions:: Sample @samp{ifinfo} copying permissions. -* Titlepage Permissions:: Sample Titlepage copying permissions. - Include Files * Using Include Files:: How to use the @code{@@include} command. @@ -624,6 +596,7 @@ Finding Badly Referenced Nodes * Unsplit:: How to create an unsplit file. * Tagifying:: How to tagify a file. * Splitting:: How to split a file manually. + @end detailmenu @end menu @@ -642,38 +615,36 @@ when it is bad, it is better than nothing. @cindex Conditions for copying Texinfo The programs currently being distributed that relate to Texinfo include -portions of GNU Emacs, plus other separate programs (including -@code{makeinfo}, @code{info}, @code{texindex}, and @file{texinfo.tex}). +@code{makeinfo}, @code{info}, @code{texindex}, and @file{texinfo.tex}. These programs are @dfn{free}; this means that everyone is free to use them and free to redistribute them on a free basis. The Texinfo-related programs are not in the public domain; they are copyrighted and there are restrictions on their distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further -sharing any version of these programs that they might get from -you.@refill +sharing any version of these programs that they might get from you. - Specifically, we want to make sure that you have the right to give -away copies of the programs that relate to Texinfo, that you receive -source code or else can get it if you want it, that you can change these +Specifically, we want to make sure that you have the right to give away +copies of the programs that relate to Texinfo, that you receive source +code or else can get it if you want it, that you can change these programs or use pieces of them in new free programs, and that you know -you can do these things.@refill +you can do these things. - To make sure that everyone has such rights, we have to forbid you to +To make sure that everyone has such rights, we have to forbid you to deprive anyone else of these rights. For example, if you distribute copies of the Texinfo related programs, you must give the recipients all the rights that you have. You must make sure that they, too, receive or -can get the source code. And you must tell them their rights.@refill +can get the source code. And you must tell them their rights. - Also, for our own protection, we must make certain that everyone finds +Also, for our own protection, we must make certain that everyone finds out that there is no warranty for the programs that relate to Texinfo. If these programs are modified by someone else and passed on, we want their recipients to know that what they have is not what we distributed, so that any problems introduced by others will not reflect on our -reputation.@refill +reputation. -The precise conditions of the licenses for the programs currently -being distributed that relate to Texinfo are found in the General Public +The precise conditions of the licenses for the programs currently being +distributed that relate to Texinfo are found in the General Public Licenses that accompany them. @@ -707,7 +678,7 @@ that one document. * Minimum:: What a Texinfo file must have. * Six Parts:: Usually, a Texinfo file has six parts. * Short Sample:: A short sample Texinfo file. -* Acknowledgements and History:: Contributors and genesis. +* History:: Acknowledgements, contributors and genesis. @end menu @@ -717,8 +688,8 @@ that one document. @cindex Bugs, reporting @cindex Suggestions for Texinfo, making @cindex Reporting bugs -We welcome bug reports or suggestions for the Texinfo system, both -programs and documentation. Please email them to +We welcome bug reports and suggestions for any aspect of the Texinfo system, +programs, documentation, installation, anything. Please email them to @email{bug-texinfo@@gnu.org}. You can get the latest version of Texinfo from @uref{ftp://ftp.gnu.org/gnu/texinfo/} and its mirrors worldwide. @@ -743,11 +714,11 @@ Patches are most welcome; if possible, please make them with Merging Files}) and include @file{ChangeLog} entries (@pxref{Change Log,,, emacs, The GNU Emacs Manual}). -When sending email, please do not encode or split the messages in any -way if possible; it's much easier to deal with one plain text message, -however large, than many small ones. -@uref{ftp://ftp.gnu.org/gnu/sharutils/, GNU shar} is a convenient way of -packaging multiple and/or binary files for email. +When sending patches, if possible please do not encode or split them in +any way; it's much easier to deal with one plain text message, however +large, than many small ones. @uref{ftp://ftp.gnu.org/gnu/sharutils/, +GNU shar} is a convenient way of packaging multiple and/or binary files +for email. @node Using Texinfo @@ -762,8 +733,8 @@ features of a book, including chapters, sections, cross references, and indices. From the same Texinfo source file, you can create a menu-driven, online Info file with nodes, menus, cross references, and indices. You can also create from that same source file an HTML output -file suitable for use with a web browser. @cite{The GNU Emacs Manual} -is a good example of a Texinfo file, as is this manual. +file suitable for use with a web browser, or an XML file. @cite{The GNU +Emacs Manual} is a good example of a Texinfo file, as is this manual. To make a printed document, you process a Texinfo source file with the @TeX{} typesetting program (but the Texinfo language is very different @@ -773,15 +744,20 @@ that you can typeset and print as a book or report (@pxref{Hardcopy}). @pindex makeinfo To output an Info file, process your Texinfo source with the @code{makeinfo} utility or Emacs's @code{texinfo-format-buffer} command. -You can install the result in your Info tree (@pxref{Install an Info +You can install the result in your Info tree (@pxref{Installing an Info File}). -To output an HTML file, process your Texinfo source with @code{makeinfo} -using the @samp{--html} option. You can (for example) install the -result on your web site. +To output an HTML file, run @code{makeinfo --html} on your Texinfo +source. You can (for example) install the result on your web site. + +@cindex Docbook, converting to Texinfo +@cindex Conversion, from Docbook to Texinfo +To output an XML file, run @code{makeinfo --xml} on your Texinfo source. +To output DocBook, run @code{makeinfo --docbook}. If you want to +convert from Docbook @emph{to} Texinfo, please see +@uref{http://docbook2X.sourceforge.net/}. @cindex Output formats, supporting more -@cindex Docbook output format @cindex SGML-tools output format If you are a programmer and would like to contribute to the GNU project by implementing additional output formats for Texinfo, that would be @@ -831,7 +807,7 @@ output formats. You might as well just write the man page directly. If you wish to support man pages, the program @command{help2man} may be useful; it generates a traditional man page from the @samp{--help} output of a program. In fact, this is currently used to generate man -pages for the Texinfo programs themselves. It is free software written +pages for the Texinfo programs themselves. It is GNU software written by Brendan O'Dea, available from @uref{http://www.ozemail.com.au/~bod/help2man.tar.gz}. @@ -975,12 +951,12 @@ document.) @file{texinfo.tex} contains the specifications for printing a document. You can get the latest version of @file{texinfo.tex} from @uref{ftp://ftp.gnu.org/gnu/texinfo.tex}. -Most often, documents are printed on 8.5 inch by 11 inch -pages (216@dmn{mm} by 280@dmn{mm}; this is the default size), but you -can also print for 7 inch by 9.25 inch pages (178@dmn{mm} by -235@dmn{mm}; the @code{@@smallbook} size) or on European A4 size paper -(@code{@@afourpaper}). (@xref{smallbook, , Printing ``Small'' Books}. -Also, see @ref{A4 Paper, ,Printing on A4 Paper}.)@refill +Most often, documents are printed on 8.5 inch by 11 inch pages +(216@dmn{mm} by 280@dmn{mm}; this is the default size), but you can also +print for 7 inch by 9.25 inch pages (178@dmn{mm} by 235@dmn{mm}; the +@code{@@smallbook} size) or on A4 or A5 size paper (@code{@@afourpaper}, +@code{@@afivepaper}). (@xref{smallbook, , Printing ``Small'' Books}. +Also, see @ref{A4 Paper, ,Printing on A4 Paper}.) By changing the parameters in @file{texinfo.tex}, you can change the size of the printed document. In addition, you can change the style in @@ -1007,7 +983,6 @@ To get a copy of @TeX{}, see @node Formatting Commands, Conventions, Printed Books, Overview -@comment node-name, next, previous, up @section @@-commands @cindex @@-commands @cindex Formatting commands @@ -1091,8 +1066,8 @@ make it easier to write and read Texinfo files than if all commands followed exactly the same syntax. (For details about @@-command syntax, see @ref{Command Syntax, , @@-Command Syntax}.)@refill + @node Conventions, Comments, Formatting Commands, Overview -@comment node-name, next, previous, up @section General Syntactic Conventions @cindex General syntactic conventions @cindex Syntactic conventions @@ -1157,24 +1132,25 @@ Similarly for @code{@@ifhtml @dots{} @@end ifhtml}, @cindex Tabs; don't use! @quotation -@strong{Caution:} Do not use tabs in a Texinfo file! @TeX{} uses -variable-width fonts, which means that it cannot predefine a tab to work -in all circumstances. Consequently, @TeX{} treats tabs like single -spaces, and that is not what they look like. Furthermore, -@code{makeinfo} does nothing special with tabs, and thus a tab character -in your input file may appear differently in the output. +@strong{Caution:} Do not use tabs in a Texinfo file (except in verbatim +modes) ! @TeX{} uses variable-width fonts, which means that it is +impractical at best to define a tab to work in all circumstances. +Consequently, @TeX{} treats tabs like single spaces, and that is not +what they look like. Furthermore, @code{makeinfo} does nothing special +with tabs, and thus a tab character in your input file may appear +differently in the output, for example, in an indented example. @noindent To avoid this problem, Texinfo mode causes GNU Emacs to insert multiple -spaces when you press the @key{TAB} key.@refill +spaces when you press the @key{TAB} key. @noindent Also, you can run @code{untabify} in Emacs to convert tabs in a region -to multiple spaces.@refill +to multiple spaces. @end quotation + @node Comments, Minimum, Conventions, Overview -@comment node-name, next, previous, up @section Comments You can write comments in a Texinfo file that will not appear in @@ -1199,10 +1175,8 @@ the Info file or the printed manual by using the @code{@@ignore} and of its own, starting each command at the beginning of the line. Text between these two commands does not appear in the processed output. You can use @code{@@ignore} and @code{@@end ignore} for writing -comments. Often, @code{@@ignore} and @code{@@end ignore} is used -to enclose a part of the copying permissions that applies to the -Texinfo source file of a document, but not to the Info or printed -version of the document.@refill +comments. + @cindex Ignored text @cindex Unprocessed text @findex ignore @@ -1210,15 +1184,15 @@ version of the document.@refill @ignore Text enclosed by @code{@@ignore} or by failing @code{@@ifset} or @code{@@ifclear} conditions is ignored in the sense that it will not -contribute to the formatted output. However, TeX and makeinfo must +contribute to the formatted output. However, @TeX{} and makeinfo must still parse the ignored text, in order to understand when to @emph{stop} ignoring text from the source file; that means that you will still get error messages if you have invalid Texinfo markup within ignored text. @end ignore + @node Minimum, Six Parts, Comments, Overview -@comment node-name, next, previous, up @section What a Texinfo File Must Have @cindex Minimal Texinfo file (requirements) @cindex Must have in Texinfo file @@ -1258,7 +1232,8 @@ The @samp{\input texinfo} line tells @TeX{} to use the backslash, @samp{\}; this is correct for @TeX{}.) The @samp{@@setfilename} line provides a name for the Info file and tells @TeX{} to open auxiliary files. The @samp{@@settitle} line specifies a -title for the page headers (or footers) of the printed manual.@refill +title for the page headers (or footers) of the printed manual, and the +default document description title for the @samp{<head>} in HTML format. The @code{@@bye} line at the end of the file on a line of its own tells the formatters that the file is ended and to stop formatting.@refill @@ -1374,7 +1349,7 @@ appear in the printed document. @@ifinfo This is a short example of a complete Texinfo file. -Copyright @@copyright@{@} 1990 Free Software Foundation, Inc. +Copyright @@copyright@{@} 2002 Free Software Foundation, Inc. @@end ifinfo @end group @end example @@ -1386,17 +1361,17 @@ The titlepage segment does not appear in the Info file. @example @group +@@contents @@titlepage @@sp 10 -@@comment The title is printed in a large font. -@@center @@titlefont@{Sample Title@} +@@title Sample Title @end group @group @@c The following two commands start the copyright page. @@page @@vskip 0pt plus 1filll -Copyright @@copyright@{@} 1990 Free Software Foundation, Inc. +Copyright @@copyright@{@} 2002 Free Software Foundation, Inc. @@end titlepage @end group @end example @@ -1406,12 +1381,13 @@ Copyright @@copyright@{@} 1990 Free Software Foundation, Inc. @noindent The `Top' node contains the master menu for the Info file. Since a printed manual uses a table of contents rather than -a menu, the master menu appears only in the Info file. +a menu, the master menu appears only in online output. @example @group -@@node Top, First Chapter, , (dir) -@@comment node-name, next, previous, up +@@ifnottex +@@node Top +@@end ifnottex @end group @end example @@ -1434,10 +1410,9 @@ chapter containing an enumerated list.@refill @example @group -@@node First Chapter, Concept Index, Top, Top -@@comment node-name, next, previous, up +@@node First Chapter @@chapter First Chapter -@@cindex Sample index entry +@@cindex Chapter, first @end group @group @@ -1458,10 +1433,9 @@ This is the second item. @end group @group -The @@code@{makeinfo@} and @@code@{texinfo-format-buffer@} -commands transform a Texinfo file such as this into -an Info file; and @@TeX@{@} typesets it for a printed -manual. +The @@code@{makeinfo@} command transforms a Texinfo file +such as this into an Info file or other output; +@@TeX@ typesets it for a printed manual. @end group @end example @@ -1475,14 +1449,13 @@ document.@refill @example @group -@@node Concept Index, , First Chapter, Top +@@node Concept Index @@unnumbered Concept Index @end group @group @@printindex cp -@@contents @@bye @end group @end example @@ -1513,8 +1486,8 @@ manual. @end quotation -@node Acknowledgements and History -@section Acknowledgements and History +@node History +@section History @cindex Stallman, Richard M. @cindex Chassell, Robert J. @@ -1892,10 +1865,10 @@ about the page commands.@refill Texinfo mode provides commands for automatically creating or updating menus and node pointers. The commands are called ``update'' commands -because their most frequent use is for updating a Texinfo file after -you have worked on it; but you can use them to insert the `Next', -`Previous', and `Up' pointers into an @code{@@node} line that has none and to -create menus in a file that has none.@refill +because their most frequent use is for updating a Texinfo file after you +have worked on it; but you can use them to insert the `Next', +`Previous', and `Up' pointers into an @code{@@node} line that has none +and to create menus in a file that has none. If you do not use the updating commands, you need to write menus and node pointers by hand, which is a tedious task.@refill @@ -2520,8 +2493,7 @@ M-x texinfo-sequential-node-update @end group @end example -@node Beginning a File, Ending a File, Texinfo Mode, Top -@comment node-name, next, previous, up +@node Beginning a File @chapter Beginning a Texinfo File @cindex Beginning a Texinfo file @cindex Texinfo file beginning @@ -2581,8 +2553,8 @@ document (in contrast to the copying permissions for a program) are in parts that appear only in the Info file or only in the printed manual, this information must be given twice.@refill -@node Sample Beginning, Header, Four Parts, Beginning a File -@comment node-name, next, previous, up + +@node Sample Beginning @section Sample Texinfo File Beginning The following sample shows what is needed.@refill @@ -2631,14 +2603,15 @@ Published by @dots{} Permission is granted to @dots{} @@end titlepage -@@node Top, Overview, , (dir) +@@ifnottex +@@node Top +@@top @var{title} -@@ifinfo This document describes @dots{} This document applies to version @dots{} of the program named @dots{} -@@end ifinfo +@@end ifnottex @group @@menu @@ -2651,26 +2624,24 @@ of the program named @dots{} @end group @group -@@node First Chapter, Second Chapter, top, top -@@comment node-name, next, previous, up +@@node First Chapter @@chapter First Chapter @@cindex Index entry for First Chapter @end group @end example -@node Header, Info Summary and Permissions, Sample Beginning, Beginning a File -@comment node-name, next, previous, up + +@node Header @section The Texinfo File Header @cindex Header for Texinfo files @cindex Texinfo file header Texinfo files start with at least three lines that provide Info and -@TeX{} with necessary information. These are the @code{\input -texinfo} line, the @code{@@settitle} line, and the -@code{@@setfilename} line. If you want to run @TeX{} on just a part -of the Texinfo File, you must write the @code{@@settitle} -and @code{@@setfilename} lines between start-of-header and end-of-header -lines.@refill +@TeX{} with necessary information. These are the @code{\input texinfo} +line, the @code{@@settitle} line, and the @code{@@setfilename} line. If +you want to run @TeX{} on just a part of the Texinfo file, you must +write the @code{@@settitle} and @code{@@setfilename} lines between +start-of-header and end-of-header lines. Thus, the beginning of a Texinfo file looks like this: @@ -2700,6 +2671,7 @@ or else like this: * Start of Header:: Formatting a region requires this. * setfilename:: Tell Info the name of the Info file. * settitle:: Create a title for the printed work. +* documentdescription:: Document summary for the HTML output. * setchapternewpage:: Start chapters on right-hand pages. * paragraphindent:: Specify paragraph indentation. * exampleindent:: Specify environment indentation. @@ -2739,8 +2711,8 @@ When the file is edited in GNU Emacs, the @samp{-*-texinfo-*-} mode specification tells Emacs to use Texinfo mode.@refill @end enumerate -@node Start of Header, setfilename, First Line, Header -@comment node-name, next, previous, up + +@node Start of Header @subsection Start of Header @cindex Start of header line @@ -2816,18 +2788,21 @@ also reads @file{texinfo.cnf} if that file is present on your system (@pxref{Preparing for TeX,, Preparing for @TeX{}}). -@node settitle, setchapternewpage, setfilename, Header -@comment node-name, next, previous, up -@subsection @code{@@settitle} +@node settitle +@subsection @code{@@settitle}: Set the document title @findex settitle In order to be made into a printed manual, a Texinfo file must contain -a line that looks like this:@refill +a line that looks like this: @example @@settitle @var{title} @end example +In the HTML file produced by @command{makeinfo}, @var{title} serves as +the default document description in the @samp{<head>} part; see +@ref{documentdescription}, for how to change that. + Write the @code{@@settitle} command at the beginning of a line and follow it on the same line by the title. This tells @TeX{} the title to use in a header or footer. Do not write anything else on the line; @@ -2866,8 +2841,40 @@ footings. @xref{Headings, , Page Headings}, for a detailed discussion of this process.@refill +@node documentdescription +@subsection @code{@@documentdescription}: Summary text +@cindex Document description +@cindex Description of document +@cindex Summary of document +@cindex <meta> HTML tag, and document description + +When producing HTML output for a document, @command{makeinfo} writes a +@samp{<meta>} element in the @samp{<head>} to give some idea of the +content of the document. By default, this @dfn{description} is the title +of the document, taken from the @code{@@settitle} command +(@pxref{settitle}). To change this, use the @code{@@documentdescription} +environment, as in: + +@example +@@documentdescription +descriptive text +@@end documendescription +@end example + +@noindent +This will produce the following output in the @samp{<head>} of the HTML: + +@example +<meta name=description content="descriptive text"> +@end example + +@code{@@documentdescription} must be specified before the first node of +the document. + + +@findex documentdescription @node setchapternewpage -@subsection @code{@@setchapternewpage} +@subsection @code{@@setchapternewpage}: @cindex Starting chapters @cindex Pages, starting odd @findex setchapternewpage @@ -2877,61 +2884,59 @@ the paper, chapters start on right-hand pages, and right-hand pages have odd numbers. But in short reports, text often is printed only on one side of the paper. Also in short reports, chapters sometimes do not start on new pages, but are printed on the same page as the end of the -preceding chapter, after a small amount of vertical whitespace.@refill +preceding chapter, after a small amount of vertical whitespace. You can use the @code{@@setchapternewpage} command with various arguments to specify how @TeX{} should start chapters and whether it should format headers for printing on one or both sides of the paper -(single-sided or double-sided printing).@refill +(single-sided or double-sided printing). Write the @code{@@setchapternewpage} command at the beginning of a -line followed by its argument.@refill +line followed by its argument. For example, you would write the following to cause each chapter to -start on a fresh odd-numbered page:@refill +start on a fresh odd-numbered page: @example @@setchapternewpage odd @end example You can specify one of three alternatives with the -@code{@@setchapternewpage} command:@refill +@code{@@setchapternewpage} command: @table @asis @item @code{@@setchapternewpage off} Cause @TeX{} to typeset a new chapter on the same page as the last chapter, after skipping some vertical whitespace. Also, cause @TeX{} to -format page headers for single-sided printing. (You can override the -headers format with the @code{@@headings double} command; see -@ref{headings on off, , The @code{@@headings} Command}.)@refill +format page headers for single-sided printing. @item @code{@@setchapternewpage on} Cause @TeX{} to start new chapters on new pages and to format page -headers for single-sided printing. This is the form most often -used for short reports or personal printing. - -This alternative is the default.@refill +headers for single-sided printing. This is the form most often used for +short reports or personal printing. This is the default. @item @code{@@setchapternewpage odd} Cause @TeX{} to start new chapters on new, odd-numbered pages (right-handed pages) and to typeset for double-sided printing. This is -the form most often used for books and manuals.@refill +the form most often used for books and manuals. @end table -Texinfo does not have an @code{@@setchapternewpage even} command.@refill +Texinfo does not have an @code{@@setchapternewpage even} command, +because there is no printing tradition of starting chapters or books on +an even-numbered page. -You can countermand or modify the effect on headers of an -@code{@@setchapternewpage} command with an @code{@@headings} command. -@xref{headings on off, , The @code{@@headings} Command}.@refill +If you don't like the default headers that @code{@@setchapternewpage} +sets, you can explicit control them with the @code{@@headings} command. +@xref{headings on off, , The @code{@@headings} Command}. At the beginning of a manual or book, pages are not numbered---for -example, the title and copyright pages of a book are not numbered. -By convention, table of contents pages are numbered with roman -numerals and not in sequence with the rest of the document.@refill +example, the title and copyright pages of a book are not numbered. By +convention, table of contents and frontmatter pages are numbered with +roman numerals and not in sequence with the rest of the document. Since an Info file does not have pages, the @code{@@setchapternewpage} -command has no effect on it.@refill +command has no effect on it. We recommend not including any @code{@@setchapternewpage} command in your manual sources at all, since the desired output is not intrinsic to @@ -3066,23 +3071,23 @@ section that appears only in the Info file. This section usually contains a brief description of the contents of the Info file, a copyright notice, and copying permissions.@refill -The copyright notice should read:@refill +The copyright notice should read: @example Copyright @var{year} @var{copyright-owner} @end example @noindent -and be put on a line by itself.@refill +and be put on a line by itself. -Standard text for the copyright permissions is contained in an appendix -to this manual; see @ref{ifinfo Permissions, , @samp{ifinfo} Copying -Permissions}, for the complete text.@refill +Standard text for the copyright permissions of free manuals is contained +in an appendix to this manual (@pxref{Documentation Copying, , GNU Free +Documentation License}). The permissions text appears in an Info file @emph{before} the first node. This mean that a reader does @emph{not} see this text when -reading the file using Info, except when using the advanced Info command -@kbd{g *}. +reading the file using Info (except when using the advanced Info command +@kbd{g *}). @node Titlepage & Copyright Page @@ -3105,8 +3110,8 @@ output. Simply place any such leading material between @code{@@ifinfo} and @code{@@end ifinfo}; @command{makeinfo} includes this in its plain text output. It will not show up in the Info readers. -@xref{Titlepage Permissions, , Titlepage Copying Permissions}, for the -standard text for the copyright permissions.@refill +@xref{Documentation Copying, , GNU Free Documentation License}, for the +standard text for the copyright permissions. @menu * titlepage:: Create a title for the printed document. @@ -3329,7 +3334,7 @@ may be useful if you have a very long title. Here is a real-life example: @@titlefont@{GNU Software@} @@sp 1 @@title for MS-Windows and MS-DOS -@@subtitle Edition @@value@{edition@} for Release @@value@{cd-edition@} +@@subtitle Edition @@value@{e@} for Release @@value@{cde@} @@author by Daniel Hagerty, Melissa Weisshaus @@author and Eli Zaretskii @end group @@ -3394,7 +3399,8 @@ Permissions must be given here as well as in the summary segment within header since this text appears only in the printed manual and the @samp{ifinfo} text appears only in the Info file. -@xref{Sample Permissions}, for the standard text.@refill +@xref{Documentation Copying,,GNU Free Documentation License}, for the +standard text. @node end titlepage @@ -3659,7 +3665,7 @@ Using Texinfo Mode @end group @end example -@node Software Copying Permissions, , The Top Node, Beginning a File +@node Software Copying Permissions @comment node-name, next, previous, up @section Software Copying Permissions @cindex Software copying permissions @@ -3674,9 +3680,8 @@ for the software that is documented, this section usually follows the GNU software. It ensures that you and others will continue to have a right to use and share the software.@refill -The copying and distribution information and the disclaimer are -followed by an introduction or else by the first chapter of the -manual.@refill +The copying and distribution information and the disclaimer are followed +by an introduction or else by the first chapter of the manual.@refill @cindex Introduction, as part of file Although an introduction is not a required part of a Texinfo file, it @@ -3848,7 +3853,15 @@ sectioning command such as @code{@@unnumbered} before them. Since an Info file uses menus instead of tables of contents, the Info formatting commands ignore the contents commands. But the contents are -included in plain text output (generated by @code{makeinfo --no-headers}). +included in plain text output (generated by @code{makeinfo +--no-headers}), unless @code{makeinfo} is writing its output to standard +output. + +When @code{makeinfo} writes a short table of contents while producing +html output, the links in the short table of contents point to +corresponding entries in the full table of contents rather than the text +of the document. The links in the full table of contents point to the +main text of the document. The contents commands can be placed either at the very end of the file, after any indices (see the previous section) and just before the @@ -3858,8 +3871,7 @@ the former is that then the contents output is always up to date, because it reflects the processing just done. The advantage to the latter is that the contents are printed in the proper place, thus you do not need to rearrange the DVI file with @command{dviselect} or shuffle -paper. However, contents commands at the beginning of the document are -ignored when outputting to standard output. +paper. @findex setcontentsaftertitlepage @findex setshortcontentsaftertitlepage @@ -4033,25 +4045,25 @@ start new pages in the printed manual; the @code{@@heading} commands do not.@refill @end itemize -Here are the four groups of chapter structuring commands:@refill +Here are the four groups of chapter structuring commands: -@multitable @columnfractions .19 .30 .29 .22 +@tex +{\globaldefs = 1 \smallfonts} +@end tex -@item @tab @tab @tab No new page -@item Numbered @tab Unnumbered @tab Lettered and numbered - @tab Unnumbered -@item In contents @tab In contents @tab In contents @tab Not in contents -@item @tab @code{@@top} @tab - @tab @code{@@majorheading} -@item @code{@@chapter} @tab @code{@@unnumbered} @tab @code{@@appendix} - @tab @code{@@chapheading} -@item @code{@@section} @tab @code{@@unnumberedsec} @tab @code{@@appendixsec} - @tab @code{@@heading} -@item @code{@@subsection} @tab @code{@@unnumberedsubsec} @tab @code{@@appendixsubsec} - @tab @code{@@subheading} -@item @code{@@subsubsection} @tab @code{@@unnumberedsubsubsec} @tab @code{@@appendixsubsubsec} - @tab @code{@@subsubheading} +@multitable @columnfractions .19 .30 .29 .22 +@item @tab @tab @tab No new page +@item @i{Numbered} @tab @i{Unnumbered} @tab @i{Lettered/numbered} @tab @i{Unnumbered} +@item In contents @tab In contents @tab In contents @tab Omitted from@*contents +@item @tab @code{@@top} @tab @tab @code{@@majorheading} +@item @code{@@chapter} @tab @code{@@unnumbered} @tab @code{@@appendix} @tab @code{@@chapheading} +@item @code{@@section} @tab @code{@@unnumberedsec} @tab @code{@@appendixsec} @tab @code{@@heading} +@item @code{@@subsection} @tab @code{@@unnumberedsubsec} @tab @code{@@appendixsubsec} @tab @code{@@subheading} +@item @code{@@subsubsection} @tab @code{@@unnumberedsubsubsec} @tab @code{@@appendixsubsubsec} @tab @code{@@subsubheading} @end multitable +@tex +{\globaldefs = 1 \textfonts} +@end tex @node makeinfo top @@ -4736,6 +4748,7 @@ capitalized; others are not.@refill @subsection @code{@@node} Line Requirements @cindex Node line requirements +@cindex Restrictions on node names Here are several requirements for @code{@@node} lines: @itemize @bullet @@ -4761,10 +4774,11 @@ node containing the pointer. @cindex @@-commands in nodename @cindex Node name, should not contain @@-commands @item -@w{@@-commands} used in node names generally confuse Info, so you should -avoid them. For a few rare cases when this is useful, Texinfo has -limited support for using @w{@@-commands} in node names; see -@ref{Pointer Validation}. +@w{@@-commands} used in node names generally confuse Info, so you +should avoid them. This includes punctuation characters that are +escaped with a @samp{@@}, such as @code{@@} and @code{@{}. For a few +rare cases when this is useful, Texinfo has limited support for using +@w{@@-commands} in node names; see @ref{Pointer Validation}. @need 750 Thus, the beginning of the section called @code{@@chapter} looks like @@ -4780,6 +4794,12 @@ this:@refill @end smallexample @item +@cindex Parentheses in nodename +You cannot use parentheses in node names, because a node name such as +@samp{(foo)bar} is interpreted by the Info readers as a node +@samp{bar} in an Info file @file{foo}. + +@item @cindex Apostrophe in nodename @cindex Colon in nodename @cindex Comma in nodename @@ -4787,7 +4807,7 @@ this:@refill @cindex Characters, invalid in node name @cindex Invalid characters in node names Unfortunately, you cannot use periods, commas, colons or apostrophes -within a node name; these confuse @TeX{} or the Info formatters.@refill +within a node name; these confuse @TeX{} or the Info formatters. @need 700 For example, the following is a section title: @@ -4846,7 +4866,7 @@ hits @key{DEL} to go backwards, you wind up in the middle of the some other entry in the @file{dir} file, which has nothing to do with what you were reading. -@xref{Install an Info File}, for more information about installing +@xref{Installing an Info File}, for more information about installing an Info file in the @file{info} directory. @@ -4906,6 +4926,7 @@ include an edition number for the manual. (The title page should also contain this information: see @ref{titlepage, , @code{@@titlepage}}.)@refill + @node makeinfo Pointer Creation @section Creating Pointers with @code{makeinfo} @cindex Creating pointers with @code{makeinfo} @@ -4933,6 +4954,12 @@ This node pointer insertion feature in @code{makeinfo} relieves you from the need to update menus and pointers manually or with Texinfo mode commands. (@xref{Updating Nodes and Menus}.) +In most cases, you will want to take advantage of this feature and not +redundantly specify node pointers. However, Texinfo documents are not +required to be organized hierarchically or in fact contain sectioning +commands at all. For example, if you never intend the document to be +printed. In those cases, you will need to explicitly specify the pointers. + @node anchor @section @code{@@anchor}: Defining Arbitrary Cross-reference Targets @@ -5278,7 +5305,7 @@ presumes that you are referring to the `Top' node.@refill The @file{dir} file that contains the main menu for Info has menu entries that list only file names. These take you directly to the `Top' -nodes of each Info document. (@xref{Install an Info File}.)@refill +nodes of each Info document. (@xref{Installing an Info File}.) @need 700 For example: @@ -6275,48 +6302,47 @@ The official GNU ftp site is @uref{ftp://ftp.gnu.org/gnu}. An example of the two-argument form: @example -The official @@uref@{ftp://ftp.gnu.org/gnu, GNU ftp site@} holds -programs and texts. +The official @@uref@{ftp://ftp.gnu.org/gnu, GNU ftp site@} +holds programs and texts. @end example @noindent produces: @display -The official @uref{ftp://ftp.gnu.org/gnu, GNU ftp site} holds -programs and texts. +The official @uref{ftp://ftp.gnu.org/gnu, GNU ftp site} +holds programs and texts. @end display @noindent that is, the Info output is this: @example -The official GNU ftp site (ftp://ftp.gnu.org/gnu) holds -programs and texts. +The official GNU ftp site (ftp://ftp.gnu.org/gnu) +holds programs and texts. @end example @noindent and the HTML output is this: @example -The official <a href="ftp://ftp.gnu.org/gnu">GNU ftp site</a> holds -programs and texts. +The official <a href="ftp://ftp.gnu.org/gnu">GNU ftp site</a> +holds programs and texts. @end example An example of the three-argument form: @example -The @@uref@{http://example.org/man.cgi/1/ls,,ls(1)@} program @dots{} +The @@uref@{/man.cgi/1/ls,,ls(1)@} program @dots{} @end example @noindent produces: @display -The @uref{http://example.org/man.cgi/1/ls,,ls(1)} program @dots{} +The @uref{/man.cgi/1/ls,,ls(1)} program @dots{} @end display @noindent but with HTML: @example -The <a href="http://example.org/man.cgi/1/ls">ls(1)</a> program @dots{} +The <a href="/man.cgi/1/ls">ls(1)</a> program @dots{} @end example To merely indicate a url without creating a link people can follow, use @code{@@url} (@pxref{url, @code{@@url}}). - Some people prefer to display url's in the unambiguous format: @display @@ -6324,7 +6350,7 @@ Some people prefer to display url's in the unambiguous format: @end display @noindent -@cindex <URL: convention, not used +@cindex <URL convention, not used You can use this form in the input file if you wish. We feel it's not necessary to clutter up the output with the extra @samp{<URL:} and @samp{>}, since any software that tries to detect url's in text already @@ -6351,8 +6377,8 @@ program. Also, you can emphasize text, in several different ways. * Emphasis:: How to emphasize text. @end menu + @node Indicating, Emphasis, Marking Text, Marking Text -@comment node-name, next, previous, up @section Indicating Definitions, Commands, etc. @cindex Highlighting text @cindex Indicating commands, definitions, etc. @@ -6380,7 +6406,8 @@ not something else that should not be changed.@refill * code:: Indicating program code. * kbd:: Showing keyboard input. * key:: Specifying keys. -* samp:: Showing a literal sequence of characters. +* samp:: A literal sequence of characters. +* verb:: A verbatim sequence of characters. * var:: Indicating metasyntactic variables. * env:: Indicating environment variables. * file:: Indicating file names. @@ -6712,8 +6739,7 @@ example, write @samp{@@kbd@{Meta-a@}} to produce @kbd{Meta-a} and @c the beginning of the sentence. The @code{@@key@{META@}} key is often in @c the lower left of the keyboard.''@refill -@node samp, var, key, Indicating -@comment node-name, next, previous, up +@node samp @subsection @code{@@samp}@{@var{text}@} @findex samp @@ -6767,6 +6793,38 @@ In English, the vowels are @samp{a}, @samp{e}, @end quotation +@node verb +@subsection @code{@@verb}@{<char>@var{text}<char>@} +@findex verb +@cindex Verbatim in-line text + +@cindex Delimiter character, for verbatim +Use the @code{@@verb} command to print a verbatim sequence of +characters. + +Like La@TeX{}'s @code{\verb} command, the verbatim text can be quoted using +any unique delimiter character. Enclose the verbatim text, including the +delimiters, in braces. Text is printed in a fixed-width font: + +@example +How many @@verb@{|@@|@}-escapes does one need to print this +@@verb@{.@@a @@b @@c.@} string or @@verb@{+@@'e@?`@!`@{@}\+@} this? +@end example + +@noindent +produces + +@example +How many @verb{|@|}-escapes does one need to print this +@verb{.@a @b @c.} string or these @verb{+@'e?`{}!`\+} this? +@end example + +This is in contrast to @code{@@samp} (see the previous +section), whose argument is normal Texinfo text, where the characters +@code{@@@{@}} are special; with @code{@@verb}, nothing is special except +the delimiter character you choose. + + @node var @subsection @code{@@var}@{@var{metasyntactic-variable}@} @findex var @@ -6859,11 +6917,11 @@ section). For example: @example -The @@env@{PATH@} environment variable sets the search path for commands. +The @@env@{PATH@} environment variable @dots{} @end example @noindent produces @quotation -The @env{PATH} environment variable sets the search path for commands. +The @env{PATH} environment variable @dots{} @end quotation @@ -7093,17 +7151,17 @@ the text to display if any. In HTML output, @code{@@email} produces a For example: @example -Send bug reports to @@email@{bug-texinfo@@@@gnu.org@}. -Send suggestions to the @@email@{bug-texinfo@@@@gnu.org, same place@}. +Send bug reports to @@email@{bug-texinfo@@@@gnu.org@}, +suggestions to the @@email@{bug-texinfo@@@@gnu.org, same place@}. @end example @noindent produces @display -Send bug reports to @email{bug-texinfo@@gnu.org}. -Send suggestions to the @email{bug-texinfo@@gnu.org, same place}. +Send bug reports to @email{bug-texinfo@@gnu.org}, +suggestions to the @email{bug-texinfo@@gnu.org, same place}. @end display -@node Emphasis, , Indicating, Marking Text +@node Emphasis @comment node-name, next, previous, up @section Emphasizing Text @cindex Emphasizing text @@ -7267,7 +7325,8 @@ produces If possible, you should avoid using the other three font commands. If you need to use one, it probably indicates a gap in the Texinfo -language.@refill +language. + @node Quotations and Examples @chapter Quotations and Examples @@ -7282,25 +7341,26 @@ an @code{@@end} command that is also at the beginning of a line by itself. For instance, you begin an example by writing @code{@@example} by itself at the beginning of a line and end the example by writing @code{@@end example} on a line by itself, at the beginning of that -line.@refill +line. @findex end @menu -* Block Enclosing Commands:: Use different constructs for - different purposes. -* quotation:: How to write a quotation. -* example:: How to write an example in a fixed-width font. -* noindent:: How to prevent paragraph indentation. -* lisp:: How to illustrate Lisp code. +* Block Enclosing Commands:: Different constructs for different purposes. +* quotation:: Writing a quotation. +* example:: Writing an example in a fixed-width font. +* verbatim:: Writing a verbatim example. +* verbatiminclude:: Including a file verbatim. +* lisp:: Illustrating Lisp code. * small:: Forms for @code{@@smallbook}. -* display:: How to write an example in the current font. -* format:: How to write an example that does not narrow - the margins. -* exdent:: How to undo the indentation of a line. -* flushleft & flushright:: How to push text flushleft or flushright. -* cartouche:: How to draw cartouches around examples. +* display:: Writing an example in the current font. +* format:: Writing an example without narrowed margins. +* exdent:: Undo indentation on a line. +* flushleft & flushright:: Pushing text flush left or flush right. +* noindent:: Preventing paragraph indentation. +* cartouche:: Drawing rounded rectangles around examples. @end menu + @node Block Enclosing Commands @section Block Enclosing Commands @@ -7310,16 +7370,22 @@ following sections: @table @code @item @@quotation Indicate text that is quoted. The text is filled, indented, and -printed in a roman font by default.@refill +printed in a roman font by default. @item @@example Illustrate code, commands, and the like. The text is printed -in a fixed-width font, and indented but not filled.@refill +in a fixed-width font, and indented but not filled. + +@item @@verbatim +Mark a piece of text that is to be printed verbatim; no character +substitutions are made and all commands are ignored, until the next +@code{@@end verbatim}. The text is printed in a fixed-width font, +and not indented or filled. Extra spaces and blank lines are +significant, and tabs are expanded. @item @@smallexample Same as @code{@@example}, except that in @TeX{} this command typesets -text in a smaller font for the @code{@@smallbook} format than for the -default 8.5 by 11 inch format. +text in a smaller font. @item @@lisp Like @code{@@example}, but specifically for illustrating Lisp code. The @@ -7351,7 +7417,7 @@ up the left or right margins of unfilled text.@refill The @code{@@noindent} command may be used after one of the above constructs to prevent the following text from being indented as a new -paragraph.@refill +paragraph. You can use the @code{@@cartouche} command within one of the above constructs to highlight the example or quotation by drawing a box with @@ -7408,13 +7474,13 @@ This is a foo. @node example -@section @code{@@example} +@section @code{@@example}: Example Text @cindex Examples, formatting them @cindex Formatting examples @findex example The @code{@@example} command is used to indicate an example that is -not part of the running text, such as computer input or output.@refill +not part of the running text, such as computer input or output. @example @group @@ -7463,11 +7529,11 @@ Note that blank lines inside the beginning the output.@refill @quotation -@strong{Caution:} Do not use tabs in the lines of an example (or anywhere -else in Texinfo, for that matter)! @TeX{} treats tabs as single -spaces, and that is not what they look like. This is a problem with -@TeX{}. (If necessary, in Emacs, you can use @kbd{M-x untabify} to -convert tabs in a region to multiple spaces.)@refill +@strong{Caution:} Do not use tabs in the lines of an example or anywhere +else in Texinfo (except in verbatim environments)! The @TeX{} +implementation of Texinfo treats tabs as single spaces, and that is not +what they look like. (If necessary, in Emacs, you can use @kbd{M-x +untabify} to convert tabs in a region to multiple spaces.)@refill @end quotation Examples are often, logically speaking, ``in the middle'' of a @@ -7483,66 +7549,84 @@ embedded within sentences, not set off from preceding and following text. @xref{code, , @code{@@code}}.) -@node noindent -@section @code{@@noindent} -@findex noindent +@node verbatim +@section @code{@@verbatim}: Literal Text +@findex verbatim +@cindex Verbatim environment -An example or other inclusion can break a paragraph into segments. -Ordinarily, the formatters indent text that follows an example as a new -paragraph. However, you can prevent this by writing @code{@@noindent} -at the beginning of a line by itself preceding the continuation -text.@refill +Use the @code{@@verbatim} environment for printing of text that may +contain special characters or commands that should not be interpreted, +such as computer input or output (@code{@@example} interprets its text +as regular Texinfo commands). This is especially useful for including +automatically generated output in a Texinfo manual. Here is an example; +the output you see is just the same as the input, with a line +@code{@@verbatim} before and a line @code{@@end verbatim} after. + +@verbatim +This is an example of text written in a @verbatim +block. No character substitutions are made all commands +are ignored, until the next 'end verbatim' command. + +In the printed manual, the text is typeset in a +fixed-width font, and not indented or filled. All +spaces and blank lines are significant, including tabs. +@end verbatim + +Write a @code{@@verbatim} command at the beginning of a line by itself. +This line will disappear from the output. Mark the end of the verbatim +block with a @code{@@end verbatim} command, also written at the +beginning of a line by itself. The @code{@@end verbatim} will also +disappear from the output. -@need 1500 For example: +@c urg: got to trick this a bit: can't use @end verbatim inside @verbatim @example -@group -@@example -This is an example -@@end example - -@@noindent -This line is not indented. As you can see, the -beginning of the line is fully flush left with the line -that follows after it. (This whole example is between -@@code@{@@@@display@} and @@code@{@@@@end display@}.) -@end group +@exdent @@verbatim +@exdent @{ +@exdent <tab>@@command with strange characters: @@'e +@exdent expand<tab>me +@exdent @} +@exdent @@end verbatim @end example @noindent produces -@display -@example -This is an example -@end example -@tex -% Remove extra vskip; this is a kludge to counter the effect of display -\vskip-3.5\baselineskip -@end tex +@verbatim +{ + @command with strange characters: @'e +expand me +} +@end verbatim -@noindent -This line is not indented. As you can see, the -beginning of the line is fully flush left with the line -that follows after it. (This whole example is between -@code{@@display} and @code{@@end display}.) -@end display +Since the lines containing @code{@@verbatim} and @code{@@end verbatim} +will disappear, tyically you should put a blank line before the +@code{@@verbatim} and another blank line after the @code{@@end +verbatim}. Blank lines between the beginning @code{@@verbatim} and the +ending @code{@@end verbatim} will appear in the output.) -To adjust the number of blank lines properly in the Info file output, -remember that the line containing @code{@@noindent} does not generate a -blank line, and neither does the @code{@@end example} line.@refill -In the Texinfo source file for this manual, each line that says -`produces' is preceded by a line containing @code{@@noindent}.@refill +@node verbatiminclude +@section @code{@@verbatiminclude} @var{file}: Include a File Verbatim +@cindex Verbatim, include file +@cindex Including a file verbatim +@findex verbatiminclude -Do not put braces after an @code{@@noindent} command; they are not -necessary, since @code{@@noindent} is a command used outside of -paragraphs (@pxref{Command Syntax}).@refill +You can include the exact contents of a file in the document with the +@code{@@verbatiminclude} command: + +@example +@@verbatiminclude @var{filename} +@end example + +The contents of @var{filename} is printed in a verbatim environment +(@pxref{verbatim,,@code{@@verbatim}}). Generally, the file is printed +exactly as it is, with all special characters and white space retained. @node lisp -@section @code{@@lisp} +@section @code{@@lisp}: Marking a Lisp Example @findex lisp @cindex Lisp example @@ -7567,9 +7651,9 @@ itself.@refill @node small @section @code{@@small@dots{}} Block Commands -@cindex Small book example -@cindex Example for a small book -@cindex Lisp example for a small book +@cindex Small examples +@cindex Examples in smaller fonts +@cindex Lisp examples in smaller fonts @findex smalldisplay @findex smallexample @findex smallformat @@ -7578,19 +7662,13 @@ itself.@refill In addition to the regular @code{@@example} and @code{@@lisp} commands, Texinfo has ``small'' example-style commands. These are @code{@@smalldisplay}, @code{@@smallexample}, @code{@@smallformat}, and -@code{@@smalllisp}. All of these commands are designed for use with the -@code{@@smallbook} command (which causes @TeX{} to format a printed book for -a 7 by 9.25 inch trim size rather than the default 8.5 by 11 inch size). +@code{@@smalllisp}. In @TeX{}, the @code{@@small@dots{}} commands typeset text in a smaller -font for the smaller @code{@@smallbook} format than for the 8.5 by 11 -inch format. Consequently, many examples containing long lines fit in a -narrower, @code{@@smallbook} page without needing to be shortened. Both -commands typeset in the normal font size when you format for the 8.5 by -11 inch size. Indeed, in this situation, the @code{@@small@dots{}} -commands are equivalent to their non-small versions. - -In Info, the @code{@@small@dots{}} commands are also equivalent to their +font than the non-small example commands. Consequently, many examples +containing long lines fit on a page without needing to be shortened. + +In Info, the @code{@@small@dots{}} commands are equivalent to their non-small companion commands. Mark the end of an @code{@@small@dots{}} block with a corresponding @@ -7621,24 +7699,22 @@ programs; and that you know you can do these things.} @iftex @smallexample This is an example of text written between @code{@@smallexample} and -@code{@@end smallexample}. In Info and in an 8.5 by 11 inch manual, -this text appears in its normal size; but in a 7 by 9.25 inch manual, -this text appears in a smaller font. +@code{@@end smallexample}. In Info this text appears in its normal size; +but in printed manuals, this text appears in a smaller font. @end smallexample @end iftex @end ifset @ifinfo @smallexample This is an example of text written between @code{@@smallexample} and -@code{@@end smallexample}. In Info and in an 8.5 by 11 inch manual, -this text appears in its normal size; but in a 7 by 9.25 inch manual, -this text appears in a smaller font. +@code{@@end smallexample}. In Info this text appears in its normal size; +but in a 7 by 9.25 inch manual, this text appears in a smaller font. @end smallexample @end ifinfo -The @code{@@small@dots{}} commands make it easier to prepare smaller -format manuals without forcing you to edit examples by hand to fit them -onto narrower pages.@refill +The @code{@@small@dots{}} commands make it easier to prepare manuals +without forcing you to edit examples by hand to fit them onto narrower +pages. As a general rule, a printed document looks better if you use only one of (for example) @code{@@example} or in @code{@@smallexample} @@ -7646,7 +7722,7 @@ consistently within a chapter. Only occasionally should you mix the two formats. @xref{smallbook, , Printing ``Small'' Books}, for more information -about the @code{@@smallbook} command.@refill +about the @code{@@smallbook} command. @node display @@ -7736,10 +7812,13 @@ In practice, the @code{@@exdent} command is rarely used. Usually, you un-indent text by ending the example and returning the page to its normal width.@refill -@node flushleft & flushright, cartouche, exdent, Quotations and Examples + +@node flushleft & flushright @section @code{@@flushleft} and @code{@@flushright} @findex flushleft @findex flushright +@cindex ragged right +@cindex ragged left The @code{@@flushleft} and @code{@@flushright} commands line up the ends of lines on the left and right margins of a page, @@ -7795,16 +7874,76 @@ right justifies every line but leaves the left end ragged. @end flushright -@node cartouche, , flushleft & flushright, Quotations and Examples -@section Drawing Cartouches Around Examples + +@node noindent +@section @code{@@noindent}: Omitting Indentation +@findex noindent + +An example or other inclusion can break a paragraph into segments. +Ordinarily, the formatters indent text that follows an example as a new +paragraph. However, you can prevent this by writing @code{@@noindent} +at the beginning of a line by itself preceding the continuation +text.@refill + +@need 1500 +For example: + +@example +@group +@@example +This is an example +@@end example + +@@noindent +This line is not indented. As you can see, the +beginning of the line is fully flush left with the line +that follows after it. (This whole example is between +@@code@{@@@@display@} and @@code@{@@@@end display@}.) +@end group +@end example + +@noindent +produces + +@display +@example +This is an example +@end example +@tex +% Remove extra vskip; this is a kludge to counter the effect of display +\vskip-3.5\baselineskip +@end tex + +@noindent +This line is not indented. As you can see, the +beginning of the line is fully flush left with the line +that follows after it. (This whole example is between +@code{@@display} and @code{@@end display}.) +@end display + +To adjust the number of blank lines properly in the Info file output, +remember that the line containing @code{@@noindent} does not generate a +blank line, and neither does the @code{@@end example} line.@refill + +In the Texinfo source file for this manual, each line that says +`produces' is preceded by a line containing @code{@@noindent}.@refill + +Do not put braces after an @code{@@noindent} command; they are not +necessary, since @code{@@noindent} is a command used outside of +paragraphs (@pxref{Command Syntax}).@refill + + +@node cartouche +@section @code{@@cartouche}: Rounded Rectangles Around Examples @findex cartouche @cindex Box with rounded corners +@cindex Rounded rectangles, around examples In a printed manual, the @code{@@cartouche} command draws a box with rounded corners around its contents. You can use this command to further highlight an example or quotation. For instance, you could write a manual in which one type of example is surrounded by a cartouche -for emphasis.@refill +for emphasis. @code{@@cartouche} affects only the printed manual; it has no effect in other output files. @@ -7841,7 +7980,7 @@ In a printed manual, the example looks like this:@refill @end iftex -@node Lists and Tables, Indices, Quotations and Examples, Top +@node Lists and Tables @chapter Lists and Tables @cindex Making lists and tables @cindex Lists and tables, making @@ -8944,7 +9083,7 @@ use the special commands; you just enter a period as you would if you were using a typewriter, which means you put two spaces after the period, question mark, or exclamation mark that ends a sentence. -@findex : @r{(suppress widening)} +@findex <colon> @r{(suppress widening)} Use the @code{@@:}@: command after a period, question mark, exclamation mark, or colon that should not be followed by extra space. For example, use @code{@@:}@: after periods that end abbreviations @@ -9070,6 +9209,8 @@ Other possible uses of @code{@@@kbd{SPACE}} have been subsumed by Do not follow any of these commands with braces. +To produce a non-breakable space, see @ref{w, non-breakable space}. + @node dmn @subsection @code{@@dmn}@{@var{dimension}@}: Format a Dimension @@ -9208,7 +9349,7 @@ commonly used in languages other than English. @cindex Es-zet @cindex Sharp S @cindex German S -@multitable {x@@questiondown@{@} } {oe,OE} {es-zet or sharp S} +@multitable {x@@questiondown@{@}} {oe,OE} {es-zet or sharp S} @item @t{@@exclamdown@{@}} @tab @exclamdown{} @tab upside-down ! @item @t{@@questiondown@{@}} @tab @questiondown{} @tab upside-down ? @item @t{@@aa@{@},@@AA@{@}} @tab @aa{},@AA{} @tab a,A with circle @@ -9335,6 +9476,8 @@ available. @section @code{@@minus}@{@} (@minus{}): Inserting a Minus Sign @findex minus +@cindex em-dash +@cindex hyphen Use the @code{@@minus@{@}} command to generate a minus sign. In a fixed-width font, this is a single hyphen, but in a proportional font, the symbol is the customary length for a minus sign---a little longer @@ -9361,10 +9504,11 @@ an itemized list, you do not need to type the braces (@pxref{itemize, , @code{@@itemize}}.) -@node math, Glyphs, minus, Insertions +@node math @section @code{@@math}: Inserting Mathematical Expressions @findex math @cindex Mathematical expressions +@cindex Formulas, mathematical You can write a short mathematical expression with the @code{@@math} command. Write the mathematical expression between braces, like this: @@ -9374,20 +9518,16 @@ command. Write the mathematical expression between braces, like this: @end example @iftex -@need 1000 -@noindent -This produces the following in @TeX{}: +@noindent This produces the following in @TeX{}: @display @math{(a + b)(a + b) = a^2 + 2ab + b^2} @end display -@noindent -and the following in Info: +@noindent and the following in Info: @end iftex @ifinfo -@noindent -This produces the following in Info: +@noindent This produces the following in Info: @end ifinfo @example @@ -9396,15 +9536,38 @@ This produces the following in Info: Thus, the @code{@@math} command has no effect on the Info output. -For complex mathematical expressions, you can also use @TeX{} directly -(@pxref{Raw Formatter Commands}). When you use @TeX{} directly, -remember to write the mathematical expression between one or two -@samp{$} (dollar-signs) as appropriate. +@code{@@math} implies @code{@@tex}. This not only makes it possible to +write superscripts and subscripts (as in the above example), but also +allows you to use any of the plain @TeX{} math control sequences. It's +simplest to use @samp{\} instead of @samp{@@} for these commands. As +in: +@example +@@math@{\sin 2\pi \equiv \cos 3\pi@} +@end example + +@iftex +@noindent which looks like this in @TeX{}: +@display +@math{\sin 2\pi \equiv \cos 3\pi} +@end display + +@noindent and +@end iftex +@noindent which looks like the input in Info and HTML: +@example +\sin 2\pi \equiv \cos 3\pi +@end example + +@cindex Displayed equations +@cindex Equations, displayed +For displayed equations, you must at present use @TeX{} directly +(@pxref{Raw Formatter Commands}). @node Glyphs @section Glyphs for Examples @cindex Glyphs +@cindex Examples, glyphs for In Texinfo, code is often illustrated in examples that are delimited by @code{@@example} and @code{@@end example}, or by @code{@@lisp} and @@ -9429,12 +9592,11 @@ left- and right-hand braces.@refill * Point Glyph:: How to indicate the location of point. @end menu -@node Glyphs Summary, result, Glyphs, Glyphs -@ifinfo -@subheading Glyphs Summary + +@node Glyphs Summary +@subsection Glyphs Summary Here are the different glyph commands:@refill -@end ifinfo @table @asis @item @result{} @@ -9457,7 +9619,6 @@ message.@refill @code{@@point@{@}} shows the location of point.@refill @end table - @menu * result:: * expansion:: @@ -9467,7 +9628,8 @@ message.@refill * Point Glyph:: @end menu -@node result, expansion, Glyphs Summary, Glyphs + +@node result @subsection @code{@@result@{@}} (@result{}): Indicating Evaluation @cindex Result of an expression @cindex Indicating evaluation @@ -9757,13 +9919,14 @@ primary text.@footnote{A footnote should complement or expand upon the primary text, but a reader should not need to read a footnote to understand the primary text. For a thorough discussion of footnotes, see @cite{The Chicago Manual of Style}, which is published by the -University of Chicago Press.}@refill +University of Chicago Press.} @menu * Footnote Commands:: How to write a footnote in Texinfo. * Footnote Styles:: Controlling how footnotes appear in Info. @end menu + @node Footnote Commands @subsection Footnote Commands @@ -9783,16 +9946,21 @@ marker might end up starting a line. For example, this clause is followed by a sample footnote@footnote{Here is the sample footnote.}; in the Texinfo source, it looks like -this:@refill +this: @example @dots{}a sample footnote@@footnote@{Here is the sample footnote.@}; in the Texinfo source@dots{} @end example +As you can see, the source includes two punctuation marks next to each +other; in this case, @samp{.@};} is the sequence. This is normal (the +first ends the footnote and the second belongs to the sentence being +footnoted), so don't worry that it looks odd. + In a printed manual or book, the reference mark for a footnote is a small, superscripted number; the text of the footnote appears at the -bottom of the page, below a horizontal line.@refill +bottom of the page, below a horizontal line. In Info, the reference mark for a footnote is a pair of parentheses with the footnote number between them, like this: @samp{(1)}. The @@ -9950,7 +10118,7 @@ You can insert an image given in an external file with the @code{@@image} command: @example -@@image@{@var{filename}, @r{[}@var{width}@r{]}, @r{[}@var{height}@r{]}@} +@@image@{@var{filename}, @r{[}@var{width}@r{]}, @r{[}@var{height}@r{]}, @r{[}@var{alttext}@r{]}, @r{[}@var{extension}@r{]}@} @end example @cindex Formats for images @@ -9968,13 +10136,26 @@ PDF@TeX{} reads @file{@var{filename}.pdf} (Adobe's Portable Document Format). @code{makeinfo} uses @file{@var{filename}.txt} verbatim for Info output (more or less as if it was an @code{@@example}). @item +@code{makeinfo} +uses the optional fifth argument to @code{@@image} for the extension if +you supply it. For example: + +@pindex XPM image format +@example +@@image@{foo,,,,xpm@} +@end example + +@noindent +will cause @samp{makeinfo --html} to try @file{foo.xpm}. + @cindex GIF, unsupported due to patents @cindex PNG image format -@cindex JPEG image format -@code{makeinfo} producing HTML output tries @file{@var{filename}.png}; -if that does not exist, it tries @file{@var{filename}.jpg}. If that -does not exist either, it complains. (We cannot support GIF format due -to patents.) +@cindex JPG image format +If you do not supply the optional fifth argument, @samp{makeinfo +---html} first tries @file{@var{filename}.png}; if that does not exist, +it tries @file{@var{filename}.jpg}. If that does not exist either, it +complains. (We cannot support GIF format directly due to software +patents.) @end itemize @cindex Width of images @@ -10035,38 +10216,48 @@ For @code{@@image} to work with @TeX{}, the file @file{epsf.tex} must be installed somewhere that @TeX{} can find it. (The standard location is @file{@var{texmf}/tex/generic/dvips/epsf.tex}, where @var{texmf} is a root of your @TeX{} directory tree.) This file is included in the -Texinfo distribution and is available from -@uref{ftp://tug.org/tex/epsf.tex}. +Texinfo distribution and is also available from +@uref{ftp://tug.org/tex/epsf.tex}, among other places. @code{@@image} can be used within a line as well as for displayed figures. Therefore, if you intend it to be displayed, be sure to leave a blank line before the command, or the output will run into the preceding text. +@cindex alt attribute for images +@cindex alternate text for images +When producing html, @code{makeinfo} sets the @dfn{alt attribute} for +inline images to the optional fourth argument to @code{@@image}, if +supplied. If not supplied, @code{makeinfo} uses the full file name of +the image being displayed. + @node Breaks @chapter Making and Preventing Breaks @cindex Making line and page breaks @cindex Preventing line and page breaks +@cindex Line breaks Usually, a Texinfo file is processed both by @TeX{} and by one of the Info formatting commands. Line, paragraph, or page breaks sometimes occur in the `wrong' place in one or other form of output. You must ensure that text looks right both in the printed manual and in the -Info file.@refill +Info file. +@cindex White space, excessive +@cindex Page breaks For example, in a printed manual, page breaks may occur awkwardly in the middle of an example; to prevent this, you can hold text together using a grouping command that keeps the text from being split across two pages. Conversely, you may want to force a page break where none would occur normally. Fortunately, problems like these do not often arise. When they do, use the break, break prevention, or pagination -commands.@refill +commands. @menu * Break Commands:: Cause and prevent splits. * Line Breaks:: How to force a single line to use two lines. -* - and hyphenation:: How to tell TeX about hyphenation points. +* - and hyphenation:: How to tell @TeX{} about hyphenation points. * w:: How to prevent unwanted line breaks. * sp:: How to insert blank lines. * page:: How to force the start of a new page. @@ -10074,6 +10265,7 @@ commands.@refill * need:: Another way to prevent unwanted page breaks. @end menu + @node Break Commands, Line Breaks, Breaks, Breaks @ifinfo @heading Break Commands @@ -10120,8 +10312,7 @@ Hold text together that must appear on one printed page.@refill Start a new printed page if not enough space on this one.@refill @end table -@node Line Breaks, - and hyphenation, Break Commands, Breaks -@comment node-name, next, previous, up +@node Line Breaks @section @code{@@*}: Generate Line Breaks @findex * @r{(force line break)} @cindex Line breaks @@ -10176,7 +10367,8 @@ refilled after the line break occurs, negating the effect of the line break.@refill @end quotation -@node - and hyphenation, w, Line Breaks, Breaks + +@node - and hyphenation @section @code{@@-} and @code{@@hyphenation}: Helping @TeX{} hyphenate @findex - @@ -10305,8 +10497,8 @@ and is followed by another line. The @code{@@br} command is seldom used. @end ignore -@node page, group, sp, Breaks -@comment node-name, next, previous, up + +@node page @section @code{@@page}: Start a New Page @cindex Page breaks @findex page @@ -10314,7 +10506,8 @@ The @code{@@br} command is seldom used. A line containing only @code{@@page} starts a new page in a printed manual. The command has no effect on Info files since they are not paginated. An @code{@@page} command is often used in the @code{@@titlepage} -section of a Texinfo file to start the copyright page.@refill +section of a Texinfo file to start the copyright page. + @node group, need, page, Breaks @comment node-name, next, previous, up @@ -10555,6 +10748,10 @@ definition.@refill The other specialized commands work like @code{@@defun}.@refill +@cindex Macros in definition commands +Note that, due to implementation difficulties, macros are not expanded +in @code{@@deffn} and all the other definition commands. + @node Optional Arguments, deffnx, Def Cmd Template, Definition Commands @section Optional and Repeated Arguments @cindex Optional and repeated arguments @@ -11621,7 +11818,7 @@ with @code{@@iftex}, not raw formatter source as with @code{@@tex} (@pxref{Raw Formatter Commands}). -@node Raw Formatter Commands, set clear value, Conditional Not Commands, Conditionals +@node Raw Formatter Commands @section Raw Formatter Commands @cindex @TeX{} commands, using ordinary @cindex HTML commands, using ordinary @@ -11697,147 +11894,45 @@ You can direct the Texinfo formatting commands to format or ignore parts of a Texinfo file with the @code{@@set}, @code{@@clear}, @code{@@ifset}, and @code{@@ifclear} commands.@refill -In addition, you can use the @code{@@set @var{flag}} command to set the -value of @var{flag} to a string of characters; and use -@code{@@value@{@var{flag}@}} to insert that string. You can use -@code{@@set}, for example, to set a date and use @code{@@value} to -insert the date in several places in the Texinfo file.@refill - -@menu -* ifset ifclear:: Format a region if a flag is set. -* set value:: Expand a flag variable to a string. -* value Example:: An easy way to update edition information. -@end menu - - -@node ifset ifclear -@subsection @code{@@ifset} and @code{@@ifclear} - -@findex ifset -When a @var{flag} is set, the Texinfo formatting commands format text -between subsequent pairs of @code{@@ifset @var{flag}} and @code{@@end -ifset} commands. When the @var{flag} is cleared, the Texinfo formatting -commands do @emph{not} format the text. - -Use the @code{@@set @var{flag}} command to turn on, or @dfn{set}, a -@var{flag}; a @dfn{flag} name can be any single word, containing -letters, numerals, hyphens, or underscores. - -The format for the command looks like this:@refill -@findex set - -@example -@@set @var{flag} -@end example - -Write the conditionally formatted text between @code{@@ifset @var{flag}} -and @code{@@end ifset} commands, like this:@refill - -@example -@group -@@ifset @var{flag} -@var{conditional-text} -@@end ifset -@end group -@end example - -For example, you can create one document that has two variants, such as -a manual for a `large' and `small' model:@refill - -@example -You can use this machine to dig up shrubs -without hurting them. - -@@set large - -@@ifset large -It can also dig up fully grown trees. -@@end ifset - -Remember to replant promptly @dots{} -@end example - -@noindent -In the example, the formatting commands will format the text between -@code{@@ifset large} and @code{@@end ifset} because the @code{large} -flag is set.@refill - -@findex clear -Use the @code{@@clear @var{flag}} command to turn off, or @dfn{clear}, -a flag. Clearing a flag is the opposite of setting a flag. The -command looks like this:@refill - -@example -@@clear @var{flag} -@end example - -@noindent -Write the command on a line of its own. - -When @var{flag} is cleared, the Texinfo formatting commands do -@emph{not} format the text between @code{@@ifset @var{flag}} and -@code{@@end ifset}; that text is ignored and does not appear in either -printed or Info output.@refill - -For example, if you clear the flag of the preceding example by writing -an @code{@@clear large} command after the @code{@@set large} command -(but before the conditional text), then the Texinfo formatting commands -ignore the text between the @code{@@ifset large} and @code{@@end ifset} -commands. In the formatted output, that text does not appear; in both -printed and Info output, you see only the lines that say, ``You can use -this machine to dig up shrubs without hurting them. Remember to replant -promptly @dots{}''. - -@findex ifclear -If a flag is cleared with an @code{@@clear @var{flag}} command, then -the formatting commands format text between subsequent pairs of -@code{@@ifclear} and @code{@@end ifclear} commands. But if the flag -is set with @code{@@set @var{flag}}, then the formatting commands do -@emph{not} format text between an @code{@@ifclear} and an @code{@@end -ifclear} command; rather, they ignore that text. An @code{@@ifclear} -command looks like this:@refill - -@example -@@ifclear @var{flag} -@end example - -@need 700 -In brief, the commands are:@refill +Brief descriptions: @table @code -@item @@set @var{flag} -Tell the Texinfo formatting commands that @var{flag} is set.@refill +@item @@set @var{flag} [@var{value}] +Set the variable @var{flag}, to the optional @var{value} if specifed. @item @@clear @var{flag} -Tell the Texinfo formatting commands that @var{flag} is cleared.@refill +Undefine the variable @var{flag}, whether or not it was previously defined. @item @@ifset @var{flag} -If @var{flag} is set, tell the Texinfo formatting commands to format -the text up to the following @code{@@end ifset} command.@refill - -If @var{flag} is cleared, tell the Texinfo formatting commands to -ignore text up to the following @code{@@end ifset} command.@refill +If @var{flag} is set, text through the next @code{@@end ifset} command +is formatted. If @var{flag} is clear, text through the following +@code{@@end ifset} command is ignored. @item @@ifclear @var{flag} -If @var{flag} is set, tell the Texinfo formatting commands to ignore -the text up to the following @code{@@end ifclear} command.@refill - -If @var{flag} is cleared, tell the Texinfo formatting commands to -format the text up to the following @code{@@end ifclear} -command.@refill +If @var{flag} is set, text through the next @code{@@end ifclear} command +is ignored. If @var{flag} is clear, text through the following +@code{@@end ifclear} command is formatted. @end table +@menu +* set value:: Expand a flag variable to a string. +* ifset ifclear:: Format a region if a flag is set. +* value Example:: An easy way to update edition information. +@end menu + @node set value @subsection @code{@@set} and @code{@@value} @findex value -You can use the @code{@@set} command to specify a value for a flag, -which is expanded by the @code{@@value} command. A flag is an -identifier; for best results, use only letters and numerals in a flag -name, not @samp{-} or @samp{_}---they will work in some contexts, but -not all, due to limitations in @TeX{}. The value is just a string of -characters, the remainder of the input line. +You use the @code{@@set} command to specify a value for a flag, which is +later expanded by the @code{@@value} command. + +A @dfn{flag} is an identifier. In general, it is best to use only +letters and numerals in a flag name, not @samp{-} or @samp{_}---they +will work in some contexts, but not all, due to limitations in @TeX{}. + +The value is the remainder of the input line, and can contain anything. Write the @code{@@set} command like this: @@ -11850,12 +11945,12 @@ This sets the value of the flag @code{foo} to ``This is a string.''. The Texinfo formatters then replace an @code{@@value@{@var{flag}@}} command with the string to which @var{flag} is set. Thus, when -@code{foo} is set as shown above, the Texinfo formatters convert +@code{foo} is set as shown above, the Texinfo formatters convert this: @example @group @@value@{foo@} -@exdent @r{to} +@exdent @r{to this:} This is a string. @end group @end example @@ -11870,12 +11965,10 @@ If you write the @code{@@set} command like this: @end example @noindent -without specifying a string, the value of @code{foo} is an empty string. +without specifying a string, the value of @code{foo} is the empty string. If you clear a previously set flag with @code{@@clear @var{flag}}, a -subsequent @code{@@value@{flag@}} command is invalid and the string is -replaced with an error message that says @samp{@{No value for -"@var{flag}"@}}. +subsequent @code{@@value@{flag@}} command will report an error. For example, if you set @code{foo} as follows:@refill @@ -11912,12 +12005,83 @@ It is a @{No value for "how-much"@} wet day. @end example +@node ifset ifclear +@subsection @code{@@ifset} and @code{@@ifclear} + +@findex ifset +When a @var{flag} is set, the Texinfo formatting commands format text +between subsequent pairs of @code{@@ifset @var{flag}} and @code{@@end +ifset} commands. When the @var{flag} is cleared, the Texinfo formatting +commands do @emph{not} format the text. @code{@@ifclear} operates +analogously. + +Write the conditionally formatted text between @code{@@ifset @var{flag}} +and @code{@@end ifset} commands, like this: + +@example +@group +@@ifset @var{flag} +@var{conditional-text} +@@end ifset +@end group +@end example + +For example, you can create one document that has two variants, such as +a manual for a `large' and `small' model: + +@cindex shrubbery +@example +You can use this machine to dig up shrubs +without hurting them. + +@@set large + +@@ifset large +It can also dig up fully grown trees. +@@end ifset + +Remember to replant promptly @dots{} +@end example + +@noindent +In the example, the formatting commands will format the text between +@code{@@ifset large} and @code{@@end ifset} because the @code{large} +flag is set. + +When @var{flag} is cleared, the Texinfo formatting commands do +@emph{not} format the text between @code{@@ifset @var{flag}} and +@code{@@end ifset}; that text is ignored and does not appear in either +printed or Info output. + +For example, if you clear the flag of the preceding example by writing +an @code{@@clear large} command after the @code{@@set large} command +(but before the conditional text), then the Texinfo formatting commands +ignore the text between the @code{@@ifset large} and @code{@@end ifset} +commands. In the formatted output, that text does not appear; in both +printed and Info output, you see only the lines that say, ``You can use +this machine to dig up shrubs without hurting them. Remember to replant +promptly @dots{}''. + +@findex ifclear +If a flag is cleared with an @code{@@clear @var{flag}} command, then +the formatting commands format text between subsequent pairs of +@code{@@ifclear} and @code{@@end ifclear} commands. But if the flag +is set with @code{@@set @var{flag}}, then the formatting commands do +@emph{not} format text between an @code{@@ifclear} and an @code{@@end +ifclear} command; rather, they ignore that text. An @code{@@ifclear} +command looks like this: + +@example +@@ifclear @var{flag} +@end example + + @node value Example @subsection @code{@@value} Example -You can use the @code{@@value} command to limit the number of places you -need to change when you record an update to a manual. Here is how it is -done in @cite{The GNU Make Manual}: +You can use the @code{@@value} command to minimize the number of places +you need to change when you record an update to a manual. Here is how +it is done in @cite{The GNU Make Manual}: @enumerate @item @@ -12033,14 +12197,9 @@ current hyphenation patterns (via the @TeX{} primitive @cindex ISO 639 codes @cindex Language codes -@cindex African languages -Here is the list of valid language codes. This list comes from -@uref{http://www.iro.umontreal.ca/contrib/po/iso-639, the free -translation project}. In the future we may wish to allow the 3-letter -POV codes described at @uref{http://www.sil.org/ethnologue/#contents}. -This will be necessary to support African languages. - -@multitable @columnfractions .06 .27 .06 .27 .06 .27 +Hereare the valid language codes, from ISO-639. + +@multitable @columnfractions .07 .26 .07 .26 .07 .26 @item @code{aa} @tab Afar @tab @code{ab} @tab Abkhazian @tab @@ -12245,11 +12404,12 @@ specification following, such as @samp{ISO-8859-1}. @cindex http-equiv, and charset @cindex meta HTML tag, and charset At present, this is used only in HTML output from @code{makeinfo}. If a -document encoding @var{enc} is specified, it is used in the -@samp{<meta>} tag is included in the @samp{<head>} of the output: +document encoding @var{enc} is specified, it is used in a +@samp{<meta>} tag included in the @samp{<head>} of the output: @example -<meta http-equiv="Content-Type" content="text/html; charset=@var{enc}"> +<meta http-equiv="Content-Type" content="text/html; + charset=@var{enc}"> @end example @@ -12297,7 +12457,6 @@ customized output in the Info file. @section Defining Macros @cindex Defining macros @cindex Macro definitions -@cindex Definitions, a.k.a.@: macros @findex macro You use the Texinfo @code{@@macro} command to define a macro, like this: @@ -12351,7 +12510,7 @@ To allow a macro to be used recursively, that is, in an argument to a call to itself, you must define it with @samp{@@rmacro}, like this: @example -@@rmacro rmac +@@rmacro rmac @{arg@} a\arg\b @@end rmacro @dots{} @@ -12423,6 +12582,8 @@ No arguments here. No arguments here. @end display +@cindex Comma, in macro arguments +@cindex Braces, in macro arguments To insert a comma, brace, or backslash in an argument, prepend a backslash, as in @@ -12432,7 +12593,8 @@ backslash, as in @noindent which will pass the (almost certainly error-producing) argument -@samp{\@{@},} to @var{macname}. +@samp{\@{@},} to @var{macname}. However, commas in parameters, even +if escaped by a backslash, might cause trouble in @TeX{}. If the macro is defined to take a single argument, and is invoked without any braces, the entire rest of the line after the macro name is @@ -12481,13 +12643,18 @@ implementations, Texinfo macros have the following limitations. @itemize @bullet @item All macros are expanded inside at least one @TeX{} group. This means -that @set and other such commands will have no effect inside a macro. +that @code{@@set} and other such commands will have no effect inside a +macro. @item Macros containing a command which must be on a line by itself, such as a conditional, cannot be invoked in the middle of a line. @item +Commas in macro arguments, even if escaped by a backslash, don't +always work. + +@item The @TeX{} implementation cannot construct macros that define macros in the natural way. To do this, you must use conditionals and raw @TeX{}. For example: @@ -12511,6 +12678,10 @@ It is best to avoid comments inside macro definitions. @end itemize +If some macro feature causes errors when producing the printed version +of a manual, try expanding the macros with @command{makeinfo} by +invoking @command{texi2dvi} with the @samp{-e} option; see @ref{Format +with texi2dvi}. @node alias @section @samp{@@alias @var{new}=@var{existing}} @@ -12553,7 +12724,7 @@ Aliases must not be recursive, directly or indirectly. @findex definfoenclose A @code{@@definfoenclose} command may be used to define a highlighting -command for Info, but not for TeX. A command defined using +command for Info, but not for @TeX{}. A command defined using @code{@@definfoenclose} marks text by enclosing it in strings that precede and follow the text. You can use this to get closer control of your Info output. @@ -12595,7 +12766,7 @@ formatting command that inserts `//' before and `\\' after the argument to @code{@@phoo}. You can then write @code{@@phoo@{bar@}} wherever you want `//bar\\' highlighted in Info. -Also, for TeX formatting, you could write +Also, for @TeX{} formatting, you could write @example @@iftex @@ -12604,14 +12775,13 @@ Also, for TeX formatting, you could write @end example @noindent -to define @code{@@phoo} as a command that causes TeX to typeset the +to define @code{@@phoo} as a command that causes @TeX{} to typeset the argument to @code{@@phoo} in italics. -Note that each definition applies to its own formatter: one for TeX, -the other for @code{texinfo-format-buffer} or -@code{texinfo-format-region}. The @code{@@definfoenclose} command need -not be within @samp{@@ifinfo}, but the raw @TeX{} commands do need to be -in @samp{@@iftex}. +Each definition applies to its own formatter: one for @TeX{}, the other +for @code{texinfo-format-buffer} or @code{texinfo-format-region}. The +@code{@@definfoenclose} command need not be within @samp{@@ifinfo}, but +the raw @TeX{} commands do need to be in @samp{@@iftex}. @findex headword Here is another example: write @@ -12665,7 +12835,7 @@ print queue, and delete a job from the print queue. * Preparing for TeX:: What to do before you use @TeX{}. * Overfull hboxes:: What are and what to do with overfull hboxes. * smallbook:: How to print small format books and manuals. -* A4 Paper:: How to print on European A4 paper. +* A4 Paper:: How to print on A4 or A5 paper. * pagesizes:: How to print with customized page sizes. * Cropmarks and Magnification:: How to print marks to indicate the size of pages and how to print scaled up output. @@ -12680,10 +12850,11 @@ file. @TeX{} is a very powerful typesetting program and, if used correctly, does an exceptionally good job. (@xref{Obtaining TeX, , How to Obtain @TeX{}}, for information on how to obtain @TeX{}.) -The @code{makeinfo}, @code{texinfo-format-region}, and -@code{texinfo-format-buffer} commands read the very same @@-commands -in the Texinfo file as does @TeX{}, but process them differently to -make an Info file (@pxref{Creating an Info File}). +The standalone @code{makeinfo} program and Emacs functions +@code{texinfo-format-region} and @code{texinfo-format-buffer} commands +read the very same @@-commands in the Texinfo file as does @TeX{}, but +process them differently to make an Info file (@pxref{Creating an Info +File}). @node Format with tex/texindex @@ -12844,7 +13015,7 @@ Perhaps the most useful option to @code{texi2dvi} is after the @code{@@setfilename} in a temporary copy of the input file before running @TeX{}. With this, you can specify different printing formats, such as @code{@@smallbook} (@pxref{smallbook}), -@code{@@afourpaper} (@pxref{A4 Paper}), or @code{@@pageparams} +@code{@@afourpaper} (@pxref{A4 Paper}), or @code{@@pagesizes} (@pxref{pagesizes}), without actually changing the document source. (You can also do this on a site-wide basis with @file{texinfo.cnf}; @pxref{Preparing for TeX,,Preparing for @TeX{}}). @@ -12852,16 +13023,15 @@ formats, such as @code{@@smallbook} (@pxref{smallbook}), For a list of other options, run @samp{texi2dvi --help}. -@node Print with lpr, Within Emacs, Format with texi2dvi, Hardcopy +@node Print with lpr @section Shell Print Using @code{lpr -d} @pindex lpr @r{(DVI print command)} The precise command to print a DVI file depends on your system -installation, but @samp{lpr -d} is common. The command may require the -DVI file name without any extension or with a @samp{.dvi} -extension. (If it is @samp{lpr}, you must include the @samp{.dvi}.) +installation. Two common ones are @samp{dvips foo.dvi -o} and @samp{lpr +-d foo.dvi}. -For example, the following commands, will (perhaps) suffice to sort the +For example, the following commands will (perhaps) suffice to sort the indices, format, and print the @cite{Bison Manual}: @example @@ -12875,15 +13045,15 @@ lpr -d bison.dvi @noindent (Remember that the shell commands may be different at your site; but -these are commonly used versions.)@refill +these are commonly used versions.) -@need 1000 -Using the @code{texi2dvi} shell script, you simply need type:@refill +Using the @code{texi2dvi} shell script (see the previous section): @example @group texi2dvi bison.texinfo lpr -d bison.dvi +# or perhaps dvips bison.dvi -o @end group @end example @@ -13155,26 +13325,28 @@ For more information, see: @cindex @b{.cshrc} initialization file @cindex Initialization file for @TeX{} input -@TeX{} needs to know where to find the @file{texinfo.tex} file that you -have told it to input with the @samp{\input texinfo} command at the -beginning of the first line. The @file{texinfo.tex} file tells @TeX{} -how to handle @@-commands; it is included in all standard GNU -distributions. +@TeX{} needs to know where to find the @file{texinfo.tex} file that the +@samp{\input texinfo} command on the first line reads. The +@file{texinfo.tex} file tells @TeX{} how to handle @@-commands; it is +included in all standard GNU distributions. @pindex texinfo.tex@r{, installing} -Usually, the @file{texinfo.tex} file is put under the default directory -that contains @TeX{} macros -(@file{/usr/local/share/texmf/tex/texinfo/texinfo.tex} by default) when -GNU Emacs or other GNU software is installed. In this case, @TeX{} will -find the file and you do not need to do anything special. -Alternatively, you can put @file{texinfo.tex} in the current directory -when you run @TeX{}, and @TeX{} will find it there. + +Usually, the installer has put the @file{texinfo.tex} file in the +default directory that contains @TeX{} macros when GNU Texinfo, Emacs or +other GNU software is installed. In this case, @TeX{} will find the +file and you do not need to do anything special. If this has not been +done, you can put @file{texinfo.tex} in the current directory when you +run @TeX{}, and @TeX{} will find it there. @pindex epsf.tex@r{, installing} -Also, you should install @file{epsf.tex} in the same place as -@file{texinfo.tex}, if it is not already installed from another -distribution. This file is needed to support the @code{@@image} command -(@pxref{Images}). +Also, you should install @file{epsf.tex}, if it is not already installed +from another distribution. More details are at the end of the description +of the @code{@@image} command (@pxref{Images}). + +@pindex pdfcolor.tex@r{, installing} +Likewise for @file{pdfcolor.tex}, if it is not already installed and you +use pdftex. @pindex texinfo.cnf @r{installation} @cindex Customizing of @TeX{} for Texinfo @@ -13254,10 +13426,9 @@ redumping.) You can do this by running this command, assuming initex texinfo @@dump @end example -(@code{@@dump} is a @TeX{} primitive.) You'll then need to move -@file{texinfo.fmt} to wherever your @code{.fmt} files are found; -typically this will be in the subdirectory @file{web2c} of your @TeX{} -installation, for example, @file{/usr/local/share/tex/web2c}. +(@code{dump} is a @TeX{} primitive.) Then, move @file{texinfo.fmt} to +wherever your @code{.fmt} files are found; typically, this will be in the +subdirectory @file{web2c} of your @TeX{} installation. @node Overfull hboxes @@ -13305,10 +13476,10 @@ like this: @end example @noindent -(You can adjust the fraction as needed.) This huge value for +(You should adjust the fraction as needed.) This huge value for @code{\emergencystretch} cannot be the default, since then the typeset -output would generally be of noticeably lower quality. The default -value is @samp{.15\hsize}. @code{\hsize} is the @TeX{} dimension +output would generally be of noticeably lower quality; the default +is @samp{.15\hsize}. @code{\hsize} is the @TeX{} dimension containing the current line width. @cindex Black rectangle in hardcopy @@ -13369,15 +13540,16 @@ require changing the source file. @node A4 Paper @section Printing on A4 Paper @cindex A4 paper, printing on -@cindex Paper size, European A4 +@cindex A5 paper, printing on +@cindex Paper size, A4 @cindex European A4 paper @findex afourpaper You can tell @TeX{} to format a document for printing on European size -A4 paper with the @code{@@afourpaper} command. Write the command on a -line by itself near the beginning of the Texinfo file, before the title -page. For example, this is how you would write the header for this -manual: +A4 paper (or A5) with the @code{@@afourpaper} (or @code{@@afivepaper}) +command. Write the command on a line by itself near the beginning of +the Texinfo file, before the title page. For example, this is how you +would write the header for this manual: @example @group @@ -13391,15 +13563,15 @@ manual: @end example @xref{Format with texi2dvi}, and @ref{Preparing for TeX,,Preparing for -@TeX{}}, for other ways to format with @code{@@afourpaper} that do not +@TeX{}}, for other ways to format for different paper sizes that do not require changing the source file. @findex afourlatex +@findex afourwide You may or may not prefer the formatting that results from the command @code{@@afourlatex}. There's also @code{@@afourwide} for A4 paper in wide format. - @node pagesizes @section @code{@@pagesizes} [@var{width}][, @var{height}]: Custom page sizes @findex pagesizes @@ -13515,21 +13687,21 @@ You can generate a PDF output file from Texinfo source by using the @command{tex}. Just run @samp{pdftex foo.texi} instead of @samp{tex foo.texi}, or give the @samp{--pdf} option to @command{texi2dvi}. -PDF stands for Portable Document Format, and was invented by Adobe -Systems. The -@uref{http://www.adobe.com/prodindex/acrobat/adobepdf.html, file format -definition} is freely available, as is a -@uref{http://www.foolabs.com/xpdf/, free viewer} for the X window -system. Since PDF is a binary format, there is no @samp{@@ifpdf} or -@samp{@@pdf} command by analogy with the other output formats. +@dfn{PDF} stands for `Portable Document Format'. It was invented by +Adobe Systems some years ago for document interchange, based on their +PostScript language. A @uref{http://www.foolabs.com/xpdf/, PDF reader} +for the X window system is freely available, as is the +@uref{http://partners.adobe.com/asn/developer/technotes/, definition of +the file format}. Since PDF is a binary format, there are no +@samp{@@ifpdf} or @samp{@@pdf} commands as with the other output +formats. Despite the `portable' in the name, PDF files are nowhere near as -portable in practice as the plain ASCII formats (Info, HTML) Texinfo -also supports (portability relative to DVI is arguable). They also tend -to be much larger and do not support the bitmap fonts used by @TeX{} (by +portable in practice as the plain ASCII formats (Info, HTML) that +Texinfo supports (DVI portability is arguable). They also tend to be +much larger and do not support the bitmap fonts used by @TeX{} (by default) very well. Nevertheless, a PDF file does preserve an actual -printed document on a screen as faithfully as possible, unlike HTML, -say, so have their place. +printed document on a screen as faithfully as possible, so it has its place. PDF support in Texinfo is fairly rudimentary. @@ -13537,15 +13709,15 @@ PDF support in Texinfo is fairly rudimentary. @node Creating and Installing Info Files @chapter Creating and Installing Info Files -This chapter describes how to create and install info files. @xref{Info +This chapter describes how to create and install Info files. @xref{Info Files}, for general information about the file format itself. - @menu * Creating an Info File:: -* Install an Info File:: +* Installing an Info File:: @end menu + @node Creating an Info File @section Creating an Info File @cindex Creating an Info file @@ -13558,7 +13730,7 @@ file, HTML file, or plain text. @code{texinfo-format-region} and Texinfo to Info. For information on installing the Info file in the Info system, -@pxref{Install an Info File}. +@pxref{Installing an Info File}. @menu * makeinfo advantages:: @code{makeinfo} provides better error checking. @@ -13668,6 +13840,10 @@ can probably never be implemented in @TeX{}. It also makes @samp{--no-validate} is used. @xref{Pointer Validation}, for more details. +@item --docbook +@opindex --docbook +Generate DocBook output rather than Info. + @item --error-limit=@var{limit} @itemx -e @var{limit} @opindex --error-limit=@var{limit} @@ -13714,7 +13890,11 @@ created. With this option, they are preserved. Print a usage message listing all available options, then exit successfully. @item --html -Generate HTML output rather than Info. @xref{makeinfo html}. +@opindex --html +Generate HTML output rather than Info. @xref{makeinfo html}. By +default, the HTML output is split into one output file per source node, +and the split output is written into a subdirectory with the name of the +top-level info file. @item -I @var{dir} @opindex -I @var{dir} @@ -13796,8 +13976,8 @@ Specify that the output should be directed to @var{file} and not to the file name specified in the @code{@@setfilename} command found in the Texinfo source (@pxref{setfilename}). If @var{file} is @samp{-}, output goes to standard output and @samp{--no-split} is implied. For split -HTML output, @var{file} is the name of the output file for the top node -(@pxref{makeinfo html}). +HTML output, @var{file} is the name for the directory into which all +HTML nodes are written (@pxref{makeinfo html}). @item -P @var{dir} @opindex -P @var{dir} @@ -13850,6 +14030,10 @@ warnings. @opindex -V Print the version number, then exit successfully. +@item --xml +@opindex --xml +Generate XML output rather than Info. + @end table @@ -14205,14 +14389,26 @@ Info-validate}.@refill @subsection Generating HTML @cindex HTML -As an alternative to the normal Info format output you can use the +Besides generating output in the Info format, you can use the @samp{--html} option to generate output in HTML format, for installation -on a web site (for example). In this release, HTML output from -@code{makeinfo} is monolithic, splitting the output by chapter or node -is not supported. We hope to implement this feature soon. - -The HTML output file is named according to @code{@@setfilename}, but -with any @samp{.info} extension replaced with @samp{.html}. +on a web site (for example). By default, the HTML output is split at +node level. + +When splitting, the HTML output files are written into a subdirectory. +The subdirectory is named according to the name from +@code{@@setfilename} with any extension removed; for example, HTML +output for @code{@@setfilename emacs.info} would be written into a +subdirectory named @samp{emacs}. If that directory cannot be created +for any reason, then @samp{.html} is appended to the directory name, as +in @samp{emacs.html} (this is necessary because sometimes the info file +is named without an extension, e.g., @samp{texinfo}). If the +@samp{@var{name}.html} directory can't be created either, +@code{makeinfo} gives up. In any case, the top-level output file within +the directory is always named @samp{index.html}. + +Monolithic output (@code{--no-split}) is named according to +@code{@@setfilename} or @code{--outfile}. Cross-document node +references are not supported in monolithic HTML. Texinfo input marked up with the @code{@@ifhtml} command will produce output only with the @samp{--html} option supplied. Input marked up @@ -14221,29 +14417,26 @@ the normal escaping of input @samp{<}, @samp{>} and @samp{&} characters which have special significance in HTML). The @samp{--footnote-style} option is currently ignored for HTML output; -footnotes are hyperlinked at the end of the output file. +footnotes are linked to the end of the output file. -The HTML generated is mostly standard (i.e., HTML 2.0, RFC1866). The +The HTML generated is mostly standard (i.e., HTML 2.0, RFC-1866). The exception is that HTML 3.2 tables are generated from the @code{@@multitable} command, but tagged to degrade as well as possible in browsers without table support. Please report output from an -error-free run of @code{makeinfo} which violates the HTML 3.2 DTD as a -bug. +error-free run of @code{makeinfo} which violates the @w{HTML 3.2} DTD as +a bug. Navigation bars are inserted at the start of nodes, similarly to Info output. The @samp{--no-headers} option will suppress this if used with @samp{--no-split}. Header @code{<link>} elements in split output can support info-like navigation with browsers like Lynx and @w{Emacs W3} -which implement this @w{HTML 1.0} feature. You still won't normally get -the multi-file regexp and index search facilities provided by Info -readers. Otherwise, hyperlinks are generated from Texinfo commands -where appropriate. @samp{@@xref} commands to other documents are -generated assuming the other document is available in HTML form too, and -@samp{.html} is appended to the @samp{@@xref} Info file name. This -presumably will often not work. +which implement this @w{HTML 1.0} feature. @samp{@@xref} commands to +other documents are generated assuming the other document is available +in split HTML form, and installed in the same HTML documentation tree, +at @file{../<info-document>/}. -@node Install an Info File +@node Installing an Info File @section Installing an Info File @cindex Installing an Info file @cindex Info file installation @@ -14285,7 +14478,7 @@ this:@refill text editor. * Texinfo: (texinfo). With one source file, make either a printed manual using - TeX or an Info file. + @@TeX@{@} or an Info file. @dots{} @end group @end example @@ -14316,9 +14509,9 @@ true in general, it is a special case for @file{dir}. @node New Info File @subsection Listing a New Info File -@cindex Adding a new info file -@cindex Listing a new info file -@cindex New info file, listing it in @file{dir} file +@cindex Adding a new Info file +@cindex Listing a new Info file +@cindex New Info file, listing it in @file{dir} file @cindex Info file, listing a new @cindex @file{dir} file listing @@ -14391,23 +14584,23 @@ standard @file{dir} file:@refill In this case, the absolute file name of the @file{info-test} file is written as the second part of the menu entry.@refill -Alternatively, you could write the following in your @file{.emacs} -file:@refill +Alternatively, you could write the following in your @file{.emacs} file: @vindex Info-directory-list @example @group (require 'info) (setq Info-directory-list - (cons (expand-file-name "/home/bob/info") Info-directory-list)) + (cons (expand-file-name "/home/bob/info") + Info-directory-list)) @end group @end example -This tells Emacs to merge the @file{dir} file from the -@file{/home/bob/info} directory with the system @file{dir} file. Info -will list the @file{/home/bob/info/info-test} file as a menu entry in -the @file{/home/bob/info/dir} file. Emacs does the merging only -when @kbd{M-x info} is first run, so if you want to set +This tells Emacs to merge the system @file{dir} file with the @file{dir} +file in @file{/home/bob/info}. Thus, Info will list the +@file{/home/bob/info/info-test} file as a menu entry in the +@file{/home/bob/info/dir} file. Emacs does the merging only when +@kbd{M-x info} is first run, so if you want to set @code{Info-directory-list} in an Emacs session where you've already run @code{info}, you must @code{(setq Info-dir-contents nil)} to force Emacs to recompose the @file{dir} file. @@ -14461,7 +14654,7 @@ merges any files named @file{dir} in any directory listed in the @env{INFOPATH} variable into a single menu presented to you in the node called @samp{(dir)Top}. -@cindex @samp{:} @r{last in @env{INFOPATH}} +@cindex colon, last in @env{INFOPATH} However you set @env{INFOPATH}, if its last character is a colon@footnote{On MS-DOS/MS-Windows systems, use semi-colon instead.}, this is replaced by the default (compiled-in) path. This gives you a way to @@ -14485,7 +14678,7 @@ copying an existing @file{dir} file and replace all the text after the special CTRL-_ characters that Info needs will be present. -@node Installing Dir Entries, Invoking install-info, Other Info Directories, Install an Info File +@node Installing Dir Entries @subsection Installing Info Directory Files When you install an Info file onto your system, you can use the program @@ -14536,12 +14729,22 @@ If you use @code{@@dircategory} more than once in the Texinfo source, each usage specifies the `current' category; any subsequent @code{@@direntry} commands will add to that category. -Here are some recommended @code{@@dircategory} categories: `GNU -packages', `GNU programming tools', `GNU programming documentation', -`GNU Emacs Lisp', `GNU libraries', `Linux', `TeX', `Individual -utilities'. The idea is to include the `invoking' node for every -program installed by a package under `Individual utilities', and an -entry for the manual as a whole in the appropriate other category. +Here are some recommended @code{@@dircategory} categories: + +@display +GNU packages +GNU programming tools +GNU programming documentation +GNU Emacs Lisp +GNU libraries +Linux +TeX +Individual utilities +@end display + +The idea is to include the `Invoking' node for every program installed +by a package under `Individual utilities', and an entry for the manual +as a whole in the appropriate other category. @node Invoking install-info @@ -14750,6 +14953,9 @@ capital letters, such as `NASA'. @xref{acronym,, @code{acronym}}. Generate the uppercase and lowercase AE ligatures, respectively: @AE{}, @ae{}. @xref{Inserting Accents}. +@itemx @@afivepaper +Change page dimensions for the A5 paper size. @xref{A4 Paper}. + @item @@afourlatex @itemx @@afourpaper @itemx @@afourwide @@ -15052,8 +15258,13 @@ Format a unit of measure, as in 12@dmn{pt}. Causes @TeX{} to insert a thin space before @var{dimension}. No effect in Info. @xref{dmn, , @code{@@dmn}}. +@item @@documentdescription +Set the document description text, included in the HTML output. Pair +with @code{@@end documentdescription}. @xref{documentdescription,, +@code{@@documentdescription}}. + @item @@documentencoding @var{enc} -Declare the input encoding as @var{enc}. +Declare the input encoding to be @var{enc}. @xref{documentencoding,, @code{@@documentencoding}}. @item @@documentlanguage @var{CC} @@ -15245,9 +15456,10 @@ Begin a stretch of text that will not appear in either the Info file or the printed output. Pair with @code{@@end ignore}. @xref{Comments, , Comments and Ignored Text}.@refill -@item @@image@{@var{filename}, [@var{width}], [@var{height}]@} +@item @@image@{@var{filename}, [@var{width}], [@var{height}], [@var{alt}], [@var{ext}]@} Include graphics image in external @var{filename} scaled to the given -@var{width} and/or @var{height}. @xref{Images}. +@var{width} and/or @var{height}, using @var{alt} text and looking for +@samp{@var{filename}.@var{ext}} in HTML. @xref{Images}. @item @@include @var{filename} Incorporate the contents of the file @var{filename} into the Info file @@ -15503,7 +15715,8 @@ command even if the @code{@@shortcontents} command is not there. @xref{Contents}. @item @@settitle @var{title} -Provide a title for page headers in a printed manual. +Provide a title for page headers in a printed manual, and the default +document description for HTML @samp{<head>}. @xref{settitle, , @code{@@settitle}}.@refill @item @@shortcontents @@ -15521,28 +15734,23 @@ rather than the regular 8.5 by 11 inch format. @xref{smallbook, , Printing Small Books}. Also, see @ref{small}. @item @@smalldisplay -Begin a kind of example. Like @code{@@smallexample} (indent text, no -filling), but do not select the fixed-width font. In @code{@@smallbook} -format, print text in a smaller font than with @code{@@display}. Pair -with @code{@@end smalldisplay}. @xref{small}. +Begin a kind of example. Like @code{@@smallexample} (narrow margins, no +filling), but do not select the fixed-width font. Pair with @code{@@end +smalldisplay}. @xref{small}. @item @@smallexample Indent text to indicate an example. Do not fill, select fixed-width -font. In @code{@@smallbook} format, print text in a smaller font than -with @code{@@example}. Pair with @code{@@end smallexample}. +font, narrow the margins. In printed manuals, print text in a smaller +font than with @code{@@example}. Pair with @code{@@end smallexample}. @xref{small}. @item @@smallformat Begin a kind of example. Like @code{@@smalldisplay}, but do not narrow -the margins and do not select the fixed-width font. -In @code{@@smallbook} format, print text in a smaller font than -with @code{@@format}. Pair with @code{@@end smallformat}. -@xref{small}. +the margins. Pair with @code{@@end smallformat}. @xref{small}. @item @@smalllisp -Begin an example of Lisp code. Indent text, do not fill, select -fixed-width font. In @code{@@smallbook} format, print text in a -smaller font. Pair with @code{@@end smalllisp}. @xref{small}. +Begin an example of Lisp code. Same as @code{@@smallexample}. Pair +with @code{@@end smalllisp}. @xref{small}. @item @@sp @var{n} Skip @var{n} blank lines. @xref{sp, , @code{@@sp}}.@refill @@ -15735,6 +15943,19 @@ Highlight a metasyntactic variable, which is something that stands for another piece of text. @xref{var, , Indicating Metasyntactic Variables}.@refill +@item @@verb@{@var{delim} @var{literal} @var{delim}@} +Output @var{literal}, delimited by the single character @var{delim}, +exactly as is (in the fixed-width font), including any whitespace or +Texinfo special characters. @xref{verb,,@code{verb}}. + +@item @@verbatim +Output the text of the environment exactly as is (in the fixed-width +font). Pair with @code{@@end verbatim}. @xref{verbatim,,@code{verbatim}}. + +@item @@verbatiminclude @var{filename} +Output the contents of @var{filename} exactly as is (in the fixed-width font). +@xref{verbatiminclude,,@code{verbatiminclude}}. + @item @@vindex @var{entry} Add @var{entry} to the index of variables. @xref{Index Entries, , Defining the Entries of an Index}.@refill @@ -16125,12 +16346,12 @@ file, but only when the command is used inside parentheses. You can invoke programs such as Emacs, GCC, and @code{gawk} from a shell. The documentation for each program should contain a section that describes this. Unfortunately, if the node names and titles for these -sections are all different, readers find it hard to search for the -section.@refill +sections are all different, they are difficult for users to find. + +So, there is a convention to name such sections with a phrase beginning +with the word `Invoking', as in `Invoking Emacs'; this way, users can +find the section easily. -Name such sections with a phrase beginning with the word -@w{`Invoking @dots{}'}, as in `Invoking Emacs'; this way -users can find the section easily. @subsubheading ANSI C Syntax @@ -16224,27 +16445,30 @@ You can see this file, with comments, in the first chapter. @@settitle Sample Document @@c %**end of header -@@setchapternewpage odd - @@ifinfo This is a short example of a complete Texinfo file. -Copyright 1990 Free Software Foundation, Inc. +Copyright (C) 2002 Free Software Foundation, Inc. @@end ifinfo @@titlepage -@@sp 10 @@comment The title is printed in a large font. -@@center @@titlefont@{Sample Title@} +@@title Sample Title @@c The following two commands start the copyright page. @@page @@vskip 0pt plus 1filll -Copyright @@copyright@{@} 1990 Free Software Foundation, Inc. +Copyright @@copyright@{@} 2002 Free Software Foundation, Inc. @@end titlepage -@@node Top, First Chapter, , (dir) -@@comment node-name, next, previous, up +@@c Output the table of the contents at the beginning. +@@contents + +@@ifnottex +@@node Top + +This is the top node of a sample document. +@@end ifnottex @@menu * First Chapter:: The first chapter is the @@ -16252,10 +16476,10 @@ Copyright @@copyright@{@} 1990 Free Software Foundation, Inc. * Concept Index:: This index has two entries. @@end menu -@@node First Chapter, Concept Index, Top, Top -@@comment node-name, next, previous, up + +@@node First Chapter @@chapter First Chapter -@@cindex Sample index entry +@@cindex Chapter, first This is the contents of the first chapter. @@cindex Another sample index entry @@ -16270,165 +16494,20 @@ This is the first item. This is the second item. @@end enumerate -The @@code@{makeinfo@} and @@code@{texinfo-format-buffer@} -commands transform a Texinfo file such as this into -an Info file; and @@TeX@{@} typesets it for a printed -manual. +The @@code@{makeinfo@} command transforms a Texinfo source file +such as this into an Info file or HTML; and @@TeX typesets it +for a printed manual. -@@node Concept Index, , First Chapter, Top -@@comment node-name, next, previous, up + +@@node Concept Index @@unnumbered Concept Index @@printindex cp -@@contents @@bye @end example -@node Sample Permissions -@appendix Sample Permissions -@cindex Permissions -@cindex Sample permissions -@cindex Copying permissions - -Texinfo files should contain sections that tell the readers that they -have the right to copy and distribute the Texinfo file, the Info file, -and the printed manual.@refill - -Also, if you are writing a manual about software, you should explain -that the software is free and either include the GNU General Public -License (GPL) or provide a reference to it. @xref{Distrib, , -Distribution, emacs, The GNU Emacs Manual}, for an example of the text -that could be used in the software ``Distribution'', ``General Public -License'', and ``NO WARRANTY'' sections of a document. @xref{Copying, -, Texinfo Copying Conditions}, for an example of a brief explanation -of how the copying conditions provide you with rights. @refill - -@menu -* Inserting Permissions:: How to put permissions in your document. -* ifinfo Permissions:: Sample @samp{ifinfo} copying permissions. -* Titlepage Permissions:: Sample Titlepage copying permissions. -@end menu - -@node Inserting Permissions, ifinfo Permissions, Sample Permissions, Sample Permissions -@ifinfo -@section Inserting Permissions -@end ifinfo - -In a Texinfo file, the first @code{@@ifinfo} section usually begins -with a line that says what the file documents. This is what a person -reading the unprocessed Texinfo file or using the advanced Info -command @kbd{g *} sees first. @inforef{Expert, Advanced Info -commands, info}, for more information. (A reader using the regular -Info commands usually starts reading at the first node and skips -this first section, which is not in a node.)@refill - -In the @code{@@ifinfo} section, the summary sentence is followed by a -copyright notice and then by the copying permission notice. One of -the copying permission paragraphs is enclosed in @code{@@ignore} and -@code{@@end ignore} commands. This paragraph states that the Texinfo -file can be processed through @TeX{} and printed, provided the printed -manual carries the proper copying permission notice. This paragraph -is not made part of the Info file since it is not relevant to the Info -file; but it is a mandatory part of the Texinfo file since it permits -people to process the Texinfo file in @TeX{} and print the -results.@refill - -In the printed manual, the Free Software Foundation copying permission -notice follows the copyright notice and publishing information and is -located within the region delineated by the @code{@@titlepage} and -@code{@@end titlepage} commands. The copying permission notice is exactly -the same as the notice in the @code{@@ifinfo} section except that the -paragraph enclosed in @code{@@ignore} and @code{@@end ignore} commands is -not part of the notice.@refill - -To make it simple to insert a permission notice into each section of -the Texinfo file, sample permission notices for each section are -reproduced in full below.@refill - -You may need to specify the correct name of a section mentioned in the -permission notice. For example, in @cite{The GDB Manual}, the name of -the section referring to the General Public License is called the ``GDB -General Public License'', but in the sample shown below, that section is -referred to generically as the ``GNU General Public License''. If the -Texinfo file does not carry a copy of the General Public License, leave -out the reference to it, but be sure to include the rest of the -sentence. - -@node ifinfo Permissions, Titlepage Permissions, Inserting Permissions, Sample Permissions -@comment node-name, next, previous, up -@section @samp{ifinfo} Copying Permissions -@cindex @samp{ifinfo} permissions - -In the @code{@@ifinfo} section of a Texinfo file, the standard Free -Software Foundation permission notice reads as follows:@refill - -@example -This file documents @dots{} - -Copyright 1999 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim -copies of this manual provided the copyright notice and -this permission notice are preserved on all copies. - -@@ignore -Permission is granted to process this file through TeX -and print the results, provided the printed document -carries a copying permission notice identical to this -one except for the removal of this paragraph (this -paragraph not being relevant to the printed manual). - -@@end ignore -Permission is granted to copy and distribute modified -versions of this manual under the conditions for -verbatim copying, provided also that the sections -entitled ``Copying'' and ``GNU General Public License'' -are included exactly as in the original, and provided -that the entire resulting derived work is distributed -under the terms of a permission notice identical to this -one. - -Permission is granted to copy and distribute -translations of this manual into another language, -under the above conditions for modified versions, -except that this permission notice may be stated in a -translation approved by the Free Software Foundation. -@end example - -@node Titlepage Permissions, , ifinfo Permissions, Sample Permissions -@comment node-name, next, previous, up -@section Titlepage Copying Permissions -@cindex Titlepage permissions - -In the @code{@@titlepage} section of a Texinfo file, the standard Free -Software Foundation copying permission notice follows the copyright -notice and publishing information. The standard phrasing is as -follows:@refill - -@example -Permission is granted to make and distribute verbatim -copies of this manual provided the copyright notice and -this permission notice are preserved on all copies. - -Permission is granted to copy and distribute modified -versions of this manual under the conditions for -verbatim copying, provided also that the sections -entitled ``Copying'' and ``GNU General Public License'' -are included exactly as in the original, and provided -that the entire resulting derived work is distributed -under the terms of a permission notice identical to this -one. - -Permission is granted to copy and distribute -translations of this manual into another language, -under the above conditions for modified versions, -except that this permission notice may be stated in a -translation approved by the Free Software Foundation. -@end example - - @node Include Files @appendix Include Files @cindex Include files @@ -16440,7 +16519,7 @@ created. Index entries from the included file are incorporated into the indices of the output file.@refill Include files let you keep a single large document as a collection of -conveniently small parts.@refill +conveniently small parts. @menu * Using Include Files:: How to use the @code{@@include} command. @@ -16570,7 +16649,8 @@ with a numeric prefix argument, such as @kbd{C-u 8}, the command updates @strong{every} pointer and menu in @strong{all} the files and then inserts a master menu.@refill -@node Include File Requirements, Sample Include File, texinfo-multiple-files-update, Include Files + +@node Include File Requirements @section Include File Requirements @cindex Include file requirements @cindex Requirements for include files @@ -16627,7 +16707,7 @@ would insert a main or master menu:@refill @group @@page @@vskip 0pt plus 1filll -Copyright @@copyright@{@} 1999 Free Software Foundation, Inc. +Copyright @@copyright@{@} 2002 Free Software Foundation, Inc. @@end titlepage @end group @@ -16680,8 +16760,8 @@ Manual} is named @file{elisp.texi}. This outer file contains a master menu with 417 entries and a list of 41 @code{@@include} files.@refill -@node Include Files Evolution, , Sample Include File, Include Files -@comment node-name, next, previous, up + +@node Include Files Evolution @section Evolution of Include Files When Info was first created, it was customary to create many small @@ -18372,6 +18452,405 @@ Insert the current date. @end ignore +@node Documentation Copying +@appendix GNU Free Documentation License + +@cindex FDL, GNU Free Documentation License +@center Version 1.1, March 2000 + +@display +Copyright @copyright{} 2000 Free Software Foundation, Inc. +59 Temple Place, Suite 330, Boston, MA 02111-1307, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +@end display + +@enumerate 0 +@item +PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +written document @dfn{free} in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of ``copyleft'', which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + +@item +APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The ``Document'', below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as ``you''. + +A ``Modified Version'' of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A ``Secondary Section'' is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The ``Invariant Sections'' are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +The ``Cover Texts'' are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +A ``Transparent'' copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not ``Transparent'' is called ``Opaque''. + +Examples of suitable formats for Transparent copies include plain +@sc{ascii} without markup, Texinfo input format, La@TeX{} input format, +@acronym{SGML} or @acronym{XML} using a publicly available +@acronym{DTD}, and standard-conforming simple @acronym{HTML} designed +for human modification. Opaque formats include PostScript, +@acronym{PDF}, proprietary formats that can be read and edited only by +proprietary word processors, @acronym{SGML} or @acronym{XML} for which +the @acronym{DTD} and/or processing tools are not generally available, +and the machine-generated @acronym{HTML} produced by some word +processors for output purposes only. + +The ``Title Page'' means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, ``Title Page'' means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +@item +VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + +@item +COPYING IN QUANTITY + +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + +@item +MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +@enumerate A +@item +Use in the Title Page (and on the covers, if any) a title distinct +from that of the Document, and from those of previous versions +(which should, if there were any, be listed in the History section +of the Document). You may use the same title as a previous version +if the original publisher of that version gives permission. + +@item +List on the Title Page, as authors, one or more persons or entities +responsible for authorship of the modifications in the Modified +Version, together with at least five of the principal authors of the +Document (all of its principal authors, if it has less than five). + +@item +State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +@item +Preserve all the copyright notices of the Document. + +@item +Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +@item +Include, immediately after the copyright notices, a license notice +giving the public permission to use the Modified Version under the +terms of this License, in the form shown in the Addendum below. + +@item +Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document's license notice. + +@item +Include an unaltered copy of this License. + +@item +Preserve the section entitled ``History'', and its title, and add to +it an item stating at least the title, year, new authors, and +publisher of the Modified Version as given on the Title Page. If +there is no section entitled ``History'' in the Document, create one +stating the title, year, authors, and publisher of the Document as +given on its Title Page, then add an item describing the Modified +Version as stated in the previous sentence. + +@item +Preserve the network location, if any, given in the Document for +public access to a Transparent copy of the Document, and likewise +the network locations given in the Document for previous versions +it was based on. These may be placed in the ``History'' section. +You may omit a network location for a work that was published at +least four years before the Document itself, or if the original +publisher of the version it refers to gives permission. + +@item +In any section entitled ``Acknowledgments'' or ``Dedications'', +preserve the section's title, and preserve in the section all the +substance and tone of each of the contributor acknowledgments +and/or dedications given therein. + +@item +Preserve all the Invariant Sections of the Document, +unaltered in their text and in their titles. Section numbers +or the equivalent are not considered part of the section titles. + +@item +Delete any section entitled ``Endorsements''. Such a section +may not be included in the Modified Version. + +@item +Do not retitle any existing section as ``Endorsements'' +or to conflict in title with any Invariant Section. +@end enumerate + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section entitled ``Endorsements'', provided it contains +nothing but endorsements of your Modified Version by various +parties---for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + +@item +COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections entitled ``History'' +in the various original documents, forming one section entitled +``History''; likewise combine any sections entitled ``Acknowledgments'', +and any sections entitled ``Dedications''. You must delete all sections +entitled ``Endorsements.'' + +@item +COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + +@item +AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an ``aggregate'', and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + +@item +TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + +@item +TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + +@item +FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +@uref{http://www.gnu.org/copyleft/}. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License ``or any later version'' applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. +@end enumerate + +@page +@appendixsubsec ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample +@group + Copyright (C) @var{year} @var{your name}. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being @var{list their titles}, with the + Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. + A copy of the license is included in the section entitled ``GNU + Free Documentation License''. +@end group +@end smallexample + +If you have no Invariant Sections, write ``with no Invariant Sections'' +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write ``no Front-Cover Texts'' instead of +``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + + @node Command and Variable Index @unnumbered Command and Variable Index diff --git a/contrib/texinfo/doc/version-stnd.texi b/contrib/texinfo/doc/version-stnd.texi new file mode 100644 index 0000000..fb7f62b --- /dev/null +++ b/contrib/texinfo/doc/version-stnd.texi @@ -0,0 +1,4 @@ +@set UPDATED 2 March 2002 +@set UPDATED-MONTH March 2002 +@set EDITION 4.1 +@set VERSION 4.1 diff --git a/contrib/texinfo/doc/version.texi b/contrib/texinfo/doc/version.texi index 2d7c149..af97803 100644 --- a/contrib/texinfo/doc/version.texi +++ b/contrib/texinfo/doc/version.texi @@ -1,3 +1,4 @@ -@set UPDATED 28 September 1999 -@set EDITION 4.0 -@set VERSION 4.0 +@set UPDATED 4 March 2002 +@set UPDATED-MONTH March 2002 +@set EDITION 4.1 +@set VERSION 4.1 diff --git a/contrib/texinfo/info/doc.h b/contrib/texinfo/info/doc.h index 423998e..53597d1 100644 --- a/contrib/texinfo/info/doc.h +++ b/contrib/texinfo/info/doc.h @@ -1,9 +1,7 @@ -/* doc.h -- Structure associating function pointers with documentation. */ +/* doc.h -- Structures associating function pointers with documentation. + $Id: doc.h,v 1.5 2001/11/16 23:16:40 karl Exp $ -/* This file is part of GNU Info, a program for reading online documentation - stored in Info format. - - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 2001 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 @@ -26,12 +24,44 @@ #include "info.h" /* for NAMED_FUNCTIONS, VFunction, etc. */ -typedef struct { +#if defined (INFOKEY) +/* For each function, we keep track of the first defined key sequence + which invokes that function, for each different map. This is so that + the dynamic documentation generation in infodoc.c (a) doesn't have to + search through copious KEYMAP_ENTRYs, and, more importantly, (b) the + user and programmer can choose the preferred key sequence that is + printed for any given function -- it's just the first one that + appears in the user's infokey file or the default keymaps in + infomap.c. + + Each FUNCTION_DOC has a linked list of FUNCTION_KEYSEQ structs + hanging off it, which are created on startup when the user and/or + default keymaps are being parsed. */ +typedef struct function_keyseq +{ + struct function_keyseq *next; + struct keymap_entry *map; + char *keyseq; +} FUNCTION_KEYSEQ; + +#endif /* INFOKEY */ + + +/* An array of FUNCTION_DOC structures is defined in doc.c, which is + automagically generated by the makedoc utility, whose job is to scan + through the source files for command function declarations and + compile a list of all the ones it finds. This saves tedious + housekeeping and avoids errors of omission. */ +typedef struct +{ VFunction *func; #if defined (NAMED_FUNCTIONS) char *func_name; #endif /* NAMED_FUNCTIONS */ - char *doc; +#if defined (INFOKEY) + FUNCTION_KEYSEQ *keys; +#endif /* INFOKEY */ + char *doc; } FUNCTION_DOC; extern FUNCTION_DOC function_doc_array[]; @@ -39,12 +69,31 @@ extern FUNCTION_DOC function_doc_array[]; extern char *function_documentation (); extern char *key_documentation (); extern char *pretty_keyname (); +extern char *pretty_keyseq (); +extern char *where_is (); extern char *replace_in_documentation (); extern void info_document_key (); extern void dump_map_to_message_buffer (); +/* Under the old key-binding system, an info command is specified by + the pointer to its function. Under the new INFOKEY binding system, + it is specified by a pointer to the command's FUNCTION_DOC structure, + defined in doc.c, from which the pointer to the function can be + easily divined using the InfoFunction() extractor. */ +#if defined(INFOKEY) +typedef FUNCTION_DOC InfoCommand; +#define InfoFunction(ic) ((ic) ? (ic)->func : NULL) +#define InfoCmd(fn) (&function_doc_array[A_##fn]) +#define DocInfoCmd(fd) ((fd) && (fd)->func ? (fd) : NULL) +#else /* !INFOKEY */ +typedef VFunction InfoCommand; +#define InfoFunction(vf) ((vf)) +#define InfoCmd(fn) fn +#define DocInfoCmd(fd) ((fd)->func) +#endif /* !INFOKEY */ + #if defined (NAMED_FUNCTIONS) extern char *function_name (); -extern VFunction *named_function (); +extern InfoCommand *named_function (); #endif /* NAMED_FUNCTIONS */ #endif /* !DOC_H */ diff --git a/contrib/texinfo/info/echo-area.c b/contrib/texinfo/info/echo-area.c index 7500523..078e8e7 100644 --- a/contrib/texinfo/info/echo-area.c +++ b/contrib/texinfo/info/echo-area.c @@ -1,7 +1,7 @@ /* echo-area.c -- how to read a line in the echo area. - $Id: echo-area.c,v 1.12 1999/03/03 22:22:14 karl Exp $ + $Id: echo-area.c,v 1.15 2001/12/12 16:19:39 karl Exp $ - Copyright (C) 1993, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1993, 97, 98, 99, 2001 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 @@ -868,7 +868,10 @@ info_read_completing_internal (window, prompt, completions, force) /* If no match, go back and try again. */ if (i == completions_found_index) { - inform_in_echo_area (_("Not complete")); + if (!completions_found_index) + inform_in_echo_area (_("No completions")); + else + inform_in_echo_area (_("Not complete")); continue; } } @@ -1258,7 +1261,26 @@ build_completions () maybe_free (LCD_reference.label); LCD_reference.label = (char *)xmalloc (1 + shortest); - strncpy (LCD_reference.label, completions_found[0]->label, shortest); + /* Since both the sorting done inside remove_completion_duplicates + and all the comparisons above are case-insensitive, it's + possible that the completion we are going to return is + identical to what the user typed but for the letter-case. This + is confusing, since the user could type FOOBAR<TAB> and get her + string change letter-case for no good reason. So try to find a + possible completion whose letter-case is identical, and if so, + use that. */ + if (completions_found_index > 1) + { + int req_len = strlen (request); + + for (i = 0; i < completions_found_index; i++) + if (strncmp (request, completions_found[i]->label, req_len) == 0) + break; + /* If none of the candidates match exactly, use the first one. */ + if (i >= completions_found_index) + i = 0; + } + strncpy (LCD_reference.label, completions_found[i]->label, shortest); LCD_reference.label[shortest] = '\0'; LCD_completion = &LCD_reference; } diff --git a/contrib/texinfo/info/filesys.c b/contrib/texinfo/info/filesys.c index 96f0ed9..cdf1365 100644 --- a/contrib/texinfo/info/filesys.c +++ b/contrib/texinfo/info/filesys.c @@ -1,7 +1,7 @@ /* filesys.c -- filesystem specific functions. - $Id: filesys.c,v 1.10 1998/12/06 21:58:30 karl Exp $ + $Id: filesys.c,v 1.14 2002/03/02 15:05:04 karl Exp $ - Copyright (C) 1993, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1993, 97, 98, 2000 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 @@ -163,6 +163,11 @@ info_file_in_path (filename, path) char *temp_dirname; int statable, dirname_index; + /* Reject ridiculous cases up front, to prevent infinite recursion + later on. E.g., someone might say "info '(.)foo'"... */ + if (!*filename || STREQ (filename, ".") || STREQ (filename, "..")) + return NULL; + dirname_index = 0; while ((temp_dirname = extract_colon_unit (path, &dirname_index))) @@ -557,7 +562,7 @@ filesys_read_compressed (pathname, filesize, finfo) /* Read chunks from this file until there are none left to read. */ if (stream) { - int offset, size; + long offset, size; char *chunk; offset = size = 0; @@ -689,25 +694,34 @@ filesys_error_string (filename, error_num) } -/* Check for FILENAME eq "dir" first, then all the compression - suffixes. */ +/* Check for "dir" with all the possible info and compression suffixes, + in combination. */ int is_dir_name (filename) char *filename; { unsigned i; - if (strcasecmp (filename, "dir") == 0) - return 1; - - for (i = 0; compress_suffixes[i].suffix; i++) + + for (i = 0; info_suffixes[i]; i++) { - char dir_compressed[50]; /* can be short */ - strcpy (dir_compressed, "dir"); - strcat (dir_compressed, compress_suffixes[i].suffix); - if (strcasecmp (filename, dir_compressed) == 0) + unsigned c; + char trydir[50]; + strcpy (trydir, "dir"); + strcat (trydir, info_suffixes[i]); + + if (strcasecmp (filename, trydir) == 0) return 1; - } - + + for (c = 0; compress_suffixes[c].suffix; c++) + { + char dir_compressed[50]; /* can be short */ + strcpy (dir_compressed, trydir); + strcat (dir_compressed, compress_suffixes[c].suffix); + if (strcasecmp (filename, dir_compressed) == 0) + return 1; + } + } + return 0; } diff --git a/contrib/texinfo/info/info.c b/contrib/texinfo/info/info.c index 4f4999c..33aacdf 100644 --- a/contrib/texinfo/info/info.c +++ b/contrib/texinfo/info/info.c @@ -1,7 +1,8 @@ /* info.c -- Display nodes of Info files in multiple windows. - $Id: info.c,v 1.41 1999/09/25 16:10:04 karl Exp $ + $Id: info.c,v 1.53 2002/03/02 15:18:58 karl Exp $ - Copyright (C) 1993, 96, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1993, 96, 97, 98, 99, 2000, 01, 02 + 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 @@ -76,6 +77,9 @@ int dump_subnodes = 0; /* Non-zero means make default keybindings be loosely modeled on vi(1). */ int vi_keys_p = 0; +/* Non-zero means don't remove ANSI escape sequences from man pages. */ +int raw_escapes_p = 0; + #ifdef __MSDOS__ /* Non-zero indicates that screen output should be made 'speech-friendly'. Since on MSDOS the usual behavior is to write directly to the video @@ -99,6 +103,7 @@ static struct option long_options[] = { { "file", 1, 0, 'f' }, { "subnodes", 0, &dump_subnodes, 1 }, { "output", 1, 0, 'o' }, + { "raw-escapes", 0, &raw_escapes_p, 1 }, { "show-options", 0, 0, 'O' }, { "usage", 0, 0, 'O' }, { "vi-keys", 0, &vi_keys_p, 1 }, @@ -115,9 +120,9 @@ static struct option long_options[] = { /* String describing the shorthand versions of the long options found above. */ #ifdef __MSDOS__ -static char *short_options = "d:n:f:o:Osb"; +static char *short_options = "d:n:f:o:ORsb"; #else -static char *short_options = "d:n:f:o:Os"; +static char *short_options = "d:n:f:o:ORs"; #endif /* When non-zero, the Info window system has been initialized. */ @@ -126,6 +131,7 @@ int info_windows_initialized_p = 0; /* Some "forward" declarations. */ static void info_short_help (), remember_info_program_name (); static void init_messages (); +extern void add_file_directory_to_path (); /* **************************************************************** */ @@ -206,6 +212,12 @@ main (argc, argv) goto_invocation_p = 1; break; + /* User has specified that she wants the escape sequences + in man pages to be passed thru unaltered. */ + case 'R': + raw_escapes_p = 1; + break; + /* User is specifying that she wishes to dump the subnodes of the node that she is dumping. */ case 's': @@ -213,7 +225,7 @@ main (argc, argv) break; #ifdef __MSDOS__ - /* User specifies that she wants speech-friendly output. */ + /* User wants speech-friendly output. */ case 'b': speech_friendly = 1; break; @@ -268,7 +280,7 @@ main (argc, argv) There is NO warranty. You may redistribute this software\n\ under the terms of the GNU General Public License.\n\ For more information about these matters, see the files named COPYING.\n"), - "1999"); + "2002"); xexit (0); } @@ -313,25 +325,7 @@ For more information about these matters, see the files named COPYING.\n"), /* If the user specified a particular filename, add the path of that file to the contents of INFOPATH. */ if (user_filename) - { - char *directory_name = xstrdup (user_filename); - char *temp = filename_non_directory (directory_name); - - if (temp != directory_name) - { - if (HAVE_DRIVE (directory_name) && temp == directory_name + 2) - { - /* The directory of "d:foo" is stored as "d:.", to avoid - mixing it with "d:/" when a slash is appended. */ - *temp = '.'; - temp += 2; - } - temp[-1] = 0; - info_add_path (directory_name, INFOPATH_PREPEND); - } - - free (directory_name); - } + add_file_directory_to_path (user_filename); /* If the user wants to search every known index for a given string, do that now, and report the results. */ @@ -382,13 +376,14 @@ For more information about these matters, see the files named COPYING.\n"), char *errstr, *errarg1, *errarg2; NODE *new_initial_node = info_follow_menus (initial_node, argv + optind, &errstr, &errarg1, &errarg2); + if (new_initial_node && new_initial_node != initial_node) initial_node = new_initial_node; /* If the user specified that this node should be output, then do that now. Otherwise, start the Info session with this node. Or act accordingly if the initial node was not found. */ - if (user_output_filename) + if (user_output_filename && !goto_invocation_p) { if (!errstr) dump_node_to_file (initial_node, user_output_filename, @@ -447,7 +442,13 @@ For more information about these matters, see the files named COPYING.\n"), free (program); } - info_read_and_dispatch (); + if (user_output_filename) + { + dump_node_to_file (windows->node, user_output_filename, + dump_subnodes); + } + else + info_read_and_dispatch (); /* On program exit, leave the cursor at the bottom of the window, and restore the terminal IO. */ @@ -474,6 +475,29 @@ For more information about these matters, see the files named COPYING.\n"), } } +void +add_file_directory_to_path (filename) + char *filename; +{ + char *directory_name = xstrdup (filename); + char *temp = filename_non_directory (directory_name); + + if (temp != directory_name) + { + if (HAVE_DRIVE (directory_name) && temp == directory_name + 2) + { + /* The directory of "d:foo" is stored as "d:.", to avoid + mixing it with "d:/" when a slash is appended. */ + *temp = '.'; + temp += 2; + } + temp[-1] = 0; + info_add_path (directory_name, INFOPATH_PREPEND); + } + + free (directory_name); +} + /* Error handling. */ @@ -527,6 +551,14 @@ info_error (format, arg1, arg2) static void info_short_help () { +#ifdef __MSDOS__ + static const char speech_friendly_string[] = N_("\ + --speech-friendly be friendly to speech synthesizers.\n"); +#else + static const char speech_friendly_string[] = ""; +#endif + + printf (_("\ Usage: %s [OPTION]... [MENU-ITEM...]\n\ \n\ @@ -541,9 +573,10 @@ Options:\n\ --index-search=STRING go to node pointed by index entry STRING.\n\ --node=NODENAME specify nodes in first visited Info file.\n\ --output=FILENAME output selected nodes to FILENAME.\n\ + --raw-escapes don't remove ANSI escapes from man pages.\n\ --restore=FILENAME read initial keystrokes from FILENAME.\n\ - --show-options, --usage go to command-line options node.\n\ - --subnodes recursively output menu items.\n%s\ + --show-options, --usage go to command-line options node.\n%s\ + --subnodes recursively output menu items.\n\ --vi-keys use vi-like and less-like key bindings.\n\ --version display version information and exit.\n\ \n\ @@ -563,14 +596,7 @@ Examples:\n\ Email bug reports to bug-texinfo@gnu.org,\n\ general questions and discussion to help-texinfo@gnu.org.\n\ "), - program_name, -#ifdef __MSDOS__ -"\ - --speech-friendly be friendly to speech synthesizers.\n" -#else -"" -#endif - ); + program_name, speech_friendly_string); xexit (0); } diff --git a/contrib/texinfo/info/info.h b/contrib/texinfo/info/info.h index 2f85d80..1746660 100644 --- a/contrib/texinfo/info/info.h +++ b/contrib/texinfo/info/info.h @@ -1,7 +1,7 @@ /* info.h -- Header file which includes all of the other headers. - $Id: info.h,v 1.14 1999/09/25 16:10:04 karl Exp $ + $Id: info.h,v 1.16 2002/02/23 19:12:02 karl Exp $ - Copyright (C) 1993, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1993, 97, 98, 99, 2001 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,6 +25,7 @@ /* We always want these, so why clutter up the compile command? */ #define HANDLE_MAN_PAGES #define NAMED_FUNCTIONS +#define INFOKEY /* System dependencies. */ #include "system.h" @@ -34,12 +35,11 @@ typedef int Function (); typedef void VFunction (); typedef char *CFunction (); - #include "filesys.h" +#include "doc.h" #include "display.h" #include "session.h" #include "echo-area.h" -#include "doc.h" #include "footnotes.h" #include "gc.h" @@ -119,14 +119,14 @@ extern int info_error_rings_bell_p; /* Non-zero means default keybindings are loosely modeled on vi(1). */ extern int vi_keys_p; +/* Non-zero means don't remove ANSI escape sequences from man pages. */ +extern int raw_escapes_p; + /* Print FORMAT with ARG1 and ARG2. If the window system was initialized, then the message is printed in the echo area. Otherwise, a message is output to stderr. */ extern void info_error (); -/* The version numbers of Info. */ -extern int info_major_version, info_minor_version; - /* Error message defines. */ extern char *msg_cant_find_node; extern char *msg_cant_file_node; @@ -146,13 +146,14 @@ extern char *msg_win_too_small; extern char *msg_cant_make_help; -/* Found in info-utils.c. */ -extern char *filename_non_directory (); +extern char *filename_non_directory (); /* Found in info-utils.c. */ -#if !defined (BUILDING_LIBRARY) -/* Found in session.c */ -extern int info_windows_initialized_p; +#if defined(INFOKEY) +extern void set_variable_to_value (); /* Found in variables.c. */ +#endif /* INFOKEY */ +#if !defined (BUILDING_LIBRARY) +extern int info_windows_initialized_p; /* Found in session.c */ /* Found in window.c. */ extern void message_in_echo_area (), unmessage_in_echo_area (); #endif /* !BUILDING_LIBRARY */ diff --git a/contrib/texinfo/info/infodoc.c b/contrib/texinfo/info/infodoc.c index 2b70918..731cb48 100644 --- a/contrib/texinfo/info/infodoc.c +++ b/contrib/texinfo/info/infodoc.c @@ -1,7 +1,7 @@ /* infodoc.c -- Functions which build documentation nodes. - $Id: infodoc.c,v 1.23 1999/09/25 16:10:04 karl Exp $ + $Id: infodoc.c,v 1.28 2002/02/27 13:37:33 karl Exp $ - Copyright (C) 1993, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1993, 97, 98, 99, 2001, 02 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 @@ -20,17 +20,12 @@ Written by Brian Fox (bfox@ai.mit.edu). */ #include "info.h" +#include "funs.h" /* HELP_NODE_GETS_REGENERATED is always defined now that keys may get rebound, or other changes in the help text may occur. */ #define HELP_NODE_GETS_REGENERATED 1 -/* **************************************************************** */ -/* */ -/* Info Help Windows */ -/* */ -/* **************************************************************** */ - /* The name of the node used in the help window. */ static char *info_help_nodename = "*Info Help*"; @@ -40,26 +35,71 @@ static NODE *internal_info_help_node = (NODE *)NULL; /* A pointer to the contents of the help node. */ static char *internal_info_help_node_contents = (char *)NULL; -/* The static text which appears in the internal info help node. */ +/* The (more or less) static text which appears in the internal info + help node. The actual key bindings are inserted. Keep the + underlines (****, etc.) in the same N_ call as the text lines they + refer to, so translations can make the number of *'s or -'s match. */ +#if defined(INFOKEY) + +static char *info_internal_help_text[] = { + N_("Basic Commands in Info Windows\n\ +******************************\n"), + "\n", + N_("\\%-10[quit-help] Quit this help.\n"), + N_("\\%-10[quit] Quit Info altogether.\n"), + N_("\\%-10[get-info-help-node] Invoke the Info tutorial.\n"), + "\n", + N_("Selecting other nodes:\n\ +----------------------\n"), + N_("\\%-10[next-node] Move to the \"next\" node of this node.\n"), + N_("\\%-10[prev-node] Move to the \"previous\" node of this node.\n"), + N_("\\%-10[up-node] Move \"up\" from this node.\n"), + N_("\\%-10[menu-item] Pick menu item specified by name.\n\ + Picking a menu item causes another node to be selected.\n"), + N_("\\%-10[xref-item] Follow a cross reference. Reads name of reference.\n"), + N_("\\%-10[history-node] Move to the last node seen in this window.\n"), + N_("\\%-10[move-to-next-xref] Skip to next hypertext link within this node.\n"), + N_("\\%-10[move-to-prev-xref] Skip to previous hypertext link within this node.\n"), + N_("\\%-10[select-reference-this-line] Follow the hypertext link under cursor.\n"), + N_("\\%-10[dir-node] Move to the `directory' node. Equivalent to `\\[goto-node] (DIR)'.\n"), + N_("\\%-10[top-node] Move to the Top node. Equivalent to `\\[goto-node] Top'.\n"), + "\n", + N_("Moving within a node:\n\ +---------------------\n"), + N_("\\%-10[scroll-forward] Scroll forward a page.\n"), + N_("\\%-10[scroll-backward] Scroll backward a page.\n"), + N_("\\%-10[beginning-of-node] Go to the beginning of this node.\n"), + N_("\\%-10[end-of-node] Go to the end of this node.\n"), + N_("\\%-10[scroll-forward] Scroll forward 1 line.\n"), + N_("\\%-10[scroll-backward] Scroll backward 1 line.\n"), + "\n", + N_("Other commands:\n\ +---------------\n"), + N_("\\%-10[menu-digit] Pick first ... ninth item in node's menu.\n"), + N_("\\%-10[last-menu-item] Pick last item in node's menu.\n"), + N_("\\%-10[index-search] Search for a specified string in the index entries of this Info\n\ + file, and select the node referenced by the first entry found.\n"), + N_("\\%-10[goto-node] Move to node specified by name.\n\ + You may include a filename as well, as in (FILENAME)NODENAME.\n"), + N_("\\%-10[search] Search forward for a specified string\n\ + and select the node in which the next occurrence is found.\n"), + N_("\\%-10[search-backward] Search backward for a specified string\n\ + and select the node in which the previous occurrence is found.\n"), + NULL +}; + +#else /* !INFOKEY */ + static char *info_internal_help_text[] = { - N_("Basic Commands in Info Windows\n"), - N_("******************************\n"), + N_("Basic Commands in Info Windows\n\ +******************************\n"), "\n", N_(" %-10s Quit this help.\n"), N_(" %-10s Quit Info altogether.\n"), N_(" %-10s Invoke the Info tutorial.\n"), "\n", - N_("Moving within a node:\n"), - N_("---------------------\n"), - N_(" %-10s Scroll forward a page.\n"), - N_(" %-10s Scroll backward a page.\n"), - N_(" %-10s Go to the beginning of this node.\n"), - N_(" %-10s Go to the end of this node.\n"), - N_(" %-10s Scroll forward 1 line.\n"), - N_(" %-10s Scroll backward 1 line.\n"), - "\n", - N_("Selecting other nodes:\n"), - N_("----------------------\n"), + N_("Selecting other nodes:\n\ +----------------------\n", N_(" %-10s Move to the `next' node of this node.\n"), N_(" %-10s Move to the `previous' node of this node.\n"), N_(" %-10s Move `up' from this node.\n"), @@ -72,17 +112,26 @@ static char *info_internal_help_text[] = { N_(" %-10s Move to the `directory' node. Equivalent to `g (DIR)'.\n"), N_(" %-10s Move to the Top node. Equivalent to `g Top'.\n"), "\n", - N_("Other commands:\n"), - N_("---------------\n"), + N_("Moving within a node:\n\ +---------------------\n"), + N_(" %-10s Scroll forward a page.\n"), + N_(" %-10s Scroll backward a page.\n"), + N_(" %-10s Go to the beginning of this node.\n"), + N_(" %-10s Go to the end of this node.\n"), + N_(" %-10s Scroll forward 1 line.\n"), + N_(" %-10s Scroll backward 1 line.\n"), + "\n", + N_("Other commands:\n\ +---------------\n"), N_(" %-10s Pick first ... ninth item in node's menu.\n"), N_(" %-10s Pick last item in node's menu.\n"), N_(" %-10s Search for a specified string in the index entries of this Info\n"), N_(" file, and select the node referenced by the first entry found.\n"), N_(" %-10s Move to node specified by name.\n"), N_(" You may include a filename as well, as in (FILENAME)NODENAME.\n"), - N_(" %-10s Search forward through this Info file for a specified string,\n"), + N_(" %-10s Search forward for a specified string,\n"), N_(" and select the node in which the next occurrence is found.\n"), - N_(" %-10s Search backward in this Info file for a specified string,\n"), + N_(" %-10s Search backward for a specified string\n"), N_(" and select the node in which the next occurrence is found.\n"), NULL }; @@ -133,7 +182,9 @@ static char *info_help_keys_text[][2] = { NULL }; -static char *where_is (), *where_is_internal (); +#endif /* !INFOKEY */ + +static char *where_is_internal (); void dump_map_to_message_buffer (prefix, map) @@ -141,20 +192,18 @@ dump_map_to_message_buffer (prefix, map) Keymap map; { register int i; + unsigned prefix_len = strlen (prefix); + char *new_prefix = (char *)xmalloc (prefix_len + 2); + + strncpy (new_prefix, prefix, prefix_len); + new_prefix[prefix_len + 1] = '\0'; for (i = 0; i < 256; i++) { + new_prefix[prefix_len] = i; if (map[i].type == ISKMAP) { - char *new_prefix, *keyname; - - keyname = pretty_keyname (i); - new_prefix = (char *) - xmalloc (3 + strlen (prefix) + strlen (keyname)); - sprintf (new_prefix, "%s%s%s ", prefix, *prefix ? " " : "", keyname); - dump_map_to_message_buffer (new_prefix, (Keymap)map[i].function); - free (new_prefix); } else if (map[i].function) { @@ -176,14 +225,13 @@ dump_map_to_message_buffer (prefix, map) if (last - 1 != i) { - printf_to_message_buffer - ("%s%s .. ", prefix, pretty_keyname (i)); - printf_to_message_buffer - ("%s%s\t", prefix, pretty_keyname (last - 1)); + printf_to_message_buffer ("%s .. ", pretty_keyseq (new_prefix)); + new_prefix[prefix_len] = last - 1; + printf_to_message_buffer ("%s\t", pretty_keyseq (new_prefix)); i = last - 1; } else - printf_to_message_buffer ("%s%s\t", prefix, pretty_keyname (i)); + printf_to_message_buffer ("%s\t", pretty_keyseq (new_prefix)); #if defined (NAMED_FUNCTIONS) /* Print the name of the function, and some padding before the @@ -210,6 +258,7 @@ dump_map_to_message_buffer (prefix, map) printf_to_message_buffer ("%s\n", doc); } } + free (new_prefix); } /* How to create internal_info_help_node. HELP_IS_ONLY_WINDOW_P says @@ -225,6 +274,7 @@ create_internal_info_help_node (help_is_only_window_p) register int i; NODE *node; char *contents = NULL; + char *exec_keys; #ifndef HELP_NODE_GETS_REGENERATED if (internal_info_help_node_contents) @@ -239,6 +289,10 @@ create_internal_info_help_node (help_is_only_window_p) for (i = 0; info_internal_help_text[i]; i++) { +#ifdef INFOKEY + printf_to_message_buffer (replace_in_documentation ( + _(info_internal_help_text[i]), help_is_only_window_p)); +#else /* Don't translate blank lines, gettext outputs the po file header in that case. We want a blank line. */ char *msg = *(info_internal_help_text[i]) @@ -252,6 +306,7 @@ create_internal_info_help_node (help_is_only_window_p) key = "l"; printf_to_message_buffer (msg, key); +#endif /* !INFOKEY */ } printf_to_message_buffer ("---------------------\n\n"); @@ -265,35 +320,46 @@ create_internal_info_help_node (help_is_only_window_p) dump_map_to_message_buffer ("", echo_area_keymap); #if defined (NAMED_FUNCTIONS) - /* Get a list of the M-x commands which have no keystroke equivs. */ + /* Get a list of commands which have no keystroke equivs. */ + exec_keys = where_is (info_keymap, InfoCmd(info_execute_command)); + if (exec_keys) + exec_keys = xstrdup (exec_keys); for (i = 0; function_doc_array[i].func; i++) { - VFunction *func = function_doc_array[i].func; + InfoCommand *cmd = DocInfoCmd(&function_doc_array[i]); - if ((!where_is_internal (info_keymap, func)) && - (!where_is_internal (echo_area_keymap, func))) + if (InfoFunction(cmd) != info_do_lowercase_version + && !where_is_internal (info_keymap, cmd) + && !where_is_internal (echo_area_keymap, cmd)) { if (!printed_one_mx) { printf_to_message_buffer ("---------------------\n\n"); - printf_to_message_buffer - (_("The following commands can only be invoked via M-x:\n\n")); + if (exec_keys && exec_keys[0]) + printf_to_message_buffer + (_("The following commands can only be invoked via %s:\n\n"), exec_keys); + else + printf_to_message_buffer + (_("The following commands cannot be invoked at all:\n\n")); printed_one_mx = 1; } printf_to_message_buffer - ("M-x %s\n %s\n", + ("%s %s\n %s\n", + exec_keys, function_doc_array[i].func_name, replace_in_documentation (strlen (function_doc_array[i].doc) - == 0 - ? function_doc_array[i].doc - : _(function_doc_array[i].doc))); + ? _(function_doc_array[i].doc) + : "") + ); } } if (printed_one_mx) printf_to_message_buffer ("\n"); + + maybe_free (exec_keys); #endif /* NAMED_FUNCTIONS */ printf_to_message_buffer @@ -492,39 +558,56 @@ DECLARE_INFO_COMMAND (info_get_info_help_node, _("Visit Info node `(info)Help'") /* Return the documentation associated with the Info command FUNCTION. */ char * -function_documentation (function) - VFunction *function; +function_documentation (cmd) + InfoCommand *cmd; { + char *doc; + +#if defined (INFOKEY) + + doc = cmd->doc; + +#else /* !INFOKEY */ + register int i; for (i = 0; function_doc_array[i].func; i++) - if (function == function_doc_array[i].func) + if (InfoFunction(cmd) == function_doc_array[i].func) break; - return replace_in_documentation ((strlen (function_doc_array[i].doc) == 0) - ? function_doc_array[i].doc - : _(function_doc_array[i].doc)); + doc = function_doc_array[i].func ? function_doc_array[i].doc : ""; + +#endif /* !INFOKEY */ + + return replace_in_documentation ((strlen (doc) == 0) ? doc : _(doc)); } #if defined (NAMED_FUNCTIONS) /* Return the user-visible name of the function associated with the Info command FUNCTION. */ char * -function_name (function) - - VFunction *function; +function_name (cmd) + InfoCommand *cmd; { +#if defined (INFOKEY) + + return cmd->func_name; + +#else /* !INFOKEY */ + register int i; for (i = 0; function_doc_array[i].func; i++) - if (function == function_doc_array[i].func) + if (InfoFunction(cmd) == function_doc_array[i].func) break; return (function_doc_array[i].func_name); + +#endif /* !INFOKEY */ } -/* Return a pointer to the function named NAME. */ -VFunction * +/* Return a pointer to the info command for function NAME. */ +InfoCommand * named_function (name) char *name; { @@ -534,7 +617,7 @@ named_function (name) if (strcmp (function_doc_array[i].func_name, name) == 0) break; - return (function_doc_array[i].func); + return (DocInfoCmd(&function_doc_array[i])); } #endif /* NAMED_FUNCTIONS */ @@ -544,7 +627,7 @@ key_documentation (key, map) char key; Keymap map; { - VFunction *function = map[key].function; + InfoCommand *function = map[key].function; if (function) return (function_documentation (function)); @@ -554,21 +637,21 @@ key_documentation (key, map) DECLARE_INFO_COMMAND (describe_key, _("Print documentation for KEY")) { - char keyname[50]; - int keyname_index = 0; + char keys[50]; unsigned char keystroke; - char *rep; + char *k = keys; Keymap map; - keyname[0] = 0; + *k = '\0'; map = window->keymap; for (;;) { - message_in_echo_area (_("Describe key: %s"), keyname); + message_in_echo_area (_("Describe key: %s"), pretty_keyseq (keys)); keystroke = info_get_input_char (); unmessage_in_echo_area (); +#if !defined (INFOKEY) if (Meta_p (keystroke)) { if (map[ESC].type != ISKMAP) @@ -578,32 +661,53 @@ DECLARE_INFO_COMMAND (describe_key, _("Print documentation for KEY")) return; } - strcpy (keyname + keyname_index, "ESC "); - keyname_index = strlen (keyname); + *k++ = '\e'; keystroke = UnMeta (keystroke); map = (Keymap)map[ESC].function; } +#endif /* !INFOKEY */ - /* Add the printed representation of KEYSTROKE to our keyname. */ - rep = pretty_keyname (keystroke); - strcpy (keyname + keyname_index, rep); - keyname_index = strlen (keyname); + /* Add the KEYSTROKE to our list. */ + *k++ = keystroke; + *k = '\0'; - if (map[keystroke].function == (VFunction *)NULL) + if (map[keystroke].function == (InfoCommand *)NULL) { - message_in_echo_area (_("%s is undefined."), keyname); + message_in_echo_area (_("%s is undefined."), pretty_keyseq (keys)); return; } else if (map[keystroke].type == ISKMAP) { map = (Keymap)map[keystroke].function; - strcat (keyname, " "); - keyname_index = strlen (keyname); continue; } else { - char *message, *fundoc, *funname = ""; + char *keyname, *message, *fundoc, *funname = ""; + +#if defined (INFOKEY) + /* If the key is bound to do-lowercase-version, but its + lower-case variant is undefined, say that this key is + also undefined. This is especially important for unbound + edit keys that emit an escape sequence: it's terribly + confusing to see a message "Home (do-lowercase-version)" + or some such when Home is unbound. */ + if (InfoFunction(map[keystroke].function) == info_do_lowercase_version) + { + unsigned char lowerkey = Meta_p(keystroke) + ? Meta (tolower (UnMeta (keystroke))) + : tolower (keystroke); + + if (map[lowerkey].function == (InfoCommand *)NULL) + { + message_in_echo_area (_("%s is undefined."), + pretty_keyseq (keys)); + return; + } + } +#endif + + keyname = pretty_keyseq (keys); #if defined (NAMED_FUNCTIONS) funname = function_name (map[keystroke].function); @@ -627,13 +731,12 @@ DECLARE_INFO_COMMAND (describe_key, _("Print documentation for KEY")) } } -/* How to get the pretty printable name of a character. */ -static char rep_buffer[30]; - +/* Return the pretty printable name of a single character. */ char * pretty_keyname (key) unsigned char key; { + static char rep_buffer[30]; char *rep; if (Meta_p (key)) @@ -642,7 +745,11 @@ pretty_keyname (key) rep = pretty_keyname (UnMeta (key)); +#if defined (INFOKEY) + sprintf (temp, "M-%s", rep); +#else /* !INFOKEY */ sprintf (temp, "ESC %s", rep); +#endif /* !INFOKEY */ strcpy (rep_buffer, temp); rep = rep_buffer; } @@ -675,57 +782,269 @@ pretty_keyname (key) return (rep); } +/* Return the pretty printable string which represents KEYSEQ. */ + +static void pretty_keyseq_internal (); + +char * +pretty_keyseq (keyseq) + char *keyseq; +{ + static char keyseq_rep[200]; + + keyseq_rep[0] = '\0'; + if (*keyseq) + pretty_keyseq_internal (keyseq, keyseq_rep); + return (keyseq_rep); +} + +static void +pretty_keyseq_internal (keyseq, rep) + char *keyseq, *rep; +{ + if (term_kP && strncmp(keyseq, term_kP, strlen(term_kP)) == 0) + { + strcpy(rep, "PgUp"); + keyseq += strlen(term_kP); + } + else if (term_kN && strncmp(keyseq, term_kN, strlen(term_kN)) == 0) + { + strcpy(rep, "PgDn"); + keyseq += strlen(term_kN); + } +#if defined(INFOKEY) + else if (term_kh && strncmp(keyseq, term_kh, strlen(term_kh)) == 0) + { + strcpy(rep, "Home"); + keyseq += strlen(term_kh); + } + else if (term_ke && strncmp(keyseq, term_ke, strlen(term_ke)) == 0) + { + strcpy(rep, "End"); + keyseq += strlen(term_ke); + } + else if (term_ki && strncmp(keyseq, term_ki, strlen(term_ki)) == 0) + { + strcpy(rep, "INS"); + keyseq += strlen(term_ki); + } + else if (term_kx && strncmp(keyseq, term_kx, strlen(term_kx)) == 0) + { + strcpy(rep, "DEL"); + keyseq += strlen(term_kx); + } +#endif /* INFOKEY */ + else if (term_ku && strncmp(keyseq, term_ku, strlen(term_ku)) == 0) + { + strcpy(rep, "Up"); + keyseq += strlen(term_ku); + } + else if (term_kd && strncmp(keyseq, term_kd, strlen(term_kd)) == 0) + { + strcpy(rep, "Down"); + keyseq += strlen(term_kd); + } + else if (term_kl && strncmp(keyseq, term_kl, strlen(term_kl)) == 0) + { + strcpy(rep, "Left"); + keyseq += strlen(term_kl); + } + else if (term_kr && strncmp(keyseq, term_kr, strlen(term_kr)) == 0) + { + strcpy(rep, "Right"); + keyseq += strlen(term_kr); + } + else + { + strcpy (rep, pretty_keyname (keyseq[0])); + keyseq++; + } + if (*keyseq) + { + strcat (rep, " "); + pretty_keyseq_internal (keyseq, rep + strlen(rep)); + } +} + +/* Return a pointer to the last character in s that is found in f. */ +static char * +strrpbrk (s, f) + const char *s, *f; +{ + register const char *e = s + strlen(s); + register const char *t; + + while (e-- != s) + { + for (t = f; *t; t++) + if (*e == *t) + return (char *)e; + } + return NULL; +} + /* Replace the names of functions with the key that invokes them. */ char * -replace_in_documentation (string) +replace_in_documentation (string, help_is_only_window_p) char *string; + int help_is_only_window_p; { + unsigned reslen = strlen (string); register int i, start, next; static char *result = (char *)NULL; maybe_free (result); - result = (char *)xmalloc (1 + strlen (string)); + result = (char *)xmalloc (1 + reslen); i = next = start = 0; /* Skip to the beginning of a replaceable function. */ for (i = start; string[i]; i++) { - /* Is this the start of a replaceable function name? */ - if (string[i] == '\\' && string[i + 1] == '[') - { - char *fun_name, *rep; - VFunction *function; - - /* Copy in the old text. */ - strncpy (result + next, string + start, i - start); - next += (i - start); - start = i + 2; - - /* Move to the end of the function name. */ - for (i = start; string[i] && (string[i] != ']'); i++); - - fun_name = (char *)xmalloc (1 + i - start); - strncpy (fun_name, string + start, i - start); - fun_name[i - start] = '\0'; - - /* Find a key which invokes this function in the info_keymap. */ - function = named_function (fun_name); + int j = i + 1; - /* If the internal documentation string fails, there is a - serious problem with the associated command's documentation. - We croak so that it can be fixed immediately. */ - if (!function) - abort (); - - rep = where_is (info_keymap, function); - strcpy (result + next, rep); - next = strlen (result); - - start = i; - if (string[i]) - start++; - } + /* Is this the start of a replaceable function name? */ + if (string[i] == '\\') + { + char *fmt = NULL; + unsigned min = 0; + unsigned max = 0; + + if(string[j] == '%') + { + if (string[++j] == '-') + j++; + if (isdigit(string[j])) + { + min = atoi(string + j); + while (isdigit(string[j])) + j++; + if (string[j] == '.' && isdigit(string[j + 1])) + { + j += 1; + max = atoi(string + j); + while (isdigit(string[j])) + j++; + } + fmt = (char *)xmalloc (j - i + 2); + strncpy (fmt, string + i + 1, j - i); + fmt[j - i - 1] = 's'; + fmt[j - i] = '\0'; + } + else + j = i + 1; + } + if (string[j] == '[') + { + unsigned arg = 0; + char *argstr = NULL; + char *rep_name, *fun_name, *rep; + InfoCommand *command; + char *repstr = NULL; + unsigned replen; + + /* Copy in the old text. */ + strncpy (result + next, string + start, i - start); + next += (i - start); + start = j + 1; + + /* Look for an optional numeric arg. */ + i = start; + if (isdigit(string[i]) + || (string[i] == '-' && isdigit(string[i + 1])) ) + { + arg = atoi(string + i); + if (string[i] == '-') + i++; + while (isdigit(string[i])) + i++; + } + start = i; + + /* Move to the end of the function name. */ + for (i = start; string[i] && (string[i] != ']'); i++); + + rep_name = (char *)xmalloc (1 + i - start); + strncpy (rep_name, string + start, i - start); + rep_name[i - start] = '\0'; + + /* If we have only one window (because the window size was too + small to split it), we have to quit help by going back one + noew in the history list, not deleting the window. */ + if (strcmp (rep_name, "quit-help") == 0) + fun_name = help_is_only_window_p ? "history-node" + : "delete-window"; + else + fun_name = rep_name; + + /* Find a key which invokes this function in the info_keymap. */ + command = named_function (fun_name); + + free (rep_name); + + /* If the internal documentation string fails, there is a + serious problem with the associated command's documentation. + We croak so that it can be fixed immediately. */ + if (!command) + abort (); + + if (arg) + { + char *argrep, *p; + + argrep = where_is (info_keymap, InfoCmd(info_add_digit_to_numeric_arg)); + p = argrep ? strrpbrk (argrep, "0123456789-") : NULL; + if (p) + { + argstr = (char *)xmalloc (p - argrep + 21); + strncpy (argstr, argrep, p - argrep); + sprintf (argstr + (p - argrep), "%d", arg); + } + else + command = NULL; + } + rep = command ? where_is (info_keymap, command) : NULL; + if (!rep) + rep = "N/A"; + replen = (argstr ? strlen (argstr) + 1 : 0) + strlen (rep); + repstr = (char *)xmalloc (replen); + repstr[0] = '\0'; + if (argstr) + { + strcat(repstr, argstr); + strcat(repstr, " "); + free (argstr); + } + strcat(repstr, rep); + + if (fmt) + { + if (replen > max) + replen = max; + if (replen < min) + replen = min; + } + if (next + replen > reslen) + { + reslen = next + replen + 1; + result = (char *)xrealloc (result, reslen + 1); + } + + if (fmt) + sprintf (result + next, fmt, repstr); + else + strcpy (result + next, repstr); + + next = strlen (result); + free (repstr); + + start = i; + if (string[i]) + start++; + } + + maybe_free (fmt); + } } strcpy (result + next, string + start); return (result); @@ -737,10 +1056,10 @@ static char *where_is_rep = (char *)NULL; static int where_is_rep_index = 0; static int where_is_rep_size = 0; -static char * -where_is (map, function) +char * +where_is (map, cmd) Keymap map; - VFunction *function; + InfoCommand *cmd; { char *rep; @@ -748,35 +1067,53 @@ where_is (map, function) where_is_rep = (char *)xmalloc (where_is_rep_size = 100); where_is_rep_index = 0; - rep = where_is_internal (map, function); + rep = where_is_internal (map, cmd); - /* If it couldn't be found, return "M-x Foo". */ + /* If it couldn't be found, return "M-x Foo" (or equivalent). */ if (!rep) { char *name; - name = function_name (function); + name = function_name (cmd); + if (!name) + return NULL; /* no such function */ + + rep = where_is_internal (map, InfoCmd(info_execute_command)); + if (!rep) + return ""; /* function exists but can't be got to by user */ - if (name) - sprintf (where_is_rep, "M-x %s", name); + sprintf (where_is_rep, "%s %s", rep, name); rep = where_is_rep; } return (rep); } -/* Return the printed rep of FUNCTION as found in MAP, or NULL. */ +/* Return the printed rep of the keystrokes that invoke FUNCTION, + as found in MAP, or NULL. */ static char * -where_is_internal (map, function) +where_is_internal (map, cmd) Keymap map; - VFunction *function; + InfoCommand *cmd; { +#if defined(INFOKEY) + + register FUNCTION_KEYSEQ *k; + + for (k = cmd->keys; k; k = k->next) + if (k->map == map) + return pretty_keyseq (k->keyseq); + + return NULL; + +#else /* !INFOKEY */ + register int i; /* If the function is directly invokable in MAP, return the representation of that keystroke. */ for (i = 0; i < 256; i++) - if ((map[i].type == ISFUNC) && map[i].function == function) + if ((map[i].type == ISFUNC) && map[i].function == cmd) { sprintf (where_is_rep + where_is_rep_index, "%s", pretty_keyname (i)); return (where_is_rep); @@ -794,7 +1131,7 @@ where_is_internal (map, function) pretty_keyname (i)); where_is_rep_index = strlen (where_is_rep); - rep = where_is_internal ((Keymap)map[i].function, function); + rep = where_is_internal ((Keymap)map[i].function, cmd); if (rep) return (where_is_rep); @@ -804,6 +1141,8 @@ where_is_internal (map, function) } return NULL; + +#endif /* INFOKEY */ } extern char *read_function_name (); @@ -823,23 +1162,23 @@ DECLARE_INFO_COMMAND (info_where_is, if (*command_name) { - VFunction *function; + InfoCommand *command; - function = named_function (command_name); + command = named_function (command_name); - if (function) + if (command) { char *location; - location = where_is (active_window->keymap, function); + location = where_is (active_window->keymap, command); - if (!location) + if (!location || !location[0]) { info_error (_("`%s' is not on any keys"), command_name); } else { - if (strncmp (location, "M-x ", 4) == 0) + if (strstr (location, function_name (command))) window_message_in_echo_area (_("%s can only be invoked via %s."), command_name, location); else diff --git a/contrib/texinfo/info/infokey.c b/contrib/texinfo/info/infokey.c new file mode 100644 index 0000000..e84a2d7 --- /dev/null +++ b/contrib/texinfo/info/infokey.c @@ -0,0 +1,908 @@ +/* infokey.c -- compile ~/.infokey to ~/.info. + $Id: infokey.c,v 1.5 2002/02/26 16:17:57 karl Exp $ + + Copyright (C) 1999, 2001, 02 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Written by Andrew Bettison <andrewb@zip.com.au>. */ + +#include "info.h" +#include "infomap.h" +#include "infokey.h" +#include "key.h" +#include "getopt.h" + +static char *program_name = "infokey"; + +/* Non-zero means print version info only. */ +static int print_version_p = 0; + +/* Non-zero means print a short description of the options. */ +static int print_help_p = 0; + +/* String specifying the source file. This is set by the user on the + command line, or a default is used. */ +static char *input_filename = (char *) NULL; + +/* String specifying the name of the file to output to. This is + set by the user on the command line, or a default is used. */ +static char *output_filename = (char *) NULL; + +/* Structure describing the options that Infokey accepts. We pass this + structure to getopt_long (). If you add or otherwise change this + structure, you must also change the string which follows it. */ +static struct option long_options[] = +{ + {"output", 1, 0, 'o'}, + {"help", 0, &print_help_p, 1}, + {"version", 0, &print_version_p, 1}, + {NULL, 0, NULL, 0} +}; + +/* String describing the shorthand versions of the long options found above. */ +static char *short_options = "o:"; + +/* Structure for holding the compiled sections. */ +enum sect_e + { + info = 0, + ea = 1, + var = 2, + }; +struct sect + { + unsigned int cur; + unsigned char data[INFOKEY_MAX_SECTIONLEN]; + }; + +/* Some "forward" declarations. */ +static char *mkpath (); +static int compile (), write_infokey_file (); +static void syntax_error (), error_message (), suggest_help (), short_help (); + + +/* **************************************************************** */ +/* */ +/* Main Entry Point to the Infokey Program */ +/* */ +/* **************************************************************** */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int getopt_long_index; /* Index returned by getopt_long (). */ + NODE *initial_node; /* First node loaded by Info. */ + +#ifdef HAVE_SETLOCALE + /* Set locale via LC_ALL. */ + setlocale (LC_ALL, ""); +#endif + + /* Set the text message domain. */ + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + while (1) + { + int option_character; + + option_character = getopt_long + (argc, argv, short_options, long_options, &getopt_long_index); + + /* getopt_long () returns EOF when there are no more long options. */ + if (option_character == EOF) + break; + + /* If this is a long option, then get the short version of it. */ + if (option_character == 0 && long_options[getopt_long_index].flag == 0) + option_character = long_options[getopt_long_index].val; + + /* Case on the option that we have received. */ + switch (option_character) + { + case 0: + break; + + /* User is specifying the name of a file to output to. */ + case 'o': + if (output_filename) + free (output_filename); + output_filename = xstrdup (optarg); + break; + + default: + suggest_help (); + xexit (1); + } + } + + /* If the user specified --version, then show the version and exit. */ + if (print_version_p) + { + printf ("%s (GNU %s) %s\n", program_name, PACKAGE, VERSION); + puts (""); + printf (_ ("Copyright (C) %s Free Software Foundation, Inc.\n\ +There is NO warranty. You may redistribute this software\n\ +under the terms of the GNU General Public License.\n\ +For more information about these matters, see the files named COPYING.\n"), + "1999"); + xexit (0); + } + + /* If the `--help' option was present, show the help and exit. */ + if (print_help_p) + { + short_help (); + xexit (0); + } + + /* If there is one argument remaining, it is the name of the input + file. */ + if (optind == argc - 1) + { + if (input_filename) + free (input_filename); + input_filename = xstrdup (argv[optind]); + } + else if (optind != argc) + { + error_message (0, _("incorrect number of arguments")); + suggest_help (); + xexit (1); + } + + /* Use default filenames where none given. */ + { + char *homedir; + + homedir = getenv ("HOME"); +#ifdef __MSDOS__ + if (!homedir) + homedir = "."; +#endif + if (!input_filename) + input_filename = mkpath (homedir, INFOKEY_SRCFILE); + if (!output_filename) + output_filename = mkpath (homedir, INFOKEY_FILE); + } + + { + FILE *inf; + FILE *outf; + int write_error; + static struct sect sections[3]; + + /* Open the input file. */ + inf = fopen (input_filename, "r"); + if (!inf) + { + error_message (errno, _("cannot open input file `%s'"), input_filename); + xexit (1); + } + + /* Compile the input file to its verious sections, then write the + section data to the output file. */ + + if (compile (inf, input_filename, sections)) + { + /* Open the output file. */ + outf = fopen (output_filename, FOPEN_WBIN); + if (!outf) + { + error_message (errno, _("cannot create output file `%s'"), output_filename); + xexit (1); + } + + /* Write the contents of the output file and close it. If there is + an error writing to the file, delete it and exit with a failure + status. */ + write_error = 0; + if (!write_infokey_file (outf, sections)) + { + error_message (errno, _("error writing to `%s'"), output_filename); + write_error = 1; + } + if (fclose (outf) == EOF) + { + error_message (errno, _("error closing output file `%s'"), output_filename); + write_error = 1; + } + if (write_error) + { + unlink (output_filename); + xexit (1); + } + } + + /* Close the input file. */ + fclose (inf); + } + + xexit (0); +} + +static char * +mkpath (dir, file) + const char *dir; + const char *file; +{ + char *p; + + p = xmalloc (strlen (dir) + 1 + strlen (file) + 2); + strcpy (p, dir); + strcat (p, "/"); + strcat (p, file); + return p; +} + + +/* Compilation - the real work. + + Source file syntax + ------------------ + The source file is a line-based text file with the following + structure: + + # comments + # more comments + + #info + u prev-line + d next-line + ^a invalid # just beep + \ku prev-line + #stop + \kd next-line + q quit # of course! + + #echo-area + ^a echo-area-beg-of-line + ^e echo-area-end-of-line + \kr echo-area-forward + \kl echo-area-backward + \kh echo-area-beg-of-line + \ke echo-area-end-of-line + + #var + scroll-step=1 + ISO-Latin=Off + + Lines starting with '#' are comments, and are ignored. Blank + lines are ignored. Each section is introduced by one of the + following lines: + + #info + #echo-area + #var + + The sections may occur in any order. Each section may be + omitted completely. If the 'info' section is the first in the + file, its '#info' line may be omitted. + + The 'info' and 'echo-area' sections + ----------------------------------- + Each line in the 'info' or 'echo-area' sections has the + following syntax: + + key-sequence SPACE action-name [ SPACE [ # comment ] ] \n + + Where SPACE is one or more white space characters excluding + newline, "action-name" is the name of a GNU Info command, + "comment" is any sequence of characters excluding newline, and + "key-sequence" is a concatenation of one or more key definitions + using the following syntax: + + 1. A carat ^ followed by one character indicates a single + control character; + + 2. A backslash \ followed by one, two, or three octal + digits indicates a single character having that ASCII + code; + + 3. \n indicates a single NEWLINE; + \e indicates a single ESC; + \r indicates a single CR; + \t indicates a single TAB; + \b indicates a single BACKSPACE; + + 4. \ku indicates the Up Arrow key; + \kd indicates the Down Arrow key; + \kl indicates the Left Arrow key; + \kr indicates the Right Arrow key; + \kP indicates the Page Up (PRIOR) key; + \kN indicates the Page Down (NEXT) key; + \kh indicates the Home key; + \ke indicates the End key; + \kx indicates the DEL key; + \k followed by any other character indicates a single + control-K, and the following character is interpreted + as in rules 1, 2, 3, 5 and 6. + + 5. \m followed by any sequence defined in rules 1, 2, 3, 4 + or 6 indicates the "Meta" modification of that key. + + 6. A backslash \ followed by any character not described + above indicates that character itself. In particular: + \\ indicates a single backslash \, + \ (backslash-space) indicates a single space, + \^ indicates a single caret ^, + + If the following line: + + #stop + + occurs anywhere in an 'info' or 'echo-area' section, that + indicates to GNU Info to suppress all of its default key + bindings in that context. + + The 'var' section + ----------------- + Each line in the 'var' section has the following syntax: + + variable-name = value \n + + Where "variable-name" is the name of a GNU Info variable and + "value" is the value that GNU Info will assign to that variable + when commencing execution. There must be no white space in the + variable name, nor between the variable name and the '='. All + characters immediately following the '=', up to but not + including the terminating newline, are considered to be the + value that will be assigned. In other words, white space + following the '=' is not ignored. + */ + +static int add_to_section (), lookup_action (); + +/* Compile the input file into its various sections. Return true if no + error was encountered. + */ +static int +compile (fp, filename, sections) + FILE *fp; + const char *filename; + struct sect sections[]; +{ + int error = 0; + char rescan = 0; + unsigned int lnum = 0; + int c; + + /* This parser is a true state machine, with no sneaky fetching + of input characters inside the main loop. In other words, all + state is fully represented by the following variables: + */ + enum + { + start_of_line, + start_of_comment, + in_line_comment, + in_trailing_comment, + get_keyseq, + got_keyseq, + get_action, + got_action, + get_varname, + got_varname, + get_equals, + got_equals, + get_value, + } + state = start_of_line; + enum sect_e section = info; + enum + { + normal, + slosh, + control, + octal, + special_key, + } + seqstate; /* used if state == get_keyseq */ + char meta = 0; + char ocnt; /* used if state == get_keyseq && seqstate == octal */ + + /* Data is accumulated in the following variables. The code + avoids overflowing these strings, and throws an error + where appropriate if a string limit is exceeded. These string + lengths are arbitrary (and should be large enough) and their + lengths are not hard-coded anywhere else, so increasing them + here will not break anything. */ + char oval; + char comment[10]; + unsigned int clen; + char seq[20]; + unsigned int slen; + char act[80]; + unsigned int alen; + char varn[80]; + unsigned int varlen; + char val[80]; + unsigned int vallen; + +#define To_seq(c) \ + do { \ + if (slen < sizeof seq) \ + seq[slen++] = meta ? Meta(c) : (c); \ + else \ + { \ + syntax_error(filename, lnum, _("key sequence too long")); \ + error = 1; \ + } \ + meta = 0; \ + } while (0) + + sections[info].cur = 1; + sections[info].data[0] = 0; + sections[ea].cur = 1; + sections[ea].data[0] = 0; + sections[var].cur = 0; + + while (!error && (rescan || (c = fgetc (fp)) != EOF)) + { + rescan = 0; + switch (state) + { + case start_of_line: + lnum++; + if (c == '#') + state = start_of_comment; + else if (c != '\n') + { + switch (section) + { + case info: + case ea: + state = get_keyseq; + seqstate = normal; + slen = 0; + break; + case var: + state = get_varname; + varlen = 0; + break; + } + rescan = 1; + } + break; + + case start_of_comment: + clen = 0; + state = in_line_comment; + /* fall through */ + case in_line_comment: + if (c == '\n') + { + state = start_of_line; + comment[clen] = '\0'; + if (strcmp (comment, "info") == 0) + section = info; + else if (strcmp (comment, "echo-area") == 0) + section = ea; + else if (strcmp (comment, "var") == 0) + section = var; + else if (strcmp (comment, "stop") == 0 + && (section == info || section == ea)) + sections[section].data[0] = 1; + } + else if (clen < sizeof comment - 1) + comment[clen++] = c; + break; + + case in_trailing_comment: + if (c == '\n') + state = start_of_line; + break; + + case get_keyseq: + switch (seqstate) + { + case normal: + if (c == '\n' || isspace (c)) + { + state = got_keyseq; + rescan = 1; + if (slen == 0) + { + syntax_error (filename, lnum, _("missing key sequence")); + error = 1; + } + } + else if (c == '\\') + seqstate = slosh; + else if (c == '^') + seqstate = control; + else + To_seq (c); + break; + + case slosh: + switch (c) + { + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + seqstate = octal; + oval = c - '0'; + ocnt = 1; + break; + case 'b': + To_seq ('\b'); + seqstate = normal; + break; + case 'e': + To_seq ('\033'); + seqstate = normal; + break; + case 'n': + To_seq ('\n'); + seqstate = normal; + break; + case 'r': + To_seq ('\r'); + seqstate = normal; + break; + case 't': + To_seq ('\t'); + seqstate = normal; + break; + case 'm': + meta = 1; + seqstate = normal; + break; + case 'k': + seqstate = special_key; + break; + default: + /* Backslash followed by any other char + just means that char. */ + To_seq (c); + seqstate = normal; + break; + } + break; + + case octal: + switch (c) + { + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + if (++ocnt <= 3) + oval = oval * 8 + c - '0'; + if (ocnt == 3) + seqstate = normal; + break; + default: + ocnt = 4; + seqstate = normal; + rescan = 1; + break; + } + if (seqstate != octal) + { + if (oval) + To_seq (oval); + else + { + syntax_error (filename, lnum, _("NUL character (\\000) not permitted")); + error = 1; + } + } + break; + + case special_key: + To_seq (SK_ESCAPE); + switch (c) + { + case 'u': To_seq (SK_UP_ARROW); break; + case 'd': To_seq (SK_DOWN_ARROW); break; + case 'r': To_seq (SK_RIGHT_ARROW); break; + case 'l': To_seq (SK_LEFT_ARROW); break; + case 'U': To_seq (SK_PAGE_UP); break; + case 'D': To_seq (SK_PAGE_DOWN); break; + case 'h': To_seq (SK_HOME); break; + case 'e': To_seq (SK_END); break; + case 'x': To_seq (SK_DELETE); break; + default: To_seq (SK_LITERAL); rescan = 1; break; + } + seqstate = normal; + break; + + case control: + if (CONTROL (c)) + To_seq (CONTROL (c)); + else + { + syntax_error (filename, lnum, _("NUL character (^%c) not permitted"), c); + error = 1; + } + seqstate = normal; + break; + } + break; + + case got_keyseq: + if (isspace (c) && c != '\n') + break; + state = get_action; + alen = 0; + /* fall through */ + case get_action: + if (c == '\n' || isspace (c)) + { + int a; + + state = got_action; + rescan = 1; + if (alen == 0) + { + syntax_error (filename, lnum, _("missing action name"), c); + error = 1; + } + else + { + act[alen] = '\0'; + a = lookup_action (act); + if (a != -1) + { + char av = a; + + if (!(add_to_section (§ions[section], seq, slen) + && add_to_section (§ions[section], "", 1) + && add_to_section (§ions[section], &av, 1))) + { + syntax_error (filename, lnum, _("section too long")); + error = 1; + } + } + else + { + syntax_error (filename, lnum, _("unknown action `%s'"), act); + error = 1; + } + } + } + else if (alen < sizeof act - 1) + act[alen++] = c; + else + { + syntax_error (filename, lnum, _("action name too long")); + error = 1; + } + break; + + case got_action: + if (c == '#') + state = in_trailing_comment; + else if (c == '\n') + state = start_of_line; + else if (!isspace (c)) + { + syntax_error (filename, lnum, _("extra characters following action `%s'"), act); + error = 1; + } + break; + + case get_varname: + if (c == '=') + { + if (varlen == 0) + { + syntax_error (filename, lnum, _("missing variable name")); + error = 1; + } + state = get_value; + vallen = 0; + } + else if (c == '\n' || isspace (c)) + { + syntax_error (filename, lnum, _("missing `=' immediately after variable name")); + error = 1; + } + else if (varlen < sizeof varn) + varn[varlen++] = c; + else + { + syntax_error (filename, lnum, _("variable name too long")); + error = 1; + } + break; + + case get_value: + if (c == '\n') + { + state = start_of_line; + if (!(add_to_section (§ions[section], varn, varlen) + && add_to_section (§ions[section], "", 1) + && add_to_section (§ions[section], val, vallen) + && add_to_section (§ions[section], "", 1))) + { + syntax_error (filename, lnum, _("section too long")); + error = 1; + } + } + else if (vallen < sizeof val) + val[vallen++] = c; + else + { + syntax_error (filename, lnum, _("value too long")); + error = 1; + } + break; + } + } + +#undef To_seq + + return !error; +} + +/* Add some characters to a section's data. Return true if all the + characters fit, or false if the section's size limit was exceeded. + */ +static int +add_to_section (s, str, len) + struct sect *s; + const char *str; + unsigned int len; +{ + if (s->cur + len > sizeof s->data) + return 0; + strncpy (s->data + s->cur, str, len); + s->cur += len; + return 1; +} + +/* Translate from an action name to its numeric code. This uses the + auto-generated array in key.c. + */ +static int +lookup_action (actname) + const char *actname; +{ + int i; + + if (strcmp ("invalid", actname) == 0) + return A_INVALID; + for (i = 0; function_key_array[i].name != NULL; i++) + if (strcmp (function_key_array[i].name, actname) == 0) + return function_key_array[i].code; + return -1; +} + +/* Put an integer to an infokey file. + Integers are stored as two bytes, low order first, + in radix INFOKEY_RADIX. + */ +static int +putint (i, fp) + int i; + FILE *fp; +{ + return fputc (i % INFOKEY_RADIX, fp) != EOF + && fputc ((i / INFOKEY_RADIX) % INFOKEY_RADIX, fp) != EOF; +} + +/* Write an entire section to an infokey file. If the section is + empty, simply omit it. + */ +static int +putsect (s, code, fp) + struct sect *s; + int code; + FILE *fp; +{ + if (s->cur == 0) + return 1; + return fputc (code, fp) != EOF + && putint (s->cur, fp) + && fwrite (s->data, s->cur, 1, fp) == 1; +} + +/* Write an entire infokey file, given an array containing its sections. + */ +static int +write_infokey_file (fp, sections) + FILE *fp; + struct sect sections[]; +{ + /* Get rid of sections with no effect. */ + if (sections[info].cur == 1 && sections[info].data[0] == 0) + sections[info].cur = 0; + if (sections[ea].cur == 1 && sections[ea].data[0] == 0) + sections[ea].cur = 0; + + /* Write all parts of the file out in order (no lseeks), + checking for errors all the way. */ + return fputc (INFOKEY_MAGIC_S0, fp) != EOF + && fputc (INFOKEY_MAGIC_S1, fp) != EOF + && fputc (INFOKEY_MAGIC_S2, fp) != EOF + && fputc (INFOKEY_MAGIC_S3, fp) != EOF + && fputs (VERSION, fp) != EOF + && fputc ('\0', fp) != EOF + && putsect (§ions[info], INFOKEY_SECTION_INFO, fp) + && putsect (§ions[ea], INFOKEY_SECTION_EA, fp) + && putsect (§ions[var], INFOKEY_SECTION_VAR, fp) + && fputc (INFOKEY_MAGIC_E0, fp) != EOF + && fputc (INFOKEY_MAGIC_E1, fp) != EOF + && fputc (INFOKEY_MAGIC_E2, fp) != EOF + && fputc (INFOKEY_MAGIC_E3, fp) != EOF; +} + + +/* Error handling. */ + +/* Give the user a "syntax error" message in the form + progname: "filename", line N: message + */ +static void +error_message (error_code, fmt, a1, a2, a3, a4) + int error_code; + const char *fmt; + const void *a1, *a2, *a3, *a4; +{ + fprintf (stderr, "%s: ", program_name); + fprintf (stderr, fmt, a1, a2, a3, a4); + if (error_code) + fprintf (stderr, " - %s", strerror (error_code)); + fprintf (stderr, "\n"); +} + +/* Give the user a generic error message in the form + progname: message + */ +static void +syntax_error (filename, linenum, fmt, a1, a2, a3, a4) + const char *filename; + unsigned int linenum; + const char *fmt; + const void *a1, *a2, *a3, *a4; +{ + fprintf (stderr, "%s: ", program_name); + fprintf (stderr, _("\"%s\", line %u: "), filename, linenum); + fprintf (stderr, fmt, a1, a2, a3, a4); + fprintf (stderr, "\n"); +} + +/* Produce a gentle rtfm. */ +static void +suggest_help () +{ + fprintf (stderr, _("Try --help for more information.\n")); +} + +/* Produce a scaled down description of the available options to Info. */ +static void +short_help () +{ + printf (_ ("\ +Usage: %s [OPTION]... [INPUT-FILE]\n\ +\n\ +Compile infokey source file to infokey file. Reads INPUT-FILE (default\n\ +$HOME/.infokey) and writes compiled key file to (by default) $HOME/.info.\n\ +\n\ +Options:\n\ + --output FILE output to FILE instead of $HOME/.info\n\ + --help display this help and exit.\n\ + --version display version information and exit.\n\ +\n\ +Email bug reports to bug-texinfo@gnu.org,\n\ +general questions and discussion to help-texinfo@gnu.org.\n\ +"), + program_name + ); + xexit (0); +} diff --git a/contrib/texinfo/info/infokey.h b/contrib/texinfo/info/infokey.h new file mode 100644 index 0000000..0babea9 --- /dev/null +++ b/contrib/texinfo/info/infokey.h @@ -0,0 +1,128 @@ +/* infokey.h -- Custom keystroke definition support. + $Id: $ + + Copyright (C) 1999 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Written by Andrew Bettison <andrewb@zip.com.au>. + + This design was derived from the "lesskey" system in less 3.4.0. by + Mark Nudelman. + + The following terminology is confusing: + source file = $HOME/.infokey + infokey file = $HOME/.info + Oh, well. + */ + + +/* Default source file, where user writes text definitions to be + compiled to the infokey file. MS-DOS doesn't allow leading + dots in file names. */ +#ifdef __MSDOS__ +#define INFOKEY_SRCFILE "_infokey" +#else +#define INFOKEY_SRCFILE ".infokey" +#endif + +/* Default "infokey file", where compiled user defs are kept and + read by Info. MS-DOS doesn't allow leading dots in file names. */ +#ifdef __MSDOS__ +#define INFOKEY_FILE "_info" +#else +#define INFOKEY_FILE ".info" +#endif + +/* +Format of entire infokey file: + + 4 bytes magic number S + X bytes version string + 1 byte '\0' terminator + + any number of sections: + 1 byte section id + 2 bytes section length (N) + N bytes section definitions: format depends on section + + 4 bytes magic number E + +Format of INFO and EA sections: + + 1 byte flag: 1 == suppress default key bindings + Repeat: + X bytes key sequence + 1 byte '\0' terminator + 1 byte action code (A_xxx) + +Format of VAR section: + + Repeat: + X bytes variable name + 1 byte '\0' terminator + Y bytes value + 1 byte '\0' terminator + +*/ + +#define INFOKEY_NMAGIC 8 + +#define INFOKEY_MAGIC_S0 '\001' +#define INFOKEY_MAGIC_S1 'I' +#define INFOKEY_MAGIC_S2 'n' +#define INFOKEY_MAGIC_S3 'f' + +#define INFOKEY_SECTION_INFO 'i' +#define INFOKEY_SECTION_EA 'e' +#define INFOKEY_SECTION_VAR 'v' + +#define INFOKEY_MAGIC_E0 'A' +#define INFOKEY_MAGIC_E1 'l' +#define INFOKEY_MAGIC_E2 'f' +#define INFOKEY_MAGIC_E3 'n' + +#define INFOKEY_RADIX 64 +#define INFOKEY_MAX_SECTIONLEN 500 +#define INFOKEY_MAX_DEFLEN 16 + +#define A_MAX_COMMAND 120 +#define A_INVALID 121 + +/* Character transformations (independent of info's own) */ + +#define CONTROL(c) ((c) & 0x1f) +#define ISCONTROL(c) (((c) & ~0x1f) == 0) +#define META(c) ((c) | 0x80) +#define UNMETA(c) ((c) & ~0x80) +#define ISMETA(c) (((c) & 0x80) != 0) + +/* Special keys (keys which output different strings on different terminals) */ + +#define SK_ESCAPE CONTROL('k') +#define SK_RIGHT_ARROW 1 +#define SK_LEFT_ARROW 2 +#define SK_UP_ARROW 3 +#define SK_DOWN_ARROW 4 +#define SK_PAGE_UP 5 +#define SK_PAGE_DOWN 6 +#define SK_HOME 7 +#define SK_END 8 +#define SK_DELETE 9 +#define SK_INSERT 10 +#define SK_CTL_LEFT_ARROW 11 +#define SK_CTL_RIGHT_ARROW 12 +#define SK_CTL_DELETE 13 +#define SK_LITERAL 40 diff --git a/contrib/texinfo/info/infomap.h b/contrib/texinfo/info/infomap.h index 65968cb..bf46399 100644 --- a/contrib/texinfo/info/infomap.h +++ b/contrib/texinfo/info/infomap.h @@ -1,9 +1,7 @@ -/* infomap.h -- Description of a keymap in Info and related functions. */ +/* infomap.h -- description of a keymap in Info and related functions. + $Id: infomap.h,v 1.6 2001/11/16 23:16:59 karl Exp $ -/* This file is part of GNU Info, a program for reading online documentation - stored in Info format. - - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 2001 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 @@ -52,9 +50,10 @@ FUNCTION is the address of a function to run, or the address of a keymap to indirect through. TYPE says which kind of thing FUNCTION is. */ -typedef struct { +typedef struct keymap_entry +{ char type; - VFunction *function; + InfoCommand *function; } KEYMAP_ENTRY; typedef KEYMAP_ENTRY *Keymap; diff --git a/contrib/texinfo/info/key.c b/contrib/texinfo/info/key.c new file mode 100644 index 0000000..06be6fa --- /dev/null +++ b/contrib/texinfo/info/key.c @@ -0,0 +1,146 @@ +/* key.c -- Generated array containing function names. + + This file was automatically made from various source files with the + command "./makedoc". DO NOT EDIT THIS FILE, only "./makedoc.c". + + Source files groveled to make this file include: + + ./session.c + ./echo-area.c + ./infodoc.c + ./m-x.c + ./indices.c + ./nodemenu.c + ./footnotes.c + ./variables.c + + An entry in the array FUNCTION_KEY_ARRAY is made for each command + found in the above files; each entry consists of + a string which is the user-visible name of the function. */ + +#include "key.h" +#include "funs.h" + +FUNCTION_KEY function_key_array[] = { + +/* Commands found in "./session.c". */ + { "next-line", A_info_next_line }, + { "prev-line", A_info_prev_line }, + { "end-of-line", A_info_end_of_line }, + { "beginning-of-line", A_info_beginning_of_line }, + { "forward-char", A_info_forward_char }, + { "backward-char", A_info_backward_char }, + { "forward-word", A_info_forward_word }, + { "backward-word", A_info_backward_word }, + { "global-next-node", A_info_global_next_node }, + { "global-prev-node", A_info_global_prev_node }, + { "scroll-forward", A_info_scroll_forward }, + { "scroll-forward-set-window", A_info_scroll_forward_set_window }, + { "scroll-forward-page-only", A_info_scroll_forward_page_only }, + { "scroll-forward-page-only-set-window", A_info_scroll_forward_page_only_set_window }, + { "scroll-backward", A_info_scroll_backward }, + { "scroll-backward-set-window", A_info_scroll_backward_set_window }, + { "scroll-backward-page-only", A_info_scroll_backward_page_only }, + { "scroll-backward-page-only-set-window", A_info_scroll_backward_page_only_set_window }, + { "beginning-of-node", A_info_beginning_of_node }, + { "end-of-node", A_info_end_of_node }, + { "down-line", A_info_down_line }, + { "up-line", A_info_up_line }, + { "scroll-half-screen-down", A_info_scroll_half_screen_down }, + { "scroll-half-screen-up", A_info_scroll_half_screen_up }, + { "next-window", A_info_next_window }, + { "prev-window", A_info_prev_window }, + { "split-window", A_info_split_window }, + { "delete-window", A_info_delete_window }, + { "keep-one-window", A_info_keep_one_window }, + { "scroll-other-window", A_info_scroll_other_window }, + { "scroll-other-window-backward", A_info_scroll_other_window_backward }, + { "grow-window", A_info_grow_window }, + { "tile-windows", A_info_tile_windows }, + { "toggle-wrap", A_info_toggle_wrap }, + { "next-node", A_info_next_node }, + { "prev-node", A_info_prev_node }, + { "up-node", A_info_up_node }, + { "last-node", A_info_last_node }, + { "first-node", A_info_first_node }, + { "last-menu-item", A_info_last_menu_item }, + { "menu-digit", A_info_menu_digit }, + { "menu-item", A_info_menu_item }, + { "xref-item", A_info_xref_item }, + { "find-menu", A_info_find_menu }, + { "visit-menu", A_info_visit_menu }, + { "goto-node", A_info_goto_node }, + { "menu-sequence", A_info_menu_sequence }, + { "goto-invocation-node", A_info_goto_invocation_node }, + { "man", A_info_man }, + { "top-node", A_info_top_node }, + { "dir-node", A_info_dir_node }, + { "history-node", A_info_history_node }, + { "kill-node", A_info_kill_node }, + { "view-file", A_info_view_file }, + { "print-node", A_info_print_node }, + { "search-case-sensitively", A_info_search_case_sensitively }, + { "search", A_info_search }, + { "search-backward", A_info_search_backward }, + { "search-next", A_info_search_next }, + { "search-previous", A_info_search_previous }, + { "isearch-forward", A_isearch_forward }, + { "isearch-backward", A_isearch_backward }, + { "move-to-prev-xref", A_info_move_to_prev_xref }, + { "move-to-next-xref", A_info_move_to_next_xref }, + { "select-reference-this-line", A_info_select_reference_this_line }, + { "abort-key", A_info_abort_key }, + { "move-to-window-line", A_info_move_to_window_line }, + { "redraw-display", A_info_redraw_display }, + { "quit", A_info_quit }, + { "do-lowercase-version", A_info_do_lowercase_version }, + { "add-digit-to-numeric-arg", A_info_add_digit_to_numeric_arg }, + { "universal-argument", A_info_universal_argument }, + { "numeric-arg-digit-loop", A_info_numeric_arg_digit_loop }, +/* Commands found in "./echo-area.c". */ + { "echo-area-forward", A_ea_forward }, + { "echo-area-backward", A_ea_backward }, + { "echo-area-beg-of-line", A_ea_beg_of_line }, + { "echo-area-end-of-line", A_ea_end_of_line }, + { "echo-area-forward-word", A_ea_forward_word }, + { "echo-area-backward-word", A_ea_backward_word }, + { "echo-area-delete", A_ea_delete }, + { "echo-area-rubout", A_ea_rubout }, + { "echo-area-abort", A_ea_abort }, + { "echo-area-newline", A_ea_newline }, + { "echo-area-quoted-insert", A_ea_quoted_insert }, + { "echo-area-insert", A_ea_insert }, + { "echo-area-tab-insert", A_ea_tab_insert }, + { "echo-area-transpose-chars", A_ea_transpose_chars }, + { "echo-area-yank", A_ea_yank }, + { "echo-area-yank-pop", A_ea_yank_pop }, + { "echo-area-kill-line", A_ea_kill_line }, + { "echo-area-backward-kill-line", A_ea_backward_kill_line }, + { "echo-area-kill-word", A_ea_kill_word }, + { "echo-area-backward-kill-word", A_ea_backward_kill_word }, + { "echo-area-possible-completions", A_ea_possible_completions }, + { "echo-area-complete", A_ea_complete }, + { "echo-area-scroll-completions-window", A_ea_scroll_completions_window }, +/* Commands found in "./infodoc.c". */ + { "get-help-window", A_info_get_help_window }, + { "get-info-help-node", A_info_get_info_help_node }, + { "describe-key", A_describe_key }, + { "where-is", A_info_where_is }, +/* Commands found in "./m-x.c". */ + { "describe-command", A_describe_command }, + { "execute-command", A_info_execute_command }, + { "set-screen-height", A_set_screen_height }, +/* Commands found in "./indices.c". */ + { "index-search", A_info_index_search }, + { "next-index-match", A_info_next_index_match }, + { "index-apropos", A_info_index_apropos }, +/* Commands found in "./nodemenu.c". */ + { "list-visited-nodes", A_list_visited_nodes }, + { "select-visited-node", A_select_visited_node }, +/* Commands found in "./footnotes.c". */ + { "show-footnotes", A_info_show_footnotes }, +/* Commands found in "./variables.c". */ + { "describe-variable", A_describe_variable }, + { "set-variable", A_set_variable }, + (char *)0 +}; diff --git a/contrib/texinfo/info/key.h b/contrib/texinfo/info/key.h new file mode 100644 index 0000000..35d2762 --- /dev/null +++ b/contrib/texinfo/info/key.h @@ -0,0 +1,35 @@ +/* key.h -- Structure associating function names with numeric codes. */ + +/* This file is part of GNU Info, a program for reading online documentation + stored in Info format. + + Copyright (C) 1993 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Written by Andrew Bettison <andrewb@zip.com.au> */ + +#if !defined (KEY_H) +#define KEY_H + +typedef struct { + char *name; + unsigned char code; +} + FUNCTION_KEY; + +extern FUNCTION_KEY function_key_array[]; + +#endif /* !KEY_H */ diff --git a/contrib/texinfo/info/m-x.c b/contrib/texinfo/info/m-x.c index 2fc5a60..5085235 100644 --- a/contrib/texinfo/info/m-x.c +++ b/contrib/texinfo/info/m-x.c @@ -1,7 +1,7 @@ /* m-x.c -- Meta-x minibuffer reader. - $Id: m-x.c,v 1.8 1999/06/25 21:57:40 karl Exp $ + $Id: m-x.c,v 1.9 2001/11/16 23:14:33 karl Exp $ - Copyright (C) 1993, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1993, 97, 98, 2001 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 @@ -20,6 +20,7 @@ Written by Brian Fox (bfox@ai.mit.edu). */ #include "info.h" +#include "funs.h" /* **************************************************************** */ /* */ @@ -81,13 +82,13 @@ DECLARE_INFO_COMMAND (describe_command, /* Describe the function named in "LINE". */ if (*line) { - VFunction *fun = named_function (line); + InfoCommand *cmd = named_function (line); - if (!fun) + if (!cmd) return; window_message_in_echo_area ("%s: %s.", - line, function_documentation (fun)); + line, function_documentation (cmd)); } free (line); } @@ -96,18 +97,24 @@ DECLARE_INFO_COMMAND (info_execute_command, _("Read a command name in the echo area and execute it")) { char *line; + char *keys; + char *prompt; - /* Ask the completer to read a reference for us. */ - if (info_explicit_arg || count != 1) - { - char *prompt; + prompt = (char *)xmalloc (20); - prompt = (char *)xmalloc (20); - sprintf (prompt, "%d M-x ", count); - line = read_function_name (prompt, window); - } + keys = where_is (info_keymap, InfoCmd(info_execute_command)); + /* If the where_is () function thinks that this command doesn't exist, + there's something very wrong! */ + if (!keys) + abort(); + + if (info_explicit_arg || count != 1) + sprintf (prompt, "%d %s ", count, keys); else - line = read_function_name ("M-x ", window); + sprintf (prompt, "%s ", keys); + + /* Ask the completer to read a reference for us. */ + line = read_function_name (prompt, window); /* User aborted? */ if (!line) @@ -125,7 +132,7 @@ DECLARE_INFO_COMMAND (info_execute_command, /* User wants to execute a named command. Do it. */ { - VFunction *function; + InfoCommand *command; if ((active_window != the_echo_area) && (strncmp (line, "echo-area-", 10) == 0)) @@ -135,13 +142,13 @@ DECLARE_INFO_COMMAND (info_execute_command, return; } - function = named_function (line); + command = named_function (line); free (line); - if (!function) + if (!command) return; - (*function) (active_window, count, 0); + (*InfoFunction(command)) (active_window, count, 0); } } diff --git a/contrib/texinfo/info/man.c b/contrib/texinfo/info/man.c index ee68cbb..1332cc5 100644 --- a/contrib/texinfo/info/man.c +++ b/contrib/texinfo/info/man.c @@ -1,7 +1,7 @@ /* man.c: How to read and format man files. - $Id: man.c,v 1.13 1999/07/05 20:43:23 karl Exp $ + $Id: man.c,v 1.16 2002/02/23 19:12:02 karl Exp $ - Copyright (C) 1995, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1995, 97, 98, 99, 2000 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 @@ -397,11 +397,36 @@ clean_manpage (manpage) newline_count--; } - if (manpage[i] == '\b' || manpage[i] == '\f') + /* A malformed man page could have a \b as its first character, + in which case decrementing j by 2 will cause us to write into + newpage[-1], smashing the hidden info stored there by malloc. */ + if (manpage[i] == '\b' || manpage[i] == '\f' && j > 0) j -= 2; + else if (!raw_escapes_p) + { + /* Remove the ANSI escape sequences for color, boldface, + underlining, and italics, generated by some versions of + Groff. */ + if (manpage[i] == '\033' && manpage[i + 1] == '[' + && isdigit (manpage[i + 2])) + { + if (isdigit (manpage[i + 3]) && manpage[i + 4] == 'm') + { + i += 4; + j--; + } + else if (manpage[i + 3] == 'm') + { + i += 3; + j--; + } + /* Else do nothing: it's some unknown escape sequence, + so let's leave it alone. */ + } + } } - newpage[j++] = '\0'; + newpage[j++] = 0; strcpy (manpage, newpage); free (newpage); diff --git a/contrib/texinfo/info/nodes.c b/contrib/texinfo/info/nodes.c index 0aaee52..7f0bf0f 100644 --- a/contrib/texinfo/info/nodes.c +++ b/contrib/texinfo/info/nodes.c @@ -1,7 +1,7 @@ /* nodes.c -- how to get an Info file and node. - $Id: nodes.c,v 1.14 1999/08/15 10:18:09 karl Exp $ + $Id: nodes.c,v 1.15 2000/11/11 00:40:37 karl Exp $ - Copyright (C) 1993, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1993, 98, 99, 2000 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 @@ -222,11 +222,12 @@ info_find_file_internal (filename, get_tags) if (info_loaded_files) { for (i = 0; (file_buffer = info_loaded_files[i]); i++) - if ((FILENAME_CMP (filename, file_buffer->filename) == 0) || - (FILENAME_CMP (filename, file_buffer->fullpath) == 0) || - (!IS_ABSOLUTE (filename) && - FILENAME_CMP (filename, - filename_non_directory (file_buffer->fullpath)) == 0)) + if ((FILENAME_CMP (filename, file_buffer->filename) == 0) + || (FILENAME_CMP (filename, file_buffer->fullpath) == 0) + || (!IS_ABSOLUTE (filename) + && FILENAME_CMP (filename, + filename_non_directory (file_buffer->fullpath)) + == 0)) { struct stat new_info, *old_info; @@ -241,9 +242,8 @@ info_find_file_internal (filename, get_tags) return file_buffer; #endif /* HANDLE_MAN_PAGES */ - /* The file appears to be already loaded, and it is not "dir". - Check to see if it has changed since the last time it was - loaded. */ + /* The file appears to be already loaded, and is not "dir". Check + to see if it's changed since the last time it was loaded. */ if (stat (file_buffer->fullpath, &new_info) == -1) { filesys_error_number = errno; @@ -252,8 +252,8 @@ info_find_file_internal (filename, get_tags) old_info = &file_buffer->finfo; - if ((new_info.st_size != old_info->st_size) || - (new_info.st_mtime != old_info->st_mtime)) + if (new_info.st_size != old_info->st_size + || new_info.st_mtime != old_info->st_mtime) { /* The file has changed. Forget that we ever had loaded it in the first place. */ @@ -267,13 +267,13 @@ info_find_file_internal (filename, get_tags) for this file, and there isn't one here, build the nodes for this file_buffer. In any case, return the file_buffer object. */ - if (!file_buffer->contents) - { - /* The file's contents have been gc'ed. Reload it. */ - info_reload_file_buffer_contents (file_buffer); - if (!file_buffer->contents) - return NULL; - } + if (!file_buffer->contents) + { + /* The file's contents have been gc'ed. Reload it. */ + info_reload_file_buffer_contents (file_buffer); + if (!file_buffer->contents) + return NULL; + } if (get_tags && !file_buffer->tags) build_tags_and_nodes (file_buffer); @@ -770,20 +770,20 @@ get_tags_of_indirect_tags_table (file_buffer, indirect_binding, tags_binding) /* Build the file buffer's list of subfiles. */ { char *containing_dir = xstrdup (file_buffer->fullpath); - char *temp = filename_non_directory (containing_dir); + char *temp = filename_non_directory (containing_dir); int len_containing_dir; - if (temp > containing_dir) - { - if (HAVE_DRIVE (file_buffer->fullpath) && - temp == containing_dir + 2) - { - /* Avoid converting "d:foo" into "d:/foo" below. */ - *temp = '.'; - temp += 2; - } - temp[-1] = 0; - } + if (temp > containing_dir) + { + if (HAVE_DRIVE (file_buffer->fullpath) && + temp == containing_dir + 2) + { + /* Avoid converting "d:foo" into "d:/foo" below. */ + *temp = '.'; + temp += 2; + } + temp[-1] = 0; + } len_containing_dir = strlen (containing_dir); @@ -940,20 +940,22 @@ info_node_of_file_buffer_tags (file_buffer, nodename) TAG *tag; int i; + /* If no tags at all (possibly a misformatted info file), quit. */ + if (!file_buffer->tags) { + return NULL; + } + for (i = 0; (tag = file_buffer->tags[i]); i++) if (strcmp (nodename, tag->nodename) == 0) { - FILE_BUFFER *subfile; - - subfile = info_find_file_internal (tag->filename, INFO_NO_TAGS); - + FILE_BUFFER *subfile = info_find_file_internal (tag->filename, + INFO_NO_TAGS); if (!subfile) return NULL; if (!subfile->contents) { info_reload_file_buffer_contents (subfile); - if (!subfile->contents) return NULL; } @@ -1187,7 +1189,7 @@ info_reload_file_buffer_contents (fb) /* Let the filesystem do all the work for us. */ fb->contents = filesys_read_info_file (fb->fullpath, &(fb->filesize), &(fb->finfo), - &is_compressed); + &is_compressed); if (is_compressed) fb->flags |= N_IsCompressed; } diff --git a/contrib/texinfo/info/session.h b/contrib/texinfo/info/session.h index 07ffd5f..99892fc 100644 --- a/contrib/texinfo/info/session.h +++ b/contrib/texinfo/info/session.h @@ -1,7 +1,7 @@ /* session.h -- Functions found in session.c. - $Id: session.h,v 1.9 1999/06/25 21:57:40 karl Exp $ + $Id: session.h,v 1.10 2001/11/16 23:17:15 karl Exp $ - Copyright (C) 1993, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1993, 98, 99, 2001 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 @@ -65,7 +65,6 @@ extern unsigned char info_get_input_char (), info_get_another_input_char (); extern unsigned char info_input_pending_p (); extern void remember_window_and_node (), set_remembered_pagetop_and_point (); extern void set_window_pagetop (), info_set_node_of_window (); -extern char *pretty_keyseq (); extern void initialize_keyseq (), add_char_to_keyseq (); extern void info_gather_typeahead (); extern FILE_BUFFER *file_buffer_of_window (); diff --git a/contrib/texinfo/info/termdep.h b/contrib/texinfo/info/termdep.h index 5f4b41a..0ab6c44 100644 --- a/contrib/texinfo/info/termdep.h +++ b/contrib/texinfo/info/termdep.h @@ -1,7 +1,7 @@ /* termdep.h -- System things that terminal.c depends on. - $Id: termdep.h,v 1.4 1998/04/13 22:02:57 karl Exp $ + $Id: termdep.h,v 1.5 2001/09/12 17:26:03 karl Exp $ - Copyright (C) 1993, 96, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1993, 96, 97, 98, 2001 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 @@ -30,9 +30,6 @@ #ifdef HAVE_TERMIOS_H # include <termios.h> -# ifdef GWINSZ_IN_SYS_IOCTL -# include <sys/ioctl.h> -# endif #else # if defined (HAVE_TERMIO_H) # include <termio.h> @@ -50,6 +47,10 @@ # endif /* !HAVE_TERMIO_H */ #endif /* !HAVE_TERMIOS_H */ +#ifdef GWINSZ_IN_SYS_IOCTL +# include <sys/ioctl.h> +#endif + #ifdef HAVE_SYS_TTOLD_H # include <sys/ttold.h> #endif /* HAVE_SYS_TTOLD_H */ diff --git a/contrib/texinfo/info/terminal.h b/contrib/texinfo/info/terminal.h index 2e27268..361fa4c 100644 --- a/contrib/texinfo/info/terminal.h +++ b/contrib/texinfo/info/terminal.h @@ -1,9 +1,7 @@ -/* terminal.h -- The external interface to terminal I/O. */ +/* terminal.h -- The external interface to terminal I/O. + $Id: terminal.h,v 1.7 2001/11/16 23:17:29 karl Exp $ -/* This file is part of GNU Info, a program for reading online documentation - stored in Info format. - - Copyright (C) 1993, 96, 97 Free Software Foundation, Inc. + Copyright (C) 1993, 96, 97, 2001 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 @@ -118,8 +116,11 @@ extern VFunction *terminal_scroll_terminal_hook; extern void terminal_ring_bell (); extern VFunction *terminal_ring_bell_hook; -/* The key sequences output by the arrow keys, if this terminal has any. */ +/* The key sequences output by special keys, if this terminal has any. */ extern char *term_ku, *term_kd, *term_kr, *term_kl; extern char *term_kP, *term_kN; +extern char *term_ke, *term_kh; +extern char *term_kx, *term_ki; +extern char *term_kD; #endif /* !TERMINAL_H */ diff --git a/contrib/texinfo/info/variables.c b/contrib/texinfo/info/variables.c index 9412797..581d2bb 100644 --- a/contrib/texinfo/info/variables.c +++ b/contrib/texinfo/info/variables.c @@ -1,10 +1,7 @@ /* variables.c -- How to manipulate user visible variables in Info. - $Id: variables.c,v 1.7 1999/06/25 21:57:40 karl Exp $ + $Id: variables.c,v 1.8 2001/11/16 23:16:19 karl Exp $ - This file is part of GNU Info, a program for reading online documentation - stored in Info format. - - Copyright (C) 1993, 97 Free Software Foundation, Inc. + Copyright (C) 1993, 97, 2001 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 @@ -273,3 +270,40 @@ make_variable_completions_array () return (array); } + +#if defined(INFOKEY) + +void +set_variable_to_value(name, value) + char *name; + char *value; +{ + register int i; + + /* Find the variable in our list of variables. */ + for (i = 0; info_variables[i].name; i++) + if (strcmp(info_variables[i].name, name) == 0) + break; + + if (!info_variables[i].name) + return; + + if (info_variables[i].choices) + { + register int j; + + /* Find the choice in our list of choices. */ + for (j = 0; info_variables[i].choices[j]; j++) + if (strcmp (info_variables[i].choices[j], value) == 0) + break; + + if (info_variables[i].choices[j]) + *info_variables[i].value = j; + } + else + { + *info_variables[i].value = atoi(value); + } +} + +#endif /* INFOKEY */ diff --git a/contrib/texinfo/info/window.c b/contrib/texinfo/info/window.c index 1b6d062..faa0784 100644 --- a/contrib/texinfo/info/window.c +++ b/contrib/texinfo/info/window.c @@ -1,7 +1,7 @@ /* window.c -- windows in Info. - $Id: window.c,v 1.11 1999/06/25 21:57:40 karl Exp $ + $Id: window.c,v 1.15 2002/01/19 01:08:20 karl Exp $ - Copyright (C) 1993, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1993, 97, 98, 2001, 02 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 @@ -826,7 +826,10 @@ calculate_line_starts (window) while (1) { - c = node->contents[i]; + /* The cast to unsigned char is for 8-bit characters, which + could be passed as negative integers to character_width + and wreak havoc on some naive implementations of iscntrl. */ + c = (unsigned char) node->contents[i]; cwidth = character_width (c, hpos); /* If this character fits within this line, just do the next one. */ @@ -1298,16 +1301,17 @@ message_buffer_resize (length) /* Format MESSAGE_BUFFER with the results of printing FORMAT with ARG1 and ARG2. */ static void -build_message_buffer (format, arg1, arg2) +build_message_buffer (format, arg1, arg2, arg3) char *format; - void *arg1, *arg2; + void *arg1, *arg2, *arg3; { register int i, len; - void *args[2]; + void *args[3]; int arg_index = 0; args[0] = arg1; args[1] = arg2; + args[2] = arg3; len = strlen (format); @@ -1326,7 +1330,9 @@ build_message_buffer (format, arg1, arg2) char *fmt_start = format + i; char *fmt; int fmt_len, formatted_len; + int paramed = 0; + format_again: i++; while (format[i] && strchr ("-. +0123456789", format[i])) i++; @@ -1335,18 +1341,39 @@ build_message_buffer (format, arg1, arg2) if (c == '\0') abort (); + if (c == '$') { + /* position parameter parameter */ + /* better to use bprintf from bfox's metahtml? */ + arg_index = atoi(fmt_start + 1) - 1; + if (arg_index < 0) + arg_index = 0; + if (arg_index >= 2) + arg_index = 1; + paramed = 1; + goto format_again; + } + fmt_len = format + i - fmt_start + 1; fmt = (char *) xmalloc (fmt_len + 1); strncpy (fmt, fmt_start, fmt_len); fmt[fmt_len] = '\0'; + if (paramed) { + /* removed positioned parameter */ + char *p; + for (p = fmt + 1; *p && *p != '$'; p++) { + ; + } + strcpy(fmt + 1, p + 1); + } + /* If we have "%-98s", maybe 98 calls for a longer string. */ if (fmt_len > 2) { int j; - for (j = 0; j < fmt_len; j++) - if (isdigit (fmt[j])) + for (j = fmt_len - 2; j >= 0; j--) + if (isdigit (fmt[j]) || fmt[j] == '$') break; formatted_len = atoi (fmt + j); @@ -1430,7 +1457,7 @@ build_message_node (format, arg1, arg2) NODE *node; message_buffer_index = 0; - build_message_buffer (format, arg1, arg2); + build_message_buffer (format, arg1, arg2, 0); node = message_buffer_to_node (); return (node); @@ -1467,11 +1494,11 @@ initialize_message_buffer () /* Print FORMAT with ARG1,2 to the end of the current message buffer. */ void -printf_to_message_buffer (format, arg1, arg2) +printf_to_message_buffer (format, arg1, arg2, arg3) char *format; - void *arg1, *arg2; + void *arg1, *arg2, *arg3; { - build_message_buffer (format, arg1, arg2); + build_message_buffer (format, arg1, arg2, arg3); } /* Return the current horizontal position of the "cursor" on the most diff --git a/contrib/texinfo/lib/getopt.c b/contrib/texinfo/lib/getopt.c index 03effcb..d176d3e 100644 --- a/contrib/texinfo/lib/getopt.c +++ b/contrib/texinfo/lib/getopt.c @@ -1,14 +1,10 @@ /* Getopt for GNU. - NOTE: getopt is now part of the C library, so if you don't know what - "Keep this file name-space clean" means, talk to drepper@gnu.org - before changing it! + NOTE: The canonical source of this file is maintained with the GNU + C Library. Bugs can be reported to bug-glibc@gnu.org. - Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 + Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc. - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@gnu.org. - 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 the Free Software Foundation; either version 2, or (at your option) any @@ -20,9 +16,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. Ditto for AIX 3.2 and <stdlib.h>. */ @@ -32,13 +27,13 @@ #ifdef HAVE_CONFIG_H # include <config.h> -#endif - -#if !defined __STDC__ || !__STDC__ +#else +# if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ -# ifndef const -# define const +# ifndef const +# define const +# endif # endif #endif @@ -112,7 +107,7 @@ Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ -char *optarg = NULL; +char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -133,7 +128,7 @@ int optind = 1; causes problems with re-calling getopt as programs generally don't know that. */ -int __getopt_initialized = 0; +int __getopt_initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. @@ -698,16 +693,18 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) else { if (opterr) - if (argv[optind - 1][1] == '-') - /* --option */ - fprintf (stderr, - _("%s: option `--%s' doesn't allow an argument\n"), - argv[0], pfound->name); - else - /* +option or -option */ - fprintf (stderr, - _("%s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[optind - 1][0], pfound->name); + { + if (argv[optind - 1][1] == '-') + /* --option */ + fprintf (stderr, + _("%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); + else + /* +option or -option */ + fprintf (stderr, + _("%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], pfound->name); + } nextchar += strlen (nextchar); diff --git a/contrib/texinfo/lib/getopt.h b/contrib/texinfo/lib/getopt.h index fb30719..ac6728f 100644 --- a/contrib/texinfo/lib/getopt.h +++ b/contrib/texinfo/lib/getopt.h @@ -1,9 +1,7 @@ /* Declarations for getopt. - Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. - + Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. - 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 the Free Software Foundation; either version 2, or (at your option) any @@ -20,7 +18,10 @@ USA. */ #ifndef _GETOPT_H -#define _GETOPT_H 1 + +#ifndef __need_getopt +# define _GETOPT_H 1 +#endif #ifdef __cplusplus extern "C" { @@ -57,6 +58,7 @@ extern int opterr; extern int optopt; +#ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is @@ -80,11 +82,11 @@ extern int optopt; struct option { -#if defined (__STDC__) && __STDC__ +# if defined __STDC__ && __STDC__ const char *name; -#else +# else char *name; -#endif +# endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; @@ -94,40 +96,74 @@ struct option /* Names for the values of the `has_arg' field of `struct option'. */ -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. -#if defined (__STDC__) && __STDC__ -#ifdef __GNU_LIBRARY__ + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, `optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in `optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU `getopt'. + + The argument `--' causes premature termination of argument + scanning, explicitly telling `getopt' that there are no more + options. + + If OPTS begins with `--', then non-option arguments are treated as + arguments to the option '\0'. This behavior is specific to the GNU + `getopt'. */ + +#if defined __STDC__ && __STDC__ +# ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ -extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ +extern int getopt (int __argc, char *const *__argv, const char *__shortopts); +# else /* not __GNU_LIBRARY__ */ extern int getopt (); -#endif /* __GNU_LIBRARY__ */ -extern int getopt_long (int argc, char *const *argv, const char *shortopts, - const struct option *longopts, int *longind); -extern int getopt_long_only (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind); +# endif /* __GNU_LIBRARY__ */ + +# ifndef __need_getopt +extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, + const struct option *__longopts, int *__longind); +extern int getopt_long_only (int __argc, char *const *__argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind, - int long_only); +extern int _getopt_internal (int __argc, char *const *__argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only); +# endif #else /* not __STDC__ */ extern int getopt (); +# ifndef __need_getopt extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); +# endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + #endif /* getopt.h */ diff --git a/contrib/texinfo/lib/getopt1.c b/contrib/texinfo/lib/getopt1.c index ff25737..9c82565 100644 --- a/contrib/texinfo/lib/getopt1.c +++ b/contrib/texinfo/lib/getopt1.c @@ -1,7 +1,6 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. - NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. @@ -16,16 +15,12 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include <config.h> -#endif - -#include "getopt.h" - +#else #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ @@ -33,6 +28,9 @@ #define const #endif #endif +#endif + +#include "getopt.h" #include <stdio.h> diff --git a/contrib/texinfo/lib/gettext.h b/contrib/texinfo/lib/gettext.h new file mode 100644 index 0000000..4ab74d9 --- /dev/null +++ b/contrib/texinfo/lib/gettext.h @@ -0,0 +1,74 @@ +/* Convenience header for conditional use of GNU <libintl.h>. + Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _LIBGETTEXT_H +#define _LIBGETTEXT_H 1 + +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS + +/* Get declarations of GNU message catalog functions. */ +# include <libintl.h> + +#else + +/* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ +#if 0 +/* no thanks, not ready to go const --karl, 26feb02 */ +# define gettext(Msgid) ((const char *) (Msgid)) +# define dgettext(Domainname, Msgid) ((const char *) (Msgid)) +# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define textdomain(Domainname) ((const char *) (Domainname)) +# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) +# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) +#else /* not 0 */ +# define gettext(Msgid) ((Msgid)) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 ? (Msgid1) : (Msgid2)) +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((N) == 1 ? (Msgid1) : (Msgid2)) +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((N) == 1 ? (Msgid1) : (Msgid2)) +# define textdomain(Domainname) (Domainname) +# define bindtextdomain(Domainname, Dirname) (Dirname) +# define bind_textdomain_codeset(Domainname, Codeset) (Codeset) +#endif /* 0 */ +#endif + +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + +#endif /* _LIBGETTEXT_H */ diff --git a/contrib/texinfo/lib/system.h b/contrib/texinfo/lib/system.h index 4ca1837..a816553 100644 --- a/contrib/texinfo/lib/system.h +++ b/contrib/texinfo/lib/system.h @@ -1,7 +1,7 @@ /* system.h: system-dependent declarations; include this first. - $Id: system.h,v 1.14 1999/07/17 21:11:34 karl Exp $ + $Id: system.h,v 1.22 2002/02/26 14:31:18 karl Exp $ - Copyright (C) 1997, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1997, 98, 99, 00, 01, 02 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 @@ -34,6 +34,7 @@ #include <sys/types.h> #include <ctype.h> +/* All systems nowadays probably have these functions, but ... */ #ifdef HAVE_LOCALE_H #include <locale.h> #endif @@ -42,10 +43,14 @@ #endif /* For gettext (NLS). */ -#include <libintl.h> +#include "gettext.h" #define _(String) gettext (String) #define N_(String) (String) +#ifndef HAVE_LC_MESSAGES +#define LC_MESSAGES (-1) +#endif + #ifdef STDC_HEADERS #define getopt system_getopt #include <stdlib.h> @@ -78,6 +83,16 @@ extern int errno; extern char *strerror (); #endif +#ifdef HAVE_LIMITS_H +#include <limits.h> +#endif +#ifndef PATH_MAX +#ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 255 +#endif +#define PATH_MAX _POSIX_PATH_MAX +#endif + #ifndef HAVE_DECL_STRCASECMP extern int strcasecmp (); #endif @@ -123,7 +138,6 @@ extern int strcoll (); - directories in environment variables (like INFOPATH) are separated by `;' rather than `:'; - text files can have their lines ended either with \n or with \r\n pairs; - These are all parameterized here except the last, which is handled by the source code as appropriate (mostly, in info/). */ #ifndef O_BINARY @@ -134,13 +148,35 @@ extern int strcoll (); # endif #endif /* O_BINARY */ +/* We'd like to take advantage of _doprnt if it's around, a la error.c, + but then we'd have no VA_SPRINTF. */ +#if HAVE_VPRINTF +# if __STDC__ +# include <stdarg.h> +# define VA_START(args, lastarg) va_start(args, lastarg) +# else +# include <varargs.h> +# define VA_START(args, lastarg) va_start(args) +# endif +# define VA_FPRINTF(file, fmt, ap) vfprintf (file, fmt, ap) +# define VA_SPRINTF(str, fmt, ap) vsprintf (str, fmt, ap) +#else /* not HAVE_VPRINTF */ +# define VA_START(args, lastarg) +# define va_alist a1, a2, a3, a4, a5, a6, a7, a8 +# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8; +# define va_end(args) +#endif + #if O_BINARY -# include <io.h> +# ifdef HAVE_IO_H +# include <io.h> +# endif # ifdef __MSDOS__ # include <limits.h> # ifdef __DJGPP__ # define HAVE_LONG_FILENAMES(dir) (pathconf (dir, _PC_NAME_MAX) > 12) # define NULL_DEVICE "/dev/null" +# define DEFAULT_INFOPATH "c:/djgpp/info;/usr/local/info;/usr/info;." # else /* !__DJGPP__ */ # define HAVE_LONG_FILENAMES(dir) (0) # define NULL_DEVICE "NUL" @@ -185,6 +221,15 @@ extern int strcoll (); # define PIPE_USE_FORK 1 #endif /* not O_BINARY */ +/* DJGPP supports /dev/null, which is okay for Unix aficionados, + shell scripts and Makefiles, but interactive DOS die-hards + would probably want to have NUL as well. */ +#ifdef __DJGPP__ +# define ALSO_NULL_DEVICE "NUL" +#else +# define ALSO_NULL_DEVICE "" +#endif + #ifdef HAVE_PWD_H #include <pwd.h> #endif diff --git a/contrib/texinfo/lib/xstrdup.c b/contrib/texinfo/lib/xstrdup.c index d5bcaf3..38674ca 100644 --- a/contrib/texinfo/lib/xstrdup.c +++ b/contrib/texinfo/lib/xstrdup.c @@ -1,5 +1,5 @@ /* xstrdup.c -- copy a string with out of memory checking - Copyright (C) 1990, 1996 Free Software Foundation, Inc. + Copyright (C) 1990, 1996, 1998 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 @@ -19,24 +19,28 @@ # include <config.h> #endif -#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) +#ifndef PARAMS +# if defined PROTOTYPES || (defined __STDC__ && __STDC__) +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +#endif + +#if STDC_HEADERS || HAVE_STRING_H # include <string.h> #else # include <strings.h> #endif -#if defined (__STDC__) && __STDC__ -char *xmalloc (size_t); -char *xstrdup (char *string); -#else -char *xmalloc (); -#endif +#include <sys/types.h> + +char *xmalloc PARAMS ((size_t n)); /* Return a newly allocated copy of STRING. */ char * -xstrdup (string) - char *string; +xstrdup (const char *string) { return strcpy (xmalloc (strlen (string) + 1), string); } diff --git a/contrib/texinfo/makeinfo/README b/contrib/texinfo/makeinfo/README index a6f97eb..1b45f02 100644 --- a/contrib/texinfo/makeinfo/README +++ b/contrib/texinfo/makeinfo/README @@ -2,7 +2,7 @@ makeinfo is a standalone program to convert Texinfo source into Info files readable with standalone info or M-x info in Emacs. makeinfo can also output plain ASCII (with --no-headers) -or HTML (with --html). +or HTML (with --html) or XML (with --xml). The Emacs function M-x texinfo-format-buffer does more or less the same job, but makeinfo is faster and gives better error messages. diff --git a/contrib/texinfo/makeinfo/cmds.c b/contrib/texinfo/makeinfo/cmds.c index 65d382e..968bc8f 100644 --- a/contrib/texinfo/makeinfo/cmds.c +++ b/contrib/texinfo/makeinfo/cmds.c @@ -1,7 +1,7 @@ /* cmds.c -- Texinfo commands. - $Id: cmds.c,v 1.57 1999/09/19 16:39:35 karl Exp $ + $Id: cmds.c,v 1.69 2002/02/09 00:54:51 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2000, 01 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 @@ -29,6 +29,7 @@ #include "node.h" #include "sectioning.h" #include "toc.h" +#include "xml.h" #ifdef TM_IN_SYS_TIME #include <sys/time.h> @@ -45,7 +46,8 @@ void cm_direntry (), cm_dmn (), cm_dots (), cm_emph (), cm_enddots (), cm_i (), cm_image (), cm_kbd (), cm_key (), cm_no_op (), cm_novalidate (), cm_not_fixed_width (), cm_r (), - cm_strong (), cm_var (), cm_sc (), cm_w (), cm_email (), cm_url (); + cm_strong (), cm_var (), cm_sc (), cm_w (), cm_email (), cm_url (), + cm_verb (), cm_documentdescription (); void cm_anchor (), cm_node (), cm_menu (), cm_xref (), cm_ftable (), @@ -61,7 +63,8 @@ void cm_defcodeindex (), cm_result (), cm_expansion (), cm_equiv (), cm_print (), cm_error (), cm_point (), cm_today (), cm_flushleft (), cm_flushright (), cm_finalout (), cm_cartouche (), cm_detailmenu (), - cm_multitable (), cm_settitle (), cm_titlefont (), cm_tt (); + cm_multitable (), cm_settitle (), cm_titlefont (), cm_tt (), + cm_verbatim (), cm_verbatiminclude (), cm_titlepage (); /* Conditionals. */ void cm_set (), cm_clear (), cm_ifset (), cm_ifclear (); @@ -80,7 +83,7 @@ static const char small_tag[] = "small"; COMMAND command_table[] = { { "\t", insert_space, NO_BRACE_ARGS }, { "\n", insert_space, NO_BRACE_ARGS }, - { " ", insert_self, NO_BRACE_ARGS }, + { " ", insert_space, NO_BRACE_ARGS }, { "!", insert_self, NO_BRACE_ARGS }, { "\"", cm_accent_umlaut, MAYBE_BRACE_ARGS }, { "'", cm_accent_acute, MAYBE_BRACE_ARGS }, @@ -108,7 +111,10 @@ COMMAND command_table[] = { { "aa", cm_special_char, BRACE_ARGS }, { "acronym", cm_acronym, BRACE_ARGS }, { "ae", cm_special_char, BRACE_ARGS }, + { "afivepaper", cm_ignore_line, NO_BRACE_ARGS }, + { "afourlatex", cm_ignore_line, NO_BRACE_ARGS }, { "afourpaper", cm_ignore_line, NO_BRACE_ARGS }, + { "afourwide", cm_ignore_line, NO_BRACE_ARGS }, { "alias", cm_alias, NO_BRACE_ARGS }, { "anchor", cm_anchor, BRACE_ARGS }, { "appendix", cm_appendix, NO_BRACE_ARGS }, @@ -182,6 +188,7 @@ COMMAND command_table[] = { { "direntry", cm_direntry, NO_BRACE_ARGS }, { "display", cm_display, NO_BRACE_ARGS }, { "dmn", cm_no_op, BRACE_ARGS }, + { "documentdescription", cm_documentdescription, NO_BRACE_ARGS }, { "documentencoding", cm_documentencoding, NO_BRACE_ARGS }, { "documentlanguage", cm_documentlanguage, NO_BRACE_ARGS }, { "dotaccent", cm_accent, MAYBE_BRACE_ARGS }, @@ -294,7 +301,7 @@ COMMAND command_table[] = { { "subsection", cm_subsection, NO_BRACE_ARGS }, { "subsubheading", cm_subsubheading, NO_BRACE_ARGS }, { "subsubsection", cm_subsubsection, NO_BRACE_ARGS }, - { "summarycontents", cm_no_op, NO_BRACE_ARGS }, + { "summarycontents", cm_shortcontents, NO_BRACE_ARGS }, { "syncodeindex", cm_synindex, NO_BRACE_ARGS }, { "synindex", cm_synindex, NO_BRACE_ARGS }, { "t", cm_tt, BRACE_ARGS }, @@ -320,6 +327,9 @@ COMMAND command_table[] = { { "v", cm_accent, MAYBE_BRACE_ARGS }, { "value", cm_value, BRACE_ARGS }, { "var", cm_var, BRACE_ARGS }, + { "verb", cm_verb, NO_BRACE_ARGS }, + { "verbatim", cm_verbatim, NO_BRACE_ARGS }, + { "verbatiminclude", cm_verbatiminclude, NO_BRACE_ARGS }, { "vindex", cm_vindex, NO_BRACE_ARGS }, { "vtable", cm_vtable, NO_BRACE_ARGS }, { "w", cm_w, BRACE_ARGS }, @@ -363,7 +373,12 @@ insert_space (arg) int arg; { if (arg == START) - add_char (' '); + { + if (xml && !docbook) + xml_insert_entity ("space"); + else + add_char (' '); + } } /* Force a line break in the output. */ @@ -372,6 +387,10 @@ cm_asterisk () { if (html) add_word ("<br>"); + else if (xml && !docbook) + xml_insert_entity ("linebreak"); + else if (docbook) + xml_asterisk (); else { close_single_paragraph (); @@ -385,7 +404,14 @@ cm_dots (arg) int arg; { if (arg == START) - add_word (html ? "<small>...</small>" : "..."); + { + if (xml && !docbook) + xml_insert_entity ("dots"); + else if (docbook) + xml_insert_entity ("hellip"); + else + add_word (html ? "<small>...</small>" : "..."); + } } /* Insert ellipsis for sentence end. */ @@ -394,7 +420,17 @@ cm_enddots (arg) int arg; { if (arg == START) - add_word (html ? "<small>...</small>." : "...."); + { + if (xml && !docbook) + xml_insert_entity ("enddots"); + else if (docbook) + { + xml_insert_entity ("hellip"); + add_char ('.'); + } + else + add_word (html ? "<small>...</small>." : "...."); + } } void @@ -405,6 +441,10 @@ cm_bullet (arg) { if (html) add_word ("•"); + else if (xml && !docbook) + xml_insert_entity ("bullet"); + else if (docbook) + xml_insert_entity ("bull"); else add_char ('*'); } @@ -415,7 +455,12 @@ cm_minus (arg) int arg; { if (arg == START) - add_char ('-'); + { + if (xml) + xml_insert_entity ("minus"); + else + add_char ('-'); + } } /* Insert "TeX". */ @@ -424,7 +469,12 @@ cm_TeX (arg) int arg; { if (arg == START) - add_word ("TeX"); + { + if (xml && ! docbook) + xml_insert_entity ("tex"); + else + add_word ("TeX"); + } } /* Copyright symbol. */ @@ -433,10 +483,16 @@ cm_copyright (arg) int arg; { if (arg == START) + { if (html) add_word ("©"); + else if (xml && !docbook) + xml_insert_entity ("copyright"); + else if (docbook) + xml_insert_entity ("copy"); else add_word ("(C)"); + } } void @@ -462,6 +518,8 @@ cm_acronym (arg) { if (html) insert_html_tag (arg, small_tag); + else if (xml) + xml_insert_element (ACRONYM, arg); } void @@ -471,12 +529,18 @@ cm_tt (arg) /* @t{} is a no-op in Info. */ if (html) insert_html_tag (arg, "tt"); + else if (xml) + xml_insert_element (TT, arg); } void cm_code (arg) int arg; { + if (xml) + xml_insert_element (CODE, arg); + else + { extern int printing_index; if (arg == START) @@ -495,13 +559,16 @@ cm_code (arg) if (!printing_index) add_meta_char ('\''); } + } } void cm_kbd (arg) int arg; { - if (html) + if (xml) + xml_insert_element (KBD, arg); + else if (html) { /* Seems like we should increment in_fixed_width_font for Info format too, but then the quote-omitting special case gets confused. Punt. */ @@ -520,7 +587,9 @@ cm_kbd (arg) void cm_url (arg, start, end) { - if (html) + if (xml) + xml_insert_element (URL, arg); + else if (html) { if (arg == START) add_word ("<<code>"); @@ -538,7 +607,9 @@ void cm_key (arg) int arg; { - if (html) + if (xml) + xml_insert_element (KEY, arg); + else if (html) add_word (arg == START ? "<" : ">"); else add_char (arg == START ? '<' : '>'); @@ -558,6 +629,10 @@ void cm_var (arg, start_pos, end_pos) int arg, start_pos, end_pos; { + if (xml) + xml_insert_element (VAR, arg); + else + { not_fixed_width (arg); if (html) @@ -573,12 +648,17 @@ cm_var (arg, start_pos, end_pos) start_pos++; } } + } } void cm_sc (arg, start_pos, end_pos) int arg, start_pos, end_pos; { + if (xml) + xml_insert_element (SC, arg); + else + { not_fixed_width (arg); if (arg == START) @@ -588,11 +668,15 @@ cm_sc (arg, start_pos, end_pos) } else { - int all_upper = 1; + int all_upper; if (html) start_pos += sizeof (small_tag) + 2 - 1; /* skip <small> */ + /* Avoid the warning below if there's no text inside @sc{}, or + when processing menus under --no-headers. */ + all_upper = start_pos < end_pos; + while (start_pos < end_pos) { unsigned char c = output_paragraph[start_pos]; @@ -607,35 +691,111 @@ cm_sc (arg, start_pos, end_pos) if (html) insert_html_tag (arg, small_tag); } + } } void cm_dfn (arg, position) int arg, position; { + if (xml) + xml_insert_element (DFN, arg); + else + { if (html) insert_html_tag (arg, "dfn"); else if (arg == START) add_char ('"'); else add_meta_char ('"'); + } } void cm_emph (arg) int arg; { - if (html) + if (xml) + xml_insert_element (EMPH, arg); + else if (html) insert_html_tag (arg, "em"); else add_char ('_'); } void +cm_verb (arg) + int arg; +{ + int character; + int delimiter; + int seen_end = 0; + + in_fixed_width_font++; + /* are these necessary ? */ + last_char_was_newline = 0; + + if (html) + add_word ("<pre>"); + + if (input_text_offset < input_text_length) + { + character = curchar (); + if (character == '{') + input_text_offset++; + else + line_error (_("`{' expected, but saw `%c'"), character); + } + + if (input_text_offset < input_text_length) + { + delimiter = curchar (); + input_text_offset++; + } + + while (input_text_offset < input_text_length) + { + character = curchar (); + + if (character == '\n') + line_number++; + /* + Assume no newlines in END_VERBATIM + */ + else if (character == delimiter) + { + seen_end = 1; + input_text_offset++; + break; + } + + add_char (character); + input_text_offset++; + } + + if (!seen_end) + warning (_("end of file inside verb block")); + + if (input_text_offset < input_text_length) + { + character = curchar (); + if (character == '}') + input_text_offset++; + else + line_error (_("`}' expected, but saw `%c'"), character); + } + + if (html) + add_word ("</pre>"); +} + +void cm_strong (arg, position) int arg, position; { - if (html) + if (xml) + xml_insert_element (STRONG, arg); + else if (html) insert_html_tag (arg, "strong"); else add_char ('*'); @@ -645,7 +805,9 @@ void cm_cite (arg, position) int arg, position; { - if (html) + if (xml) + xml_insert_element (CITE, arg); + else if (html) insert_html_tag (arg, "cite"); else { @@ -661,6 +823,8 @@ void cm_not_fixed_width (arg, start, end) int arg, start, end; { + if (xml) + xml_insert_element (NOTFIXEDWIDTH, arg); not_fixed_width (arg); } @@ -668,7 +832,9 @@ void cm_i (arg) int arg; { - if (html) + if (xml) + xml_insert_element (I, arg); + else if (html) insert_html_tag (arg, "i"); else not_fixed_width (arg); @@ -678,7 +844,9 @@ void cm_b (arg) int arg; { - if (html) + if (xml) + xml_insert_element (B, arg); + else if (html) insert_html_tag (arg, "b"); else not_fixed_width (arg); @@ -688,32 +856,40 @@ void cm_r (arg) int arg; { - extern int printing_index; - - /* People use @r{} in index entries like this: - - @findex foo@r{, some text} - - This is supposed to produce output as if the entry were saying - "@code{foo}, some text", since the "fn" index is typeset as - @code. The following attempts to do the same in HTML. Note that - this relies on the fact that only @code bumps up the variable - in_fixed_width_font while processing index entries in HTML mode. */ - if (html && printing_index) + if (xml) + xml_insert_element (R, arg); + else { - int level = in_fixed_width_font; + extern int printing_index; - while (level--) - insert_html_tag (arg == START ? END : START, "code"); + /* People use @r{} in index entries like this: + + @findex foo@r{, some text} + + This is supposed to produce output as if the entry were saying + "@code{foo}, some text", since the "fn" index is typeset as + @code. The following attempts to do the same in HTML. Note that + this relies on the fact that only @code bumps up the variable + in_fixed_width_font while processing index entries in HTML mode. */ + if (html && printing_index) + { + int level = in_fixed_width_font; + + while (level--) + insert_html_tag (arg == START ? END : START, "code"); + } + + not_fixed_width (arg); } - - not_fixed_width (arg); } void cm_titlefont (arg) int arg; { + if (xml) + xml_insert_element (TITLEFONT, arg); + else not_fixed_width (arg); } @@ -776,15 +952,27 @@ cm_setfilename () char *filename; get_rest_of_line (1, &filename); /* warning ("`@%s %s' encountered and ignored", command, filename); */ + if (xml) + add_word_args ("<setfilename>%s</setfilename>", filename); free (filename); } void cm_settitle () { - get_rest_of_line (0, &title); + if (xml) + { + xml_begin_document (); + xml_insert_element (SETTITLE, START); + get_rest_of_line (0, &title); + execute_string ("%s", title); + xml_insert_element (SETTITLE, END); + } + else + get_rest_of_line (0, &title); } + /* Ignore argument in braces. */ void cm_ignore_arg (arg, start_pos, end_pos) @@ -813,7 +1001,16 @@ cm_sp () if (sscanf (line, "%d", &lines) != 1 || lines <= 0) line_error (_("@sp requires a positive numeric argument, not `%s'"), line); else - { /* Must disable filling since otherwise multiple newlines is like + { + if (xml) + { + xml_insert_element_with_attribute (SP, START, "lines=\"%s\"", line); + /* insert_string (line);*/ + xml_insert_element (SP, END); + } + else + { + /* Must disable filling since otherwise multiple newlines is like multiple spaces. Must close paragraph since that's what the manual says and that's what TeX does. */ int save_filling_enabled = filling_enabled; @@ -821,6 +1018,9 @@ cm_sp () close_paragraph (); + if (lines && html && !executing_string) + html_output_head (); + while (lines--) { if (html) @@ -831,6 +1031,7 @@ cm_sp () filling_enabled = save_filling_enabled; } + } free (line); } @@ -840,8 +1041,16 @@ cm_dircategory () { char *line; - if (html) + if (html || docbook) cm_ignore_line (); + else if (xml) + { + xml_insert_element (DIRCATEGORY, START); + get_rest_of_line (1, &line); + insert_string (line); + free (line); + xml_insert_element (DIRCATEGORY, END); + } else { get_rest_of_line (1, &line); @@ -860,23 +1069,33 @@ cm_dircategory () /* Start a new line with just this text on it. Then center the line of text. - This always ends the current paragraph. */ + */ void cm_center () { + if (xml) + { + unsigned char *line; + xml_insert_element (CENTER, START); + get_rest_of_line (0, (char **)&line); + execute_string ("%s", (char *)line); + free (line); + xml_insert_element (CENTER, END); + } + else + { int i, start, length; unsigned char *line; int save_indented_fill = indented_fill; int save_filling_enabled = filling_enabled; int fudge_factor = 1; - close_paragraph (); filling_enabled = indented_fill = 0; cm_noindent (); start = output_paragraph_offset; if (html) - add_word ("<p align=\"center\">"); + add_word ("<div align=\"center\">"); inhibit_output_flushing (); get_rest_of_line (0, (char **)&line); @@ -884,7 +1103,7 @@ cm_center () free (line); uninhibit_output_flushing (); if (html) - add_word ("</p>"); + add_word ("</div>"); else { @@ -914,9 +1133,9 @@ cm_center () } insert ('\n'); - close_paragraph (); filling_enabled = save_filling_enabled; indented_fill = save_indented_fill; + } } /* Show what an expression returns. */ @@ -1012,10 +1231,14 @@ cm_exdent () in_fixed_width_font = save_in_fixed_width_font; } - -/* Remember this file, and move onto the next. */ -void -cm_include () +/* + Read include-filename, process the include-file: + verbatim_include == 0: process through reader_loop + verbatim_include != 0: process through handle_verbatim_environment + */ +static void +handle_include (verbatim_include) + int verbatim_include; { char *filename; @@ -1041,7 +1264,7 @@ cm_include () i *= 2; printf ("%*s", i, ""); - printf ("%c%s %s\n", COMMAND_PREFIX, command, filename); + printf ("%c%s `%s'\n", COMMAND_PREFIX, command, filename); fflush (stdout); } @@ -1052,8 +1275,8 @@ cm_include () popfile (); line_number--; - /* Cannot "@include foo", in line 5 of "/wh/bar". */ - line_error ("%c%s %s: %s", COMMAND_PREFIX, command, filename, + /* /wh/bar:5: @include/@verbatiminclude `foo': No such file or dir */ + line_error ("%c%s `%s': %s", COMMAND_PREFIX, command, filename, strerror (errno)); free (filename); @@ -1062,14 +1285,34 @@ cm_include () else { if (macro_expansion_output_stream && !executing_string) - remember_itext (input_text, input_text_offset); - reader_loop (); + remember_itext (input_text, input_text_offset); + + if (!verbatim_include) + reader_loop (); + else + handle_verbatim_environment (0); } free (filename); popfile (); } +/* Include file as if put in @verbatim environment */ +void +cm_verbatiminclude () +{ + handle_include (1); +} + + +/* Remember this file, and move onto the next. */ +void +cm_include () +{ + handle_include (0); +} + + /* @bye: Signals end of processing. Easy to make this happen. */ void diff --git a/contrib/texinfo/makeinfo/defun.c b/contrib/texinfo/makeinfo/defun.c index c62aba7..b261a99 100644 --- a/contrib/texinfo/makeinfo/defun.c +++ b/contrib/texinfo/makeinfo/defun.c @@ -1,7 +1,7 @@ /* defun.c -- @defun and friends. - $Id: defun.c,v 1.11 1999/07/11 16:50:19 karl Exp $ + $Id: defun.c,v 1.18 2002/01/22 18:01:24 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2000, 01, 02 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 @@ -19,6 +19,7 @@ #include "system.h" #include "defun.h" +#include "docbook.h" #include "insertion.h" #include "makeinfo.h" @@ -395,9 +396,9 @@ defun_internal (type, x_p) type_name = next_nonwhite_defun_arg (&scan_args); /* The type name for typed languages. */ - if (base_type == deftypemethod - || base_type == deftypeivar - || base_type == deftypeop + if ((base_type == deftypemethod) + || (base_type == deftypeivar) + || (base_type == deftypeop) ) type_name2 = next_nonwhite_defun_arg (&scan_args); @@ -422,6 +423,13 @@ defun_internal (type, x_p) defined_name = tem; } + /* It's easy to write @defun foo(arg1 arg2), but a following ( is + misparsed by texinfo.tex and this is next to impossible to fix. + Warn about it. */ + if (*scan_args && **scan_args && **scan_args == '(') + warning ("`%c' follows defined name `%s' instead of whitespace", + **scan_args, defined_name); + if (!x_p) begin_insertion (type); @@ -430,11 +438,15 @@ defun_internal (type, x_p) current_indent -= default_indentation_increment; start_paragraph (); - if (html && !x_p) + if (!x_p) { /* Start the definition on new paragraph. */ - add_word ("<p>\n"); + if (html) + add_word ("<p>\n"); + if (docbook) + docbook_begin_paragraph (); + } - if (!html) + if (!html && !docbook) switch (base_type) { case deffn: @@ -473,13 +485,16 @@ defun_internal (type, x_p) /* If this is not a @def...x version, it could only be a normal version @def.... So start the table here. */ if (!x_p) - add_word ("<table width=\"100%\">\n"); + { + add_html_elt ("<table width="); + add_word ("\"100%\">\n"); + } /* If this is an @def...x there has to be an other @def... before it, so this is only a new row within an existing table. With two complete standalone tables the gap between them is too big. */ add_word ("<tr>\n"); - add_word ("<td align=\"left\">"); + add_html_elt ("<td align=\"left\">"); switch (base_type) { @@ -487,24 +502,61 @@ defun_internal (type, x_p) case defvr: case deftp: /* <i> is for the following function arguments. */ - add_word_args ("<b>%s</b><i>", defined_name); + add_word ("<b>"); + execute_string ("%s", defined_name); + add_word ("</b><i>"); break; case deftypefn: case deftypevr: - add_word_args ("%s <b>%s</b><i>", type_name, defined_name); + execute_string ("%s ", type_name); + add_word ("<b>"); + execute_string ("%s", defined_name); + add_word ("</b><i>"); break; case defcv: case defop: - add_word_args ("<b>%s</b><i>", defined_name); + add_word ("<b>"); + execute_string ("%s", defined_name); + add_word ("</b><i>"); break; case deftypemethod: case deftypeop: case deftypeivar: - add_word_args ("%s <b>%s</b><i>", type_name2, defined_name); + execute_string ("%s ", type_name2); + add_word ("<b>"); + execute_string ("%s", defined_name); + add_word ("</b><i>"); break; } } /* if (html)... */ + if (docbook) + { + switch (base_type) + { + case deffn: + case defvr: + case deftp: + case defcv: + case defop: + add_word_args ("<%s>%s</%s>", DB_FUNCTION, defined_name, + DB_FUNCTION); + break; + case deftypefn: + case deftypevr: + add_word_args ("%s <%s>%s</%s>", type_name, DB_FUNCTION, + defined_name, DB_FUNCTION); + break; + case deftypemethod: + case deftypeop: + case deftypeivar: + add_word_args ("%s <%s>%s</%s>", type_name2, DB_FUNCTION, + defined_name, DB_FUNCTION); + break; + } + + } /* if (docbook)... */ + current_indent += default_indentation_increment; /* Now process the function arguments, if any. If these carry onto @@ -548,32 +600,37 @@ defun_internal (type, x_p) case deftypevr: add_word ("</i>"); /* close italic area for arguments */ /* put the rest into the second column */ - add_word_args ("</td>\n<td align=\"right\">%s", category); + add_word ("</td>\n"); + add_html_elt ("<td align=\"right\">"); + execute_string ("%s", category); break; - - case defcv: - add_word ("</td>\n<td align=\"right\">"); - add_word_args ("%s %s %s", category, _("of"), type_name); - break; - - case defop: - case deftypemethod: - case deftypeop: - add_word ("</i>"); - add_word ("</td>\n<td align=\"right\">"); - add_word_args ("%s %s %s", category, _("on"), type_name); - break; - - case deftypeivar: - add_word ("</i>"); - add_word ("</td>\n<td align=\"right\">"); - add_word_args ("%s %s %s", category, _("of"), type_name); - break; - } /* switch (base_type)... */ - + + case defcv: + add_word ("</td>\n"); + add_html_elt ("<td align=\"right\">"); + execute_string ("%s %s %s", category, _("of"), type_name); + break; + + case defop: + case deftypemethod: + case deftypeop: + add_word ("</i>"); + add_word ("</td>\n"); + add_html_elt ("<td align=\"right\">"); + execute_string ("%s %s %s", category, _("on"), type_name); + break; + + case deftypeivar: + add_word ("</i>"); + add_word ("</td>\n"); + add_html_elt ("<td align=\"right\">"); + execute_string ("%s %s %s", category, _("of"), type_name); + break; + } /* switch (base_type)... */ + add_word ("</td>\n"); /* close second column */ add_word ("</tr>\n"); /* close row */ - + /* This is needed because I have to know if the next line is normal text or another @def..x. If text follows, create a new table to get the indentation for the following text. @@ -588,10 +645,10 @@ defun_internal (type, x_p) if (!looking_at ("@def")) { add_word ("</table>\n"); - add_word ("<table width=\"95%\" align=\"center\">\n"); - add_word ("<tr><td>\n"); + add_html_elt ("<table width=\"95%\" align=\"center\">"); + add_word ("\n<tr><td>\n"); } - + } /* if (html)... */ /* Make an entry in the appropriate index. */ diff --git a/contrib/texinfo/makeinfo/docbook.c b/contrib/texinfo/makeinfo/docbook.c new file mode 100644 index 0000000..c9b05c2 --- /dev/null +++ b/contrib/texinfo/makeinfo/docbook.c @@ -0,0 +1,492 @@ +/* docbook.c -- docbook output. + $Id: docbook.c,v 1.3 2001/12/31 16:52:17 karl Exp $ + + Copyright (C) 2001 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "system.h" +#include "cmds.h" +#include "docbook.h" +#include "insertion.h" +#include "lang.h" +#include "makeinfo.h" +#include "macro.h" +#include "sectioning.h" + +int docbook_version_inserted = 0; +int docbook_first_chapter_found = 0; +int docbook_must_insert_node_anchor = 0; +int docbook_begin_book_p = 0; +int docbook_no_new_paragraph = 0; + +static int section_level = -1; +static int in_docbook_paragraph = 0; +static int in_list = 0; + +static int in_table = 0; +static int in_term = 0; +static int in_entry = 0; +static int in_varlistitem = 0; + +static int in_example = 0; + +void +docbook_begin_section (level, cmd) + int level; + char *cmd; +{ + int i, old_no_indent; + char *temp, *tem; + static char *last_chap = NULL; + + close_paragraph (); + docbook_first_chapter_found = 1; + filling_enabled = indented_fill = 0; + old_no_indent = no_indent; + no_indent = 1; + + if (!docbook_begin_book_p) + docbook_begin_book (); + + if (macro_expansion_output_stream && !executing_string) + append_to_expansion_output (input_text_offset + 1); + + get_rest_of_line (0, &temp); + + if (in_docbook_paragraph) + { + insert_string ("\n</para>\n\n"); + adjust_braces_following (0, 10); + } + in_docbook_paragraph = 0; + docbook_no_new_paragraph++; + + if (level > section_level + 1) + level = section_level + 1; + + for (i = section_level; i >= level ; i--) + { + if (i == 0) + { + if (last_chap && strcmp(last_chap, "appendix") == 0) + add_word ("</appendix>\n\n"); + else + add_word ("</chapter>\n\n"); + } + else + add_word_args ("</sect%d>\n\n", i); + } + + section_level = level; + + if (level == 0) + { + if (strcmp(cmd, "appendix") == 0) + add_word ("<appendix"); + else + add_word ("<chapter"); + last_chap = cmd; + } + else + add_word_args ("<sect%d", level); + + if (docbook_must_insert_node_anchor) + { + add_word (" id=\""); + tem = expansion (current_node, 0); + add_escaped_anchor_name (tem, 0); + free (tem); + add_word ("\""); + docbook_must_insert_node_anchor = 0; + } + add_word (">\n"); + add_word ("<title>"); + + if (macro_expansion_output_stream && !executing_string) + { + char *temp1 = xmalloc (2 + strlen (temp)); + sprintf (temp1, "%s", temp); + remember_itext (input_text, input_text_offset); + me_execute_string (temp1); + free (temp1); + } + else + execute_string ("%s", temp); + + free (temp); + + add_word ("</title>\n"); + + close_paragraph (); + filling_enabled = 1; + no_indent = old_no_indent; + docbook_no_new_paragraph--; + insert_string("\n<para>"); + in_docbook_paragraph = 1; +} + +void +docbook_begin_paragraph () +{ + if (!docbook_first_chapter_found) + return; + + if (in_example) + return; + + if (in_table && !in_term) + { + if (!in_varlistitem) + insert_string ("\n<listitem><para>\n"); + else + insert_string ("\n</para>\n\n<para>\n"); + in_varlistitem = 1; + + return; + } + if (in_list) + return; + if (in_docbook_paragraph) + { + insert_string ("\n</para>\n\n"); + adjust_braces_following (0, 10); + } + +#if 0 + if (docbook_must_insert_node_anchor) + { + char *tem; + insert_string ("<para id=\""); + adjust_braces_following (0, 10); + tem = expansion (current_node, 0); + add_escaped_anchor_name (tem, 0); + free (tem); + add_word ("\">\n"); + docbook_must_insert_node_anchor = 0; + } + else +#endif + { + insert_string ("<para>\n"); + adjust_braces_following (0, 7); + } + in_docbook_paragraph = 1; +} + +void +docbook_begin_book () +{ + if (!docbook_begin_book_p) + docbook_begin_book_p = 1; + else + return; + + ++docbook_no_new_paragraph; + add_word_args ("<!DOCTYPE book PUBLIC \"-//Davenport//DTD DocBook V3.0//EN\">\n\ +<book>\n<title>%s</title>\n", title); + --docbook_no_new_paragraph; +} + +void +docbook_end_book () +{ + int i; + if (in_docbook_paragraph) + { + insert_string ("\n</para>\n\n"); + } + + for (i = section_level; i >= 0 ; i--) + { + if (i == 0) + add_word ("</chapter>\n"); + else + add_word_args ("</sect%d>\n", i); + } + + add_word ("</book>\n"); +} + +void +docbook_insert_tag (start_or_end, tag) + int start_or_end; + char *tag; +{ + if (!paragraph_is_open && start_or_end == START) + docbook_begin_paragraph (); + + add_char ('<'); + if (start_or_end == START) + add_word (tag); + else + { + add_char ('/'); + for (; *tag && *tag != ' '; tag++) + add_char(*tag); + } + add_meta_char ('>'); +} + +void +docbook_xref1 (node_name) + char *node_name; +{ + char *tem; + add_word ("<xref linkend=\""); + tem = expansion (node_name, 0); + add_escaped_anchor_name (tem, 1); + free (tem); + add_word ("\"/>"); +} + +void +docbook_xref2 (node_name, ref_name) + char *node_name; + char *ref_name; +{ + char *tem; + add_word ("<xref linkend=\""); + tem = expansion (node_name, 0); + add_escaped_anchor_name (tem, 1); + free (tem); + add_word ("\"/>"); +} + +int +docbook_quote (character) + int character; +{ + switch (language_code) + { + case fr: + if (character == '`') + { + add_word ("« "); + return ';'; + } + else + { + add_word (" "); + return '»'; + } + break; + + default: + if (character == '`') + { + add_word ("&ldquo"); + return ';'; + } + else + { + add_word ("&rdquo"); + return ';'; + } + break; + } +} + +#define IS_BLANK(c) (c == ' ' || c == '\t' || c == '\n') + +int +docbook_is_punctuation (character, next) + int character; + int next; +{ + return ( (character == ';' + || character == ':' + || character == '?' + || character == '!') + && IS_BLANK (next)); +} + +void +docbook_punctuation (character) + int character; +{ + switch (language_code) + { + case fr: + while (output_paragraph[output_paragraph_offset-1] == ' ') + output_paragraph_offset--; + add_word (" "); + break; + } +} + +static int in_item = 0; + +void +docbook_begin_itemize () +{ + if (in_docbook_paragraph) + insert_string ("\n</para>\n"); + + in_docbook_paragraph = 0; + insert_string ("\n<itemizedlist>\n"); + in_item = 0; + in_list = 1; +} + +void +docbook_end_itemize () +{ + if (in_item) + { + insert_string ("\n</para></listitem>\n"); + in_item = 0; + } + insert_string ("\n</itemizedlist>\n\n<para>\n"); + in_docbook_paragraph = 1; + in_list = 0; +} + +void +docbook_begin_enumerate () +{ + if (in_docbook_paragraph) + insert_string ("\n</para>\n"); + in_docbook_paragraph = 0; + insert_string ("\n<orderedlist>\n"); + in_item = 0; + in_list = 1; +} + +void +docbook_end_enumerate () +{ + if (in_item) + { + insert_string ("\n</para></listitem>\n"); + in_item = 0; + } + insert_string ("\n</orderedlist>\n\n<para>\n"); + in_docbook_paragraph = 1; + in_list = 0; +} + +void +docbook_begin_table () +{ +#if 0 + if (in_docbook_paragraph) + insert_string ("\n</para>\n\n"); + in_docbook_paragraph = 0; +#endif + + add_word ("\n<variablelist>\n"); + in_table ++; + in_varlistitem = 0; + in_entry = 0; +} + +void +docbook_end_table () +{ + if (!in_varlistitem) + docbook_begin_paragraph (); + insert_string ("\n</para></listitem>\n</varlistentry>\n\n</variablelist>\n"); +#if 0 + if (in_table == 1) + { + insert_string ("\n</para>\n\n"); + in_docbook_paragraph = 0; + } + else + { + insert_string ("\n<para>\n\n"); + in_docbook_paragraph = 1; + } +#endif + in_table --; + in_list = 0; +} + +void +docbook_add_item () +{ + if (in_item) + insert_string ("\n</para></listitem>\n"); + insert_string ("\n<listitem><para>\n"); + in_docbook_paragraph = 1; + in_item = 1; +} + +void +docbook_add_table_item () +{ + if (in_varlistitem) + { + insert_string ("\n</para></listitem>\n</varlistentry>\n\n"); + in_entry = 0; + in_varlistitem = 0; + } + if (!in_entry) + { + insert_string ("<varlistentry>\n"); + in_entry = 1; + } + insert_string ("<term>"); + in_list = 1; + in_term = 1; +} + +void +docbook_close_table_item () +{ + insert_string ("</term>"); + in_list = 1; + in_term = 0; +} + +void +docbook_add_anchor (anchor) + char *anchor; +{ + add_word ("<anchor id=\""); + add_anchor_name (anchor, 0); + add_word ("\">"); +} + +void +docbook_footnote (note) + char *note; +{ + /* add_word_args ("<footnote><para>\n%s\n</para></footnote>\n", note); */ + add_word ("<footnote><para>\n"); + execute_string("%s", note); + add_word("\n</para></footnote>\n"); +} + +void +docbook_begin_index () +{ + add_word ("<variablelist>\n"); +} + +void +docbook_begin_example () +{ + add_word ("\n\n<screen>\n"); + in_example = 1; +} + +void +docbook_end_example () +{ + in_example = 0; + add_word ("</screen>\n\n"); +} diff --git a/contrib/texinfo/makeinfo/docbook.h b/contrib/texinfo/makeinfo/docbook.h new file mode 100644 index 0000000..6f0ca49 --- /dev/null +++ b/contrib/texinfo/makeinfo/docbook.h @@ -0,0 +1,81 @@ +/* docbook.h -- docbook declarations. + $Id: docbook.h,v 1.2 2001/12/31 16:51:32 karl Exp $ + + Copyright (C) 2001 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef DOCBOOK_H +#define DOCBOOK_H + +#define DB_B "emphasis role=\"bold\"" +#define DB_CITE "citetitle" +#define DB_CODE "literal" +#define DB_COMMAND "command" +#define DB_DFN "firstterm" +#define DB_EMPH "emphasis" +#define DB_ENV "envar" +#define DB_FILE "filename" +#define DB_FUNCTION "function" +#define DB_I "emphasis" +#define DB_KBD "userinput" +#define DB_KEY "keycap" +#define DB_OPTION "option" +#define DB_STRONG "emphasis role=\"bold\"" +#define DB_TT "literal" +#define DB_URL "systemitem role=\"sitename\"" +#define DB_VAR "replaceable" + +extern int docbook_version_inserted; +extern int docbook_begin_book_p; +extern int docbook_first_chapter_found; +extern int docbook_must_insert_node_anchor; +extern int docbook_no_new_paragraph; + +void docbook_begin_section (); +void docbook_begin_paragraph (); +void docbook_begin_book (); +void docbook_end_book (); + +void docbook_insert_tag (); + +void docbook_xref1 (); +void docbook_xref2 (); + +int docbook_quote (); + +int docbook_is_punctuation (); +void docbook_punctuation (); + +void docbook_begin_itemize (); +void docbook_end_itemize (); +void docbook_begin_enumerate (); +void docbook_end_enumerate (); + +void docbook_begin_table (); +void docbook_end_table (); +void docbook_add_item (); +void docbook_add_table_item (); +void docbook_close_table_item (); +void docbook_add_anchor (); + +void docbook_footnote (); + +void docbook_begin_index (); + +void docbook_begin_example (); +void docbook_end_example (); + +#endif /* DOCBOOK_H */ diff --git a/contrib/texinfo/makeinfo/files.c b/contrib/texinfo/makeinfo/files.c index ce8ace0..83c00e1 100644 --- a/contrib/texinfo/makeinfo/files.c +++ b/contrib/texinfo/makeinfo/files.c @@ -1,7 +1,7 @@ -/* files.c -- file-related functions for Texinfo. - $Id: files.c,v 1.5 1999/03/23 21:42:44 karl Exp $ +/* files.c -- file-related functions for makeinfo. + $Id: files.c,v 1.10 2002/01/16 15:52:45 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2000, 01, 02 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 @@ -139,9 +139,7 @@ find_and_load (filename) long file_size; int file = -1, count = 0; char *fullpath, *result; -#if O_BINARY || defined (VMS) - int n; -#endif + int n, bytes_to_read; result = fullpath = NULL; @@ -163,28 +161,18 @@ find_and_load (filename) /* VMS stat lies about the st_size value. The actual number of readable bytes is always less than this value. The arcane mysteries of VMS/RMS are too much to probe, so this hack - suffices to make things work. */ -#if O_BINARY || defined (VMS) -#ifdef VMS - while ((n = read (file, result + count, file_size)) > 0) -#else /* !VMS */ -#ifndef WIN32 - while ((n = read (file, result + count, file_size)) > 0) -#else /* WIN32 */ - /* Does WIN32 really need reading 1 character at a time?? */ - while ((n = read (file, result + count, 1)) > 0) -#endif /* WIN32 */ -#endif /* !VMS */ - count += n; + suffices to make things work. It's also needed on Cygwin. And so + we might as well use it everywhere. */ + bytes_to_read = file_size; + while ((n = read (file, result + count, bytes_to_read)) > 0) + { + count += n; + bytes_to_read -= n; + } if (0 < count && count < file_size) result = xrealloc (result, count + 2); /* why waste the slack? */ else if (n == -1) -#else /* !VMS && !O_BINARY */ - count = file_size; - if (read (file, result, file_size) != file_size) -#endif /* !VMS && !WIN32 */ - - error_exit: +error_exit: { if (result) free (result); @@ -527,3 +515,62 @@ output_name_from_input_name (name) { return expand_filename (NULL, name); } + + +/* Modify the file name FNAME so that it fits the limitations of the + underlying filesystem. In particular, truncate the file name as it + would be truncated by the filesystem. We assume the result can + never be longer than the original, otherwise we couldn't be sure we + have enough space in the original string to modify it in place. */ +char * +normalize_filename (fname) + char *fname; +{ + int maxlen; + char orig[PATH_MAX + 1]; + int i; + char *lastdot, *p; + +#ifdef _PC_NAME_MAX + maxlen = pathconf (fname, _PC_NAME_MAX); + if (maxlen < 1) +#endif + maxlen = PATH_MAX; + + i = skip_directory_part (fname); + if (fname[i] == '\0') + return fname; /* only a directory name -- don't modify */ + strcpy (orig, fname + i); + + switch (maxlen) + { + case 12: /* MS-DOS 8+3 filesystem */ + if (orig[0] == '.') /* leading dots are not allowed */ + orig[0] = '_'; + lastdot = strrchr (orig, '.'); + if (!lastdot) + lastdot = orig + strlen (orig); + strncpy (fname + i, orig, lastdot - orig); + for (p = fname + i; + p < fname + i + (lastdot - orig) && p < fname + i + 8; + p++) + if (*p == '.') + *p = '_'; + *p = '\0'; + if (*lastdot == '.') + strncat (fname + i, lastdot, 4); + break; + case 14: /* old Unix systems with 14-char limitation */ + strcpy (fname + i, orig); + if (strlen (fname + i) > 14) + fname[i + 14] = '\0'; + break; + default: + strcpy (fname + i, orig); + if (strlen (fname) > maxlen - 1) + fname[maxlen - 1] = '\0'; + break; + } + + return fname; +} diff --git a/contrib/texinfo/makeinfo/files.h b/contrib/texinfo/makeinfo/files.h index d96c444..88ae209 100644 --- a/contrib/texinfo/makeinfo/files.h +++ b/contrib/texinfo/makeinfo/files.h @@ -1,7 +1,7 @@ /* files.h -- declarations for files.c. - $Id: files.h,v 1.1 1998/10/24 21:37:25 karl Exp $ + $Id: files.h,v 1.2 2002/01/16 15:52:45 karl Exp $ - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2002 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 @@ -41,5 +41,6 @@ extern char *output_name_from_input_name (); extern char *expand_filename (); extern char *filename_part (); extern char *pathname_part (); +extern char *normalize_filename (); #endif /* !FILES_H */ diff --git a/contrib/texinfo/makeinfo/footnote.c b/contrib/texinfo/makeinfo/footnote.c index c1a056d..d9f2525 100644 --- a/contrib/texinfo/makeinfo/footnote.c +++ b/contrib/texinfo/makeinfo/footnote.c @@ -1,7 +1,7 @@ /* footnote.c -- footnotes for Texinfo. - $Id: footnote.c,v 1.10 1999/09/20 12:20:52 karl Exp $ + $Id: footnote.c,v 1.13 2002/03/02 15:05:21 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2002 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 @@ -21,6 +21,7 @@ #include "footnote.h" #include "macro.h" #include "makeinfo.h" +#include "xml.h" /* Nonzero means that the footnote style for this document was set on the command line, which overrides any other settings. */ @@ -200,6 +201,18 @@ cm_footnote () return; } + /* output_pending_notes is non-reentrant (it uses a global data + structure pending_notes, which it frees before it returns), and + TeX doesn't grok footnotes inside footnotes anyway. Disallow + that. */ + if (already_outputting_pending_notes) + { + line_error (_("Footnotes inside footnotes are not allowed")); + free (marker); + free (note); + return; + } + if (!*marker) { free (marker); @@ -213,14 +226,21 @@ cm_footnote () marker = xstrdup ("*"); } + if (xml) + xml_insert_footnote (note); + else + { remember_note (marker, note); /* fixme: html: footnote processing needs work; we currently ignore the style requested; we could clash with a node name of the form `fn-<n>', though that's unlikely. */ if (html) - add_word_args ("<a rel=footnote href=\"#fn-%d\"><sup>%s</sup></a>", - current_footnote_number, marker); + { + add_html_elt ("<a rel=footnote href="); + add_word_args ("\"#fn-%d\"><sup>%s</sup></a>", + current_footnote_number, marker); + } else /* Your method should at least insert MARKER. */ switch (footnote_style) @@ -255,7 +275,7 @@ cm_footnote () break; } current_footnote_number++; - + } free (marker); free (note); } @@ -328,7 +348,9 @@ output_pending_notes () /* Make the text of every footnote begin a separate paragraph. */ add_word_args ("<li><a name=\"fn-%d\"></a>\n<p>", footnote->number); + already_outputting_pending_notes++; execute_string ("%s", footnote->note); + already_outputting_pending_notes--; add_word ("</p>\n"); } else diff --git a/contrib/texinfo/makeinfo/html.c b/contrib/texinfo/makeinfo/html.c index f2e53e5..b7a8d59 100644 --- a/contrib/texinfo/makeinfo/html.c +++ b/contrib/texinfo/makeinfo/html.c @@ -1,7 +1,7 @@ /* html.c -- html-related utilities. - $Id: html.c,v 1.5 1999/09/18 19:27:41 karl Exp $ + $Id: html.c,v 1.19 2002/02/23 19:12:15 karl Exp $ - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 01, 02 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 @@ -30,27 +30,40 @@ int html_output_head_p = 0; void html_output_head () { - char *html_title; - + static char *html_title = NULL; + static int html_title_written = 0; + if (html_output_head_p) return; html_output_head_p = 1; - /* The <title> should not have markup. */ - html_title = title ? text_expansion (title) : _("Untitled"); + /* The <title> should not have markup, so use text_expansion. */ + if (!html_title) + html_title = title ? text_expansion (title) : _("Untitled"); - add_word_args ("<html lang=\"%s\"><head>\n<title>%s</title>\n", + add_word_args ("<html lang=\"%s\">\n<head>\n<title>%s</title>\n", language_table[language_code].abbrev, html_title); add_word ("<meta http-equiv=\"Content-Type\" content=\"text/html"); - if (document_encoding) - add_word_args ("; charset=%s", document_encoding); + if (document_encoding_code != no_encoding) + add_word_args ("; charset=%s", + encoding_table[document_encoding_code].ecname); add_word ("\">\n"); - - add_word_args ("<meta name=description content=\"%s\">\n", html_title); + + if (!document_description) + document_description = html_title; + + add_word_args ("<meta name=description content=\"%s\">\n", + document_description); add_word_args ("<meta name=generator content=\"makeinfo %s\">\n", VERSION); add_word ("<link href=\"http://texinfo.org/\" rel=generator-home>\n"); - add_word ("</head><body>\n\n"); + add_word ("</head>\n<body>\n"); + + if (title && !html_title_written) + { + add_word_args ("<h1>%s</h1>\n", html_title); + html_title_written = 1; + } } @@ -78,13 +91,12 @@ escape_string (string) default: newlen++; } - i++; } - while (string[i]); + while (string[i++]); if (newlen == i) return string; /* Already OK. */ - newstring = xmalloc (newlen + 2); + newstring = xmalloc (newlen); i = 0; do { @@ -109,7 +121,7 @@ escape_string (string) } while (string[i++]); free (string); - return newstring - newlen -1; + return newstring - newlen; } /* Open or close TAG according to START_OR_END. */ @@ -136,14 +148,16 @@ insert_html_tag (start_or_end, tag) /* Output an HTML <link> to the filename for NODE, including the other string as extra attributes. */ void -add_link (node, attributes) - char *node, *attributes; +add_link (nodename, attributes) + char *nodename, *attributes; { - if (node) + if (nodename) { - add_word_args ("<link %s href=\"", attributes); - add_anchor_name (node, 1); - add_word ("\">\n"); + add_html_elt ("<link "); + add_word_args ("%s", attributes); + add_word_args (" href=\""); + add_anchor_name (nodename, 1); + add_word ("\"></a>\n"); } } @@ -176,7 +190,170 @@ add_anchor_name (nodename, href) int href; { if (href) - add_char ('#'); + { + if (splitting) + add_url_name (nodename, href); + add_char ('#'); + } + /* Always add NODENAME, so that the reference would pinpoint the + exact node on its file. This is so several nodes could share the + same file, in case of file-name clashes, but also for more + accurate browser positioning. */ + if (strcasecmp (nodename, "(dir)") == 0) + /* Strip the parens, but keep the original letter-case. */ + add_word_args ("%.3s", nodename + 1); + else + add_escaped_anchor_name (nodename); +} + +/* Insert the text for the name of a reference in an HTML url, aprropriate + for NODENAME */ +void +add_url_name (nodename, href) + char *nodename; + int href; +{ + add_nodename_to_filename (nodename, href); +} + +/* Only allow [-0-9a-zA-Z_.] when nodifying filenames. This may + result in filename clashes; e.g., + + @node Foo ],,, + @node Foo [,,, + + both map to Foo--.html. If that happens, cm_node will put all + the nodes whose file names clash on the same file. */ +void +fix_filename (filename) + char *filename; +{ + char *p; + for (p = filename; *p; p++) + { + if (!(isalnum (*p) || strchr ("-._", *p))) + *p = '-'; + } +} + +/* As we can't look-up a (forward-referenced) nodes' html filename + from the tentry, we take the easy way out. We assume that + nodenames are unique, and generate the html filename from the + nodename, that's always known. */ +static char * +nodename_to_filename_1 (nodename, href) + char *nodename; + int href; +{ + char *p; + char *filename; + char dirname[PATH_MAX]; - add_escaped_anchor_name (nodename); + if (strcasecmp (nodename, "Top") == 0) + { + /* We want to convert references to the Top node into + "index.html#Top". */ + if (href) + filename = xstrdup ("index.html"); /* "#Top" is added by our callers */ + else + filename = xstrdup ("Top"); + } + else if (strcasecmp (nodename, "(dir)") == 0) + /* We want to convert references to the (dir) node into + "../index.html". */ + filename = xstrdup ("../index.html"); + else + { + filename = xmalloc (PATH_MAX); + dirname[0] = '\0'; + *filename = '\0'; + + /* Check for external reference: ``(info-document)node-name'' + Assume this node lives at: ``../info-document/node-name.html'' + + We need to handle the special case (sigh): ``(info-document)'', + ie, an external top-node, which should translate to: + ``../info-document/info-document.html'' */ + + p = nodename; + if (*nodename == '(') + { + int length; + + p = strchr (nodename, ')'); + if (p == NULL) + { + line_error (_("Invalid node name: `%s'"), nodename); + exit (1); + } + + length = p - nodename - 1; + if (length > 5 && + FILENAME_CMPN (p - 5, ".info", 5) == 0) + length -= 5; + /* This is for DOS, and also for Windows and GNU/Linux + systems that might have Info files copied from a DOS 8+3 + filesystem. */ + if (length > 4 && + FILENAME_CMPN (p - 4, ".inf", 4) == 0) + length -= 4; + strcpy (filename, "../"); + strncpy (dirname, nodename + 1, length); + *(dirname + length) = '\0'; + fix_filename (dirname); + strcat (filename, dirname); + strcat (filename, "/"); + p++; + } + + /* In the case of just (info-document), there will be nothing + remaining, and we will refer to ../info-document/, which will + work fine. */ + strcat (filename, p); + if (*p) + { + /* Hmm */ + fix_filename (filename + strlen (filename) - strlen (p)); + strcat (filename, ".html"); + } + } + + /* Produce a file name suitable for the underlying filesystem. */ + normalize_filename (filename); + +#if 0 + /* We add ``#Nodified-filename'' anchor to external references to be + prepared for non-split HTML support. Maybe drop this. */ + if (href && *dirname) + { + strcat (filename, "#"); + strcat (filename, p); + /* Hmm, again */ + fix_filename (filename + strlen (filename) - strlen (p)); + } +#endif + + return filename; +} + +/* If necessary, ie, if current filename != filename of node, output + the node name. */ +void +add_nodename_to_filename (nodename, href) + char *nodename; + int href; +{ + /* for now, don't check: always output filename */ + char *filename = nodename_to_filename_1 (nodename, href); + add_word (filename); + free (filename); +} + +char * +nodename_to_filename (nodename) + char *nodename; +{ + /* The callers of nodename_to_filename use the result to produce + <a href=, so call nodename_to_filename_1 with last arg non-zero. */ + return nodename_to_filename_1 (nodename, 1); } diff --git a/contrib/texinfo/makeinfo/html.h b/contrib/texinfo/makeinfo/html.h index 2d68c77..cd24ce2 100644 --- a/contrib/texinfo/makeinfo/html.h +++ b/contrib/texinfo/makeinfo/html.h @@ -1,7 +1,7 @@ /* html.h -- declarations for html-related utilities. - $Id: html.h,v 1.1 1999/04/25 20:53:33 karl Exp $ + $Id: html.h,v 1.2 2000/12/19 15:17:52 karl Exp $ - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000 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 @@ -40,5 +40,8 @@ extern void add_escaped_anchor_name (/* char *name */); /* See html.c. */ extern void add_anchor_name (/* nodename, href */); +extern void add_url_name ( /* nodename, href */ ); +extern char* nodename_to_filename ( /* nodename */ ); +extern void add_nodename_to_filename ( /*nodename, href */ ); #endif /* !HTML_H */ diff --git a/contrib/texinfo/makeinfo/index.c b/contrib/texinfo/makeinfo/index.c index 05466ce..edaf4e1 100644 --- a/contrib/texinfo/makeinfo/index.c +++ b/contrib/texinfo/makeinfo/index.c @@ -1,7 +1,7 @@ /* index.c -- indexing for Texinfo. - $Id: index.c,v 1.21 1999/07/18 18:50:02 karl Exp $ + $Id: index.c,v 1.24 2002/01/22 14:28:07 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2002 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 @@ -22,6 +22,7 @@ #include "lang.h" #include "macro.h" #include "toc.h" +#include "xml.h" /* An index element... */ typedef struct index_elt @@ -226,7 +227,13 @@ index_add_arg (name) (see the findexerr test). */ new->defining_file = xstrdup (input_filename); the_indices[which] = new; + /* The index breaks if there are colons in the entry. */ + if (strchr (new->entry_text, ':')) + warning (_("Info cannot handle `:' in index entry `%s'"), + new->entry_text); } + if (xml) + xml_insert_indexterm (index_entry, name); } /* The function which user defined index commands call. */ @@ -583,7 +590,7 @@ sort_index (index) /* If this particular entry should be printed as a "code" index, then expand it as @code{entry}, i.e. as in fixed-width font. */ array[count-1]->entry = expansion (temp->entry_text, - array[count-1]->code); + array[count-1]->code); temp = temp->next; } @@ -621,203 +628,225 @@ int printing_index = 0; void cm_printindex () { - int item; - INDEX_ELT *index; - INDEX_ELT *last_index = 0; - INDEX_ELT **array; - char *index_name; - unsigned line_length; - char *line; - int saved_inhibit_paragraph_indentation = inhibit_paragraph_indentation; - int saved_filling_enabled = filling_enabled; - int saved_line_number = line_number; - char *saved_input_filename = input_filename; - - close_paragraph (); - get_rest_of_line (0, &index_name); - - index = index_list (index_name); - if (index == (INDEX_ELT *)-1) + if (xml && !docbook) { - line_error (_("Unknown index `%s' in @printindex"), index_name); - free (index_name); - return; + char *index_name; + get_rest_of_line (0, &index_name); + xml_insert_element (PRINTINDEX, START); + insert_string (index_name); + xml_insert_element (PRINTINDEX, END); } - - /* Do this before sorting, so execute_string in index_element_compare - will give the same results as when we actually print. */ - printing_index = 1; - filling_enabled = 0; - inhibit_paragraph_indentation = 1; - array = sort_index (index); - - close_paragraph (); - if (html) - add_word ("<ul compact>"); - else if (!no_headers) - add_word ("* Menu:\n\n"); - - me_inhibit_expansion++; - - /* This will probably be enough. */ - line_length = 100; - line = xmalloc (line_length); - - for (item = 0; (index = array[item]); item++) + else { - /* A pathological document might have an index entry outside of any - node. Don't crash; try using the section name instead. */ - char *index_node = index->node; - - line_number = index->defining_line; - input_filename = index->defining_file; - - if ((!index_node || !*index_node) && html) - index_node = toc_find_section_of_node (index_node); - - if (!index_node || !*index_node) + int item; + INDEX_ELT *index; + INDEX_ELT *last_index = 0; + INDEX_ELT **array; + char *index_name; + unsigned line_length; + char *line; + int saved_inhibit_paragraph_indentation = inhibit_paragraph_indentation; + int saved_filling_enabled = filling_enabled; + int saved_line_number = line_number; + char *saved_input_filename = input_filename; + + close_paragraph (); + get_rest_of_line (0, &index_name); + + index = index_list (index_name); + if (index == (INDEX_ELT *)-1) { - line_error (_("Entry for index `%s' outside of any node"), - index_name); - if (html || !no_headers) - index_node = _("(outside of any node)"); + line_error (_("Unknown index `%s' in @printindex"), index_name); + free (index_name); + return; } - + + /* Do this before sorting, so execute_string is in the good environment */ + if (xml && docbook) + xml_begin_index (); + + /* Do this before sorting, so execute_string in index_element_compare + will give the same results as when we actually print. */ + printing_index = 1; + filling_enabled = 0; + inhibit_paragraph_indentation = 1; + xml_sort_index = 1; + array = sort_index (index); + xml_sort_index = 0; + close_paragraph (); if (html) - /* fixme: html: we should use specific index anchors pointing + add_word ("<ul compact>"); + else if (!no_headers && !docbook) + add_word ("* Menu:\n\n"); + + me_inhibit_expansion++; + + /* This will probably be enough. */ + line_length = 100; + line = xmalloc (line_length); + + for (item = 0; (index = array[item]); item++) + { + /* A pathological document might have an index entry outside of any + node. Don't crash; try using the section name instead. */ + char *index_node = index->node; + + line_number = index->defining_line; + input_filename = index->defining_file; + + if ((!index_node || !*index_node) && html) + index_node = toc_find_section_of_node (index_node); + + if (!index_node || !*index_node) + { + line_error (_("Entry for index `%s' outside of any node"), + index_name); + if (html || !no_headers) + index_node = _("(outside of any node)"); + } + + if (html) + /* fixme: html: we should use specific index anchors pointing to the actual location of the indexed position (but then we have to find something to wrap the anchor around). */ - { - if (last_index - && STREQ (last_index->entry_text, index->entry_text)) - add_word (", "); /* Don't repeat the previous entry. */ - else - { - /* In the HTML case, the expanded index entry is not - good for us, since it was expanded for non-HTML mode - inside sort_index. So we need to HTML-escape and - expand the original entry text here. */ - char *escaped_entry = xstrdup (index->entry_text); - char *expanded_entry; - - /* expansion() doesn't HTML-escape the argument, so need - to do it separately. */ - escaped_entry = escape_string (escaped_entry); - expanded_entry = expansion (escaped_entry, index->code); - add_word_args ("\n<li>%s: ", expanded_entry); - free (escaped_entry); - free (expanded_entry); - } - add_word ("<a href=\""); - if (index->node && *index->node) { - /* Make sure any non-macros in the node name are expanded. */ - in_fixed_width_font++; - index_node = expansion (index_node, 0); - in_fixed_width_font--; - add_anchor_name (index_node, 1); - add_word_args ("\">%s</a>", index_node); - free (index_node); + if (last_index + && STREQ (last_index->entry_text, index->entry_text)) + add_word (", "); /* Don't repeat the previous entry. */ + else + { + /* In the HTML case, the expanded index entry is not + good for us, since it was expanded for non-HTML mode + inside sort_index. So we need to HTML-escape and + expand the original entry text here. */ + char *escaped_entry = xstrdup (index->entry_text); + char *expanded_entry; + + /* expansion() doesn't HTML-escape the argument, so need + to do it separately. */ + escaped_entry = escape_string (escaped_entry); + expanded_entry = expansion (escaped_entry, index->code); + add_word_args ("\n<li>%s: ", expanded_entry); + free (escaped_entry); + free (expanded_entry); + } + add_word ("<a href=\""); + if (index->node && *index->node) + { + /* Make sure any non-macros in the node name are expanded. */ + in_fixed_width_font++; + index_node = expansion (index_node, 0); + in_fixed_width_font--; + add_anchor_name (index_node, 1); + add_word_args ("\">%s</a>", index_node); + free (index_node); + } + else if (STREQ (index_node, _("(outside of any node)"))) + { + add_anchor_name (index_node, 1); + add_word_args ("\">%s</a>", index_node); + } + else + /* If we use the section instead of the (missing) node, then + index_node already includes all we need except the #. */ + add_word_args ("#%s</a>", index_node); } - else if (STREQ (index_node, _("(outside of any node)"))) + else if (xml && docbook) { - add_anchor_name (index_node, 1); - add_word_args ("\">%s</a>", index_node); + xml_insert_indexentry (index->entry, index_node); } else - /* If we use the section instead of the (missing) node, then - index_node already includes all we need except the #. */ - add_word_args ("#%s</a>", index_node); - } - else - { - unsigned new_length = strlen (index->entry); - - if (new_length < 50) /* minimum length used below */ - new_length = 50; - new_length += strlen (index_node) + 7; /* * : .\n\0 */ - - if (new_length > line_length) - { - line_length = new_length; - line = xrealloc (line, line_length); - } - /* Print the entry, nicely formatted. We've already - expanded any commands in index->entry, including any - implicit @code. Thus, can't call execute_string, since - @@ has turned into @. */ - if (!no_headers) - { - sprintf (line, "* %-37s ", index->entry); - line[2 + strlen (index->entry)] = ':'; - insert_string (line); - /* Make sure any non-macros in the node name are expanded. */ - in_fixed_width_font++; - execute_string ("%s.\n", index_node); - in_fixed_width_font--; - } - else - { - /* With --no-headers, the @node lines are gone, so - there's little sense in referring to them in the - index. Instead, output the number or name of the - section that corresponds to that node. */ - char *section_name = toc_find_section_of_node (index_node); - - sprintf (line, "%-*s ", number_sections ? 50 : 1, index->entry); - line[strlen (index->entry)] = ':'; - insert_string (line); - if (section_name) - { - int idx = 0; - unsigned ref_len = strlen (section_name) + 30; - - if (ref_len > line_length) - { - line_length = ref_len; - line = xrealloc (line, line_length); - } - - if (number_sections) - { - while (section_name[idx] - && (isdigit (section_name[idx]) - || (idx && section_name[idx] == '.'))) - idx++; - } - if (idx) - sprintf (line, " See %.*s.\n", idx, section_name); - else - sprintf (line, "\n See ``%s''.\n", section_name); + { + unsigned new_length = strlen (index->entry); + + if (new_length < 50) /* minimum length used below */ + new_length = 50; + new_length += strlen (index_node) + 7; /* * : .\n\0 */ + + if (new_length > line_length) + { + line_length = new_length; + line = xrealloc (line, line_length); + } + /* Print the entry, nicely formatted. We've already + expanded any commands in index->entry, including any + implicit @code. Thus, can't call execute_string, since + @@ has turned into @. */ + if (!no_headers) + { + sprintf (line, "* %-37s ", index->entry); + line[2 + strlen (index->entry)] = ':'; insert_string (line); - } - else + /* Make sure any non-macros in the node name are expanded. */ + in_fixed_width_font++; + execute_string ("%s.\n", index_node); + in_fixed_width_font--; + } + else { - insert_string (" "); /* force a blank */ - execute_string ("See node %s.\n", index_node); + /* With --no-headers, the @node lines are gone, so + there's little sense in referring to them in the + index. Instead, output the number or name of the + section that corresponds to that node. */ + char *section_name = toc_find_section_of_node (index_node); + + sprintf (line, "%-*s ", number_sections ? 50 : 1, index->entry); + line[strlen (index->entry)] = ':'; + insert_string (line); + if (section_name) + { + int idx = 0; + unsigned ref_len = strlen (section_name) + 30; + + if (ref_len > line_length) + { + line_length = ref_len; + line = xrealloc (line, line_length); + } + + if (number_sections) + { + while (section_name[idx] + && (isdigit (section_name[idx]) + || (idx && section_name[idx] == '.'))) + idx++; + } + if (idx) + sprintf (line, " See %.*s.\n", idx, section_name); + else + sprintf (line, "\n See ``%s''.\n", section_name); + insert_string (line); + } + else + { + insert_string (" "); /* force a blank */ + execute_string ("See node %s.\n", index_node); + } } - } - } + } + + /* Prevent `output_paragraph' from growing to the size of the + whole index. */ + flush_output (); + last_index = index; + } - /* Prevent `output_paragraph' from growing to the size of the - whole index. */ - flush_output (); - last_index = index; + free (line); + free (index_name); + + me_inhibit_expansion--; + + printing_index = 0; + free (array); + close_single_paragraph (); + filling_enabled = saved_filling_enabled; + inhibit_paragraph_indentation = saved_inhibit_paragraph_indentation; + input_filename = saved_input_filename; + line_number = saved_line_number; + + if (html) + add_word ("</ul>"); + else if (xml && docbook) + xml_end_index (); } - - free (line); - free (index_name); - - me_inhibit_expansion--; - - printing_index = 0; - free (array); - close_single_paragraph (); - filling_enabled = saved_filling_enabled; - inhibit_paragraph_indentation = saved_inhibit_paragraph_indentation; - input_filename = saved_input_filename; - line_number = saved_line_number; - - if (html) - add_word ("</ul>"); } diff --git a/contrib/texinfo/makeinfo/insertion.c b/contrib/texinfo/makeinfo/insertion.c index 11b9089..c7087f2 100644 --- a/contrib/texinfo/makeinfo/insertion.c +++ b/contrib/texinfo/makeinfo/insertion.c @@ -1,7 +1,7 @@ /* insertion.c -- insertions for Texinfo. - $Id: insertion.c,v 1.27 1999/07/06 23:12:53 karl Exp $ + $Id: insertion.c,v 1.39 2002/03/02 15:05:21 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2000, 01, 02 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 @@ -23,20 +23,21 @@ #include "insertion.h" #include "macro.h" #include "makeinfo.h" +#include "xml.h" /* Must match list in insertion.h. */ static char *insertion_type_names[] = -{ +{ "cartouche", "defcv", "deffn", "defivar", "defmac", "defmethod", "defop", "defopt", "defspec", "deftp", "deftypefn", "deftypefun", "deftypeivar", "deftypemethod", "deftypeop", "deftypevar", "deftypevr", "defun", "defvar", "defvr", "detailmenu", "direntry", - "display", "enumerate", "example", "flushleft", "flushright", - "format", "ftable", "group", "ifclear", "ifhtml", "ifinfo", - "ifnothtml", "ifnotinfo", "ifnottex", "ifset", "iftex", "itemize", - "lisp", "menu", "multitable", "quotation", "rawhtml", "rawtex", - "smalldisplay", "smallexample", "smallformat", "smalllisp", "table", - "tex", "vtable", "bad_type" + "display", "documentdescription", "enumerate", "example", "flushleft", + "flushright", "format", "ftable", "group", "ifclear", "ifhtml", + "ifinfo", "ifnothtml", "ifnotinfo", "ifnottex", "ifset", "iftex", + "itemize", "lisp", "menu", "multitable", "quotation", "rawhtml", + "rawtex", "smalldisplay", "smallexample", "smallformat", "smalllisp", + "verbatim", "table", "tex", "vtable", "bad_type" }; /* All nested environments. */ @@ -359,7 +360,9 @@ begin_insertion (type) no_discard++; } else - push_insertion (type, get_item_function ()); + { + push_insertion (type, get_item_function ()); + } switch (type) { @@ -374,9 +377,12 @@ begin_insertion (type) { had_menu_commentary = 1; } - else if (!no_headers) + else if (!no_headers && !xml) add_word ("* Menu:\n"); + if (xml) + xml_insert_element (MENU, START); + in_menu++; in_fixed_width_font++; no_discard++; @@ -399,15 +405,29 @@ begin_insertion (type) break; case direntry: - if (html) - command_name_condition (); - else - { - close_single_paragraph (); - filling_enabled = no_indent = 0; - inhibit_paragraph_indentation = 1; - insert_string ("START-INFO-DIR-ENTRY\n"); - } + close_single_paragraph (); + filling_enabled = no_indent = 0; + inhibit_paragraph_indentation = 1; + insert_string ("START-INFO-DIR-ENTRY\n"); + break; + + case documentdescription: + { + char *desc; + int start_of_end; + int save_fixed_width; + + discard_until ("\n"); /* ignore the @documentdescription line */ + start_of_end = get_until ("\n@end documentdescription", &desc); + save_fixed_width = in_fixed_width_font; + + in_fixed_width_font = 0; + document_description = expansion (desc, 0); + free (desc); + + in_fixed_width_font = save_fixed_width; + input_text_offset = start_of_end; /* go back to the @end to match */ + } break; case quotation: @@ -443,7 +463,7 @@ begin_insertion (type) /* Kludge alert: if <pre> is followed by a newline, IE3 renders an extra blank line before the pre-formatted block. Other browsers seem to not mind one way or the other. */ - add_word ("<pre>"); + add_word ("<br><pre>"); if (type != format && type != smallformat) current_indent += default_indentation_increment; @@ -492,6 +512,8 @@ begin_insertion (type) else add_word (dl_tag); } + if (xml) + xml_begin_table (type, insertion_stack->item_function); break; case enumerate: @@ -509,6 +531,9 @@ begin_insertion (type) if (html) enum_html (); + if (xml) + xml_begin_enumerate (enumeration_arg); + if (isdigit (*enumeration_arg)) start_enumerating (atoi (enumeration_arg), ENUM_DIGITS); else @@ -519,7 +544,9 @@ begin_insertion (type) case group: /* Only close the paragraph if we are not inside of an @example-like environment. */ - if (!insertion_stack->next + if (xml) + xml_insert_element (GROUP, START); + else if (!insertion_stack->next || (insertion_stack->next->insertion != display && insertion_stack->next->insertion != smalldisplay && insertion_stack->next->insertion != example @@ -581,6 +608,8 @@ begin_insertion (type) close_single_paragraph (); inhibit_paragraph_indentation = 1; filling_enabled = indented_fill = no_indent = 0; + if (html) + add_word ("<div align=\"left\">"); break; case flushright: @@ -588,6 +617,8 @@ begin_insertion (type) filling_enabled = indented_fill = no_indent = 0; inhibit_paragraph_indentation = 1; force_flush_right++; + if (html) + add_word ("<div align=\"right\">"); break; default: @@ -627,12 +658,64 @@ end_insertion (type) pop_insertion (); + if (xml) + { + switch (type) + { + case ifinfo: + case documentdescription: + break; + case quotation: + xml_insert_element (QUOTATION, END); + break; + case example: + xml_insert_element (EXAMPLE, END); + break; + case smallexample: + xml_insert_element (SMALLEXAMPLE, END); + break; + case lisp: + xml_insert_element (LISP, END); + break; + case smalllisp: + xml_insert_element (SMALLLISP, END); + break; + case cartouche: + xml_insert_element (CARTOUCHE, END); + break; + case format: + xml_insert_element (FORMAT, END); + break; + case smallformat: + xml_insert_element (SMALLFORMAT, END); + break; + case display: + xml_insert_element (DISPLAY, END); + break; + case smalldisplay: + xml_insert_element (SMALLDISPLAY, END); + break; + case table: + case ftable: + case vtable: + case itemize: + xml_end_table (type); + break; + case enumerate: + xml_end_enumerate (type); + break; + case group: + xml_insert_element (GROUP, END); + break; + } + } switch (type) { /* Insertions which have no effect on paragraph formatting. */ + case documentdescription: case ifclear: - case ifhtml: case ifinfo: + case ifhtml: case ifnothtml: case ifnotinfo: case ifnottex: @@ -680,6 +763,11 @@ end_insertion (type) break; case flushleft: + if (html) + add_word ("</div>\n"); + close_insertion_paragraph (); + break; + case group: case cartouche: close_insertion_paragraph (); @@ -724,6 +812,8 @@ end_insertion (type) case flushright: force_flush_right--; + if (html) + add_word ("</div>\n"); close_insertion_paragraph (); break; @@ -750,7 +840,7 @@ end_insertion (type) case deftypeivar: if (html) /* close the tables which has been opened in defun.c */ - add_word ("</TD></TR>\n</TABLE>\n"); + add_word ("</td></tr>\n</table>\n"); break; } /* switch (base_type)... */ @@ -790,12 +880,11 @@ discard_insertions (specials_ok) else { char *offender = insertion_type_pname (insertion_stack->insertion); - char *current_filename = input_filename; - input_filename = insertion_stack->filename; - line_number = insertion_stack->line_number; - line_error (_("No matching `%cend %s'"), COMMAND_PREFIX, offender); - input_filename = current_filename; + file_line_error (insertion_stack->filename, + insertion_stack->line_number, + _("No matching `%cend %s'"), COMMAND_PREFIX, + offender); pop_insertion (); } } @@ -807,75 +896,103 @@ discard_insertions (specials_ok) void cm_quotation () { + if (xml) + xml_insert_element (QUOTATION, START); begin_insertion (quotation); } void cm_example () { + if (xml) + xml_insert_element (EXAMPLE, START); begin_insertion (example); } void cm_smallexample () { + if (xml) + xml_insert_element (SMALLEXAMPLE, START); begin_insertion (smallexample); } void cm_lisp () { + if (xml) + xml_insert_element (LISP, START); begin_insertion (lisp); } void cm_smalllisp () { + if (xml) + xml_insert_element (SMALLLISP, START); begin_insertion (smalllisp); } -/* @cartouche/@end cartouche draws box with rounded corners in - TeX output. Right now, just a no-op insertion. */ void cm_cartouche () { + if (xml) + xml_insert_element (CARTOUCHE, START); begin_insertion (cartouche); } void cm_format () { + if (xml) + xml_insert_element (FORMAT, START); begin_insertion (format); } void cm_smallformat () { + if (xml) + xml_insert_element (SMALLFORMAT, START); begin_insertion (smallformat); } void cm_display () { + if (xml) + xml_insert_element (DISPLAY, START); begin_insertion (display); } void cm_smalldisplay () { + if (xml) + xml_insert_element (SMALLDISPLAY, START); begin_insertion (smalldisplay); } void cm_direntry () { - if (no_headers || html) + if (html || xml) command_name_condition (); else begin_insertion (direntry); } void +cm_documentdescription () +{ + if (html || xml) + begin_insertion (documentdescription); + else + command_name_condition (); +} + + +void cm_itemize () { begin_insertion (itemize); @@ -918,6 +1035,77 @@ cm_enumerate () do_enumeration (enumerate, "1"); } +/* Handle verbatim environment: + find_end_verbatim == 0: process until end of file + find_end_verbatim != 0: process until 'COMMAND_PREFIXend verbatim' + or end of file + + We cannot simply copy input stream onto output stream; as the + verbatim environment may be encapsulated in an @example environment, + for example. */ +void +handle_verbatim_environment (find_end_verbatim) + int find_end_verbatim; +{ + int character; + int seen_end = 0; + int save_filling_enabled = filling_enabled; + int save_inhibit_paragraph_indentation = inhibit_paragraph_indentation; + + close_single_paragraph (); + inhibit_paragraph_indentation = 1; + filling_enabled = 0; + in_fixed_width_font++; + last_char_was_newline = 0; + + /* No indentation: this is verbatim after all + If you want indent, enclose @verbatim in @example + current_indent += default_indentation_increment; + */ + + if (html) + add_word ("<pre>"); + + while (input_text_offset < input_text_length) + { + character = curchar (); + + if (character == '\n') + line_number++; + /* + Assume no newlines in END_VERBATIM + */ + else if (find_end_verbatim && (character == COMMAND_PREFIX) /* @ */ + && (input_text_length - input_text_offset > sizeof (END_VERBATIM)) + && !strncmp (&input_text[input_text_offset+1], END_VERBATIM, + sizeof (END_VERBATIM)-1)) + { + input_text_offset += sizeof (END_VERBATIM); + seen_end = 1; + break; + } + + add_char (character); + input_text_offset++; + } + + if (find_end_verbatim && !seen_end) + warning (_("end of file inside verbatim block")); + + if (html) + add_word ("</pre>"); + + in_fixed_width_font--; + filling_enabled = save_filling_enabled; + inhibit_paragraph_indentation = save_inhibit_paragraph_indentation; +} + +void +cm_verbatim () +{ + handle_verbatim_environment (1); +} + void cm_table () { @@ -1087,6 +1275,10 @@ cm_end () line_error (_("Bad argument to `%s', `%s', using `%s'"), command, temp, insertion_type_pname (current_insertion_type ())); } + if (xml && type == menu) /* fixme */ + { + xml_end_menu (); + } end_insertion (type); free (temp); } @@ -1096,7 +1288,7 @@ cm_end () static int itemx_flag = 0; /* Return whether CMD takes a brace-delimited {arg}. */ -static int +/*static */int command_needs_braces (cmd) char *cmd; { @@ -1195,6 +1387,8 @@ cm_item () } add_word ("<li>"); } + else if (xml) + xml_begin_item (); else { start_paragraph (); @@ -1289,6 +1483,15 @@ cm_item () last_html_output_position = output_position; add_word ("<dd>"); } + else if (xml) /* && docbook)*/ /* 05-08 */ + { + xml_begin_table_item (); + if (item_func && *item_func) + execute_string ("%s{%s}", item_func, rest_of_line); + else + execute_string ("%s", rest_of_line); + xml_continue_table_item (); + } else { /* We need this to determine if we have two @item's in a row diff --git a/contrib/texinfo/makeinfo/insertion.h b/contrib/texinfo/makeinfo/insertion.h index 6f4a24b..51540b2 100644 --- a/contrib/texinfo/makeinfo/insertion.h +++ b/contrib/texinfo/makeinfo/insertion.h @@ -1,7 +1,7 @@ /* insertion.h -- declarations for insertion.c. - $Id: insertion.h,v 1.6 1999/07/06 23:12:58 karl Exp $ + $Id: insertion.h,v 1.8 2001/06/30 00:29:41 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2001 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 @@ -22,15 +22,15 @@ /* Must match list in insertion.c. */ enum insertion_type -{ +{ cartouche, defcv, deffn, defivar, defmac, defmethod, defop, defopt, defspec, deftp, deftypefn, deftypefun, deftypeivar, deftypemethod, deftypeop, deftypevar, deftypevr, defun, defvar, defvr, detailmenu, - direntry, display, enumerate, example, flushleft, flushright, format, - ftable, group, ifclear, ifhtml, ifinfo, ifnothtml, ifnotinfo, - ifnottex, ifset, iftex, itemize, lisp, menu, multitable, quotation, - rawhtml, rawtex, smalldisplay, smallexample, smallformat, smalllisp, - table, tex, vtable, bad_type + direntry, display, documentdescription, enumerate, example, flushleft, + flushright, format, ftable, group, ifclear, ifhtml, ifinfo, ifnothtml, + ifnotinfo, ifnottex, ifset, iftex, itemize, lisp, menu, multitable, + quotation, rawhtml, rawtex, smalldisplay, smallexample, smallformat, + smalllisp, verbatim, table, tex, vtable, bad_type }; typedef struct istack_elt diff --git a/contrib/texinfo/makeinfo/lang.c b/contrib/texinfo/makeinfo/lang.c index eeb9ef5..468bed8 100644 --- a/contrib/texinfo/makeinfo/lang.c +++ b/contrib/texinfo/makeinfo/lang.c @@ -1,7 +1,7 @@ -/* lang.c -- language depend behaviour (startpoint) - $Id: lang.c,v 1.11 1999/07/13 21:16:29 karl Exp $ +/* lang.c -- language-dependent support. + $Id: lang.c,v 1.14 2001/09/11 18:04:35 karl Exp $ - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 01 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 @@ -17,20 +17,150 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Written by Karl Heinz Marbaise <kama@hippo.fido.de>. */ + Originally written by Karl Heinz Marbaise <kama@hippo.fido.de>. */ #include "system.h" #include "cmds.h" #include "lang.h" #include "makeinfo.h" +#include "xml.h" /* Current document encoding. */ -char *document_encoding = NULL; +encoding_code_type document_encoding_code = no_encoding; /* Current language code; default is English. */ language_code_type language_code = en; -language_struct language_table[] = { +/* Translation table between HTML and ISO Codes. The last item is + hopefully the Unicode. It might be possible that those Unicodes are + not correct, cause I didn't check them. kama */ +iso_map_type iso8859_1_map [] = { + { "nbsp", 0xA0, 0x00A0 }, + { "iexcl", 0xA1, 0x00A1 }, + { "cent", 0xA2, 0x00A2 }, + { "pound", 0xA3, 0x00A3 }, + { "curren", 0xA4, 0x00A4 }, + { "yen", 0xA5, 0x00A5 }, + { "brkbar", 0xA6, 0x00A6 }, + { "sect", 0xA7, 0x00A7 }, + { "uml", 0xA8, 0x00A8 }, + { "copy", 0xA9, 0x00A9 }, + { "ordf", 0xAA, 0x00AA }, + { "laquo", 0xAB, 0x00AB }, + { "not", 0xAC, 0x00AC }, + { "shy", 0xAD, 0x00AD }, + { "reg", 0xAE, 0x00AE }, + { "hibar", 0xAF, 0x00AF }, + { "deg", 0xB0, 0x00B0 }, + { "plusmn", 0xB1, 0x00B1 }, + { "sup2", 0xB2, 0x00B2 }, + { "sup3", 0xB3, 0x00B3 }, + { "acute", 0xB4, 0x00B4 }, + { "micro", 0xB5, 0x00B5 }, + { "para", 0xB6, 0x00B6 }, + { "middot", 0xB7, 0x00B7 }, + { "cedil", 0xB8, 0x00B8 }, + { "sup1", 0xB9, 0x00B9 }, + { "ordm", 0xBA, 0x00BA }, + { "raquo", 0xBB, 0x00BB }, + { "frac14", 0xBC, 0x00BC }, + { "frac12", 0xBD, 0x00BD }, + { "frac34", 0xBE, 0x00BE }, + { "iquest", 0xBF, 0x00BF }, + { "Agrave", 0xC0, 0x00C0 }, + { "Aacute", 0xC1, 0x00C1 }, + { "Acirc", 0xC2, 0x00C2 }, + { "Atilde", 0xC3, 0x00C3 }, + { "Auml", 0xC4, 0x00C4 }, + { "Aring", 0xC5, 0x00C5 }, + { "AElig", 0xC6, 0x00C6 }, + { "Ccedil", 0xC7, 0x00C7 }, + { "Ccedil", 0xC7, 0x00C7 }, + { "Egrave", 0xC8, 0x00C8 }, + { "Eacute", 0xC9, 0x00C9 }, + { "Ecirc", 0xCA, 0x00CA }, + { "Euml", 0xCB, 0x00CB }, + { "Igrave", 0xCC, 0x00CC }, + { "Iacute", 0xCD, 0x00CD }, + { "Icirc", 0xCE, 0x00CE }, + { "Iuml", 0xCF, 0x00CF }, + { "ETH", 0xD0, 0x00D0 }, /* I don't know ;-( */ + { "Ntilde", 0xD1, 0x00D1 }, + { "Ograve", 0xD2, 0x00D2 }, + { "Oacute", 0xD3, 0x00D3 }, + { "Ocirc", 0xD4, 0x00D4 }, + { "Otilde", 0xD5, 0x00D5 }, + { "Ouml", 0xD6, 0x00D6 }, + { "times", 0xD7, 0x00D7 }, + { "Oslash", 0xD8, 0x00D8 }, + { "Ugrave", 0xD9, 0x00D9 }, + { "Uacute", 0xDA, 0x00DA }, + { "Ucirc", 0xDB, 0x00DB }, + { "Uuml", 0xDC, 0x00DC }, + { "Yacute", 0xDD, 0x00DD }, + { "THORN", 0xDE, 0x00DE }, + { "szlig", 0xDF, 0x00DF }, + { "agrave", 0xE0, 0x00E0 }, + { "aacute", 0xE1, 0x00E1 }, + { "acirc", 0xE2, 0x00E2 }, + { "atilde", 0xE3, 0x00E3 }, + { "auml", 0xE4, 0x00E4 }, + { "aring", 0xE5, 0x00E5 }, + { "aelig", 0xE6, 0x00E6 }, + { "ccedil", 0xE7, 0x00E7 }, + { "egrave", 0xE8, 0x00E8 }, + { "eacute", 0xE9, 0x00E9 }, + { "ecirc", 0xEA, 0x00EA }, + { "euml", 0xEB, 0x00EB }, + { "igrave", 0xEC, 0x00EC }, + { "iacute", 0xED, 0x00ED }, + { "icirc", 0xEE, 0x00EE }, + { "iuml", 0xEF, 0x00EF }, + { "eth", 0xF0, 0x00F0 }, + { "ntilde", 0xF1, 0x00F1 }, + { "ograve", 0xF2, 0x00F2 }, + { "oacute", 0xF3, 0x00F3 }, + { "ocirc", 0xF4, 0x00F4 }, + { "otilde", 0xF5, 0x00F5 }, + { "ouml", 0xF6, 0x00F6 }, + { "divide", 0xF7, 0x00F7 }, + { "oslash", 0xF8, 0x00F8 }, + { "ugrave", 0xF9, 0x00F9 }, + { "uacute", 0xFA, 0x00FA }, + { "ucirc", 0xFB, 0x00FB }, + { "uuml", 0xFC, 0x00FC }, + { "yacute", 0xFD, 0x00FD }, + { "thorn", 0xFE, 0x00FE }, + { "yuml", 0xFF, 0x00FF } +}; + +/* This might be put into structure below and NOT coded via define, + because some translation tables could contain different numbers of + characters, but for now it suffices. */ +#define ISO_MAP_SIZE (sizeof (iso8859_1_map) / sizeof (iso8859_1_map[0])) + +encoding_type encoding_table[] = { + { no_encoding, "(no encoding)", NULL }, + { ISO_8859_1, "ISO-8859-1", (iso_map_type *) iso8859_1_map }, + { ISO_8859_2, "ISO-8859-2", NULL }, + { ISO_8859_3, "ISO-8859-3", NULL }, + { ISO_8859_4, "ISO-8859-4", NULL }, + { ISO_8859_5, "ISO-8859-5", NULL }, + { ISO_8859_6, "ISO-8859-6", NULL }, + { ISO_8859_7, "ISO-8859-7", NULL }, + { ISO_8859_8, "ISO-8859-8", NULL }, + { ISO_8859_9, "ISO-8859-9", NULL }, + { ISO_8859_10, "ISO-8859-10", NULL }, + { ISO_8859_11, "ISO-8859-11", NULL }, + { ISO_8859_12, "ISO-8859-12", NULL }, + { ISO_8859_13, "ISO-8859-13", NULL }, + { ISO_8859_14, "ISO-8859-14", NULL }, + { ISO_8859_15, "ISO-8859-15", NULL }, + { last_encoding_code, NULL, NULL } +}; + + +language_type language_table[] = { { aa, "aa", "Afar" }, { ab, "ab", "Abkhazian" }, { af, "af", "Afrikaans" }, @@ -173,16 +303,18 @@ language_struct language_table[] = { { last_language_code, NULL, NULL } }; + + /* @documentlanguage. Maybe we'll do something useful with this in the future. For now, we just recognize it. */ void cm_documentlanguage () { language_code_type c; - char *lang_arg; + char *lang_arg; /* Read the line with the language code on it. */ - get_rest_of_line (1, &lang_arg); + get_rest_of_line (0, &lang_arg); /* Linear search is fine these days. */ for (c = aa; c != last_language_code; c++) @@ -203,11 +335,178 @@ cm_documentlanguage () -/* @documentencoding. Set global. */ +/* Search through the encoding table for the given character, returning + its equivalent. */ + +static int +cm_search_iso_map (html) + char *html; +{ + int i; + iso_map_type *iso = encoding_table[document_encoding_code].isotab; + + /* If no conversion table for this encoding, quit. */ + if (!iso) + return -1; + + for (i = 0; i < ISO_MAP_SIZE; i++) + { + if (strcmp (html, iso[i].html) == 0) + return i; + } + + return -1; +} + + +/* @documentencoding. Set the translation table. */ + void cm_documentencoding () { - get_rest_of_line (1, &document_encoding); + encoding_code_type enc; + char *enc_arg; + + get_rest_of_line (1, &enc_arg); + + /* See if we have this encoding. */ + for (enc = ISO_8859_1; enc != last_encoding_code; enc++) + { + if (strcasecmp (enc_arg, encoding_table[enc].ecname) == 0) + { + document_encoding_code = enc; + break; + } + } + + /* If we didn't find this code, complain. */ + if (enc == last_encoding_code) + warning (_("unrecogized encoding name `%s'"), enc_arg); + + else if (encoding_table[document_encoding_code].isotab == NULL) + warning (_("sorry, encoding `%s' not supported"), enc_arg); + + free (enc_arg); +} + + +/* If html or xml output, add HTML_STR to the output. If not html and + the user requested encoded output, add the real 8-bit character + corresponding to HTML_STR from the translation tables. Otherwise, + add INFO_STR. */ + +void +add_encoded_char (html_str, info_str) + char *html_str; + char *info_str; +{ + if (html || xml) + add_word_args ("&%s;", html_str); + else if (enable_encoding) + { + /* Look for HTML_STR in the current translation table. */ + int rc = cm_search_iso_map (html_str); + if (rc >= 0) + /* We found it, add the real character. */ + add_char (encoding_table[document_encoding_code].isotab[rc].bytecode); + else + { /* We didn't find it, that seems bad. */ + warning (_("invalid encoded character `%s'"), html_str); + add_word (info_str); + } + } + else + add_word (info_str); +} + + + +/* Output an accent for HTML or XML. */ + +static void +cm_accent_generic_html (arg, start, end, html_supported, single, + html_solo_standalone, html_solo) + int arg, start, end; + char *html_supported; + int single; + int html_solo_standalone; + char *html_solo; +{ + static int valid_html_accent; /* yikes */ + + if (arg == START) + { /* If HTML has good support for this character, use it. */ + if (strchr (html_supported, curchar ())) + { /* Yes; start with an ampersand. The character itself + will be added later in read_command (makeinfo.c). */ + valid_html_accent = 1; + add_char ('&'); + } + else + { + valid_html_accent = 0; + if (html_solo_standalone) + { /* No special HTML support, so produce standalone char. */ + add_word_args ("&%s;", html_solo); + } + else + /* If the html_solo does not exist as standalone character + (namely ˆ ` ˜), then we use + the single character version instead. */ + add_char (single); + } + } + else if (arg == END) + { /* Only if we saw a valid_html_accent can we use the full + HTML accent (umlaut, grave ...). */ + if (valid_html_accent) + { + add_word (html_solo); + add_char (';'); + } + } +} + + +static void +cm_accent_generic_no_headers (arg, start, end, single, html_solo) + int arg, start, end; + int single; + char *html_solo; +{ + if (arg == END) + { + if (no_encoding) + add_char (single); + else + { + int rc; + char *buffer = xmalloc (1 + strlen (html_solo) + 1); + buffer[0] = output_paragraph[end - 1]; + buffer[1] = 0; + strcat (buffer, html_solo); + + rc = cm_search_iso_map (buffer); + if (rc >= 0) + /* A little bit tricky ;-) + Here we replace the character which has + been inserted in read_command with + the value we have found in converting table + Does there exist a better way to do this? kama. */ + output_paragraph[end - 1] + = encoding_table[document_encoding_code].isotab[rc].bytecode; + else + { /* If we didn't find a translation for this character, + put the single instead. E.g., &Xuml; does not exist so X¨ + should be produced. */ + warning (_("%s is an invalid ISO code, using %c"), + buffer, single); + add_char (single); + } + + free (buffer); + } + } } @@ -219,6 +518,8 @@ void cm_accent (arg) int arg; { + int old_escape_html = escape_html; + escape_html = 0; if (arg == START) { /* Must come first to avoid ambiguity with overdot. */ @@ -228,7 +529,7 @@ cm_accent (arg) else if (arg == END) { if (strcmp (command, "=") == 0) /* macron */ - add_word (html ? "¯" : "="); + add_word ((html || xml) ? "¯" : "="); else if (strcmp (command, "H") == 0) /* Hungarian umlaut */ add_word ("''"); else if (strcmp (command, "dotaccent") == 0) /* overdot */ @@ -242,18 +543,19 @@ cm_accent (arg) else if (strcmp (command, "ubaraccent") == 0) /* underbar */ add_char ('_'); else if (strcmp (command, "v") == 0) /* hacek/check */ - add_word (html ? "<" : "<"); + add_word ((html || xml) ? "<" : "<"); } + escape_html = old_escape_html; } /* Common routine for the accent characters that have support in HTML. If the character being accented is in the HTML_SUPPORTED set, then produce &CHTML_SOLO;, for example, Ä for an A-umlaut. If not in HTML_SUPPORTED, just produce &HTML_SOLO;X for the best we can do with - at an X-umlaut. Finally, if not producing HTML, just use SINGLE, a + at an X-umlaut. If not producing HTML, just use SINGLE, a character such as " which is the best plain text representation we - can manage. If HTML_SOLO_STANDALONE is zero the given HTML_SOLO - does not exist as valid standalone character in HTML. */ + can manage. If HTML_SOLO_STANDALONE is nonzero the given HTML_SOLO + exists as valid standalone character in HTML, e.g., ¨. */ static void cm_accent_generic (arg, start, end, html_supported, single, @@ -264,47 +566,19 @@ cm_accent_generic (arg, start, end, html_supported, single, int html_solo_standalone; char *html_solo; { - if (html) - { - static int valid_html_accent; - - if (arg == START) - { /* If HTML has good support for this character, use it. */ - if (strchr (html_supported, curchar ())) - { /* Yes; start with an ampersand. The character itself - will be added later in read_command (makeinfo.c). */ - add_char ('&'); - valid_html_accent = 1; - } - else - { /* No special HTML support, so produce standalone char. */ - valid_html_accent = 0; - if (html_solo_standalone) - { - add_char ('&'); - add_word (html_solo); - add_char (';'); - } - else - /* If the html_solo does not exist as standalone character - (namely ˆ ` ˜), then we use - the single character version instead. */ - add_char (single); - } - } - else if (arg == END) - { /* Only if we saw a valid_html_accent can we use the full - HTML accent (umlaut, grave ...). */ - if (valid_html_accent) - { - add_word (html_solo); - add_char (';'); - } - } - } + if (html || xml) + cm_accent_generic_html (arg, start, end, html_supported, + single, html_solo_standalone, html_solo); + else if (no_headers) + cm_accent_generic_no_headers (arg, start, end, single, html_solo); else if (arg == END) - { /* Not producing HTML, so just use the normal character. */ - add_char (single); + { + if (enable_encoding) + /* use 8-bit if available */ + cm_accent_generic_no_headers (arg, start, end, single, html_solo); + else + /* use regular character */ + add_char (single); } } @@ -347,7 +621,7 @@ void cm_accent_tilde (arg, start, end) int arg, start, end; { - cm_accent_generic (arg, start, end, "AOano", '~', 0, "tilde"); + cm_accent_generic (arg, start, end, "ANOano", '~', 0, "tilde"); } @@ -356,6 +630,9 @@ cm_accent_tilde (arg, start, end) void cm_special_char (arg) { + int old_escape_html = escape_html; + escape_html = 0; + if (arg == START) { if ((*command == 'L' || *command == 'l' @@ -363,34 +640,37 @@ cm_special_char (arg) && command[1] == 0) { /* Lslash lslash Oslash oslash. Lslash and lslash aren't supported in HTML. */ - if (html && (command[0] == 'O' || command[0] == 'o')) - add_word_args ("&%cslash;", command[0]); + if ((html || xml) && command[0] == 'O') + add_encoded_char ("Oslash", "/O"); + else if ((html || xml) && command[0] == 'o') + add_encoded_char ("oslash", "/o"); else add_word_args ("/%c", command[0]); } else if (strcmp (command, "exclamdown") == 0) - add_word (html ? "¡" : "!"); + add_encoded_char ("iexcl", "!"); else if (strcmp (command, "pounds") == 0) - add_word (html ? "£" : "#"); + add_encoded_char ("pound" , "#"); else if (strcmp (command, "questiondown") == 0) - add_word (html ? "¿" : "?"); + add_encoded_char ("iquest", "?"); else if (strcmp (command, "AE") == 0) - add_word (html ? "Æ" : command); + add_encoded_char ("AElig", command); else if (strcmp (command, "ae") == 0) - add_word (html ? "æ" : command); + add_encoded_char ("aelig", command); else if (strcmp (command, "OE") == 0) - add_word (html ? "Œ" : command); + add_word ("Œ", command); else if (strcmp (command, "oe") == 0) - add_word (html ? "œ" : command); + add_word ("œ", command); else if (strcmp (command, "AA") == 0) - add_word (html ? "Å" : command); + add_encoded_char ("Aring", command); else if (strcmp (command, "aa") == 0) - add_word (html ? "å" : command); + add_encoded_char ("aring", command); else if (strcmp (command, "ss") == 0) - add_word (html ? "ß" : command); + add_encoded_char ("szlig", command); else line_error ("cm_special_char internal error: command=@%s", command); } + escape_html = old_escape_html; } /* Dotless i or j. */ @@ -400,6 +680,7 @@ cm_dotless (arg, start, end) { if (arg == END) { + xml_no_para --; if (output_paragraph[start] != 'i' && output_paragraph[start] != 'j') /* This error message isn't perfect if the argument is multiple characters, but it doesn't seem worth getting right. */ @@ -412,4 +693,6 @@ cm_dotless (arg, start, end) /* We've already inserted the `i' or `j', so nothing to do. */ } + else + xml_no_para ++; } diff --git a/contrib/texinfo/makeinfo/lang.h b/contrib/texinfo/makeinfo/lang.h index 25bf0bd..57d4946 100644 --- a/contrib/texinfo/makeinfo/lang.h +++ b/contrib/texinfo/makeinfo/lang.h @@ -1,7 +1,7 @@ /* lang.h -- declarations for language codes etc. - $Id: lang.h,v 1.6 1999/03/22 20:07:34 karl Exp $ + $Id: lang.h,v 1.7 2001/09/11 18:04:29 karl Exp $ - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2001 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 @@ -17,15 +17,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Written by Karl Heinz Marbaise <kama@hippo.fido.de>. */ + Originally written by Karl Heinz Marbaise <kama@hippo.fido.de>. */ #ifndef LANG_H #define LANG_H -/* The langauge code which can be changed through @documentlanguage - * Actualy Info does not support this (may be in the future) ;-) - * Default for language code is en (english!) kama - * These code should ISO 639 two letter codes. +/* The language code which can be changed through @documentlanguage + * Actually we don't currently support this (may be in the future) ;-) + * These code are the ISO-639 two letter codes. */ typedef enum { @@ -61,19 +60,71 @@ typedef enum /* The current language code. */ extern language_code_type language_code; -/* Information about all valid languages. */ + +/* Information for each language. */ typedef struct { language_code_type lc; /* language code as enum type */ char *abbrev; /* two letter language code */ char *desc; /* full name for language code */ -} language_struct; -extern language_struct language_table[]; +} language_type; + +extern language_type language_table[]; + + + +/* The document encoding. This is usefull if we working e.g. + * with german Texinfo so we can produce correct german umlaut + * while creating output (--no-headers ASCII like). + */ +typedef enum { + no_encoding, + ISO_8859_1, /* default for en, de, */ + ISO_8859_2, /* actualy not supported like the rest below */ + ISO_8859_3, + ISO_8859_4, + ISO_8859_5, + ISO_8859_6, + ISO_8859_7, + ISO_8859_8, + ISO_8859_9, + ISO_8859_10, + ISO_8859_11, + ISO_8859_12, + ISO_8859_13, + ISO_8859_14, + ISO_8859_15, + last_encoding_code +} encoding_code_type; + +/* The current document encoding, or null if not set. */ +extern encoding_code_type document_encoding_code; + -/* The encoding, or null if not set. */ -extern char *document_encoding; +/* Maps an HTML abbreviation to ISO and Unicode codes for a given code. */ + +typedef unsigned short int unicode_t; /* should be 16 bits */ +typedef unsigned char byte_t; + +typedef struct +{ + char *html; /* HTML equivalent like umlaut auml => ä */ + byte_t bytecode; /* 8-Bit Code (ISO 8859-1,...) */ + unicode_t unicode; /* Unicode in U+ convention */ +} iso_map_type; + +/* Information about the document encoding. */ +typedef struct +{ + encoding_code_type ec; /* document encoding type (see above enum) */ + char *ecname; /* encoding name like ISO-8859-1 */ + iso_map_type *isotab; /* address of ISO translation table */ +} encoding_type; +/* Table with all the encoding codes that we recognize. */ +extern encoding_type encoding_table[]; + /* The commands. */ extern void cm_documentlanguage (), cm_documentencoding (); diff --git a/contrib/texinfo/makeinfo/macro.c b/contrib/texinfo/makeinfo/macro.c index 8c89da2..2bba378 100644 --- a/contrib/texinfo/makeinfo/macro.c +++ b/contrib/texinfo/makeinfo/macro.c @@ -1,7 +1,7 @@ /* macro.c -- user-defined macros for Texinfo. - $Id: macro.c,v 1.10 1999/08/17 21:06:35 karl Exp $ + $Id: macro.c,v 1.12 2002/03/02 15:05:21 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2002 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 @@ -590,10 +590,8 @@ define_macro (mactype, recursive) { if ((input_text_offset + 9) > input_text_length) { - int temp_line = line_number; - line_number = defining_line; - line_error (_("%cend macro not found"), COMMAND_PREFIX); - line_number = temp_line; + file_line_error (input_filename, defining_line, + _("%cend macro not found"), COMMAND_PREFIX); return; } @@ -1002,6 +1000,8 @@ cm_alias () skip_whitespace (); get_until_in_line (1, "=", &(a->alias)); + canon_white (a->alias); + discard_until ("="); skip_whitespace (); get_until_in_line (0, " ", &(a->mapto)); diff --git a/contrib/texinfo/makeinfo/makeinfo.h b/contrib/texinfo/makeinfo/makeinfo.h index caff188..21aae89 100644 --- a/contrib/texinfo/makeinfo/makeinfo.h +++ b/contrib/texinfo/makeinfo/makeinfo.h @@ -1,7 +1,7 @@ /* makeinfo.h -- declarations for Makeinfo. - $Id: makeinfo.h,v 1.25 1999/09/18 18:09:22 karl Exp $ + $Id: makeinfo.h,v 1.31 2001/09/11 16:37:51 karl Exp $ - Copyright (C) 1996, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1996, 97, 98, 99, 2000, 01 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 @@ -116,6 +116,15 @@ DECLARE (int, multitable_active, 0); /* Nonzero means that we're generating HTML. */ DECLARE (int, html, 0); +/* Nonzero means that we're generating XML. */ +DECLARE (int, xml, 0); + +/* Nonzero means that we're generating DocBook. */ +DECLARE (int, docbook, 0); + +/* Nonzero means true 8-bit output for Info and plain text. */ +DECLARE (int, enable_encoding, 0); + /* Nonzero means escape characters in HTML output. */ DECLARE (int, escape_html, 1); extern char *escape_string (); /* do HTML escapes */ @@ -135,6 +144,9 @@ DECLARE (char *, current_node, NULL); /* Command name in the process of being hacked. */ DECLARE (char *, command, NULL); +/* @documentdescription ... @end documentdescription. */ +DECLARE (char *, document_description, NULL); + /* Nonzero if the last character inserted has the syntax class of NEWLINE. */ DECLARE (int, last_char_was_newline, 1); @@ -144,6 +156,7 @@ DECLARE (char *, input_text, (char *)NULL); DECLARE (int, input_text_length, 0); DECLARE (int, input_text_offset, 0); DECLARE (int, line_number, 0); +DECLARE (char *, toplevel_output_filename, NULL); #define curchar() input_text[input_text_offset] /* A colon separated list of directories to search for files included @@ -181,6 +194,9 @@ DECLARE (int, verbose_mode, 0); /* Nonzero means prefix each @chapter, ... with a number like 1. (--number-sections) */ DECLARE (int, number_sections, 0); +/* Nonzero means split size. When zero, DEFAULT_SPLIT_SIZE is used. */ +DECLARE (int, split_size, 0); + /* Nonzero means expand node names and references while validating. This will avoid errors when the Texinfo document uses features like @@ and @value inconsistently in node names, but will slow @@ -225,6 +241,8 @@ DECLARE (int, expensive_validation, 0); #define COMMAND_PREFIX '@' +#define END_VERBATIM "end verbatim" + /* Stuff for splitting large files. */ #define SPLIT_SIZE_THRESHOLD 70000 /* What's good enough for Stallman... */ #define DEFAULT_SPLIT_SIZE 50000 /* Is probably good enough for me. */ @@ -256,5 +274,4 @@ DECLARE (int, splitting, 1); /* Defaults to true for now. */ #define looking_at(string) \ (strncmp (input_text + input_text_offset, string, strlen (string)) == 0) - #endif /* not MAKEINFO_H */ diff --git a/contrib/texinfo/makeinfo/multi.c b/contrib/texinfo/makeinfo/multi.c index b41bb47..6b6ec3d 100644 --- a/contrib/texinfo/makeinfo/multi.c +++ b/contrib/texinfo/makeinfo/multi.c @@ -1,7 +1,7 @@ /* multi.c -- multitable stuff for makeinfo. - $Id: multi.c,v 1.18 1999/08/17 21:06:56 karl Exp $ + $Id: multi.c,v 1.23 2002/01/19 01:09:08 karl Exp $ - Copyright (C) 1996, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1996, 97, 98, 99, 2000, 01, 02 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 @@ -15,11 +15,14 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Written by phr@gnu.org (Paul Rubin). */ #include "system.h" #include "insertion.h" #include "makeinfo.h" +#include "xml.h" #define MAXCOLS 100 /* remove this limit later @@ */ @@ -108,6 +111,8 @@ draw_horizontal_separator () add_word ("<hr>"); return; } + if (xml) + return; for (s = 0; s < envs[0].current_indent; s++) out_char (' '); @@ -156,6 +161,9 @@ do_multitable () /* scan the current item function to get the field widths and number of columns, and set up the output environment list accordingly. */ + /* if (docbook)*/ /* 05-08 */ + if (xml) + xml_no_para = 1; ncolumns = setup_multitable_parameters (); first_row = 1; @@ -163,6 +171,16 @@ do_multitable () current paragraph, so this is ok. */ if (html) add_word ("<p><table>"); + /* else if (docbook)*/ /* 05-08 */ + else if (xml) + { + int *widths = xmalloc (ncolumns * sizeof (int)); + int i; + for (i=0; i<ncolumns; i++) + widths[i] = envs[i+1].fill_column; + xml_begin_multitable (ncolumns, widths); + free (widths); + } if (hsep) draw_horizontal_separator (); @@ -199,7 +217,7 @@ find_template_width (params) do { - if (**params == '{' && (*params)[-1] != '@') + if (**params == '{' && (*params == start || (*params)[-1] != '@')) brace_level++; else if (**params == '}' && (*params)[-1] != '@') brace_level--; @@ -385,10 +403,17 @@ multitable_item () if (html) { if (!first_row) - add_word ("<br></tr>"); /* <br> for non-tables browsers. */ - add_word ("<tr align=\"left\"><td>"); + add_word ("<br></td></tr>"); /* <br> for non-tables browsers. */ + add_word ("<tr align=\"left\"><td valign=\"top\">"); first_row = 0; - return; + return 0; + } + /* else if (docbook)*/ /* 05-08 */ + else if (xml) + { + xml_end_multitable_row (first_row); + first_row = 0; + return 0; } first_row = 0; @@ -504,7 +529,10 @@ cm_tab () error (_("ignoring @tab outside of multitable")); if (html) - add_word ("<td>"); + add_word ("</td><td valign=\"top\">"); + /* else if (docbook)*/ /* 05-08 */ + else if (xml) + xml_end_multitable_column (); else nselect_next_environment (); @@ -516,7 +544,7 @@ cm_tab () void end_multitable () { - if (!html) + if (!html && !docbook) output_multitable_row (); /* Multitables cannot be nested. Otherwise, we'd have to save the @@ -528,7 +556,10 @@ end_multitable () close_insertion_paragraph (); if (html) - add_word ("<br></tr></table>\n"); + add_word ("<br></td></tr></table>\n"); + /* else if (docbook)*/ /* 05-08 */ + else if (xml) + xml_end_multitable (); #if 0 printf (_("** Multicolumn output from last row:\n")); diff --git a/contrib/texinfo/makeinfo/node.c b/contrib/texinfo/makeinfo/node.c index 8dbbd42..3c7a27d 100644 --- a/contrib/texinfo/makeinfo/node.c +++ b/contrib/texinfo/makeinfo/node.c @@ -1,7 +1,7 @@ /* node.c -- nodes for Texinfo. - $Id: node.c,v 1.23 1999/09/20 12:31:21 karl Exp $ + $Id: node.c,v 1.31 2002/02/23 19:12:15 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2000, 01, 02 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 @@ -24,8 +24,10 @@ #include "macro.h" #include "makeinfo.h" #include "node.h" +#include "html.h" #include "sectioning.h" #include "insertion.h" +#include "xml.h" /* See comments in node.h. */ @@ -64,6 +66,12 @@ write_tag_table_internal (indirect_p) TAG_ENTRY *node; int old_indent = no_indent; + if (xml) + { + flush_output (); + return; + } + no_indent = 1; filling_enabled = 0; must_start_paragraph = 0; @@ -211,7 +219,25 @@ find_node (name) return tag; } -/* Similarly for next etc. references in a @node command, where we +/* Look in the tag table for a node whose file name is FNAME, and + return the associated tag_entry. If there's no such node in the + table, return NULL. */ +TAG_ENTRY * +find_node_by_fname (fname) + char *fname; +{ + TAG_ENTRY *tag = tag_table; + while (tag) + { + if (tag->html_fname && FILENAME_CMP (tag->html_fname, fname) == 0) + return tag; + tag = tag->next_ent; + } + + return tag; +} + +/* Remember next, prev, etc. references in a @node command, where we don't care about most of the entries. */ static void remember_node_node_reference (node) @@ -237,8 +263,8 @@ remember_node_node_reference (node) /* Remember NODE and associates. */ void -remember_node (node, prev, next, up, position, line_no, flags) - char *node, *prev, *next, *up; +remember_node (node, prev, next, up, position, line_no, fname, flags) + char *node, *prev, *next, *up, *fname; int position, line_no, flags; { /* Check for existence of this tag already. */ @@ -280,6 +306,7 @@ remember_node (node, prev, next, up, position, line_no, flags) node_number++; new->number = node_number; } + new->html_fname = fname; new->next_ent = tag_table; tag_table = new; } @@ -392,7 +419,7 @@ glean_node_from_menu (remember_ref, ref_type) char *nodename; char *line, *expanded_line; char *old_input = input_text; - size_t old_size = input_text_length; + int old_size = input_text_length; if (strncmp (&input_text[input_text_offset + 1], MENU_STARTER, @@ -457,9 +484,13 @@ set_current_output_filename (fname) void cm_node () { + static long epilogue_len = 0L; char *node, *prev, *next, *up; int new_node_pos, defaulting, this_section; int no_warn = 0; + char *fname_for_this_node = NULL; + char *tem; + TAG_ENTRY *tag = NULL; if (strcmp (command, "nwnode") == 0) no_warn = TAG_FLAG_NO_WARN; @@ -473,27 +504,12 @@ cm_node () if (!html && !already_outputting_pending_notes) { + if (!xml) close_paragraph (); output_pending_notes (); } - if (html && splitting && top_node_seen) - { - /* End the current split output file. */ - close_paragraph (); - output_pending_notes (); - start_paragraph (); - /* Fixme: html: need a navigation bar here. */ - add_word ("</body></html>\n"); - close_paragraph (); - fclose (output_stream); - output_stream = NULL; - } - - filling_enabled = indented_fill = 0; new_node_pos = output_position; - if (!html || (html && splitting)) - current_footnote_number = 1; if (macro_expansion_output_stream && !executing_string) append_to_expansion_output (input_text_offset + 1); @@ -510,6 +526,70 @@ cm_node () prev = get_node_token (0); up = get_node_token (0); + if (html && splitting + /* If there is a Top node, it always goes into index.html. So + don't start a new HTML file for Top. */ + && (top_node_seen || strcasecmp (node, "Top") != 0)) + { + /* We test *node here so that @node without a valid name won't + start a new file name with a bogus name such as ".html". + This could happen if we run under "--force", where we cannot + simply bail out. Continuing to use the same file sounds like + the best we can do in such cases. */ + if (current_output_filename && output_stream && *node) + { + char *fname_for_prev_node; + + if (current_node) + { + /* NOTE: current_node at this point still holds the name + of the previous node. */ + tem = expand_node_name (current_node); + fname_for_prev_node = nodename_to_filename (tem); + free (tem); + } + else /* could happen if their top node isn't named "Top" */ + fname_for_prev_node = filename_part (current_output_filename); + tem = expand_node_name (node); + fname_for_this_node = nodename_to_filename (tem); + free (tem); + /* Don't close current output file, if next output file is + to have the same name. This may happen at top level, or + if two nodes produce the same file name under --split. */ + if (FILENAME_CMP (fname_for_this_node, fname_for_prev_node) != 0) + { + long pos1 = 0; + + /* End the current split output file. */ + close_paragraph (); + output_pending_notes (); + start_paragraph (); + /* Compute the length of the HTML file's epilogue. We + cannot know the value until run time, due to the + text/binary nuisance on DOS/Windows platforms, where + 2 `\r' characters could be added to the epilogue when + it is written in text mode. */ + if (epilogue_len == 0) + { + flush_output (); + pos1 = ftell (output_stream); + } + add_word ("</body></html>\n"); + close_paragraph (); + if (epilogue_len == 0) + epilogue_len = ftell (output_stream) - pos1; + fclose (output_stream); + output_stream = NULL; + tag = find_node_by_fname (fname_for_this_node); + } + free (fname_for_prev_node); + } + } + + filling_enabled = indented_fill = 0; + if (!html || (html && splitting)) + current_footnote_number = 1; + if (verbose_mode) printf (_("Formatting node %s...\n"), node); @@ -517,7 +597,23 @@ cm_node () remember_itext (input_text, input_text_offset); no_indent = 1; - if (!no_headers && !html) + if (xml) + { + xml_begin_document (); + xml_begin_node (); + if (!docbook) + { + xml_insert_element (NODENAME, START); + if (macro_expansion_output_stream && !executing_string) + me_execute_string (node); + else + execute_string ("%s", node); + xml_insert_element (NODENAME, END); + } + else + xml_node_id = xml_id (node); + } + else if (!no_headers && !html) { add_word_args ("\037\nFile: %s, Node: ", pretty_output_filename); @@ -729,33 +825,83 @@ cm_node () if (!*next) { free (next); next = NULL; } if (!*prev) { free (prev); prev = NULL; } if (!*up) { free (up); up = NULL; } - remember_node (node, prev, next, up, new_node_pos, line_number, no_warn); + remember_node (node, prev, next, up, new_node_pos, line_number, + fname_for_this_node, no_warn); outstanding_node = 1; } if (html) { - char *tem; - - if (splitting) - { /* this code not operational, we do not currently split html */ - char filename[20]; - - sprintf (filename, "node%d.html", number_of_node (node)); - output_stream = fopen (filename, "w"); + if (splitting && *node && output_stream == NULL) + { + char *dirname; + char filename[PATH_MAX]; + + dirname = pathname_part (current_output_filename); + strcpy (filename, dirname); + strcat (filename, fname_for_this_node); + free (dirname); + + /* See if the node name converted to a file name clashes + with other nodes or anchors. If it clashes with an + anchor, we complain and nuke that anchor's file. */ + if (!tag) + { + output_stream = fopen (filename, "w"); + html_output_head_p = 0; /* so that we generate HTML preamble */ + html_output_head (); + } + else if ((tag->flags & TAG_FLAG_ANCHOR) != 0) + { + line_error (_("Anchor `%s' and node `%s' map to the same file name"), + tag->node, node); + file_line_error (tag->filename, tag->line_no, + _("This @anchor command ignored; references to it will not work")); + file_line_error (tag->filename, tag->line_no, + _("Rename this anchor or use the `--no-split' option")); + /* Nuke the file name recorded in anchor's tag. + Since we are about to nuke the file itself, we + don't want find_node_by_fname to consider this + anchor anymore. */ + free (tag->html_fname); + tag->html_fname = NULL; + output_stream = fopen (filename, "w"); + html_output_head_p = 0; /* so that we generate HTML preamble */ + html_output_head (); + } + else + { + /* This node's file name clashes with another node. + We put them both on the same file. */ + output_stream = fopen (filename, "r+"); + if (output_stream) + { + static char html_end[] = "</body></html>\n"; + char end_line[sizeof(html_end)]; + int fpos = fseek (output_stream, -epilogue_len, + SEEK_END); + + if (fpos < 0 + || fgets (end_line, sizeof (html_end), + output_stream) == NULL + /* Paranoia: did someone change the way HTML + files are finished up? */ + || strcasecmp (end_line, html_end) != 0) + { + line_error (_("Unexpected string at end of split-HTML file `%s'"), + fname_for_this_node); + fclose (output_stream); + xexit (1); + } + fseek (output_stream, -epilogue_len, SEEK_END); + } + } if (output_stream == NULL) { fs_error (filename); xexit (1); } set_current_output_filename (filename); - /* FIXME: when this code is operational, we will need to - expand node, next, prev, and up before output. */ - add_word_args ("<html><head><title>%s</title>", node); - if (next) add_link (next, "rel=next"); - if (prev) add_link (prev, "rel=previous"); - if (up) add_link (up, "rel=up"); - add_word ("</head>\n<body>\n"); } if (!splitting && no_headers) @@ -779,32 +925,32 @@ cm_node () if (next) { - add_word (",\n"); - add_word (_("Next:")); - add_word ("<a rel=next href=\""); tem = expansion (next, 0); - add_anchor_name (tem, 1); - add_word_args ("\">%s</a>", tem); + add_word (",\n"); + add_word (_("Next:")); + add_word ("<a rel=next href=\""); + add_anchor_name (tem, 1); + add_word_args ("\">%s</a>", tem); free (tem); } if (prev) { - add_word (",\n"); - add_word (_("Previous:")); - add_word ("<a rel=previous href=\""); tem = expansion (prev, 0); - add_anchor_name (tem, 1); - add_word_args ("\">%s</a>", tem); + add_word (",\n"); + add_word (_("Previous:")); + add_word ("<a rel=previous href=\""); + add_anchor_name (tem, 1); + add_word_args ("\">%s</a>", tem); free (tem); } if (up) { - add_word (",\n"); - add_word (_("Up:")); - add_word ("<a rel=up href=\""); tem = expansion (up, 0); - add_anchor_name (tem, 1); - add_word_args ("\">%s</a>", tem); + add_word (",\n"); + add_word (_("Up:")); + add_word ("<a rel=up href=\""); + add_anchor_name (tem, 1); + add_word_args ("\">%s</a>", tem); free (tem); } /* html fixxme: we want a `top' or `contents' link here. */ @@ -812,7 +958,29 @@ cm_node () add_word_args ("\n%s<br>\n", splitting ? "<hr>" : ""); } } - + else if (docbook) + ; + else if (xml) + { + if (next) + { + xml_insert_element (NODENEXT, START); + execute_string ("%s", next); + xml_insert_element (NODENEXT, END); + } + if (prev) + { + xml_insert_element (NODEPREV, START); + execute_string ("%s", prev); + xml_insert_element (NODEPREV, END); + } + if (up) + { + xml_insert_element (NODEUP, START); + execute_string ("%s", up); + xml_insert_element (NODEUP, END); + } + } else if (!no_headers) { if (macro_expansion_output_stream) @@ -858,6 +1026,7 @@ cm_anchor (arg) int arg; { char *anchor; + char *fname_for_anchor = NULL; if (arg == END) return; @@ -872,6 +1041,8 @@ cm_anchor (arg) sure a new paragraph is indeed started. */ if (!paragraph_is_open) { + if (!executing_string && html) + html_output_head (); start_paragraph (); if (!in_fixed_width_font || in_menu || in_detailmenu) { @@ -882,11 +1053,104 @@ cm_anchor (arg) add_word ("<a name=\""); add_anchor_name (anchor, 0); add_word ("\"></a>"); + if (splitting) + { + /* If we are splitting, cm_xref will produce a reference to + a file whose name is derived from the anchor name. So we + must create a file when we see an @anchor, otherwise + xref's to anchors won't work. The file we create simply + redirects to the file of this anchor's node. */ + TAG_ENTRY *tag; + + fname_for_anchor = nodename_to_filename (anchor); + /* See if the anchor name converted to a file name clashes + with other anchors or nodes. */ + tag = find_node_by_fname (fname_for_anchor); + if (tag) + { + if ((tag->flags & TAG_FLAG_ANCHOR) != 0) + line_error (_("Anchors `%s' and `%s' map to the same file name"), + anchor, tag->node); + else + line_error (_("Anchor `%s' and node `%s' map to the same file name"), + anchor, tag->node); + line_error (_("@anchor command ignored; references to it will not work")); + line_error (_("Rename this anchor or use the `--no-split' option")); + free (fname_for_anchor); + /* We will not be creating a file for this anchor, so + set its name to NULL, so that remember_node stores a + NULL and find_node_by_fname won't consider this + anchor for clashes. */ + fname_for_anchor = NULL; + } + else + { + char *dirname, *p; + char filename[PATH_MAX]; + FILE *anchor_stream; + + dirname = pathname_part (current_output_filename); + strcpy (filename, dirname); + strcat (filename, fname_for_anchor); + free (dirname); + + anchor_stream = fopen (filename, "w"); + if (anchor_stream == NULL) + { + fs_error (filename); + xexit (1); + } + /* The HTML magic below will cause the browser to + immediately go to the anchor's node's file. Lynx + seems not to support this redirection, but it looks + like a bug in Lynx, and they can work around it by + clicking on the link once more. */ + fputs ("<meta http-equiv=\"refresh\" content=\"0; url=", + anchor_stream); + /* Make the indirect link point to the current node's + file and anchor's "<a name" label. If we don't have + a valid node name, refer to the current output file + instead. */ + if (current_node && *current_node) + { + char *fn, *tem; + + tem = expand_node_name (current_node); + fn = nodename_to_filename (tem); + free (tem); + fputs (fn, anchor_stream); + free (fn); + } + else + { + char *base = filename_part (current_output_filename); + + fputs (base, anchor_stream); + free (base); + } + fputs ("#", anchor_stream); + for (p = anchor; *p; p++) + { + if (*p == '&') + fputs ("&", anchor_stream); + else if (!URL_SAFE_CHAR (*p)) + fprintf (anchor_stream, "%%%x", (unsigned char) *p); + else + fputc (*p, anchor_stream); + } + fputs ("\">\n", anchor_stream); + fclose (anchor_stream); + } + } + } + else if (xml) + { + xml_insert_element_with_attribute (ANCHOR, START, "name=\"%s\"", anchor); + xml_insert_element (ANCHOR, END); } - /* Save it in the tag table. */ remember_node (anchor, NULL, NULL, NULL, output_position + output_column, - line_number, TAG_FLAG_ANCHOR); + line_number, fname_for_anchor, TAG_FLAG_ANCHOR); } /* Find NODE in REF_LIST. */ @@ -1114,12 +1378,9 @@ validate_file (tag_table) { line_error (_("Next field of node `%s' not pointed to"), tags->node); - line_number = temp_tag->line_no; - input_filename = temp_tag->filename; - line_error (_("This node (%s) has the bad Prev"), - temp_tag->node); - input_filename = tags->filename; - line_number = tags->line_no; + file_line_error (temp_tag->filename, temp_tag->line_no, + _("This node (%s) has the bad Prev"), + temp_tag->node); temp_tag->flags |= TAG_FLAG_PREV_ERROR; } } @@ -1175,12 +1436,10 @@ validate_file (tag_table) line_error (_("Prev field of node `%s' not pointed to"), tags->node); - line_number = temp_tag->line_no; - input_filename = temp_tag->filename; - line_error (_("This node (%s) has the bad Next"), - temp_tag->node); - input_filename = tags->filename; - line_number = tags->line_no; + file_line_error (temp_tag->filename, + temp_tag->line_no, + _("This node (%s) has the bad Next"), + temp_tag->node); temp_tag->flags |= TAG_FLAG_NEXT_ERROR; } } @@ -1259,13 +1518,9 @@ validate_file (tag_table) if (!nref && !tref) { temp_tag = find_node (tags->up); - line_number = temp_tag->line_no; - input_filename = temp_tag->filename; - line_error ( + file_line_error (temp_tag->filename, temp_tag->line_no, _("Node `%s' lacks menu item for `%s' despite being its Up target"), tags->up, tags->node); - line_number = tags->line_no; - input_filename = tags->filename; } } } diff --git a/contrib/texinfo/makeinfo/node.h b/contrib/texinfo/makeinfo/node.h index e2fc883..735a231 100644 --- a/contrib/texinfo/makeinfo/node.h +++ b/contrib/texinfo/makeinfo/node.h @@ -1,7 +1,7 @@ /* node.h -- declarations for Node. - $Id: node.h,v 1.5 1999/07/11 16:50:19 karl Exp $ + $Id: node.h,v 1.6 2002/01/16 15:52:45 karl Exp $ - Copyright (C) 1996, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1996, 97, 98, 99, 2002 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 @@ -39,6 +39,8 @@ typedef struct tentry int number; /* Number for this node, relevant for HTML splitting -- from use+define order, not just define. */ + char *html_fname; /* The HTML file to which this node is written + (non-NULL only for HTML splitting). */ } TAG_ENTRY; /* If node-a has a "Next" for node-b, but node-b has no "Prev" for node-a, diff --git a/contrib/texinfo/makeinfo/sectioning.c b/contrib/texinfo/makeinfo/sectioning.c index b06785b..850fc46 100644 --- a/contrib/texinfo/makeinfo/sectioning.c +++ b/contrib/texinfo/makeinfo/sectioning.c @@ -1,7 +1,7 @@ /* sectioning.c -- all related stuff @chapter, @section... @contents - $Id: sectioning.c,v 1.12 1999/08/17 21:06:50 karl Exp $ + $Id: sectioning.c,v 1.17 2002/02/09 00:54:51 karl Exp $ - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2001, 02 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 @@ -26,6 +26,7 @@ #include "node.h" #include "toc.h" #include "sectioning.h" +#include "xml.h" /* See comment in sectioning.h. */ section_alist_type section_alist[] = { @@ -210,11 +211,37 @@ what_section (text) return -1; } - void sectioning_underscore (cmd) char *cmd; { + if (xml) + { + char *temp; + int level; + temp = xmalloc (2 + strlen (cmd)); + temp[0] = COMMAND_PREFIX; + strcpy (&temp[1], cmd); + level = what_section (temp); + level -= 2; + free (temp); + xml_close_sections (level); + /* Mark the beginning of the section + If the next command is printindex, we will remove + the section and put an Index instead */ + flush_output (); + xml_last_section_output_position = output_paragraph_offset; + + xml_insert_element (xml_element (cmd), START); + xml_insert_element (TITLE, START); + xml_open_section (level, cmd); + get_rest_of_line (0, &temp); + execute_string ("%s\n", temp); + free (temp); + xml_insert_element (TITLE, END); + } + else + { char character; char *temp; int level; @@ -235,6 +262,7 @@ sectioning_underscore (cmd) { character = scoring_characters[level]; insert_and_underscore (level, character, cmd); + } } } @@ -385,16 +413,22 @@ sectioning_html (level, cmd) old_no_indent = no_indent; no_indent = 1; - add_word_args ("<h%d>", level + 1); /* level 0 is <h1> */ + add_word_args ("<h%d>", level + 2); /* level 0 (chapter) is <h2> */ /* If we are outside of any node, produce an anchor that the TOC could refer to. */ if (!current_node || !*current_node) { + static const char a_name[] = "<a name=\""; + starting_pos = output_paragraph + output_paragraph_offset; - add_word_args ("<a name=\"TOC%d\">", toc_ref_count++); - toc_anchor = substring (starting_pos + 9, + add_word_args ("%sTOC%d\">", a_name, toc_ref_count++); + toc_anchor = substring (starting_pos + sizeof (a_name) - 1, output_paragraph + output_paragraph_offset); + /* This must be added after toc_anchor is extracted, since + toc_anchor cannot include the closing </a>. For details, + see toc.c:toc_add_entry and toc.c:contents_update_html. */ + add_word ("</a>"); } starting_pos = output_paragraph + output_paragraph_offset; @@ -431,13 +465,13 @@ sectioning_html (level, cmd) if (section_alist[index].toc == TOC_YES) toc_add_entry (substring (starting_pos, ending_pos), level, current_node, toc_anchor); - + free (temp); if (outstanding_node) outstanding_node = 0; - add_word_args ("</h%d>", level+1); + add_word_args ("</h%d>", level + 2); close_paragraph(); filling_enabled = 1; no_indent = old_no_indent; @@ -488,14 +522,8 @@ cm_top () { if (tag->flags & TAG_FLAG_IS_TOP) { - int old_line_number = line_number; - char *old_input_filename = input_filename; - - line_number = tag->line_no; - input_filename = tag->filename; - line_error (_("Here is the %ctop node"), COMMAND_PREFIX); - input_filename = old_input_filename; - line_number = old_line_number; + file_line_error (tag->filename, tag->line_no, + _("Here is the %ctop node"), COMMAND_PREFIX); return; } tag = tag->next_ent; @@ -506,7 +534,7 @@ cm_top () TAG_ENTRY *top_node = find_node ("Top"); top_node_seen = 1; - /* It is an error to use @top before you have used @node. */ + /* It is an error to use @top before using @node. */ if (!tag_table) { char *top_name; @@ -518,21 +546,6 @@ cm_top () free (top_name); return; } - else if (html && splitting) - { - char *next = top_node ? top_node->next : NULL; - - add_word ("<p>"); - if (next) - { - add_word (_("Next:")); - add_word ("<a rel=next href=\""); - add_anchor_name (next, 1); - add_word ("\">"); - execute_string (next); - add_word ("</a>\n"); - } - } cm_unnumbered (); diff --git a/contrib/texinfo/makeinfo/texinfo.dtd b/contrib/texinfo/makeinfo/texinfo.dtd new file mode 100644 index 0000000..ead278a --- /dev/null +++ b/contrib/texinfo/makeinfo/texinfo.dtd @@ -0,0 +1,345 @@ +<!-- $Id: texinfo.dtd,v 1.1 2001/05/21 17:36:22 karl Exp $ + Document Type Definition for Texinfo + ************************************ + For texinfo-4.0b + ******************* + + Author: Philippe Martin (feloy@free.fr) + Contributors: + Karl Eichwalder (keichwa@gmx.net) + + HISTORY + ******* + Version 0.2 - 2001-05-08 + Version 0.1 - 2001-05-07 + + + + Copyright (C) 2001 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +--> + +<!-- ENTITIES --> + +<!-- Meta-information --> +<!ENTITY % metainformation "setfilename | settitle | titlefont | dircategory"> + +<!-- block --> +<!-- ***** --> +<!ENTITY % block "menu | para | quotation | example | smallexample | lisp + | smalllisp | cartouche | format | smallformat | display + | smalldisplay | itemize | enumerate | sp | center | group + | table | multitable"> + +<!-- Sectioning --> +<!-- ********** --> +<!ENTITY % section.level1 "top | chapter | unnumbered | appendix + | majorheading | chapheading"> + +<!ENTITY % section.level2 "section | unnumberedsec | appendixsec | heading"> + +<!ENTITY % section.level3 "subsection | unnumberedsubsec | appendixsubsec + | subheading"> + +<!ENTITY % section.level4 "subsubsection | unnumberedsubsubsec + | appendixsubsubsec | subsubheading"> + +<!ENTITY % section.all "%section.level1; | %section.level2; | %section.level3; + | %section.level4;"> + + +<!ENTITY % section.level1.content "(%block; + | %section.level2; + | %section.level3; + | %section.level4; + | printindex)*"> + +<!ENTITY % section.level2.content "(%block; + | %section.level3; + | %section.level4;)*"> + +<!ENTITY % section.level3.content "(%block; + | %section.level4;)*"> + +<!ENTITY % section.level4.content "(%block;)*"> + + +<!-- Inline --> +<!-- ****** --> +<!ENTITY % Inline.emphasize "strong | emph"> +<!ENTITY % Inline.smallcaps "sc"> +<!ENTITY % Inline.fonts "i | b | tt | r"> +<!ENTITY % Inline.markup "code | dfn | cite | key | kbd | var | acronym | url"> +<!ENTITY % Inline.reference "xref | inforef | indexterm | email | uref"> + +<!ENTITY % Inline.phrase + "%Inline.emphasize; | %Inline.smallcaps; | %Inline.fonts; + | %Inline.markup; | %Inline.reference; "> + + +<!-- ************ --> +<!-- * ELEMENTS * --> +<!-- ************ --> + +<!-- TOP Level Element --> +<!-- ***************** --> +<!ELEMENT texinfo ((%metainformation; | node | %block;)* )> + +<!-- meta-information --> +<!ELEMENT setfilename (#PCDATA)> +<!ELEMENT settitle (#PCDATA)> +<!ELEMENT titlefont (#PCDATA)> +<!ELEMENT dircategory (#PCDATA)> + +<!-- NODES --> +<!-- ***** --> +<!ELEMENT node (nodename, nodenext?, nodeprev?, nodeup?, + (para | menu | %section.all;)*) > + +<!ELEMENT nodename (#PCDATA)> +<!ELEMENT nodenext (#PCDATA)> +<!ELEMENT nodeprev (#PCDATA)> +<!ELEMENT nodeup (#PCDATA)> + +<!-- SECTIONING --> +<!-- ********** --> + +<!ELEMENT top (title?, %section.level1.content;)> + +<!ELEMENT chapter (title?, %section.level1.content;)> +<!ELEMENT section (title?, %section.level2.content;)> +<!ELEMENT subsection (title?, %section.level3.content;)> +<!ELEMENT subsubsection (title?, %section.level4.content;)> + +<!ELEMENT unnumbered (title?, %section.level1.content;)> +<!ELEMENT unnumberedsec (title?, %section.level2.content;)> +<!ELEMENT unnumberedsubsec (title?, %section.level3.content;)> +<!ELEMENT unnumberedsubsubsec (title?, %section.level4.content;)> + +<!ELEMENT appendix (title?, %section.level1.content;)> +<!ELEMENT appendixsec (title?, %section.level2.content;)> +<!ELEMENT appendixsubsec (title?, %section.level3.content;)> +<!ELEMENT appendixsubsubsec (title?, %section.level4.content;)> + +<!ELEMENT majorheading (title?, %section.level1.content;)> +<!ELEMENT chapheading (title?, %section.level1.content;)> +<!ELEMENT heading (title?, %section.level2.content;)> +<!ELEMENT subheading (title?, %section.level3.content;)> +<!ELEMENT subsubheading (title?, %section.level4.content;)> + +<!ELEMENT title (#PCDATA | %Inline.phrase; | footnote)*> + +<!-- BLOCK Elements --> +<!-- ************** --> + +<!ELEMENT quotation (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT example (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT smallexample (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT lisp (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT smalllisp (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT cartouche (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT format (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT smallformat (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT display (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT smalldisplay (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT center (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT group (#PCDATA | %block; | %Inline.phrase;)*> +<!ELEMENT image (#PCDATA)> + +<!ELEMENT para (#PCDATA | %Inline.phrase; | footnote)*> + +<!ELEMENT menu ((menuentry | para)*)> +<!ELEMENT menuentry (menunode?, menutitle?, menucomment?)> +<!ELEMENT menunode (#PCDATA)> +<!ELEMENT menutitle (#PCDATA)> +<!ELEMENT menucomment (#PCDATA | para)*> + +<!-- Lists --> +<!ELEMENT itemize (itemfunction, (item | itemize | enumerate | indexterm)*)> +<!ELEMENT enumerate (enumarg?, (item | itemize | enumerate)*)> +<!ATTLIST enumerate + first CDATA #IMPLIED> + +<!ELEMENT item (%block;)*> +<!ELEMENT enumarg (#PCDATA)> + +<!ELEMENT itemfunction (#PCDATA | %Inline.phrase;)*> + +<!-- Tables --> +<!ELEMENT table (tableitem | indexterm)+> +<!ELEMENT tableitem (tableterm+, item)> +<!ELEMENT tableterm (#PCDATA | %Inline.phrase;)*> + +<!ELEMENT multitable (columnfraction*, row*)> +<!ELEMENT columnfraction (#PCDATA)> +<!ELEMENT row (entry*)> +<!ELEMENT entry (#PCDATA | %Inline.phrase;)*> + +<!-- INLINE Elements --> +<!-- *************** --> + +<!-- Emphasize --> +<!ELEMENT strong (#PCDATA | %Inline.phrase;)*> +<!ELEMENT emph (#PCDATA | %Inline.phrase;)*> + +<!-- small caps --> +<!ELEMENT sc (#PCDATA | %Inline.phrase;)*> + +<!-- fonts --> +<!ELEMENT i (#PCDATA | %Inline.phrase;)*> +<!ELEMENT b (#PCDATA | %Inline.phrase;)*> +<!ELEMENT tt (#PCDATA | %Inline.phrase;)*> +<!ELEMENT r (#PCDATA | %Inline.phrase;)*> +<!ELEMENT notfixedwidth (#PCDATA | %Inline.phrase;)*> + +<!-- markup --> +<!ELEMENT code (#PCDATA | %Inline.phrase;)*> +<!ELEMENT dfn (#PCDATA | %Inline.phrase;)*> +<!ELEMENT cite (#PCDATA | %Inline.phrase;)*> +<!ELEMENT key (#PCDATA | %Inline.phrase;)*> +<!ELEMENT kbd (#PCDATA | %Inline.phrase;)*> +<!ELEMENT var (#PCDATA | %Inline.phrase;)*> +<!ELEMENT acronym (#PCDATA | %Inline.phrase;)*> +<!ELEMENT url (#PCDATA | %Inline.phrase;)*> + +<!-- reference --> +<!ELEMENT anchor EMPTY> +<!ATTLIST anchor + name CDATA #IMPLIED> + +<!ELEMENT xref (xrefnodename | xrefinfoname | xrefinfofile + | xrefprintedname | xrefprinteddesc)*> +<!ELEMENT xrefnodename (#PCDATA | %Inline.phrase;)*> +<!ELEMENT xrefinfoname (#PCDATA | %Inline.phrase;)*> +<!ELEMENT xrefinfofile (#PCDATA | %Inline.phrase;)*> +<!ELEMENT xrefprintedname (#PCDATA | %Inline.phrase;)*> +<!ELEMENT xrefprinteddesc (#PCDATA | %Inline.phrase;)*> + +<!ELEMENT inforef (inforefnodename | inforefrefname | inforefinfoname)*> +<!ELEMENT inforefnodename (#PCDATA | %Inline.phrase;)*> +<!ELEMENT inforefrefname (#PCDATA | %Inline.phrase;)*> +<!ELEMENT inforefinfoname (#PCDATA | %Inline.phrase;)*> + +<!ELEMENT indexterm (#PCDATA | %Inline.phrase;)*> +<!ATTLIST indexterm + INDEX CDATA #IMPLIED> + +<!ELEMENT email (emailaddress, emailname?)> +<!ELEMENT emailaddress (#PCDATA | %Inline.phrase;)*> +<!ELEMENT emailname (#PCDATA | %Inline.phrase;)*> + +<!ELEMENT uref (urefurl, urefdesc?, urefreplacement?)> +<!ELEMENT urefurl (#PCDATA | %Inline.phrase;)*> +<!ELEMENT urefdesc (#PCDATA | %Inline.phrase;)*> +<!ELEMENT urefreplacement (#PCDATA | %Inline.phrase;)*> + +<!ELEMENT footnote (para)> + + + +<!ENTITY tex "TeX"> +<!ENTITY ellipsis ""> +<!ENTITY lt ""> +<!ENTITY gt ""> +<!ENTITY bullet ""> +<!ENTITY copyright ""> +<!ENTITY minus ""> +<!ENTITY linebreak ""> +<!ENTITY space ""> +<!ENTITY dots ""> +<!ENTITY enddots ""> +<!ENTITY amp ""> + +<!ENTITY auml ""> +<!ENTITY ouml ""> +<!ENTITY uuml ""> +<!ENTITY Auml ""> +<!ENTITY Ouml ""> +<!ENTITY Uuml ""> +<!ENTITY Euml ""> +<!ENTITY euml ""> +<!ENTITY Iuml ""> +<!ENTITY iuml ""> +<!ENTITY yuml ""> +<!ENTITY uml ""> + +<!ENTITY Aacute ""> +<!ENTITY Eacute ""> +<!ENTITY Iacute ""> +<!ENTITY Oacute ""> +<!ENTITY Uacute ""> +<!ENTITY Yacute ""> +<!ENTITY aacute ""> +<!ENTITY eacute ""> +<!ENTITY iacute ""> +<!ENTITY oacute ""> +<!ENTITY uacute ""> +<!ENTITY yacute ""> + +<!ENTITY ccedil ""> +<!ENTITY Ccedil ""> + +<!ENTITY Acirc ""> +<!ENTITY Ecirc ""> +<!ENTITY Icirc ""> +<!ENTITY Ocirc ""> +<!ENTITY Ucirc ""> +<!ENTITY acirc ""> +<!ENTITY ecirc ""> +<!ENTITY icirc ""> +<!ENTITY ocirc ""> +<!ENTITY ucirc ""> + +<!ENTITY Agrave ""> +<!ENTITY Egrave ""> +<!ENTITY Igrave ""> +<!ENTITY Ograve ""> +<!ENTITY Ugrave ""> +<!ENTITY agrave ""> +<!ENTITY egrave ""> +<!ENTITY igrave ""> +<!ENTITY ograve ""> +<!ENTITY ugrave ""> + +<!ENTITY Atilde ""> +<!ENTITY Ntilde ""> +<!ENTITY Otilde ""> +<!ENTITY atilde ""> +<!ENTITY ntilde ""> +<!ENTITY otilde ""> + +<!ENTITY oslash ""> +<!ENTITY Oslash ""> + +<!ENTITY iexcl ""> +<!ENTITY pound ""> +<!ENTITY iquest ""> +<!ENTITY AElig ""> +<!ENTITY aelig ""> +<!ENTITY Aring ""> +<!ENTITY aring ""> +<!ENTITY szlig ""> + +<!ENTITY macr ""> + + +<!-- fixxme: not yet classified --> + +<!ELEMENT sp (#PCDATA)> +<!ATTLIST sp + lines CDATA #IMPLIED> +<!ELEMENT printindex (#PCDATA)> + diff --git a/contrib/texinfo/makeinfo/texinfo.xsl b/contrib/texinfo/makeinfo/texinfo.xsl new file mode 100644 index 0000000..401e9be --- /dev/null +++ b/contrib/texinfo/makeinfo/texinfo.xsl @@ -0,0 +1,242 @@ +<?xml version='1.0'?> +<!-- $Id: texinfo.xsl,v 1.1 2001/06/07 18:35:23 karl Exp $ --> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + +<xsl:output method="html" indent="yes"/> + +<!-- root rule --> +<xsl:template match="/"> + <HTML> + <HEAD><TITLE> + <xsl:apply-templates select="TEXINFO/SETTITLE" mode="head"/> + </TITLE></HEAD> + <BODY BGCOLOR="#FFFFFF"><xsl:apply-templates/> +</BODY></HTML> +</xsl:template> + + +<xsl:template match="TEXINFO"> + <xsl:apply-templates/> +</xsl:template> + + +<xsl:template match="TEXINFO/SETFILENAME"> +</xsl:template> + +<xsl:template match="TEXINFO/SETTITLE" mode="head"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="TEXINFO/SETTITLE"> + <h1><xsl:apply-templates/></h1> +</xsl:template> + + +<xsl:template match="TEXINFO/DIRCATEGORY"> +</xsl:template> + +<xsl:template match="//PARA"> + <p><xsl:apply-templates/></p> +</xsl:template> + +<xsl:template match="//EMPH"> + <i><xsl:apply-templates/></i> +</xsl:template> + +<!-- The node --> +<xsl:template match="TEXINFO/NODE"> + <hr><p> + <xsl:apply-templates select="NODENAME" mode="select"/> + <xsl:apply-templates select="NODEPREV" mode="select"/> + <xsl:apply-templates select="NODEUP" mode="select"/> + <xsl:apply-templates select="NODENEXT" mode="select"/> + <xsl:apply-templates/> + <h2>Footnotes</h2> + <ol> + <xsl:apply-templates select=".//FOOTNOTE" mode="footnote"/> + </ol> + </p></hr> +</xsl:template> + +<xsl:template match="TEXINFO/NODE/NODENAME" mode="select"> +<h2> + <a> + <xsl:attribute name="name"> + <xsl:apply-templates/> + </xsl:attribute> + <xsl:apply-templates/> + </a> +</h2> +</xsl:template> + +<xsl:template match="TEXINFO/NODE/NODENAME"/> + + +<xsl:template match="TEXINFO/NODE/NODEPREV" mode="select"> + [ <b>Previous: </b> + <a> + <xsl:attribute name="href"> + <xsl:text>#</xsl:text> + <xsl:apply-templates/> + </xsl:attribute> + <xsl:apply-templates/> + </a> ] +</xsl:template> + +<xsl:template match="TEXINFO/NODE/NODEPREV"/> + +<xsl:template match="TEXINFO/NODE/NODEUP" mode="select"> + [ <b>Up: </b> + <a> + <xsl:attribute name="href"> + <xsl:text>#</xsl:text> + <xsl:apply-templates/> + </xsl:attribute> + <xsl:apply-templates/> + </a> ] +</xsl:template> + +<xsl:template match="TEXINFO/NODE/NODEUP"/> + +<xsl:template match="TEXINFO/NODE/NODENEXT" mode="select"> + [ <b>Next: </b> + <a> + <xsl:attribute name="href"> + <xsl:text>#</xsl:text> + <xsl:apply-templates/> + </xsl:attribute> + <xsl:apply-templates/> + </a> ] +</xsl:template> + +<xsl:template match="TEXINFO/NODE/NODENEXT"/> + +<!-- Menu --> +<xsl:template match="//MENU"> + <h3>Menu</h3> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="//MENU/MENUENTRY"> + <a> + <xsl:attribute name="href"> + <xsl:text>#</xsl:text> + <xsl:apply-templates select="MENUNODE"/> + </xsl:attribute> + <xsl:apply-templates select="MENUTITLE"/> + </a>: + <xsl:apply-templates select="MENUCOMMENT"/> +<br></br> +</xsl:template> + +<xsl:template match="//MENU/MENUENTRY/MENUNODE"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="//MENU/MENUENTRY/MENUTITLE"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="//MENU/MENUENTRY/MENUCOMMENT"> + <xsl:apply-templates mode="menucomment"/> +</xsl:template> + +<xsl:template match="PARA" mode="menucomment"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="//PARA"> + <p><xsl:apply-templates/></p> +</xsl:template> + +<!-- LISTS --> +<xsl:template match="//ITEMIZE"> + <ul> + <xsl:apply-templates/> + </ul> +</xsl:template> + +<xsl:template match="//ITEMIZE/ITEM"> + <li> + <xsl:apply-templates/> + </li> +</xsl:template> + +<xsl:template match="//ENUMERATE"> + <ol> + <xsl:apply-templates/> + </ol> +</xsl:template> + +<xsl:template match="//ENUMERATE/ITEM"> + <li> + <xsl:apply-templates/> + </li> +</xsl:template> + +<!-- INLINE --> +<xsl:template match="//CODE"> + <tt> + <xsl:apply-templates/> + </tt> +</xsl:template> + +<xsl:template match="//DFN"> + <i><b> + <xsl:apply-templates/> + </b></i> +</xsl:template> + +<xsl:template match="//STRONG"> + <b> + <xsl:apply-templates/> + </b> +</xsl:template> + +<xsl:template match="//CENTER"> + <center> + <xsl:apply-templates/> + </center> +</xsl:template> + +<xsl:template match="//VAR"> + <i> + <xsl:apply-templates/> + </i> +</xsl:template> + +<xsl:template match="//KBD"> + <tt> + <xsl:apply-templates/> + </tt> +</xsl:template> + +<xsl:template match="//KEY"> + <b> + <xsl:apply-templates/> + </b> +</xsl:template> + +<!-- BLOCKS --> +<xsl:template match="//DISPLAY"> + <pre> + <xsl:apply-templates/> + </pre> +</xsl:template> + + +<!-- INDEX --> +<xsl:template match="//INDEXTERM"> +</xsl:template> + +<!-- FOOTNOTE --> +<xsl:template match="//FOOTNOTE"> +</xsl:template> + +<xsl:template match="//FOOTNOTE" mode="footnote"> + <li><xsl:apply-templates/></li> +</xsl:template> + +</xsl:stylesheet> + diff --git a/contrib/texinfo/makeinfo/toc.c b/contrib/texinfo/makeinfo/toc.c index 41c5ffb..0340f4a 100644 --- a/contrib/texinfo/makeinfo/toc.c +++ b/contrib/texinfo/makeinfo/toc.c @@ -1,7 +1,7 @@ /* toc.c -- table of contents handling. - $Id: toc.c,v 1.14 1999/08/09 20:28:18 karl Exp $ + $Id: toc.c,v 1.21 2002/02/23 19:12:15 karl Exp $ - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 01, 02 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,6 +25,7 @@ #include "files.h" #include "macro.h" #include "node.h" +#include "html.h" #include "lang.h" #include "makeinfo.h" #include "sectioning.h" @@ -32,7 +33,6 @@ - /* array of toc entries */ static TOC_ENTRY_ELT **toc_entry_alist = NULL; @@ -60,6 +60,7 @@ toc_add_entry (tocname, level, node_name, anchor) char *anchor; { char *tocname_and_node, *expanded_node, *s, *d; + char *filename = NULL; if (!node_name) node_name = ""; @@ -74,52 +75,59 @@ toc_add_entry (tocname, level, node_name, anchor) if (html) { /* We need to insert the expanded node name into the TOC, so - that when we eventually output the TOC, its <A REF= link will - point to the <A NAME= tag created by cm_node in the navigation - bar. We cannot expand the containing_node member, for the - reasons explained in the WARNING below. We also cannot wait - with the node name expansion until the TOC is actually output, - since by that time the macro definitions may have been changed. - So instead we store in the tocname member the expanded node - name and the TOC name concatenated together (with the necessary - HTML markup), since that's how they are output. */ + that when we eventually output the TOC, its <A REF= link will + point to the <A NAME= tag created by cm_node in the navigation + bar. We cannot expand the containing_node member, for the + reasons explained in the WARNING below. We also cannot wait + with the node name expansion until the TOC is actually output, + since by that time the macro definitions may have been changed. + So instead we store in the tocname member the expanded node + name and the TOC name concatenated together (with the necessary + HTML markup), since that's how they are output. */ if (!anchor) - s = expanded_node = expand_node_name (node_name); + s = expanded_node = expand_node_name (node_name); else - expanded_node = anchor; + expanded_node = anchor; + if (splitting) + { + if (!anchor) + filename = nodename_to_filename (expanded_node); + else + filename = filename_part (current_output_filename); + } /* Sigh... Need to HTML-escape the expanded node name like - add_anchor_name does, except that we are not writing this to - the output, so can't use add_anchor_name... */ + add_anchor_name does, except that we are not writing this to + the output, so can't use add_anchor_name... */ /* The factor 5 in the next allocation is because the maximum - expansion of HTML-escaping is for the & character, which is - output as "&". 2 is for "> that separates node from tocname. */ + expansion of HTML-escaping is for the & character, which is + output as "&". 2 is for "> that separates node from tocname. */ d = tocname_and_node = (char *)xmalloc (2 + 5 * strlen (expanded_node) - + strlen (tocname) + 1); + + strlen (tocname) + 1); if (!anchor) - { - for (; *s; s++) - { - if (*s == '&') - { - strcpy (d, "&"); - d += 5; - } - else if (! URL_SAFE_CHAR (*s)) - { - sprintf (d, "%%%x", (unsigned char) *s); - /* do this manually since sprintf returns char * on - SunOS 4 and other old systems. */ - while (*d) - d++; - } - else - *d++ = *s; - } - strcpy (d, "\">"); - } + { + for (; *s; s++) + { + if (*s == '&') + { + strcpy (d, "&"); + d += 5; + } + else if (! URL_SAFE_CHAR (*s)) + { + sprintf (d, "%%%x", (unsigned char) *s); + /* do this manually since sprintf returns char * on + SunOS 4 and other old systems. */ + while (*d) + d++; + } + else + *d++ = *s; + } + strcpy (d, "\">"); + } else - /* Section outside any node, they provided explicit anchor. */ - strcpy (d, anchor); + /* Section outside any node, they provided explicit anchor. */ + strcpy (d, anchor); strcat (d, tocname); free (tocname); /* it was malloc'ed by substring() */ free (expanded_node); @@ -137,6 +145,7 @@ toc_add_entry (tocname, level, node_name, anchor) toc_entry_alist[toc_counter]->containing_node = xstrdup (node_name); toc_entry_alist[toc_counter]->level = level; toc_entry_alist[toc_counter]->number = toc_counter; + toc_entry_alist[toc_counter]->html_file = filename; /* have to be done at least */ return toc_counter++; @@ -192,8 +201,8 @@ toc_free () } -/* print table of contents in HTML, may be we can produce a standalone - HTML file? */ +/* Print table of contents in HTML. */ + static void contents_update_html (fp) FILE *fp; @@ -209,10 +218,10 @@ contents_update_html (fp) flush_output (); /* in case we are writing stdout */ - fprintf (fp, "\n<h1>%s</h1>\n<ul>\n", _("Table of Contents")); + fprintf (fp, "\n<h2>%s</h2>\n<ul>\n", _("Table of Contents")); last_level = toc_entry_alist[0]->level; - + for (i = 0; i < toc_counter; i++) { if (toc_entry_alist[i]->level > last_level) @@ -231,7 +240,35 @@ contents_update_html (fp) fputs ("</ul>\n", fp); } - fprintf (fp, "<li><a href=\"#%s</a>\n", toc_entry_alist[i]->name); + /* No double entries in TOC. */ + if (!(i && strcmp (toc_entry_alist[i]->name, + toc_entry_alist[i-1]->name) == 0)) + { + /* each toc entry is a list item. */ + fputs ("<li>", fp); + + /* For chapters (only), insert an anchor that the short contents + will link to. */ + if (toc_entry_alist[i]->level == 0) + { + char *p = toc_entry_alist[i]->name; + + /* toc_entry_alist[i]->name has the form `foo">bar', + that is, it includes both the node name and anchor + text. We need to find where `foo', the node name, + ends, and use that in toc_FOO. */ + while (*p && *p != '"') + p++; + fprintf (fp, "<a name=\"toc_%.*s\"></a>\n ", + p - toc_entry_alist[i]->name, toc_entry_alist[i]->name); + } + + /* Insert link -- to an external file if splitting, or + within the current document if not splitting. */ + fprintf (fp, "<a href=\"%s#%s</a>\n", + splitting ? toc_entry_alist[i]->html_file : "", + toc_entry_alist[i]->name); + } last_level = toc_entry_alist[i]->level; } @@ -282,29 +319,39 @@ shortcontents_update_html (fp) FILE *fp; { int i; + char *toc_file; /* does exist any toc? */ if (!toc_counter) return; - + flush_output (); /* in case we are writing stdout */ - fprintf (fp, "\n<h1>%s</h1>\n<ul>\n", _("Short Contents")); + fprintf (fp, "\n<h2>%s</h2>\n<ul>\n", _("Short Contents")); + + if (contents_filename) + toc_file = filename_part (contents_filename); for (i = 0; i < toc_counter; i++) { - if ((toc_entry_alist[i])->level == 0) - { - fputs ("<li>", fp); - fprintf (fp, "<a href=\"#%s\n", toc_entry_alist[i]->name); - } - } + char *name = toc_entry_alist[i]->name; + if (toc_entry_alist[i]->level == 0) + { + if (contents_filename) + fprintf (fp, "<li><a href=\"%s#toc_%s</a>\n", + splitting ? toc_file : "", name); + else + fprintf (fp, "<a href=\"%s#%s</a>\n", + splitting ? toc_entry_alist[i]->html_file : "", name); + } + } fputs ("</ul>\n\n", fp); + if (contents_filename) + free (toc_file); } -/* short contents in ASCII (--no-headers). - May be we should create a new command line switch --ascii ? */ +/* short contents in ASCII (--no-headers). */ static void shortcontents_update_info (fp) FILE *fp; @@ -321,7 +368,7 @@ shortcontents_update_info (fp) for (i = 0; i < toc_counter; i++) { - if ((toc_entry_alist[i])->level == 0) + if (toc_entry_alist[i]->level == 0) fprintf (fp, "%s\n", toc_entry_alist[i]->name); } fputs ("\n\n", fp); @@ -337,13 +384,18 @@ rewrite_top (fname, placebo) { int idx; + /* Can't rewrite standard output or the null device. No point in + complaining. */ + if (STREQ (fname, "-") + || FILENAME_CMP (fname, NULL_DEVICE) == 0 + || FILENAME_CMP (fname, ALSO_NULL_DEVICE) == 0) + return -1; + toc_buf = find_and_load (fname); if (!toc_buf) { - /* Can't rewrite standard output. No point in complaining. */ - if (!STREQ (fname, "-")) - fs_error (fname); + fs_error (fname); return -1; } @@ -442,6 +494,8 @@ cm_contents (arg) } else { + if (!executing_string && html) + html_output_head (); contents_filename = xstrdup (current_output_filename); insert_string (contents_placebo); /* just mark it, for now */ } @@ -469,6 +523,8 @@ cm_shortcontents (arg) } else { + if (!executing_string && html) + html_output_head (); shortcontents_filename = xstrdup (current_output_filename); insert_string (shortcontents_placebo); /* just mark it, for now */ } diff --git a/contrib/texinfo/makeinfo/toc.h b/contrib/texinfo/makeinfo/toc.h index a37faf7..654a768 100644 --- a/contrib/texinfo/makeinfo/toc.h +++ b/contrib/texinfo/makeinfo/toc.h @@ -1,5 +1,5 @@ /* toc.h -- table of contents handling. - $Id: toc.h,v 1.4 1999/04/25 19:49:22 karl Exp $ + $Id: toc.h,v 1.5 2002/02/09 00:54:51 karl Exp $ Copyright (C) 1999 Free Software Foundation, Inc. @@ -32,6 +32,7 @@ extern char *shortcontents_filename; typedef struct toc_entry_elt { char *name; char *containing_node; /* Name of node containing this section. */ + char *html_file; /* Name of HTML node-file in split-HTML mode */ int number; /* counting number from 0...n independent from chapter/section can be used for anchors or references to it. */ diff --git a/contrib/texinfo/makeinfo/xml.c b/contrib/texinfo/makeinfo/xml.c new file mode 100644 index 0000000..813b5b6 --- /dev/null +++ b/contrib/texinfo/makeinfo/xml.c @@ -0,0 +1,1428 @@ +/* xml.c -- xml output. + $Id: xml.c,v 1.7 2002/01/16 15:52:45 karl Exp $ + + Copyright (C) 2001, 02 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Written by Philippe Martin <feloy@free.fr>. */ + +#include "system.h" +#include "makeinfo.h" +#include "insertion.h" +#include "macro.h" +#include "cmds.h" +#include "lang.h" + +#include "xml.h" + +/* Options */ +int xml_index_divisions = 1; + + +void xml_close_sections (/* int level */); + +typedef struct _element +{ + char name[32]; + int contains_para; + int contained_in_para; +} element; + +element texinfoml_element_list [] = { + { "texinfo", 1, 0 }, + { "setfilename", 0, 0 }, + { "titlefont", 0, 0 }, + { "settitle", 0, 0 }, + + { "node", 1, 0 }, + { "nodenext", 0, 0 }, + { "nodeprev", 0, 0 }, + { "nodeup", 0, 0 }, + + { "chapter", 1, 0 }, + { "section", 1, 0 }, + { "subsection", 1, 0 }, + { "subsubsection", 1, 0 }, + + { "top", 1, 0 }, + { "unnumbered", 1, 0 }, + { "unnumberedsec", 1, 0 }, + { "unnumberedsubsec", 1, 0 }, + { "unnumberedsubsubsec", 1, 0 }, + + { "appendix", 1, 0 }, + { "appendixsec", 1, 0 }, + { "appendixsubsec", 1, 0 }, + { "appendixsubsubsec", 1, 0 }, + + { "majorheading", 1, 0 }, + { "chapheading", 1, 0 }, + { "heading", 1, 0 }, + { "subheading", 1, 0 }, + { "subsubheading", 1, 0 }, + + { "menu", 1, 0 }, + { "menuentry", 1, 0 }, + { "menutitle", 0, 0 }, + { "menucomment", 1, 0 }, + { "menunode", 0, 0 }, + { "nodename", 0, 0 }, + + { "acronym", 0, 1 }, + { "tt", 0, 1 }, + { "code", 0, 1 }, + { "kbd", 0, 1 }, + { "url", 0, 1 }, + { "key", 0, 1 }, + { "var", 0, 1 }, + { "sc", 0, 1 }, + { "dfn", 0, 1 }, + { "emph", 0, 1 }, + { "strong", 0, 1 }, + { "cite", 0, 1 }, + { "notfixedwidth", 0, 1 }, + { "i", 0, 1 }, + { "b", 0, 1 }, + { "r", 0, 1 }, + + { "title", 0, 0 }, + { "ifinfo", 1, 0 }, + { "sp", 0, 0 }, + { "center", 1, 0 }, + { "dircategory", 0, 0 }, + { "quotation", 1, 0 }, + { "example", 1, 0 }, + { "smallexample", 1, 0 }, + { "lisp", 1, 0 }, + { "smalllisp", 1, 0 }, + { "cartouche", 1, 0 }, + { "format", 1, 0 }, + { "smallformat", 1, 0 }, + { "display", 1, 0 }, + { "smalldisplay", 1, 0 }, + { "footnote", 0, 1 }, + + { "itemize", 0, 0 }, + { "itemfunction", 0, 0 }, + { "item", 1, 0 }, + { "enumerate", 0, 0 }, + { "table", 0, 0 }, + { "tableitem", 0, 0 }, /* not used */ /* TABLEITEM */ + { "tableterm", 0, 0 }, /* not used */ /* TABLETERM */ + + { "indexterm", 0, 1 }, + + { "xref", 0, 1 }, + { "xrefnodename", 0, 1 }, + { "xrefinfoname", 0, 1 }, + { "xrefprinteddesc", 0, 1 }, + { "xrefinfofile", 0, 1 }, + { "xrefprintedname", 0, 1 }, + + { "inforef", 0, 1 }, + { "inforefnodename", 0, 1 }, + { "inforefrefname", 0, 1 }, + { "inforefinfoname", 0, 1 }, + + { "uref", 0, 1 }, + { "urefurl", 0, 1 }, + { "urefdesc", 0, 1 }, + { "urefreplacement", 0, 1 }, + + { "email", 0, 1 }, + { "emailaddress", 0, 1 }, + { "emailname", 0, 1 }, + + { "group", 0, 0 }, + + { "printindex", 0, 0 }, + { "anchor", 0, 1 }, + { "image", 0, 1 }, + { "", 0, 1 }, /* PRIMARY (docbook) */ + { "", 0, 1 }, /* SECONDARY (docbook) */ + { "", 0, 0 }, /* INFORMALFIGURE (docbook) */ + { "", 0, 0 }, /* MEDIAOBJECT (docbook) */ + { "", 0, 0 }, /* IMAGEOBJECT (docbook) */ + { "", 0, 0 }, /* IMAGEDATA (docbook) */ + { "", 0, 0 }, /* TEXTOBJECT (docbook) */ + { "", 0, 0 }, /* INDEXENTRY (docbook) */ + { "", 0, 0 }, /* PRIMARYIE (docbook) */ + { "", 0, 0 }, /* SECONDARYIE (docbook) */ + { "", 0, 0 }, /* INDEXDIV (docbook) */ + { "multitable", 0, 0 }, + { "", 0, 0 }, /* TGROUP (docbook) */ + { "columnfraction", 0, 0 }, + { "", 0, 0 }, /* TBODY (docbook) */ + { "entry", 0, 0 }, /* ENTRY (docbook) */ + { "row", 0, 0 }, /* ROW (docbook) */ + { "", 0, 0 }, /* BOOKINFO (docbook) */ + { "", 0, 0 }, /* ABSTRACT (docbook) */ + { "", 0, 0 }, /* REPLACEABLE (docbook) */ + { "para", 0, 0 } /* Must be last */ + /* name / contains para / contained in para */ +}; + +element docbook_element_list [] = { + { "book", 0, 0 }, /* TEXINFO */ + { "", 0, 0 }, /* SETFILENAME */ + { "", 0, 0 }, /* TITLEINFO */ + { "title", 0, 0 }, /* SETTITLE */ + + { "", 1, 0 }, /* NODE */ + { "", 0, 0 }, /* NODENEXT */ + { "", 0, 0 }, /* NODEPREV */ + { "", 0, 0 }, /* NODEUP */ + + { "chapter", 1, 0 }, + { "sect1", 1, 0 }, /* SECTION */ + { "sect2", 1, 0 }, /* SUBSECTION */ + { "sect3", 1, 0 }, /* SUBSUBSECTION */ + + { "chapter", 1, 0 }, /* TOP */ + { "chapter", 1, 0 }, /* UNNUMBERED */ + { "sect1", 1, 0 }, /* UNNUMBEREDSEC */ + { "sect2", 1, 0 }, /* UNNUMBEREDSUBSEC */ + { "sect3", 1, 0 }, /* UNNUMBEREDSUBSUBSEC */ + + { "appendix", 1, 0 }, + { "sect1", 1, 0 }, /* APPENDIXSEC */ + { "sect2", 1, 0 }, /* APPENDIXSUBSEC */ + { "sect3", 1, 0 }, /* APPENDIXSUBSUBSEC */ + + { "chapter", 1, 0 }, /* MAJORHEADING */ + { "chapter", 1, 0 }, /* CHAPHEADING */ + { "sect1", 1, 0 }, /* HEADING */ + { "sect2", 1, 0 }, /* SUBHEADING */ + { "sect3", 1, 0 }, /* SUBSUBHEADING */ + + { "", 1, 0 }, /* MENU */ + { "", 1, 0 }, /* MENUENTRY */ + { "", 0, 0 }, /* MENUTITLE */ + { "", 1, 0 }, /* MENUCOMMENT */ + { "", 0, 0 }, /* MENUNODE */ + { "anchor", 0, 0 }, /* NODENAME */ + + { "acronym", 0, 1 }, + { "wordasword", 0, 1 }, /* TT */ + { "command", 0, 1 }, /* CODE */ + { "userinput", 0, 1 }, /* KBD */ + { "wordasword", 0, 1 }, /* URL */ + { "keycap", 0, 1 }, /* KEY */ + { "varname", 0, 1 }, /* VAR */ + { "", 0, 1 }, /* SC */ + { "firstterm", 0, 1 }, /* DFN */ + { "emphasis", 0, 1 }, /* EMPH */ + { "emphasis", 0, 1 }, /* STRONG */ + { "citation", 0, 1 }, /* CITE */ + { "", 0, 1 }, /* NOTFIXEDWIDTH */ + { "wordasword", 0, 1 }, /* I */ + { "wordasword", 0, 1 }, /* B */ + { "", 0, 1 }, /* R */ + + { "title", 0, 0 }, + { "", 1, 0 }, /* IFINFO */ + { "", 0, 0 }, /* SP */ + { "", 1, 0 }, /* CENTER */ + { "", 0, 0 }, /* DIRCATEGORY */ + { "blockquote", 1, 0 }, /* QUOTATION */ + { "screen", 0, 1 }, + { "screen", 0, 1 }, /* SMALLEXAMPLE */ + { "screen", 0, 1 }, /* LISP */ + { "screen", 0, 1 }, /* SMALLLISP */ + { "", 1, 0 }, /* CARTOUCHE */ + { "screen", 0, 1 }, /* FORMAT */ + { "screen", 0, 1 }, /* SMALLFORMAT */ + { "screen", 0, 1 }, /* DISPLAY */ + { "screen", 0, 1 }, /* SMALLDISPLAY */ + { "footnote", 0, 1 }, + + { "itemizedlist", 0, 0 }, /* ITEMIZE */ + { "", 0, 0 }, /* ITEMFUNCTION */ + { "listitem", 1, 0 }, + { "orderedlist", 0, 0 }, /* ENUMERATE */ + { "variablelist", 0, 0 }, /* TABLE */ + { "varlistentry", 0, 0 }, /* TABLEITEM */ + { "term", 0, 0 }, /* TABLETERM */ + + { "indexterm", 0, 1 }, + + { "xref", 0, 1 }, /* XREF */ + { "link", 0, 1 }, /* XREFNODENAME */ + { "", 0, 1 }, /* XREFINFONAME */ + { "", 0, 1 }, /* XREFPRINTEDDESC */ + { "", 0, 1 }, /* XREFINFOFILE */ + { "", 0, 1 }, /* XREFPRINTEDNAME */ + + { "", 0, 1 }, /* INFOREF */ + { "", 0, 1 }, /* INFOREFNODENAME */ + { "", 0, 1 }, /* INFOREFREFNAME */ + { "", 0, 1 }, /* INFOREFINFONAME */ + + { "", 0, 1 }, /* UREF */ + { "", 0, 1 }, /* UREFURL */ + { "", 0, 1 }, /* UREFDESC */ + { "", 0, 1 }, /* UREFREPLACEMENT */ + + { "ulink", 0, 1 }, /* EMAIL */ + { "", 0, 1 }, /* EMAILADDRESS */ + { "", 0, 1 }, /* EMAILNAME */ + + { "", 0, 0 }, /* GROUP */ + + { "index", 0, 0 }, /* PRINTINDEX */ + { "", 0, 1 }, /* ANCHOR */ + { "", 0, 1 }, /* IMAGE */ + { "primary", 0, 1 }, /* PRIMARY */ + { "secondary", 0, 1 }, + { "informalfigure", 0, 0 }, + { "mediaobject", 0, 0 }, + { "imageobject", 0, 0 }, + { "imagedata", 0, 0 }, + { "textobject", 0, 0 }, + { "indexentry", 0, 0 }, + { "primaryie", 0, 0 }, + { "secondaryie", 0, 0 }, + { "indexdiv", 0, 0 }, + { "informaltable", 0, 0 }, + { "tgroup", 0, 0 }, + { "colspec", 0, 0 }, + { "tbody", 0, 0 }, + { "entry", 0, 0 }, + { "row", 0, 0 }, + { "bookinfo", 0, 0 }, + { "abstract", 1, 0 }, + { "replaceable", 0, 0 }, + + { "para", 0, 0 } /* Must be last */ + /* name / contains para / contained in para */ +}; + +element *xml_element_list = NULL; + + +typedef struct _replace_element +{ + int element_to_replace; + int element_containing; + int element_replacing; +} replace_element; + +/* Elements to replace - Docbook only + ------------------- + if `element_to_replace' have to be inserted + as a child of `element_containing,' + use `element_replacing' instead. + + A value of `-1' for element_replacing means `do not use any element.' +*/ + +replace_element replace_elements [] = { + { I, TABLETERM, EMPH }, + { B, TABLETERM, EMPH }, + { TT, CODE, -1 }, + { EXAMPLE, DISPLAY, -1 }, + { CODE, DFN, -1 }, + { CODE, VAR, -1 }, + { EMPH, CODE, REPLACEABLE }, + /* Add your elements to replace here */ + {-1, 0, 0} +}; + +int xml_in_menu_entry = 0; +int xml_in_menu_entry_comment = 0; +int xml_node_open = 0; +int xml_node_level = -1; +int xml_in_para = 0; +int xml_just_after_element = 0; + +int xml_no_para = 0; +char *xml_node_id = NULL; +int xml_sort_index = 0; + +static int xml_after_table_term = 0; +static int book_started = 0; +static int first_section_opened = 0; +static int in_abstract = 0; + +static int xml_current_element (); + +void +#if defined (VA_FPRINTF) && __STDC__ +xml_insert_element_with_attribute (int elt, int arg, char *format, ...); +#else +xml_insert_element_with_attribute (); +#endif + +char * +xml_id (id) + char *id; +{ + char *tem = xmalloc (strlen (id) + 1); + char *p = tem; + strcpy (tem, id); + while (*p++) + { + if (*p == ' ' || *p == '&' || *p == '/' || *p == '+') + *p = '-'; + } + p = tem; + while (*p == '-') + *p = 'i'; + return tem; +} + +int +xml_element (name) + char *name; +{ + int i; + for (i=0; i<=PARA; i++) + { + if (strcasecmp (name, texinfoml_element_list[i].name) == 0) + return i; + } + printf ("Error xml_element\n"); + return -1; +} + +void +xml_begin_document (output_filename) + char *output_filename; +{ + if (book_started) + return; + + book_started = 1; + if (docbook) + { + insert_string ("<!DOCTYPE Book PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\">"); + xml_element_list = docbook_element_list; + } + else + { + insert_string ("<!DOCTYPE texinfo SYSTEM \"texinfo.dtd\">"); + xml_element_list = texinfoml_element_list; + } + if (docbook) + { + if (language_code != last_language_code) + xml_insert_element_with_attribute (TEXINFO, START, "lang=\"%s\"", language_table[language_code].abbrev); + } + else + xml_insert_element (TEXINFO, START); + if (!docbook) + { + xml_insert_element (SETFILENAME, START); + insert_string (output_filename); + xml_insert_element (SETFILENAME, END); + } +} + +/* */ +static int element_stack[256]; +static int element_stack_index = 0; + +static void +xml_push_current_element (elt) + int elt; +{ + element_stack[element_stack_index++] = elt; + if (element_stack_index > 200) + printf ("*** stack overflow (%d - %s) ***\n", + element_stack_index, + xml_element_list[elt].name); +} + +void +xml_pop_current_element () +{ + element_stack_index--; + if (element_stack_index < 0) + printf ("*** stack underflow (%d - %d) ***\n", + element_stack_index, + xml_current_element()); +} + +static int +xml_current_element () +{ + return element_stack[element_stack_index-1]; +} + +static void +xml_indent () +{ + int i; + insert ('\n'); + for (i = 0; i < element_stack_index; i++) + insert (' '); +} + +static void +xml_indent_end_para () +{ + int i; + for (i = 0; i < element_stack_index; i++) + insert (' '); +} + +void +xml_end_document () +{ + if (xml_node_open) + { + if (xml_node_level != -1) + { + xml_close_sections (xml_node_level); + xml_node_level = -1; + } + xml_insert_element (NODE, END); + } + xml_insert_element (TEXINFO, END); + insert_string ("\n"); + insert_string ("<!-- Keep this comment at the end of the file\n\ +Local variables:\n\ +mode: sgml\n\ +sgml-indent-step:1\n\ +sgml-indent-data:nil\n\ +End:\n\ +-->\n"); + if (element_stack_index != 0) + error ("Element stack index : %d\n", element_stack_index); +} + +/* MUST be 0 or 1, not true or false values */ +static int start_element_inserted = 1; + +/* NOTE: We use `elt' rather than `element' in the argument list of + the next function, since otherwise the Solaris SUNWspro compiler + barfs because `element' is a typedef declared near the beginning of + this file. */ +void +#if defined (VA_FPRINTF) && __STDC__ +xml_insert_element_with_attribute (int elt, int arg, char *format, ...) +#else +xml_insert_element_with_attribute (elt, arg, format, va_alist) + int elt; + int arg; + char *format; + va_dcl +#endif +{ + /* Look at the replace_elements table to see if we have to change the element */ + if (xml_sort_index) + return; + if (docbook) + { + replace_element *element_list = replace_elements; + while (element_list->element_to_replace >= 0) + { + if ( ( (arg == START) && + (element_list->element_containing == xml_current_element ()) && + (element_list->element_to_replace == elt) ) || + ( (arg == END) && + (element_list->element_containing == element_stack[element_stack_index-1-start_element_inserted]) && + (element_list->element_to_replace == elt) ) ) + { + elt = element_list->element_replacing; + break; + } + element_list ++; + } + + /* Forget the element */ + if (elt < 0) + { + if (arg == START) + start_element_inserted = 0; + else + /* Replace the default value, for the next time */ + start_element_inserted = 1; + return; + } + } + + if (!book_started) + return; + + if (xml_after_table_term && elt != TABLETERM) + { + xml_after_table_term = 0; + xml_insert_element (ITEM, START); + } + + if (docbook && !only_macro_expansion && (in_menu || in_detailmenu)) + return; + + if (!xml_element_list[elt].name || !strlen (xml_element_list[elt].name)) + { + /* printf ("Warning: Inserting empty element %d\n", elt);*/ + return; + } + + if (arg == START && !xml_in_para && !xml_no_para + && xml_element_list[elt].contained_in_para + && xml_element_list[xml_current_element()].contains_para ) + { + xml_indent (); + insert_string ("<para>"); + xml_in_para = 1; + } + + + if (arg == START && xml_in_para && !xml_element_list[elt].contained_in_para) + { + xml_indent_end_para (); + insert_string ("</para>"); + xml_in_para = 0; + } + + if (arg == END && xml_in_para && !xml_element_list[elt].contained_in_para) + { + xml_indent_end_para (); + insert_string ("</para>"); + xml_in_para = 0; + } + + if (arg == START && !xml_in_para && !xml_element_list[elt].contained_in_para) + xml_indent (); + + if (arg == START) + xml_push_current_element (elt); + else + xml_pop_current_element (); + + insert ('<'); + if (arg == END) + insert ('/'); + insert_string (xml_element_list[elt].name); + + /* printf ("%s ", xml_element_list[elt].name);*/ + + if (format) + { + char temp_string[2000]; /* xx no fixed limits */ +#ifdef VA_SPRINTF + va_list ap; +#endif + + VA_START (ap, format); +#ifdef VA_SPRINTF + VA_SPRINTF (temp_string, format, ap); +#else + sprintf (temp_string, format, a1, a2, a3, a4, a5, a6, a7, a8); +#endif + insert (' '); + insert_string (temp_string); + va_end (ap); + } + + if (arg == START && xml_node_id && elt != NODENAME) + { + insert_string (" id=\""); + insert_string (xml_node_id); + insert_string ("\""); + free (xml_node_id); + xml_node_id = NULL; + } + + insert ('>'); + + xml_just_after_element = 1; +} + +/* See the NOTE before xml_insert_element_with_attribute, for why we + use `elt' rather than `element' here. */ +void +xml_insert_element (int elt, int arg) +{ + xml_insert_element_with_attribute (elt, arg, NULL); +} + +void +xml_insert_entity (char *entity_name) +{ + int saved_escape_html = escape_html; + + if (!book_started) + return; + if (docbook && !only_macro_expansion && (in_menu || in_detailmenu)) + return; + + if (!xml_in_para && !xml_no_para && !only_macro_expansion + && xml_element_list[xml_current_element ()].contains_para) + { + insert_string ("<para>"); + xml_in_para = 1; + } + escape_html = 0; + insert ('&'); + escape_html = saved_escape_html; + insert_string (entity_name); + insert (';'); +} + +typedef struct _xml_section xml_section; +struct _xml_section { + int level; + char *name; + xml_section *prev; +}; + +xml_section *last_section = NULL; + +void +xml_begin_node () +{ + if (xml_node_open && ! docbook) + { + if (xml_node_level != -1) + { + xml_close_sections (xml_node_level); + xml_node_level = -1; + } + xml_insert_element (NODE, END); + } + xml_insert_element (NODE, START); + xml_node_open = 1; +} + +void +xml_close_sections (level) + int level; +{ + if (!first_section_opened && in_abstract) + { + xml_insert_element (ABSTRACT, END); + xml_insert_element (BOOKINFO, END); + first_section_opened = 1; + } + while (last_section && last_section->level >= level) + { + xml_section *temp = last_section; + xml_insert_element (xml_element(last_section->name), END); + temp = last_section; + last_section = last_section->prev; + free (temp->name); + free (temp); + } +} + +void +xml_open_section (level, name) + int level; + char *name; +{ + xml_section *sect = (xml_section *) xmalloc (sizeof (xml_section)); + + sect->level = level; + sect->name = xmalloc (1 + strlen (name)); + strcpy (sect->name, name); + sect->prev = last_section; + last_section = sect; + + if (xml_node_open && xml_node_level == -1) + xml_node_level = level; +} + +void +xml_start_menu_entry (tem) + char *tem; +{ + char *string; + discard_until ("* "); + + /* The line number was already incremented in reader_loop when we + saw the newline, and discard_until has now incremented again. */ + line_number--; + + if (xml_in_menu_entry) + { + if (xml_in_menu_entry_comment) + { + xml_insert_element (MENUCOMMENT, END); + xml_in_menu_entry_comment=0; + } + xml_insert_element (MENUENTRY, END); + xml_in_menu_entry=0; + } + xml_insert_element (MENUENTRY, START); + xml_in_menu_entry=1; + + xml_insert_element (MENUNODE, START); + string = expansion (tem, 0); + add_word (string); + xml_insert_element (MENUNODE, END); + free (string); + + /* The menu item may use macros, so expand them now. */ + xml_insert_element (MENUTITLE, START); + only_macro_expansion++; + get_until_in_line (1, ":", &string); + only_macro_expansion--; + execute_string ("%s", string); /* get escaping done */ + xml_insert_element (MENUTITLE, END); + free (string); + + if (looking_at ("::")) + discard_until (":"); + else + { /* discard the node name */ + get_until_in_line (0, ".", &string); + free (string); + } + input_text_offset++; /* discard the second colon or the period */ + xml_insert_element (MENUCOMMENT, START); + xml_in_menu_entry_comment ++; +} + +void +xml_end_menu () +{ + if (xml_in_menu_entry) + { + if (xml_in_menu_entry_comment) + { + xml_insert_element (MENUCOMMENT, END); + xml_in_menu_entry_comment --; + } + xml_insert_element (MENUENTRY, END); + xml_in_menu_entry--; + } + xml_insert_element (MENU, END); +} + +static int xml_last_character; + +void +xml_add_char (character) + int character; +{ + if (!book_started) + return; + if (docbook && !only_macro_expansion && (in_menu || in_detailmenu)) + return; + + if (!first_section_opened && !in_abstract && xml_current_element () == TEXINFO + && !xml_no_para && character != '\r' && character != '\n' && character != ' ') + { + xml_insert_element (BOOKINFO, START); + xml_insert_element (ABSTRACT, START); + in_abstract = 1; + } + + if (xml_after_table_term && !xml_sort_index) + { + xml_after_table_term = 0; + xml_insert_element (ITEM, START); + } + + if (xml_just_after_element && !xml_in_para && !inhibit_paragraph_indentation) + { + if (character == '\r' || character == '\n' || character == '\t' || character == ' ') + return; + xml_just_after_element = 0; + } + + if (xml_element_list[xml_current_element()].contains_para + && !xml_in_para && !only_macro_expansion && !xml_no_para) + { + xml_indent (); + insert_string ("<para>\n"); + xml_in_para = 1; + } + + if (xml_in_para) + { + if (character == '\n') + { + if (xml_last_character == '\n' && !only_macro_expansion && !xml_no_para + && xml_element_list[xml_current_element()].contains_para ) + { + xml_indent_end_para (); + insert_string ("</para>"); + xml_in_para = 0; + xml_just_after_element = 1; + if (xml_in_menu_entry_comment) + { + xml_insert_element (MENUCOMMENT, END); + xml_in_menu_entry_comment = 0; + xml_insert_element (MENUENTRY, END); + xml_in_menu_entry = 0; + } + } + } + } + + if (character == '\n' && !xml_in_para && !inhibit_paragraph_indentation) + return; + + xml_last_character = character; + + if (character == '&' && escape_html) + insert_string ("&"); + else if (character == '<' && escape_html) + insert_string ("<"); + else + insert (character); + + return; +} + +void +xml_insert_footnote (note) + char *note; +{ + xml_insert_element (FOOTNOTE, START); + insert_string ("<para>"); + execute_string ("%s", note); + insert_string ("</para>"); + xml_insert_element (FOOTNOTE, END); +} + + +/* + * Lists and Tables + */ +static int xml_in_item[256]; +static int xml_table_level = 0; + +void +xml_begin_table (type, item_function) + enum insertion_type type; + char *item_function; +{ + switch (type) + { + case ftable: + case vtable: + case table: + /*if (docbook)*/ /* 05-08 */ + { + xml_insert_element (TABLE, START); + xml_table_level ++; + xml_in_item[xml_table_level] = 0; + } + break; + case itemize: + if (!docbook) + { + xml_insert_element (ITEMIZE, START); + xml_table_level ++; + xml_in_item[xml_table_level] = 0; + xml_insert_element (ITEMFUNCTION, START); + if (*item_function == COMMAND_PREFIX + && item_function[strlen (item_function) - 1] != '}' + && command_needs_braces (item_function + 1)) + execute_string ("%s{}", item_function); + else + execute_string ("%s", item_function); + xml_insert_element (ITEMFUNCTION, END); + } + else + { + xml_insert_element_with_attribute (ITEMIZE, START, + "mark=\"%s\"", + (*item_function == COMMAND_PREFIX) ? + &item_function[1] : item_function); + xml_table_level ++; + xml_in_item[xml_table_level] = 0; + } + break; + } +} + +void +xml_end_table (type) + enum insertion_type type; +{ + switch (type) + { + case ftable: + case vtable: + case table: + /* if (docbook)*/ /* 05-08 */ + { + if (xml_in_item[xml_table_level]) + { + xml_insert_element (ITEM, END); + xml_insert_element (TABLEITEM, END); + xml_in_item[xml_table_level] = 0; + } + xml_insert_element (TABLE, END); + xml_table_level --; + } + break; + case itemize: + if (xml_in_item[xml_table_level]) + { + xml_insert_element (ITEM, END); + xml_in_item[xml_table_level] = 0; + } + xml_insert_element (ITEMIZE, END); + xml_table_level --; + break; + } +} + +void +xml_begin_item () +{ + if (xml_in_item[xml_table_level]) + xml_insert_element (ITEM, END); + + xml_insert_element (ITEM, START); + xml_in_item[xml_table_level] = 1; +} + +void +xml_begin_table_item () +{ + if (!xml_after_table_term) + { + if (xml_in_item[xml_table_level]) + { + xml_insert_element (ITEM, END); + xml_insert_element (TABLEITEM, END); + } + xml_insert_element (TABLEITEM, START); + } + xml_insert_element (TABLETERM, START); + xml_in_item[xml_table_level] = 1; + xml_after_table_term = 0; +} + +void +xml_continue_table_item () +{ + xml_insert_element (TABLETERM, END); + xml_after_table_term = 1; +} + +void +xml_begin_enumerate (enum_arg) + char *enum_arg; +{ + if (!docbook) + xml_insert_element_with_attribute (ENUMERATE, START, "first=\"%s\"", enum_arg); + else + { + if (isdigit (*enum_arg)) + { + if (enum_arg[0] == '1') + xml_insert_element_with_attribute (ENUMERATE, START, + "numeration=\"Arabic\"", NULL); + else + xml_insert_element_with_attribute (ENUMERATE, START, + "continuation=\"Continues\" numeration=\"Arabic\"", NULL); + } + else if (isupper (*enum_arg)) + { + if (enum_arg[0] == 'A') + xml_insert_element_with_attribute (ENUMERATE, START, + "numeration=\"Upperalpha\"", NULL); + else + xml_insert_element_with_attribute (ENUMERATE, START, + "continuation=\"Continues\" numeration=\"Upperalpha\"", NULL); + } + else + { + if (enum_arg[0] == 'a') + xml_insert_element_with_attribute (ENUMERATE, START, + "numeration=\"Loweralpha\"", NULL); + else + xml_insert_element_with_attribute (ENUMERATE, START, + "continuation=\"Continues\" numeration=\"Loweralpha\"", NULL); + } + } + xml_table_level ++; + xml_in_item[xml_table_level] = 0; +} + +void +xml_end_enumerate () +{ + if (xml_in_item[xml_table_level]) + { + xml_insert_element (ITEM, END); + xml_in_item[xml_table_level] = 0; + } + xml_insert_element (ENUMERATE, END); + xml_table_level --; +} + +static void +xml_insert_text_file (name_arg) + char *name_arg; +{ + char *fullname = xmalloc (strlen (name_arg) + 4 + 1); + FILE *image_file; + strcpy (fullname, name_arg); + strcat (fullname, ".txt"); + image_file = fopen (fullname, "r"); + if (image_file) + { + int ch; + int save_inhibit_indentation = inhibit_paragraph_indentation; + int save_filling_enabled = filling_enabled; + + xml_insert_element (TEXTOBJECT, START); + xml_insert_element (DISPLAY, START); + + inhibit_paragraph_indentation = 1; + filling_enabled = 0; + last_char_was_newline = 0; + + /* Maybe we need to remove the final newline if the image + file is only one line to allow in-line images. On the + other hand, they could just make the file without a + final newline. */ + while ((ch = getc (image_file)) != EOF) + add_char (ch); + + inhibit_paragraph_indentation = save_inhibit_indentation; + filling_enabled = save_filling_enabled; + + xml_insert_element (DISPLAY, END); + xml_insert_element (TEXTOBJECT, END); + + if (fclose (image_file) != 0) + perror (fullname); + } + else + warning (_("@image file `%s' unreadable: %s"), fullname, + strerror (errno)); + + free (fullname); +} + +void +xml_insert_docbook_image (name_arg) + char *name_arg; +{ + xml_insert_element (INFORMALFIGURE, START); + xml_insert_element (MEDIAOBJECT, START); + + xml_insert_element (IMAGEOBJECT, START); + xml_insert_element_with_attribute (IMAGEDATA, START, "fileref=\"%s.eps\" format=\"eps\"", name_arg); + xml_pop_current_element (); + xml_insert_element (IMAGEOBJECT, END); + + xml_insert_element (IMAGEOBJECT, START); + xml_insert_element_with_attribute (IMAGEDATA, START, "fileref=\"%s.jpg\" format=\"jpg\"", name_arg); + xml_pop_current_element (); + xml_insert_element (IMAGEOBJECT, END); + + xml_insert_text_file (name_arg); + + xml_insert_element (MEDIAOBJECT, END); + xml_insert_element (INFORMALFIGURE, END); +} + +void +xml_asterisk () +{ +} + + +/* + * INDEX + */ +/* Used to separate primary and secondary entries in an index */ +#define INDEX_SEP ", " + +xml_insert_indexterm (indexterm, index) + char *indexterm; + char *index; +{ + if (!docbook) + { + xml_insert_element_with_attribute (INDEXTERM, START, "index=\"%s\"", index); + execute_string ("%s", indexterm); + xml_insert_element (INDEXTERM, END); + } + else + { + char *expanded; + char *primary = NULL, *secondary; + xml_sort_index = 1; + xml_no_para = 1; + expanded = expansion (indexterm); + xml_sort_index = 0; + xml_no_para = 0; + if (strstr (expanded+1, INDEX_SEP)) + { + primary = xmalloc (strlen (expanded) + 1); + strcpy (primary, expanded); + secondary = strstr (primary+1, INDEX_SEP); + *secondary = '\0'; + secondary += strlen (INDEX_SEP); + } + xml_insert_element_with_attribute (INDEXTERM, START, "role=\"%s\"", index); + xml_insert_element (PRIMARY, START); + if (primary) + insert_string (primary); + else + insert_string (expanded); + xml_insert_element (PRIMARY, END); + if (primary) + { + xml_insert_element (SECONDARY, START); + insert_string (secondary); + xml_insert_element (SECONDARY, END); + } + xml_insert_element (INDEXTERM, END); + free (expanded); + } +} + + +int xml_last_section_output_position = 0; +static char last_division_letter = ' '; +static char index_primary[2000]; /** xx no fixed limit */ +static int indexdivempty = 0; + +static int in_indexentry = 0; +static int in_secondary = 0; +static void +xml_close_indexentry () +{ + if (!in_indexentry) + return; + if (in_secondary) + xml_insert_element (SECONDARYIE, END); + xml_insert_element (INDEXENTRY, END); + in_secondary = 0; + in_indexentry = 0; +} + +void +xml_begin_index () +{ + /* + We assume that we just opened a section, and so that the last output is + <SECTION ID="node-name"><TITLE>Title</TITLE> + where SECTION can be CHAPTER, ... + */ + + xml_section *temp = last_section; + + int l = output_paragraph_offset-xml_last_section_output_position; + char *tmp = xmalloc (l+1); + char *p = tmp; + strncpy (tmp, output_paragraph, l); + + /* We remove <SECTION */ + tmp[l] = '\0'; + while (*p != '<') + p++; + while (*p != ' ') + p++; + + output_paragraph_offset = xml_last_section_output_position; + xml_last_section_output_position = 0; + + xml_pop_current_element (); /* remove section element from elements stack */ + + last_section = last_section->prev; /* remove section from sections stack */ + free (temp->name); + free (temp); + + /* We put <INDEX> */ + xml_insert_element (PRINTINDEX, START); + /* Remove the final > */ + output_paragraph_offset--; + + /* and put ID="node-name"><TITLE>Title</TITLE> */ + insert_string (p); + + if (xml_index_divisions) + { + xml_insert_element (INDEXDIV, START); + indexdivempty = 1; + } +} + +void +xml_end_index () +{ + xml_close_indexentry (); + if (xml_index_divisions) + xml_insert_element (INDEXDIV, END); + xml_insert_element (PRINTINDEX, END); +} + +void +xml_index_divide (entry) + char *entry; +{ + char c; + if (strlen (entry) > (strlen (xml_element_list[CODE].name) + 2) && + strncmp (entry+1, xml_element_list[CODE].name, strlen (xml_element_list[CODE].name)) == 0) + c = entry[strlen (xml_element_list[CODE].name)+2]; + else + c = entry[0]; + if (tolower (c) != last_division_letter && isalpha (c)) + { + last_division_letter = tolower (c); + xml_close_indexentry (); + if (!indexdivempty) + { + xml_insert_element (INDEXDIV, END); + xml_insert_element (INDEXDIV, START); + } + xml_insert_element (TITLE, START); + insert (toupper (c)); + xml_insert_element (TITLE, END); + } +} + +void +xml_insert_indexentry (entry, node) + char *entry; + char *node; +{ + char *primary = NULL, *secondary; + if (xml_index_divisions) + xml_index_divide (entry); + + indexdivempty = 0; + if (strstr (entry+1, INDEX_SEP)) + { + primary = xmalloc (strlen (entry) + 1); + strcpy (primary, entry); + secondary = strstr (primary+1, INDEX_SEP); + *secondary = '\0'; + secondary += strlen (INDEX_SEP); + + if (in_secondary && strcmp (primary, index_primary) == 0) + { + xml_insert_element (SECONDARYIE, END); + xml_insert_element (SECONDARYIE, START); + insert_string (secondary); + } + else + { + xml_close_indexentry (); + xml_insert_element (INDEXENTRY, START); + in_indexentry = 1; + xml_insert_element (PRIMARYIE, START); + insert_string (primary); + xml_insert_element (PRIMARYIE, END); + xml_insert_element (SECONDARYIE, START); + insert_string (secondary); + in_secondary = 1; + } + } + else + { + xml_close_indexentry (); + xml_insert_element (INDEXENTRY, START); + in_indexentry = 1; + xml_insert_element (PRIMARYIE, START); + insert_string (entry); + } + add_word_args (", %s", _("see ")); + xml_insert_element_with_attribute (XREF, START, "linkend=\"%s\"", xml_id (node)); + xml_pop_current_element (); + + if (primary) + { + strcpy (index_primary, primary); + /* xml_insert_element (SECONDARYIE, END);*/ + /* *(secondary-1) = ',';*/ /* necessary ? */ + free (primary); + } + else + xml_insert_element (PRIMARYIE, END); + + /* xml_insert_element (INDEXENTRY, END); */ +} + +/* + * MULTITABLE + */ +void +xml_begin_multitable (ncolumns, column_widths) + int ncolumns; + int *column_widths; +{ + int i; + if (docbook) + { + xml_insert_element (MULTITABLE, START); + xml_insert_element_with_attribute (TGROUP, START, "cols=\"%d\"", ncolumns); + for (i=0; i<ncolumns; i++) + { + xml_insert_element_with_attribute (COLSPEC, START, "colwidth=\"%d*\"", column_widths[i]); + xml_pop_current_element (); + } + xml_insert_element (TBODY, START); + xml_no_para = 1; + } + else + { + xml_insert_element (MULTITABLE, START); + for (i=0; i<ncolumns; i++) + { + xml_insert_element (COLSPEC, START); + add_word_args ("%d", column_widths[i]); + xml_insert_element (COLSPEC, END); + } + xml_no_para = 1; + } +} + +void +xml_end_multitable_row (first_row) + int first_row; +{ + if (!first_row) + { + xml_insert_element (ENTRY, END); + xml_insert_element (ROW, END); + } + xml_insert_element (ROW, START); + xml_insert_element (ENTRY, START); +} + +void +xml_end_multitable_column () +{ + xml_insert_element (ENTRY, END); + xml_insert_element (ENTRY, START); +} + +void +xml_end_multitable () +{ + if (docbook) + { + xml_insert_element (ENTRY, END); + xml_insert_element (ROW, END); + xml_insert_element (TBODY, END); + xml_insert_element (TGROUP, END); + xml_insert_element (MULTITABLE, END); + xml_no_para = 0; + } + else + { + xml_insert_element (ENTRY, END); + xml_insert_element (ROW, END); + xml_insert_element (MULTITABLE, END); + xml_no_para = 0; + } +} diff --git a/contrib/texinfo/makeinfo/xml.h b/contrib/texinfo/makeinfo/xml.h new file mode 100644 index 0000000..c788617 --- /dev/null +++ b/contrib/texinfo/makeinfo/xml.h @@ -0,0 +1,76 @@ +/* xml.h -- xml output declarations. + $Id: xml.h,v 1.3 2001/05/01 16:29:29 karl Exp $ + + Copyright (C) 2001 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Written by Philippe Martin <feloy@free.fr>. */ + +#ifndef XML_H +#define XML_H + +/* Options. */ + +/* Separate index entries into divisions for each letters. */ +extern int xml_index_divisions; +extern int xml_sort_index; + +extern int xml_node_open; +extern int xml_no_para; +extern char *xml_node_id; +extern int xml_last_section_output_position; + +enum xml_element +{ + TEXINFO=0, SETFILENAME, TITLEFONT, SETTITLE, + /* Node */ + NODE /* 4 */, NODENEXT, NODEPREV, NODEUP, + /* Structuring */ + CHAPTER /* 8 */, SECTION, SUBSECTION, SUBSUBSECTION, + TOP /* 12 */, UNNUMBERED, UNNUMBEREDSEC, UNNUMBEREDSUBSEC, UNNUMBEREDSUBSUBSEC, + APPENDIX /* 17 */, APPENDIXSEC, APPENDIXSUBSEC, APPENDIXSUBSUBSEC, + MAJORHEADING /* 21 */, CHAPHEADING, HEADING, SUBHEADING, SUBSUBHEADING, + /* Menu */ + MENU /* 26 */, MENUENTRY, MENUTITLE, MENUCOMMENT, MENUNODE, NODENAME, + /* -- */ + ACRONYM/* 32 */, TT, CODE, KBD, URL, KEY, VAR, SC, DFN, EMPH, STRONG, CITE, NOTFIXEDWIDTH, I, B, R, + TITLE, + IFINFO, + SP, CENTER, + DIRCATEGORY, + QUOTATION, EXAMPLE, SMALLEXAMPLE, LISP, SMALLLISP, CARTOUCHE, FORMAT, SMALLFORMAT, DISPLAY, SMALLDISPLAY, + FOOTNOTE, + ITEMIZE, ITEMFUNCTION, ITEM, ENUMERATE, TABLE, TABLEITEM, TABLETERM, + INDEXTERM, + XREF, XREFNODENAME, XREFINFONAME, XREFPRINTEDDESC, XREFINFOFILE, XREFPRINTEDNAME, + INFOREF, INFOREFNODENAME, INFOREFREFNAME, INFOREFINFONAME, + UREF, UREFURL, UREFDESC, UREFREPLACEMENT, + EMAIL, EMAILADDRESS, EMAILNAME, + GROUP, + PRINTINDEX, + ANCHOR, + IMAGE, + PRIMARY, SECONDARY, INFORMALFIGURE, MEDIAOBJECT, IMAGEOBJECT, IMAGEDATA, TEXTOBJECT, + INDEXENTRY, PRIMARYIE, SECONDARYIE, INDEXDIV, + MULTITABLE, TGROUP, COLSPEC, TBODY, ENTRY, ROW, + BOOKINFO, ABSTRACT, REPLACEABLE, + PARA +}; + +extern void xml_insert_element (/* int name, int arg */); +extern char *xml_id (/* char *id */); + +#endif /* XML_H */ diff --git a/contrib/texinfo/util/texindex.c b/contrib/texinfo/util/texindex.c index cd4bd0f..4e43d35 100644 --- a/contrib/texinfo/util/texindex.c +++ b/contrib/texinfo/util/texindex.c @@ -1,7 +1,8 @@ /* Process TeX index dribble output into an actual index. - $Id: texindex.c,v 1.34 1999/08/06 17:03:14 karl Exp $ + $Id: texindex.c,v 1.37 2002/01/19 01:12:54 karl Exp $ - Copyright (C) 1987, 91, 92, 96, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1987, 91, 92, 96, 97, 98, 99, 2000, 01, 02 + 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 @@ -337,7 +338,7 @@ decode_command (argc, argv) There is NO warranty. You may redistribute this software\n\ under the terms of the GNU General Public License.\n\ For more information about these matters, see the files named COPYING.\n"), - "1999"); + "2002"); xexit (0); } else if ((strcmp (arg, "--keep") == 0) || |