📄 00000007.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: <A HREF="mailto:long@eagle.ee.ntu.edu.tw">long@eagle.ee.ntu.edu.tw</A> (long), 看板: linux <BR>标 题: 如何用Linuxdoc-SGML撰写并维护Linux Howto(sgml) <BR>发信站: National Taiwan University (Sat May 18 00:46:54 1996) <BR>转信站: maple!news.ee.nthu!news.csie.nctu!netnews.ntu!long <BR> <BR> <BR><!doctype linuxdoc system> <BR><article> <BR><title> 如何用Linuxdoc-SGML撰写并维护Linux Howto <BR><author> 吴晓龙, <tt><htmlurl url="<A HREF="mailto:mailto:long@eagle.ee.ntu.edu.tw"">mailto:long@eagle.ee.ntu.edu.tw"</A> name="<A HREF="mailto:long@eagle.ee.ntu.edu.tw"></tt>">long@eagle.ee.ntu.edu.tw"></tt></A> <BR><date> v1.0, 17 July 1996 <BR><toc> <BR><sect>前言 <BR> <BR><p> <BR>最近在Linux版上大家开始讨论所谓Taiwan Linux User Group的 <BR>可能性与其发展方向,我想如果真能产生一些共识与成果, <BR>对於Linux 以至於U*ix的推广都是一个好的起头吧. <BR>起码每天看tw.bbs.comp.linux时可以少按几下K.......:-) <BR>现在大家好像还在讨论阶段,对於应该致力於软体中文化还 <BR>是Howto的翻译 都还众说纷云.不过我想不管是那个方向, <BR>文件的撰写与维护都是很重要的, 因为只有这样, 才能够 <BR>使每个人的effort不致於孤芳自赏, 也能使经验传承下来. <BR> <BR>由於有这个想法,我就花了一点时间看了一下howto中的Writing <BR>发现Linux的howto早就有了一致的政策与文件规格. <BR>本土文件的政策还有赖大家讨论,不过他们的文件规格倒是 <BR>很值得我们来套用.他们是用一种叫SGML(Standard Generalized <BR>Markup Language)来写HOWTO的,更精确地来说,他们是用这种语言 <BR>来定义HOWTO文件的结构,使得每个人都可以轻易地写出格式相同 <BR>的文件.如果有人看到这里一头雾水,还搞不清楚这是一种什麽 <BR>语言的话,没关系,我也搞不太懂这是什麽...:-) <BR>不过这就是他的优点了,搞不懂也可以照写不误, 大家可以边写边搞, <BR>搞搞写写.......我是说这个语言啦....:-) <BR>它最强大的地方是可以轻松地转换成一般文字档,LaTeX(ps,dvi), <BR>GNU Info, LyX(好像是一种WYSIWYG的LaTeX)与RTF(这我就不知道是 <BR>什麽了).也就是说,你可以专心於撰写维护一份sgml文件,而不须 <BR>将心力浪费在文件转换上. <BR> <BR>希望藉著这份文件能够减轻documentation的负担, <BR>而使得有更多的人开始将自己的经验与其它linuxer分享, <BR>然後不用每天看&dquot我也要,我也是,as title&dquot的文章 <BR>然後大家能够因此有更多的心力集中在coding上, <BR>然後....能够..世界大同,宇宙和平....:-) <BR> <BR><tt>本文的html版可在<A HREF="http://eagle.ee.ntu.edu.tw/$tilde;long/linux/simple-sgml.html存在</tt>">http://eagle.ee.ntu.edu.tw/$tilde;long/linux/simple-sgml.html存在</tt></A> <BR> <BR><sect> 安装 <BR><sect1> 安装之前 <BR><p>有几个package是必须的 <BR><itemize> <BR><item> 安装需要 <BR> <itemize> <BR> <item> <A HREF="ftp://nctuccca.edu.tw/Operating-Systems/Linux/pa">ftp://nctuccca.edu.tw/Operating-Systems/Linux/pa</A> <BR>ckages/Utils/text/linuxdoc-sgml-1.5.tar.gz <BR> <item> perl <BR> <item> flex <BR> <item> gcc <BR> </itemize> <BR><item> Format文件需要 <BR> <itemize> <BR> <item> groff 1.08 or 1.09 <BR> <item> TeX and LaTeX (包含CJK套件) <BR> <item> gawk 及 GNU info tools <BR> <item> (optional) LyX <BR> </itemize> <BR></itemize> <BR><sect1> 安装 <BR><p> <BR>只需run the install script,回答binaries,library,documentation,man pages <BR>安放之处 <BR><sect>为了与中文big5码相容之修改 <BR><p>假设 LINUXDOCBIN=/usr/local/bin; <BR>LINUXDOCLIB=/usr/local/lib/linuxdoc-sgml <BR> <BR><em>注意:由於本人对中文码不太熟悉, <BR>这些修改只是trial and error的结果, <BR>无法保证所有的中文big5 code都能顺利显示, <BR>而且修改的部份可能会造成转换後文件的特殊符号(如latex中的_,})无法显示</em> <BR><sect1> Script file 的修改 <BR><p> <BR>修改LINUXDOCBIN/sgml2txt <BR><p> <BR>第17行,将COL=``no''改为COL=``no'' <BR> <BR><p>第105行,将 <BR> latin1) cat &dollar;SGMLFILE | sed -f &dollar;LINUXDOCLIB/latin1.sed <BR> <BR> &dollar;LINUXDOCBIN/sgmls &dollar;DASHI &dollar;SGMLDECL > <BR> <BR> /tmp/sgml2txt&dollar;&dollar;tmp;; <BR> <BR> 改为latin1) &dollar;LINUXDOCBIN/sgmls &dollar;DASHI &dollar;SGMLDECL &d <BR>ollar;SGMLFILE > /tmp/sgml2txt&dollar;&dollar;tmp;; <BR><sect1> Configuration file(LINUXDOCLIB/rep/xxx/[general,mapping])的修改 <BR><p> <BR><itemize> <BR> <item>LINUXDOCLIB/rep/latin1/general:第134行`` ''改为``$tilde;'' <BR> <item>LINUXDOCLIB/rep/latex2e/general:第120行``\_''改为``_'', <BR>第169行``\}''改为``}'' <BR> <item>LINUXDOCLIB/rep/latex2e/mapping: <BR> <verb> <BR> 第7行将``\\usepackage\[latin1\]{inputenc}\n''替换成``\\usepackage{CJK}\n'' <BR> 第12行加入``\\begin{CJK*}{Bg5}{kai}'' <BR> 第15行加入``\\end{CJK*}'' <BR> </verb> <BR> <item>LINUXDOCLIB/rep/html/general:第128行将&amp;nbsp换成&tilde; <BR></itemize> <BR><sect>档案的转换 <BR><p> <BR><itemize> <BR><item>产生文字档 <verb> sgml2txt -l xxx.sgmL </verb> <BR><item>产生HTML文件 <verb> sgml2html xxx.sgml </verb> <BR><item>产生LaTeX文件 <verb> sgml2latex -2e xxx.sgml </verb> <BR></itemize> <BR><sect>Further Information <BR><p> <BR> <itemize> <BR> <item>The QWERTZ User's Guide is available from <BR> <tt><htmlurl url="<A HREF="ftp://ftp.cs.cornell.edu/pub/mdw/SGML"">ftp://ftp.cs.cornell.edu/pub/mdw/SGML"</A> <BR> name="<A HREF="ftp://ftp.cs.cornell.edu/pub/mdw/SGML"></tt>.">ftp://ftp.cs.cornell.edu/pub/mdw/SGML"></tt>.</A> <BR> QWERTZ (and hence, Linuxdoc-SGML) supports many features such as <BR> mathematical formulae, tables, figures, and so forth. I don't <BR> recommend using most of these features in the Linux HOWTOs because <BR> they won't render well in plain text. If you'd like to write general <BR> documentation in SGML, I suggest using the original QWERTZ DTD instead <BR> of the hacked-up Linuxdoc-SGML DTD, which I've modified for use <BR> particularly by the Linux HOWTOs and other such documentation. <BR> <BR> <item>Tom Gordon's original QWERTZ tools can be found at <BR> <tt><htmlurl url="<A HREF="ftp://ftp.gmd.de/GMD/sgml"">ftp://ftp.gmd.de/GMD/sgml"</A> <BR> name="<A HREF="ftp://ftp.gmd.de/GMD/sgml"></tt>.">ftp://ftp.gmd.de/GMD/sgml"></tt>.</A> <BR> <BR> <item>More information on SGML can be found at the following WWW <BR> pages: <BR> <enum> <BR> <item><tt><url url="<A HREF="http://www.w3.org/hypertext/WWW/MarkUp/SGML/"">http://www.w3.org/hypertext/WWW/MarkUp/SGML/"</A> <BR> name="SGML and the Web"></tt> <BR> <item><tt><url url="<A HREF="http://www.sil.org/sgml/sgml.html"">http://www.sil.org/sgml/sgml.html"</A> <BR> name="SGML Web Page"></tt> <BR> </enum> <BR> <BR> <item>James Clark's <tt/sgmls/ parser, and it's successor <tt/nsgmls/ <BR> and other tools can be found at <BR> <tt><htmlurl url="<A HREF="ftp://ftp.jclark.com"">ftp://ftp.jclark.com"</A> name="<A HREF="ftp://ftp.jclark.com">">ftp://ftp.jclark.com"></A> <BR> </tt> and at <tt><url url="<A HREF="http://www.jclark.com"">http://www.jclark.com"</A> <BR> name="James Clark's WWW Page"></tt>. <BR> <BR> <item>You can join the Linuxdoc-SGML mailing list by sending mail to <BR> <tt><htmlurl url="<A HREF="mailto:mailto:majordomo@via.ecp.fr"">mailto:majordomo@via.ecp.fr"</A> <BR> name="<A HREF="mailto:majordomo@via.ecp.fr"></tt>">majordomo@via.ecp.fr"></tt></A> with <tt/subscribe linuxdoc-sgml/ in <BR> the message body. The list address is <BR> <tt><htmlurl url="<A HREF="mailto:linuxdoc-mailto:sgml@via.ecp.fr"">linuxdoc-mailto:sgml@via.ecp.fr"</A> <BR> name="linuxdoc-<A HREF="mailto:sgml@via.ecp.fr"></tt>.">sgml@via.ecp.fr"></tt>.</A> <BR> <BR> <item>More information on <tt/LyX/ can be found at the <BR> <tt><url url="<A HREF="http://wsiserv.informatik.uni-tuebingen.de/~ettrich/"">http://wsiserv.informatik.uni-tuebingen.de/~ettrich/"</A> <BR> name="LyX WWW Page"></tt>. <tt/LyX/ is a high-level word processor <BR> frontend to LaTeX. Quasi-WYSIWYG interface, many LaTeX styles and <BR> layouts automatically generated. Speeds up learning LaTeX and makes <BR> complicated layouts easy and intuitive. <BR> <BR> </itemize> <BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -