Chinaunix首页 | 论坛 | 博客
  • 博客访问: 192033
  • 博文数量: 19
  • 博客积分: 1422
  • 博客等级: 上尉
  • 技术积分: 235
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-04 17:46
文章分类

全部博文(19)

文章存档

2011年(1)

2009年(2)

2008年(9)

2007年(7)

我的朋友

分类:

2007-11-12 18:59:03

Texinfo文件的六个部分:
 1.头
   它指定TeX要使用的宏定义文件
 2.摘要和版权
   描述版权通知和许可,通过命令@copying和@end copying指定
 3.标题和版权
   打印手册的标题和版权页,通过命令@titlepage和@end titlepage指定,注意这部分内容
   只会出现在打印手册中。
 4.顶节(Top Node)和主菜单
   顶节标志在线输出,它不会出现在打印手册中。强烈建议在上面的段和这
里都包含版权许多。
   并包含一个顶层菜单来列出章节,或者提供一个主菜单列出文档中所有节

 5.主体
   主体可以像一体传统的书结构,或者任何自由形式。
 6.结尾
   它包含打印索引和生成目录,最后以@bye结束。
 
一个简单的例子:
  第一部分:头
  头不会出现在info文件和打印输出中。它设置变量参数,包括info文件名
和头标题。

\input texinfo

@c -*-texinfo-*-

@c %**start of header

@setfilename sample.info

@settitle Sample Manual 1.0

@c %**end of header

第二部分:摘要描述和版权

@copying
This is a short example of a complete Texinfo file, version 1.0.
     
Copyright @copyright{} 2005 Free Software Foundation, Inc.
@end copying


第三部分:标题页,目录,版权
    标题页段不会出现在在线输出中,但会出现在打印手册中。使用命令@insertcopying来包含 上一节定义的版权内容。命令@contents生成目录。

@titlepage
@title Sample Title
     
@c The following two commands start the copyright page.
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage
     
@c Output the table of contents at the beginning.
@contents

第四部分:顶节(Top Node)和主菜单
    顶节包含info文件的主菜单。但打印手册不使用主菜单,而使用目录,
它排斥顶节。
 命令@top帮助makeinfo决定节之间的关联。

@ifnottex
@node Top
@top Short Sample
     
This is a short sample Texinfo file.
@end ifnottex
     
@menu
* First Chapter::    The first chapter is the
                     only chapter in this sample.
* Index::            Complete index.
@end menu

第五部分:文章主体
    主体段可以包含所有内容,但不包含索引和目录。下面例子有一个节和
含有一个列表的章。

@node First Chapter
@chapter First Chapter
     
@cindex chapter, first
     
This is the first chapter.
@cindex index entry, another
     
Here is a numbered list.
     
@enumerate
@item
This is the first item.
     
@item
This is the second item.
@end enumerate

第六部分:文档结尾
    它包含打印索引和生成目录,最后以@bye结束。

@node Index
@unnumbered Index
     
@printindex cp
     
@bye

示例结果:

  This is the first chapter.
 
  Here is a numbered list.
    1.This is the first item.
    2.This is the second item.
阅读(2079) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~