From 153d359b4e4ee950ac581187bb7aade61c9d6895 Mon Sep 17 00:00:00 2001 From: fukachan Date: Thu, 26 Apr 2001 08:57:46 +0000 Subject: add a few examples e.g. table, listitem --- fml/doc/ja/tutorial/docbook.sgml | 244 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 241 insertions(+), 3 deletions(-) (limited to 'fml/doc/ja/tutorial') diff --git a/fml/doc/ja/tutorial/docbook.sgml b/fml/doc/ja/tutorial/docbook.sgml index 9cafff31..5b91efba 100644 --- a/fml/doc/ja/tutorial/docbook.sgml +++ b/fml/doc/ja/tutorial/docbook.sgml @@ -1,5 +1,5 @@ @@ -24,14 +24,252 @@ SGML FreeBSD の初心者向けチュートリアル -などを参照して下さい。一覧は +などを参照して下さい。 +SGML のタグの一覧は DOCBOOK definitive guide (O'reilly) -のオンライン版を見ると良いでしょう。 +のオンライン版を参照すると良いでしょう。 + +また、本 Appendix で、2、3の典型的な SGML テンプレートをメモしておくので +それらを適当に切り剥ぎしていけばなんとかなるはずです。 + + + + + + + 本( book )形式のテンプレート + + +book スタイルの典型的な SGML のテンプレートは次のようになります。 + + + +<!doctype book public "-//OASIS//DTD DocBook V3.1//EN" [ + <!entity % include SYSTEM "include.sgml"> %include; +]> +<book id="相互参照のためのID"> + + &bookinfo; + &preface; + + <toc></toc> + + <part> + <title> タイトル </title> + <partintro> + <para> + 本パートは…目指しています。 + </para> + </partintro> + + <!-- 以下、各章が並ぶ --> + &overview; + </part> +</book> + + + +2 行目は include.sgml を include する命令です。 +C 言語の #include や +perl の require() と同様です。 + + + +そして、 include.sgml の中では次のような命令が定義されています。 + + +<!-- include する SGML ファイル群 --> +<!entity bookinfo SYSTEM "bookinfo.sgml"> +<!entity overview SYSTEM "overview.sgml"> + + +これらの定義により +&bookinfo; +命令で +bookinfo.sgml +が include するようになります。 + +このようにして、文書本体と +include するヘッダファイルもどきを +別々のファイルに分離することができます。 + + + + + + + + HTML の <UL> 相当 + + +<itemizedlist> + + <listitem> + <para> + アイテム1 + </para> + </listitem> + + <listitem> + <para> + アイテム2 + </para> + </listitem> + +</itemizedlist> + + + +例えば + + +<itemizedlist> + + <listitem> + <para> + けんけんはきたきつね + </para> + </listitem> + + <listitem> + <para> + るどるどはテディベア + </para> + </listitem> + +</itemizedlist> + + +は次のようになります。 + + + + けんけんはきたきつね + + + るどるどはテディベア + + + +数字付のアイテムは orderedlist です。 + + + + けんけんはきたきつね + + + るどるどはテディベア + + + + + + + + + + + HTML の <TABLE> 相当 + + +<para> + <table> + <title> テーブルのタイトル </title> + <tgroup cols=2> + + <thead> + <row> + <entry> キー </entry> + <entry> 値 </entry> + </row> + </thead> + + <tbody> + <row> + <entry> キー 1 </entry> + <entry> 値 1 </entry> + </row> + + <row> + <entry> キー 2 </entry> + <entry> 値 2 </entry> + </row> + </tbody> + + </tgroup> + </table> +</para> + + + +例えば + + +<para> + <table> + <title> table description </title> + <tgroup cols=2> + + <thead> + <row> + <entry> 名前 </entry> + <entry> 説明 </entry> + </row> + </thead> + + <tbody> + <row> + <entry> けんけん </entry> + <entry> きたきつね </entry> + </row> + + <row> + <entry> るど </entry> + <entry> テディベア </entry> + </row> + </tbody> + + </tgroup> + </table> +</para> + + +は次のようになります。 + + + テーブルの見本 + + + + + 名前 + 説明 + + + + + + けんけん + きたきつね + + + + るど + テディベア + + + + +
+
+ +
+
-- cgit v1.2.1