⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 texinfo.texi

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
limited.@refill@xref{Obtaining TeX, , How to Obtain @TeX{}}.@node Formatting Commands, Conventions, Printed Books, Overview@comment  node-name,  next,  previous,  up@section @@-commands@cindex @@-commands@cindex Formatting commandsIn a Texinfo file, the commands that tell @TeX{} how to typeset theprinted manual and tell @code{makeinfo} and@code{texinfo-format-buffer} how to create an Info file are precededby @samp{@@}; they are called @dfn{@@-commands}.  For example,@code{@@node} is the command to indicate a node and @code{@@chapter}is the command to indicate the start of a chapter.@refill@quotation@strong{Please note:} All the @@-commands, with the exception of the@code{@@TeX@{@}} command, must be written entirely in lowercase.@refill@end quotationThe Texinfo @@-commands are a strictly limited set of constructs.  Thestrict limits make it possible for Texinfo files to be understood bothby @TeX{} and by the code that converts them into Info files.  You candisplay Info files on any terminal that displays alphabetic andnumeric characters.  Similarly, you can print the output generated by@TeX{} on a wide variety of printers.@refillDepending on what they do or what arguments@footnote{The word@dfn{argument} comes from the way it is used in mathematics and doesnot refer to a disputation between two people; it refers to theinformation presented to the command.  According to the @cite{OxfordEnglish Dictionary}, the word derives from the Latin for @dfn{to makeclear, prove}; thus it came to mean `the evidence offered as proof',which is to say, `the information offered', which led to itsmathematical meaning.  In its other thread of derivation, the wordcame to mean `to assert in a manner against which others may makecounter assertions', which led to the meaning of `argument' as adisputation.} they take, you need to write @@-commands on lines oftheir own or as part of sentences:@refill@itemize @bullet@itemWrite a command such as @code{@@noindent} at the beginning of a line asthe only text on the line.  (@code{@@noindent} prevents the beginning ofthe next line from being indented as the beginning of aparagraph.)@refill@itemWrite a command such as @code{@@chapter} at the beginning of a linefollowed by the command's arguments, in this case the chapter title, onthe rest of the line.  (@code{@@chapter} creates chapter titles.)@refill@itemWrite a command such as @code{@@dots@{@}} wherever you wish but usuallywithin a sentence. (@code{@@dots@{@}} creates dots @dots{})@refill@itemWrite a command such as @code{@@code@{@var{sample-code}@}} wherever youwish (but usually within a sentence) with its argument,@var{sample-code} in this example, between the braces.  (@code{@@code}marks text as being code.)@refill@itemWrite a command such as @code{@@example} at the beginning of a line ofits own; write the body-text on following lines; and write the matching@code{@@end} command, @code{@@end example} in this case, at thebeginning of a line of its own after the body-text. (@code{@@example}@dots{} @code{@@end example} indents and typesets body-text as anexample.)@refill@end itemize@noindent@cindex Braces, when to useAs a general rule, a command requires braces if it mingles among othertext; but it does not need braces if it starts a line of its own.  Thenon-alphabetic commands, such as @code{@@:}, are exceptions to the rule;they do not need braces.@refillAs you gain experience with Texinfo, you will rapidly learn how towrite the different commands: the different ways to write commandsmake it easier to write and read Texinfo files than if all commandsfollowed exactly the same syntax.  (For details about @@-commandsyntax, 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@cindex Conventions, syntacticAll printable @sc{ascii} characters except @samp{@@}, @samp{@{} and@samp{@}} can appear in a Texinfo file and stand for themselves.@samp{@@} is the escape character which introduces commands.@samp{@{} and @samp{@}} should be used only to surround arguments tocertain commands.  To put one of these special characters into thedocument, put an @samp{@@} character in front of it, like this:@samp{@@@@}, @samp{@@@{}, and @samp{@@@}}.@refill@ifinfoIt is customary in @TeX{} to use doubled single-quote characters tobegin and end quotations: ` ` and ' ' (but without a space between thetwo single-quote characters).  This convention should be followed inTexinfo files.  @TeX{} converts doubled single-quote characters toleft- and right-hand doubled quotation marks and Info converts doubledsingle-quote characters to @sc{ascii} double-quotes: ` ` and ' ' to " .@refill@end ifinfo@iftexIt is customary in @TeX{} to use doubled single-quote characters tobegin and end quotations: @w{@tt{ `` }} and @w{@tt{ '' }}.  Thisconvention should be followed in Texinfo files.  @TeX{} convertsdoubled single-quote characters to left- and right-hand doubledquotation marks, ``like this'', and Info converts doubled single-quotecharacters to @sc{ascii} double-quotes: @w{@tt{ `` }} and@w{@tt{ '' }} to @w{@tt{ " }}.@refill@end iftexUse three hyphens in a row, @samp{---}, for a dash---like this.  In@TeX{}, a single or double hyphen produces a printed dash that isshorter than the usual typeset dash. Info reduces three hyphens to twofor display on the screen.To prevent a paragraph from being indented in the printed manual, putthe command @code{@@noindent} on a line by itself before theparagraph.@refillIf you mark off a region of the Texinfo file with the @code{@@iftex}and @w{@code{@@end iftex}} commands, that region will appear only inthe printed copy; in that region, you can use certain commandsborrowed from plain @TeX{} that you cannot use in Info.  Likewise, ifyou mark off a region with the @code{@@ifinfo} and @code{@@end ifinfo}commands, that region will appear only in the Info file; in thatregion, you can use Info commands that you cannot use in @TeX{}.Similarly for @code{@@ifhtml @dots{} @@end ifhtml},@code{@@ifnothtml @dots{} @@end ifnothtml},@code{@@ifnotinfo @dots{} @@end ifnotinfo},@code{@@ifnottex @dots{} @@end ifnottex},@xref{Conditionals}.@cindex Tabs; don't use!@quotation@strong{Caution:} Do not use tabs in a Texinfo file!  @TeX{} usesvariable-width fonts, which means that it cannot predefine a tab to workin all circumstances.  Consequently, @TeX{} treats tabs like singlespaces, and that is not what they look like.  Furthermore,@code{makeinfo} does nothing special with tabs, and thus a tab characterin your input file may appear differently in the output.@noindentTo avoid this problem, Texinfo mode causes GNU Emacs to insert multiplespaces when you press the @key{TAB} key.@refill@noindentAlso, you can run @code{untabify} in Emacs to convert tabs in a regionto multiple spaces.@refill@noindentDon't use tabs.@end quotation@node Comments, Minimum, Conventions, Overview@comment  node-name,  next,  previous,  up@section CommentsYou can write comments in a Texinfo file that will not appear ineither the Info file or the printed manual by using the@code{@@comment} command (which may be abbreviated to @code{@@c}).Such comments are for the person who reads the Texinfo file.  All thetext on a line that follows either @code{@@comment} or @code{@@c} is acomment; the rest of the line does not appear in either the Info fileor the printed manual. (Often, you can write the @code{@@comment} or@code{@@c} in the middle of a line, and only the text that follows afterthe @code{@@comment} or @code{@@c} command does not appear; but somecommands, such as @code{@@settitle} and @code{@@setfilename}, work on awhole line.  You cannot use @code{@@comment} or @code{@@c} in a linebeginning with such a command.)@refill@cindex Comments@findex comment@findex c @r{(comment)}You can write long stretches of text that will not appear in eitherthe Info file or the printed manual by using the @code{@@ignore} and@code{@@end ignore} commands.  Write each of these commands on a lineof its own, starting each command at the beginning of the line.  Textbetween these two commands does not appear in the processed output.You can use @code{@@ignore} and @code{@@end ignore} for writingcomments.  Often, @code{@@ignore} and @code{@@end ignore} is usedto enclose a part of the copying permissions that applies to theTexinfo source file of a document, but not to the Info or printedversion of the document.@refill@cindex Ignored text@cindex Unprocessed text@findex ignore@c !!! Perhaps include this comment about ignore and ifset:@ignoreText enclosed by @code{@@ignore} or by failing @code{@@ifset} or@code{@@ifclear} conditions is ignored in the sense that it will notcontribute to the formatted output.  However, TeX and makeinfo muststill parse the ignored text, in order to understand when to@emph{stop} ignoring text from the source file; that means that youwill still get error messages if you have invalid Texinfo markupwithin 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@cindex Required in Texinfo file@cindex Texinfo file minimumBy convention, the names of Texinfo files end with one of theextensions @file{.texinfo}, @file{.texi}, or @file{.tex}.  The longerextension is preferred since it describes more clearly to a humanreader the nature of the file.  The shorter extensions are foroperating systems that cannot handle long file names.@refillIn order to be made into a printed manual and an Info file, a Texinfofile @strong{must} begin with lines like this:@refill@example@group\input texinfo@@setfilename @var{info-file-name}@@settitle @var{name-of-manual}@end group@end example@noindentThe contents of the file follow this beginning, and then you @strong{must} enda Texinfo file with a line like this:@refill@example@@bye@end example@findex input @r{(@TeX{} command)}@noindentThe @samp{\input texinfo} line tells @TeX{} to use the@file{texinfo.tex} file, which tells @TeX{} how to translate the Texinfo@@-commands into @TeX{} typesetting commands.  (Note the use of thebackslash, @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 atitle for the page headers (or footers) of the printed manual.@refillThe @code{@@bye} line at the end of the file on a line of its own tellsthe formatters that the file is ended and to stop formatting.@refillUsually, you will not use quite such a spare format, but will includemode setting and start-of-header and end-of-header lines at thebeginning of a Texinfo file, like this:@refill@example@group\input texinfo   @@c -*-texinfo-*-@@c %**start of header@@setfilename @var{info-file-name}@@settitle @var{name-of-manual}@@c %**end of header@end group@end example@noindentIn the first line, @samp{-*-texinfo-*-} causes Emacs to switch intoTexinfo mode when you edit the file.The @code{@@c} lines which surround the @samp{@@setfilename} and@samp{@@settitle} lines are optional, but you need them in order torun @TeX{} or Info on just part of the file.  (@xref{Start of Header},for more information.)@refillFurthermore, you will usually provide a Texinfo file with a titlepage, indices, and the like.  But the minimum, which can be usefulfor short documents, is just the three lines at the beginning and theone line at the end.@refill@node Six Parts, Short Sample, Minimum, Overview@comment  node-name,  next,  previous,  up@section Six Parts of a Texinfo FileGenerally, a Texinfo file contains more than the minimalbeginning and end---it usually contains six parts:@refill@table @r@item 1. HeaderThe @dfn{Header} names the file, tells @TeX{} which definitions' file touse, and performs other ``housekeeping'' tasks.@refill@item 2. Summary Description and CopyrightThe @dfn{Summary Description and Copyright} segment describes the documentand contains the copyright notice and copying permissions for the Infofile.  The segment must be enclosed between @code{@@ifinfo} and@code{@@end ifinfo} commands so that the formatters place it only in the Infofile.@refill@item 3. Title and CopyrightThe @dfn{Title and Copyright} segment contains the title and copyright pagesand copying permissions for the printed manual.  The segment must beenclosed between @code{@@titlepage} and @code{@@end titlepage} commands.The title and copyright page appear only in the printed @w{manual}.@refill@item 4. `Top' Node and Master MenuThe @dfn{Master Menu} contains a complete menu of all the nodes in the wholeInfo file.  It appears only in the Info file, in the `Top' node.@refill@item 5. BodyThe @dfn{Body} of the document may be structured like a traditional book or

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -