htmlsection の実行時にファイルを指定すると,それらのファイルを読み込んで 処理を行います.ファイルを指定しない場合には, (3)標準入力から読み込みます.
実行形式:
htmlsection [-options] [files ...]
> makemake を実行すると,(2)perlへのパスを検索し, htmlsection スクリプトの先頭に #!/usr/bin/perl のようにして埋め込みます. また,README ファイル[2]をコメントとしてスクリプトの先頭部分に 埋め込みます. さらに, (*3)マニュアルページ[3] を作成し, (*4)htmlsection.html[4]を htmlsection_orig.html[5]から作成します.
> cat htmlsection_orig.html | ./htmlsection > htmlsection.html
htmlsection-j.html と htmlsection-j_orig.html は,htmlsection による変換例の 日本語版です.htmlsection-j.html は,以下のようにして htmlsection-j_orig.html から作成されます(*5).
> cat htmlsection-j_orig.html | ./htmlsection -japanese > htmlsection-j.html
> su Password: # make installhtmlsection と (*3)マニュアルページ[3], ドキュメント類(*6)がインストールされます.
> su Password: # make uninstallhtmlsection と (*3)マニュアルページ[3], ドキュメント類(*6)がアンインストールされます.
> man htmlsection もしくは> nroff -man htmlsection.1
<section name="intro" number=no>はじめに</section> これは「はじめに」です. <section name="howto">htmlsection の使いかた</section> <subsection name="howtouse">htmlsection を使ってみよう!</subsection> htmlsection については, <sectionref name="howto"> や <subsectionref name="howtouse" title=no> を参照してください. <section number=no>おわりに</section>
さらに,以下を実行します.
> cat example.html | htmlsection -japanese -no-spacerhtmlsection の出力はリスト3.2のようになります.
<center>
<tablereference name="sample_table">表のサンプル</tablereference>
<table border=1>
<tr><td align=center>関数名</td><td align=center>機能</td></tr>
<tr><td>printf</td><td>フォーマットに従って,文字列を表示します.</td></tr>
</table>
</center>
<p>
<center>
<img src="picture/sample.jpg">
<br>
<figurereference name="sample_figure">図のサンプル</figurereference>
</center>
<p>
<pre>
<listreference name="sample_list">サンプルリスト</listreference>
int main()
{
int i;
for (i = 0; i < 10; i++)
printf("%d\n", i);
exit (0);
}
</pre>
<p>
<tableref name="sample_table"> を参照してください.
<figureref name="sample_figure"> を参照してください.
<listref name="sample_list"> を参照してください.
リスト3.4は htmlsection による変換後です.
<termref name="CLang">C</termref> はプログラミング言語です <ref name="KandR"><ref name="KandR2">. 私は普段は<termref name="CLang">C</termref>を 利用しています<noteref name="AboutMe">. また,<termref name="htmlsection">htmlsection</termref>は <termref name="PerlLang">perl</termref><ref name="LamaBook">で 書かれています<noteref name="htmlsection">. <termref name="PerlLang">Perl</termref>はスクリプト言語の一種です <ref name="LamaBook">. 私は<termref name="PerlLang">perl</termref>も よく利用しています<noteref name="AboutMe">. <notes> <note name="AboutMe">様々なプログラムを作成しています. <note name="htmlsection">htmlsection はすべて perl で記述されています. <note>他にも本文中に無い注釈を入れたい場合には,ここより下に記述します. <note>私は他にも Tcl/Tk, Java, C++, ... などなどを利用しています. </notes> <terms> <term name="CLang">プログラミング言語の一種. <term name="htmlsection">このプログラムです. <term name="PerlLang">プログラミング言語の一種. <term>他にも本文中に無い用語を入れたい場合には,ここより下に記述します. <term word="Tcl/Tk">プログラミング言語の一種. <term word="Java">プログラミング言語の一種. </terms> <references> <reference name="KandR">"プログラミング言語C", B.W.カーニハン著, D.M.リッチー著, 石田晴久訳, 共立出版. <reference name="KandR2">"プログラミング言語C 第2版 ANSI規格準拠", B.W.カーニハン著, D.M.リッチー著, 石田晴久訳, 共立出版, 1989. <reference name="LamaBook">"初めての Perl", ランダル・L.シュワルツ著, トム・フェニックス著, 近藤嘉雪訳, オライリー・ジャパン. <reference>他にも本文中に無い参考文献を入れたい場合には, ここより下に記述します. <reference name="CamelBook">"プログラミング Perl", ラリー・ウォール著, トム・クリスチャンセン著, ジョン・オーワント著, 近藤嘉雪訳, オライリー・ジャパン. <reference name="NumericalRecipe">"C言語による数値計算のレシピ", William H. Press著, Saul A. Teukolsky著, William T. Vetterling著, Brian P.Flannery著, 丹慶勝市訳, 佐藤俊郎訳, 奥村晴彦訳, 小林誠訳, 技術評論社, 1993. </references>
リスト3.6は htmlsection による変換後です.
リスト3.7は htmlsection による変換前です.
<section>プログラミング言語C</section> <termref name="Lang">C</termref> はプログラミング言語です <ref name="Book">.<noteref name="About"> <notes> <note name="About">プログラミング言語です. </notes> <terms> <term name="Lang">プログラミング言語の一種 </terms> <references> <reference name="Book">"プログラミング言語C", B.W.カーニハン著, D.M.リッチー著, 石田晴久訳, 共立出版. </references> <section>プログラミング言語 Perl</section> <termref name="Lang">Perl</termref> はプログラミング言語です <ref name="Book">.<noteref name="About"> <notes> <note name="About">プログラミング言語です. </notes> <terms> <term name="Lang">プログラミング言語の一種 </terms> <references> <reference name="Book">"初めての Perl", ランダル・L.シュワルツ著, トム・フェニックス著, 近藤嘉雪訳, オライリー・ジャパン. </references>
リスト3.8は htmlsection による変換後です.
メールアドレス: hsakai@m8.ffn.ne.jp
ウェブサイト:
http://web.ffn.ne.jp/~hsakai/myfreesoft/index.html
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
このプログラムはフリーソフトウエアであり,GNU General Public License (GPL) の
下で自由に改変し再配布できます.
ミラーサイト:
http://hp.vector.co.jp/authors/VA014157/myfreesoft/index.html
コピーライト
All Rights Reserved.
用語
参考文献
- Readme ファイル
- サンプルファイルと詳細な説明
- サンプルファイルと詳細な説明 (htmlsection による変換前)
表目次
リスト目次