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

📄 index.1

📁 HTML-XML-utils由一套小型C程序(过滤器)组成
💻 1
字号:
.de d \" begin display.sp.in +4.nf...de e \" end display.in -4.fi.sp...TH man 1 "11 Sep 2001".SH NAMEindex \- insert an index into an HTML document.SH SYNOPSIS.B index.RB "[\| " \-t " \|]".RB "[\| " \-x " \|]".RB "[\| " \-b.IR base " \|]".RB "[\| " \-i.IR indexdb " \|]".RB "[--]".RB "[\| " file\-or\-URL " \|]".SH DESCRIPTION.LPThe.B indexlooks for terms to be indexed in a document, collects them, turns theminto target anchors and creates a sorted index as an HTML list, whichis inserted at the place of a placeholder in the document. Theresulting document is written to standard output..LPThe index is inserted at the place of a comment of the form.d<!--index-->.eor between two comments of the form.d<!--begin-index-->...<!--end-index-->.eIn the latter case, all existing content between the two comments isremoved first..LPIndex terms are either elements of type \fI<dfn>\fP or elements with aclass attribute of \fI"index".\fP (For backward compatibility, alsoclass attributes \fI"index-inst"\fP and \fI"index-def"\fP arerecognized.) \fI<dfn>\fP elements (and class \fI"index-def"\fP) areconsidered more important than elements with class \fI"index"\fP andwill appear in bold in the generated index..LPBy default, the contents of the element are taken as the index term.Here are two examples of occurences of the index term "shoe":.d... A <dfn>shoe</dfn> is a piece of clothing that...... completed by a leather <span class="index">shoe</span>....e.LPIf the term to be indexed is not equal to the contents of the element,the \fItitle\fP attribute can be used to give the correct term:.d... <dfn title="shoe">Shoes</dfn> are pieces of clothing that...... with two leather <span class="index" title="shoe">shoes</span>....e.LPThe \fItitle\fP attribute must also be used when the index term is asubterm of another. Subterms appear indented in the index, under theirhead term. To define a subterm, use a \fItitle\fP attribute with anexclamation mark ("!") between the term and the subterm, like this:.d<dfn title="shoe!leather">...</dfn><dfn title="shoe!invention of">...</dfn><em class="index" title="shoe!protective!steel nosed">...</em>.eAs the last example above shows, there can be multiple levels ofsub-subterms..LPThe \fItitle\fP attribute also allows multiple index terms to beassiciated with a single occurrence. The multiple terms are separatedwith a vertical bar ("|"). Compare the following examples with theones above:.d<dfn title="shoe|boot">...</dfn><dfn title="shoe!invention of|inventions!shoe">...</dfn>.eThese two elements both insert two terms into the index. Note that thesecond example above combines subterms and multiple terms..LPIt is possible to run index on a file that already has an index. Theold target anchors and the old index will be removed before beingre-generated..SH OPTIONSThe following options are supported:.TP 10.B \-tBy default,.B indexadds an ID attribute to the element that contains the occurrence of aterm and also inserts an \fI<a>\fP element inside it with a \fIname\fPattribute equal to the ID. This is to allow old browsers that ignoreID attributes, such asNetscape 4, to find the target as well. The.B \-toption suppresses the \fI<a>\fP element..TP.B \-xThis option turns on XML syntax conventions: empty elements will endin \fI/>\fP instead of \fI>\fP as in HTML..B \-ximplies.B \-t..TP.BI \-i " indexdb".B indexcan read an initial index from a file and write the merged collectionof index terms back to that file. This allows an index to span severaldocuments. The.B \-ioption is used to give the name of the file that contains the index..TP.BI \-b " base"This option is useful in combination with.B \-ito give the base URL reference of the document. By default,.B indexwill store links to occurrences in the \fIindexdb\fP file in the form\fIfilename#anchor\fP, but when.B \-bis given, the links will look like \fIbase#anchor\fP instead..SH OPERANDSThe following operand is supported:.TP 10.I file\-or\-URLThe name of an HTML or XML file or the URL of one. If absent, or ifthe file is "-", standard input is read instead..SH "EXIT STATUS"The following exit values are returned:.TP 10.B 0Successful completion..TP.B >0An error occurred in the parsing the HTML file..SH "SEE ALSO".BR xml2asc (1),.BR UTF-8(RFC 2279),.BR normalize (1),.BR num (1),.BR toc (1),.BR htmlprune (1)..BR unent (1).BR asc2xml (1).SH BUGS.LPAssumes UTF-8 as input. Doesn't expand character entities. Insteadpipe the input through.BR unent (1)and.BR asc2xml (1)to convert it to UTF-8.

⌨️ 快捷键说明

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