📄 texinfo.texinfo
字号:
headings. Usually, you will use the same words for the title on the titlepage and for the title specified by this command for the headings, but thetwo could be different. For example, the title on the title page may belonger than the title specified by the @code{settitle} command.The @code{@@settitle} command should precede everything that generatesactual output.@node Setchapternewpage, End-of-Header, Settitle, Header@comment node-name, next, previous, up@subsection @@setchapternewpage@cindex Starting chapters@cindex Pages, starting odd@findex setchapternewpageConventionally, chapters start on the page on the right hand side of abook; and the right hand page has an odd number. To make sure that Texinfodoes this, you can use the command @code{@@setchapternewpage}. Forexample, to cause each chapter to start on a fresh odd-numbered page:@example@@setchapternewpage odd@end examplePage numbering is turned on by the @code{@@end titlepage} command, so the@code{@@setchapternewpage} should come before it. Although it can occuranywhere in the beginning of the file, it is most convenient to put it inthis location.@node End-of-Header, , Setchapternewpage, Header@comment node-name, next, previous, up@subsection @samp{end-of-header}@cindex end-of-headerThe end-of-header line should follow the line containing the@code{@@setchapternewpage} command.Usually, the end-of-header line looks like this:@example@@comment %**end of header (This is for running Texinfo on a region.)@end example@ifinfoIn the default configuration, the phrase @samp{(This is for running Texinfoon a region.)} is not needed and is just included to make it easier forsomeone reading the Texinfo file.The reason for the odd string of characters (`%**') is so that the@code{texinfo-hardcopy-region} command does not accidently find somethingthat it shouldn't when it is looking for the header.The start-of-header line and the end-of-header line are Texinfo modevariables that you can change.@end ifinfo@iftexAlso, @pxref{Start-of-Header}@end iftex@node Permissions for Info, Titlepage & Copyright Page, Header, Beginning a File@comment node-name, next, previous, up@section Copying Permissions for InfoSince the title page and the copyright page appear only in the printed copyof the manual, the same information has to inserted in a section thatappears only in the Info file. This section usually contains a briefdescription of the contents of the Info file, a copyright notice andcopying permissions.The copyright notice should read:@exampleCopyright @var{year} @var{copyright-owner}@end example@noindentand be put on a line by itself.Standard text for the copyright permissions is contained in the appendix.@xref{Ifinfo Permissions}, for the complete text.@node Titlepage & Copyright Page, Top Node, Permissions for Info, Beginning a File@comment node-name, next, previous, up@section The Title and Copyright Pages@cindex Titlepage@cindex Copyright pageThe title and copyright pages appear in the printed manual, but not in theInfo file. Because of this, it is possible to use a couple of slightlyobscure @TeX{} typesetting commands that could not be used in an Info file.In addition, this part of the beginning of a Texinfo file contains the textof the copying permissions that will appear in the printed manual.@menu* Titlepage:: Creating a title page for the printed manual.* Center:: Centering a line.* Copyright & Printed Permissions:: Inserting the copyright notice and printed permissions.@end menu@node Titlepage, Center , Titlepage & Copyright Page, Titlepage & Copyright Page@comment node-name, next, previous, up@subsection @@titlepage@cindex Titlepage@findex titlepageStart the material for the title page and following copyright page with@code{@@titlepage} on a line by itself and end it with @code{@@endtitlepage} on a line by itself. The title page and copyright page materialappears only in the printed manual, not in the Info file. Also, the @code{@@end titlepage} command starts a new page and turns onpage numbering (generation of headings). Therefore, all the material thatyou want to appear on unnumbered pages should be put between the@code{@@titlepage} and @code{@@end titlepage} commands. By using the@code{@@page} command you can force a page break within the regiondelineated by the @code{@@titlepage} and @code{@@end titlepage} commandsand create more than one unnumbered page. This is how the copyright pageis produced.@refill@findex titlefontTo select a large font suitable for the title itself, you can use thecommand @code{@@titlefont}. For example:@example@@center @@titlefont@{Texinfo@}@end exampleAlso, you can use @code{@@sp} commands to adjust vertical spacing. For example:@example@@sp 2@end example@noindentIn the sample, the spacing was chosen to fit an 8 1/2 by 11 inch manual.@node Center, Copyright & Printed Permissions, Titlepage, Titlepage & Copyright Page@comment node-name, next, previous, up@subsection @@center@cindex Centering a line@findex centerA line containing @code{@@center @var{text}} produces a line of outputcontaining @var{text}, centered between the margins.@refill@node Copyright & Printed Permissions,, Center, Titlepage & Copyright Page@comment node-name, next, previous, up@subsection The Copyright Page and Printed Permissions@cindex Copyright@cindex Printed permissions@cindex Permissions, printedBy international treaty, the copyright notice for a book should either beon the title page or on the back of the title page. Other locations in abook are not official and do not provide copyright protection. Thecopyright notice should include the year followed by the name of the personor organization who has the copyright.When the copyright notice is on the back of the title page, the page is notnumbered. Therefore, in Texinfo, the information on the copyright pageshould be within the region delineated by the @code{@@titlepage} and@code{@@end titlepage} commands.@refill@findex vskip@findex filllTo cause a page break, the @code{@@page} command is used. In the sample,the @code{@@page} command is followed by the somewhat mysterious line thatreads: @samp{@@vskip 0pt plus 1filll}. This is a line that uses @TeX{}commands to push the copyright notice and the other text on the copyrightpage towards the bottom of the page. The @code{@@vskip} command means toskip lines and put in white space. The @samp{0pt plus 1filll} means to putin zero points of mandatory white space, and as much optional white spaceas needed. Note the use of three @samp{l}s in the word @samp{filll}; thisis the correct use in @TeX{}.@refill@findex copyrightThe @code{@@copyright@{@}} command generates a @samp{c} inside a circle.The copyright notice itself has the following legally defined sequence: @exampleCopyright @copyright{} @var{year} @var{copyright-owner}@end exampleIt is customary to put information on how to get a manual after thecopyright notice (the address of the Free Software Foundation, for example)and the permissions. Note that the permissions have to be repeated here as well as in the`ifinfo' section that immediately follows the header since this sectionappears only in the printed manual and the `ifinfo' section appears only inthe Info file.Standard text for the permissions appears in the appendix. @xref{Sample Permissions}.@node Top Node, License and Distribution, Titlepage & Copyright Page, Beginning a File @comment node-name, next, previous, up@section The Top Node and Master Menu@cindex Top node@cindex Master menuThe @samp{Top} node contains an extensive, master menu for the whole Infofile. The contents of this node appear only in the Info file. Nothing inthis node should appear in the printed file. Since a node line by itselfand a menu by itself are not printed, the contents of this node do not haveto be within a region delineated by @code{@@ifinfo} and @code{@@end ifinfo}commands. However, any text within the node should be marked off in thatmanner. You may want to put a short summary before the master menu insidea region delineated by @code{@@ifinfo} and @code{@@end ifinfo} commands.Usually, the `Previous' and `Up' nodes refer to the top level directory ofthe whole Info system, with pointers to @samp{(dir)}.@refillGenerally, the top menu is divided into parts. @itemize @bullet@itemThe first part contains the major nodes in the Texinfo file: the nodes forthe chapters, chapter-like sections and the major appendices.@itemThe second part contains entries for the indices. In an Info file, it isvery useful to have indices here at the beginning of the file in the topnode rather than at the end, as in a printed book.@itemThe third and subsequent parts contain a listing of the other, lower levelnodes, often ordered by chapter. This way, an inquirer can go directly toa particular node if he or she is searching for specific information.(These nodes are not required; use them if you think they are aconvenience.)@end itemizeEach section in the menu can be introduced a descriptive line. So long asthe line does not begin with an asterisk, it will not be treated as a menuitem. (@xref{Menu, , Making Menus}, for more information.)For example, the Top node of this manual looks like this (but with manymore entries):@example@@node Top, Overview, (dir), (dir)@@menu* Overview:: What is Texinfo?* Texinfo Mode:: Special features in GNU Emacs.@dots{}Indices, nodes containing large menus* Command Index:: An item for each @@-command.* Concept Index:: An item for each concept.A detailed node listingOverview* Info File:: Characteristics of the Info file.* Printed Manual:: Characteristics of the printed manual.Using Texinfo Mode* Info on a Region:: Formatting a region for Info.* Showing the Structure:: Showing the structure of a file.@dots{}@dots{}@end example@node License and Distribution, , Top Node, Beginning a File@comment node-name, next, previous, up@section Licensing and Distribution Information@cindex Distribution@cindex License agreementIf the Texinfo file has a section containing the ``General Public License''and the distribution information and a warranty disclaimer, this sectionusually follows the @samp{Top} node. The licensing and distributioninformation and the disclaimer are followed by a preface or else by thefirst chapter of the manual.The licensing agreement is very important to Project GNU documentation andsoftware. Without it, you may find that you can no longer get the softwareor its documentation. This sounds paradoxical, but the state of the worldis such that documentation and software that does not have a``restrictive'' license to make them freely distributable may be lost tothe public. This has happened.@refillFor a good example of the text that could be used for the Distribution,General Public License and NO WARRANTY sections of your document, see thelatest version of the @cite{GNU Emacs Manual}.@cindex PrefaceAlthough a preface is not a required part of a Texinfo file, it is veryhelpful. Ideally, it should state clearly and concisely what the file isabout and who would be interested in reading it. In general, the prefacewould follow the licensing and distribution information, although sometimespeople put it earlier in the document. Usually, a preface is put in an@code{@@unnumbered} section. (@xref{Unnumbered and Appendix}.)@node Ending a File, Structuring, Beginning a File, Top@comment node-name, next, previous, up@chapter Ending a Texinfo File@cindex Ending a Texinfo file@cindex Texinfo file ending@cindex File ending@findex byeThe end of a Texinfo file should include the indices, the commands togenerate detailed and summary tables of contents and the @@-commandthat tells @TeX{} that it has reached the end of the file.For example, a Texinfo file might be ended as follows:@example@@node Concept Index, , Previous Node, Top@@comment node-name, next, previous, up@@unnumbered Concept Index@@printindex cp@@contents@@bye@end exampleThe @code{@@bye} command should be on a line by itself and every Texinfofile must end with such a line. This command terminates @TeX{} processingand forces out unfinished pages.@refill@menu* Contents:: Generating a table of contents* Indices:: Generating, sorting and printing indices@end menu@node Contents, Indices , , Ending a File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -